You are on page 1of 2

lt_process_log = VALUE #(

FOR <lfs_proc_log> IN lt_operprocessinfo


(
mandt = sy-mandt
orderid = if_po
plantid = ls_bapi_head-production_plant
operationindex = <lfs_proc_log>-operationindex
processcode = <lfs_proc_log>-processcode
uname = sy-uname
edate = sy-datum
etime = sy-uzeit
)
).

IF lv_spres IS NOT INITIAL.


lt_operprocessinfo = VALUE #( BASE lt_operprocessinfo (
operationindex = ls_operation-
operation_number
processcode = lv_spres
)
).
Endif.

ls_orders = VALUE #(
orderid = if_po
internalspecid = ls_bapi_head-material
customername = ls_cust_customer-name1
customerid = ls_cust_customer-kunnr
customerpo = lv_vbeln1
customeritemid = ls_cust_ord_pos-kdmat
duedate = COND #( WHEN ls_cust_ord_head-
vdatu IS NOT INITIAL THEN |{ ls_cust_ord_head-vdatu DATE = ISO }| &&
'T00:00:00'(020) ELSE space )
blanksrequired = ls_bapi_head-target_quantity *
( ls_afvv-umrez / ls_afvv-umren )
blankstocorr = ls_bapi_head-target_quantity *
( ls_afvv-umrez / ls_afvv-umren )
corrugateddate = COND #( WHEN ls_bapi_head-
start_date IS NOT INITIAL THEN |{ ls_bapi_head-start_date DATE = ISO }| &&
'T00:00:00'(020) ELSE space )
earlystartdate = space
).

COND #(
WHEN sy-timlo < t THEN
|{ sy-timlo TIME = ISO } AM|
WHEN sy-timlo > t AND sy-timlo < '240000' THEN
|{ CONV t( sy-timlo - 12 * 3600 ) TIME = ISO } PM|
WHEN sy-timlo = t THEN
|High Noon|
ELSE
THROW cx_cant_be( ) ) ).

DATA(lv_stat) = SWITCH #( lv_action


WHEN lc_aors THEN lc_disp
WHEN lc_cors THEN lc_orch
ELSE space ).

move_type = COND #(
WHEN lv_code = lc_u THEN
move_type = lc_343.
WHEN lv_code = lc_r THEN
move_type = lc_344.
Else space ).

"Get the previous status of the role


TRY.
DATA(lv_old_role_status) = t_old_notif_roles[ request_number = <lfs_role>-
request_number
role_number = <lfs_role>-
role_number
]-role_status.
CATCH cx_sy_itab_line_not_found.
CLEAR lv_old_role_status.
ENDTRY.

"Format Request-Role number


DATA(lv_req_role_no) = |{ is_request-request_number }/{ <lfs_role>-
role_number }|.

You might also like