on ‎2018 Nov 29 1:50 PM
Hi Experts
I am new to EWM, i need to automate process below,
1) Enter Transaction /SCWM/TU.
2) on the transaction screen i need to click on create button and create TU. enter means of transport, TU no, carrier, Material and continue to create
Im not able to find any FM/BAPI for this purpose. kindly help
Request clarification before answering.
Hi Rajesh,
Unfortunately I'm not allowed to disclose the full code, but I hope this helps:
ls_new_tu_head-tu_num_ext = lv_tu_num_ext. "This is assuming you know the external TU identification.
ls_new_tu_head-start_plan_tstfr = lv_timestamp_fr.
ls_new_tu_head-start_plan_tstto = lv_timestamp_fr.
ls_new_tu_head-end_plan_tstfr = lv_timestamp_to.
ls_new_tu_head-end_plan_tstto = lv_timestamp_to.
ls_new_tu_head-pmat = lv_pmat_tu. "You need a packaging material for the TU
ls_new_tu_head-yard = lv_lgnum.
"ls_new_tu_head-act_dir = wmesr_sr_act_dir_outb. "This is commented, so I guess it's not needed and the direction will be determined by the first assigned deliveryr (inbound or outbound)
ls_new_tu_head-mtr = lv_mtr_tu.
TRY.
lo_tu_cntrl = /scwm/cl_sr_bom=>get_instance( ).
lo_tu_cntrl->create_new_bo_tu( EXPORTING is_bo_tu_new = ls_new_tu_head
IMPORTING eo_bo_tu = eo_bo_tu ).
IF eo_bo_tu IS BOUND.
es_tu_act_num = eo_bo_tu->get_num( ).
ENDIF.
lo_tu_cntrl->save( ).
COMMIT WORK AND WAIT.
"Log something in case of success
CATCH /scwm/cx_sr_error INTO lo_tu_exception.
ROLLBACK WORK.
"Log something in case of error
ENDTRY.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Kunal Kulkarni are you able to change the status of TU
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
juliolopez1945 , I have trying to change the status of an already created TU, which works from the standard transaction /SCWM/TU but when i try to replicate the same in the my custom report using class /scwm/cl_sr_bo_tu method check_in_out, I am getting an update error for "Assert Failed"
Can you please help me out here since standard debugging is pretty much inconclusive in this case.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rajesh Kannan RS,
Did you try to use same number, sending shipment number (vt01n) to TU number?
If you set ıdoc, shipment number will be created TU automatically. I think it' s simple way.
Could you check document "How To Configure LE-TRA Integration"?
Best regards.
Atılay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rajesh,
Check class /SCWM/CL_SR_BOM, method CREATE_NEW_BO_TU.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 12 | |
| 7 | |
| 4 | |
| 3 | |
| 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.