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

Assigning Freight unit to a Freight Booking

Former Member
0 Kudos
565

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

Accepted Solutions (0)

Answers (1)

Answers (1)

cyclingfisch_
SAP Mentor
SAP Mentor
0 Kudos

Hi Arun,

please give us some more details: e.g. whicht kind of dump and where in the code.

Cheers Martin

Former Member
0 Kudos

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

cyclingfisch_
SAP Mentor
SAP Mentor
0 Kudos

Hi,

if you set a break-point in exception the contructor of class /bobf/cx_frw and have a look to the call stack and the content of the message table which was handed over to the exception the chances are high to find the reason for the dump.

Cheers,

Martin