cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to assign FUs to FO while creating a new Freight Order through proxy?

aba212
Participant
0 Kudos
3,023

Hello Experts,

I really need some one help who is expertise on SAP TM technical with BOPF.

I have a requirement, there is a SOAP API which receives the FO data with FUs into S4. As there is no standard functionality to assign FUs to FO, the items are directly assigning to the FO.

I need to assign these freight units to freight order when proxy trigger.

I'm able to assign FUs to FO in change mode but NOT in creation mode. By using a BADI I and action call I achieved the FU assignment.

Can any one help me how I can achieve the assignment of FUs to FO when it is creating newly.

Proxy: TransportationOrderGenericRequest_In

BADI: /SCMTMS/TOR_SE_TOR_GN_REQ

method: CHANGE_MODIFICATION

Regards,

veeranjaneyuluvalluri

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Just call the action ADD_FU_BY_FUID by passing the key value as Freight order key and parameers with freight unit data.

TRY.
CALL METHOD lo_srv_mgr->do_action
EXPORTING
iv_act_key = /scmtms/if_tor_c=>sc_action-root-add_fu_by_fuid
it_key = VALUE #( ( key = ls_tor_root-key ) )
is_parameters = NEW /scmtms/s_tor_a_add_elements( string = lv_fu_str )
IMPORTING
eo_message = lo_msg
et_failed_key = DATA(lt_fail).
CATCH /bobf/cx_frw_contrct_violation.
ENDTRY.

lourdesga_
Explorer
0 Kudos

Hi! Did you solve it?

karthikeyan3991
Participant
0 Kudos

Hello,

You can use TOR Save Strategy in FU or FO or both. While saving the TOR object, you custom code will be called to link freight unit(s) with Freight Order.

Hope it helps!!

Regards,

Karthik

aba212
Participant
0 Kudos

Hi karthikeyan3991,

Thanks for your reply !

Here actually the issue with assigning FUs to FO. If this is done the save/commit will trigger to commit the changes. But the issue is while creating the FO, how I can add the FUs to FO from the BADI mentioned above.

Could you please help me in this and if you have the code for it and if you can share it that would be helpful to me.

Regards,

veeranjaneyuluvalluri