on 2016 May 20 11:45 AM
Hi All,
How can I assign the freight unit to a freight booking , I tried the below code but it is going to the dump.
READ TABLE lt_root_fb INTO lwa_root_fb INDEX 1.
IF sy-subrc = 0.
REFRESH lt_key_root.
* Existing Freight Booking Key
ls_key_root-key = lwa_root_fb-root_key.
APPEND ls_key_root TO lt_key_root.
* Freight Unit Key that we are used to assign to the existing Freight Booking
ls_key_item-key = <lfs_tor_item>-fu_root_key.
APPEND ls_key_item TO lt_key_item.
ls_parameters-target_item_keys = lt_key_item.
* Adding string for test planning
ls_parameters-string = '001'.
GET REFERENCE OF ls_parameters INTO lr_s_parameters.
* Assign the Freight unit to Freight booking
CALL METHOD lo_srv_mgr->do_action
EXPORTING
iv_act_key = /scmtms/if_tor_c=>sc_action-root-add_fu_by_fuid
it_key = lt_key_root
is_parameters = lr_s_parameters
IMPORTING
* eo_change = lo_change
eo_message = lo_msg
et_failed_key = lt_failed_key
et_failed_action_key = lt_failed_act_key.
* Saving the Action
if lt_failed_key is INITIAL and
lt_failed_act_key is INITIAL.
lo_tra->save( IMPORTING eo_message = lo_msg ).
endif.
ENDIF.
Thanks,
Arun
Request clarification before answering.
Hi Arun,
please give us some more details: e.g. whicht kind of dump and where in the code.
Cheers Martin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Martin,
It is getting 'MESSAGE lx_frw_fatal TYPE 'X'.' error
Is there any issue with lr_s_parameters in the action method ?
like
ls_key_item-key = <lfs_tor_item>-fu_root_key.
APPEND ls_key_item TO lt_key_item.
ls_parameters-target_item_keys = lt_key_item.
ls_parameters-string = '001'.
GET REFERENCE OF ls_parameters INTO lr_s_parameters.
Thanks,
Venkat
| 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.