on 08-22-2019 11:52 PM
I am using service class for the creation of TU and using method
ADD_TU_DOOR of service class /SCWM/CL_SR_BO_TU , but I am not getting my code right.Its not saving in database.
Does any body know the sequence of steps for same?
I figured it out, it was tricky but once known then piece of cake for other operations on TU:
Below is snippet for same;
DATA:
LT_BO_TU TYPE /SCWM/TT_BO_TUNIT,
LO_SR_BOM TYPE REF TO /SCWM/CL_SR_BOM.
Logic:
LOOP AT LT_BO_TU ASSIGNING FIELD-SYMBOL(<LFS_BO_TU>).
<LFS_BO_TU>-BO_REF->GET_DATA(IMPORTING ES_BO_TU_DATA = ES_DETAILS ).
*getting internal tu num.
LST_TU_DOOR-TU_NUM = ES_DETAILS-TU_NUM.
LST_TU_DOOR-START_PLAN_TSTFR = ES_DETAILS-START_PLAN_TSTFR.
LST_TU_DOOR-START_PLAN_TSTTO = ES_DETAILS-START_PLAN_TSTTO.
LST_TU_DOOR-END_PLAN_TSTFR = ES_DETAILS-END_PLAN_TSTFR.
LST_TU_DOOR-END_PLAN_TSTTO = ES_DETAILS-END_PLAN_TSTTO.
*&-- assign door to tu
GET TIME STAMP FIELD DATA(L_TIME).
LST_TU_DOOR-END_PLAN_TSTFR = L_TIME.
LST_TU_DOOR-END_PLAN_TSTTO = L_TIME + L_DIFF.
<LFS_BO_TU>-BO_REF->ADD_TU_DOOR (
EXPORTING
IS_BO_TU_DOOR = LST_TU_DOOR
IMPORTING
EO_BO_DOOR = LO_BO_DOOR ).
LO_SR_BOM->SAVE().
COMMIT WORK AND WAIT.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.