on 2016 Jan 01 11:00 AM
Hi ,
In BOPF using OPTIMIZE action in /SCMTMS/TOR object I have to create the Freight Order using multiple Freight Units having the same stages but FO is not created and not populating any errors.
In this FU's are not planned , Here is the sample code I wrote to create the FO
lo_srv_mgr TYPE REF TO /bobf/if_tra_service_manager, " Containing the public service methods of a service manager
&---------------------------------------------------------------------*
* Get an instance of a service manager for FO
*&---------------------------------------------------------------------*
lo_srv_mgr = /bobf/cl_tra_serv_mgr_factory=>get_service_manager( /scmtms/if_tor_c=>sc_bo_key ).
CALL METHOD
lo_srv_mgr->do_action
EXPORTING
iv_act_key = /scmtms/if_tor_c=>sc_action-root-optimize
it_key = lt_key_fu
* is_parameters =
IMPORTING
eo_change = lo_change
eo_message = lo_msg
et_failed_key = lt_failed_key
et_failed_action_key = lt_failed_act_key
.
IF lo_msg IS BOUND .
/scmtms/cl_common_helper=>msg_convert_bopf_2_bapiret2(
EXPORTING
io_message = lo_msg
CHANGING
ct_bapiret2 = lt_bapiret2 ).
endif.
*&---------------------------------------------------------*
* Save the changes on the Freight Order/Freight bookings..
*&---------------------------------------------------------*
lo_tra->save( IMPORTING eo_message = lo_msg ).
IF lo_msg IS BOUND .
/scmtms/cl_common_helper=>msg_convert_bopf_2_bapiret2(
EXPORTING
io_message = lo_msg
CHANGING
ct_bapiret2 = lt_bapiret2 ).
endif.
Please suggest an alternative if it doesn't work this way.
Thanks
Arun
Request clarification before answering.
Hello Arun,
as BOPF is the technical foundation TM is build with, your question related to TM specific functionality might be better solved in the community of TM (http://scn.sap.com/community/scm/transportation-management).
Best regards Tilmann
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 6 | |
| 5 | |
| 3 | |
| 2 | |
| 2 | |
| 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.