on ‎2025 Nov 12 2:39 PM
Hello SAP Community,
I am working on an ABAP development requirement within SAP Transportation Management (TM) and need to programmatically unassign a Freight Unit (FU) from a Freight Order (FO).
In an other development method DO_ACTION of class /bobf/if_tra_service_manager was used to assign to freight unit to freight order with the following code:
DATA: lo_srv_mgr TYPE REF TO /bobf/if_tra_service_manager.
*-- Initialize service manager for TOR
lo_srv_mgr = /bobf/cl_tra_serv_mgr_factory=>get_service_manager( /scmtms/if_tor_c=>sc_bo_key ).
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 = <la_un>-db_key_odn ) ) "GUID FREIGHT ORDER
* it_key = lt_n_fo_key
is_parameters = NEW /scmtms/s_tor_a_add_elements( string = lv_fu_str ) " FREIGHT UNI
* is_parameters = lr_s_parameters
IMPORTING
eo_message = lo_message
et_failed_key = DATA(lt_fail).
CATCH /bobf/cx_frw_contrct_violation.
ENDTRY.
Now I was thinking about doing something similar, but I can't find the right action key among costants in /scmtms/if_tor_c=>sc_action .
Any suggestions?
Thanks in advance
Request clarification before answering.
Hi @e_maino ,
Addition to @Dominik_Tylczynski , Please add the parameters too and let us know if you face any issues. Example code screen shot, its standard way working of delete button.
Kind Regards,
Ajit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @e_maino
I think the /scmtms/if_tor_c=>sc_action-item_tr-delete_cargo_item action will do the job.
Best regards
Dominik Tylczynski
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 14 | |
| 9 | |
| 8 | |
| 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.