cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in Flowing Z field Value from DTR to Freight Unit

Former Member
0 Kudos

Dear All,

I am facing issue in flowing Z field value from DTR line Item to OTR. I have appended the TRQ Object and added a Z field in it. Also I have updated value in this field by using BADI /SCMTMS/TRQ_SE_REQREQ while creation of DTR.

Now I want to update the value of this Z Field in Freight Unit. For this I have appended the TOR Object and Added the Z field in It.

Now please suggest how to update the Z field value in Freight Unit by copying the value from DTR line Item? Please suggest if i need to do use some BADI for the same?

Regards,

Vibhu Gupta

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

If you want the Z field also in FU item, then you should maintain the same field name in TOR item node and then, the same field value will be automatically flowing from TRQ item to TOR item.

Hope this helps.

BR, Dawson

bharath_k6
Active Participant
0 Kudos

Dear Vibhu,

In which structure you have appended this Z field?

The structure in which you have appended this Z field via append structure, it might be assigned to some node of TOR business object. So find out of the determination class & relevant method of that node and enhance it for passing the Z field.

May be you can use below sample code for updating the Z field.

DATA:   ls_mod                    TYPE /bobf/s_frw_modification,

              lt_mod                    TYPE /bobf/t_frw_modification,

              lt_changed_fields   TYPE /bobf/t_frw_name,

              ls_changed_field    LIKE LINE OF lt_changed_fields,

            ls_mod-change_mode        = /bobf/if_frw_c=>sc_modify_update.
            ls_mod-node               = /SCMTMS/IF_C_TOR=>sc_node-root.
            ls_mod-key                = key. "Node key for which you want to update

           ls_changed_field = 'Z FIELD'.

           ls_changed_field-Zfield          = value.

          APPEND ls_changed_field TO lt_changed_fields.

          ls_mod-changed_fields     = lt_changed_fields.
          APPEND ls_mod TO lt_mod.

  IF lt_mod IS NOT INITIAL.

    lo_srvmgr_jco->modify(
       EXPORTING
         it_modification = lt_mod
       IMPORTING
         eo_change       = lo_change
         eo_message      = lo_message ).

  ENDIF.

If you are not able to proceed,
Please let me know what are the steps you had performed, so that I should be able to guide you.

Best Regards,

Bharath K.

Former Member
0 Kudos

Dear Bharat,

We had added a Z field in our ECC Delivery. We wanted to flow it to TM, So for that we used the Proxy

"http://sap.com/xi/TMS/Global->IntracompanyTransportationRequestRequest_In" .In this we implemented the BADI "/SCMTMS/TRQ_SE_REQREQ" to Map our Z field to TRQ Item BO.

We want to Flow the same field to TOR now. But when the Proxy is executed the DTR and FU gets automatically Created. I want to know any BADI or Class that is called in background where DTR Item is mapped to FU or when FU is created.

Regards,

Vibhu Gupta

bharath_k6
Active Participant
0 Kudos

Dear Vibhu,

There are various classes and Methods which are used to deal with ITEM node. To handle each part of the ITEM related data, there are set of classes. So it is very difficult to give you exact class until we have clear understanding what ITEM related data you are trying to update in FU.

However, you can try with below classes.

Classes - /SCMTMS/CL_TOR_D_ITEM_AC and /SCMTMS/CL_TOR_D_ITEM_TR_AM

Make sure you see your Z field coming in the importing parameter structure of this method. If so enhance the class to pass the value. To get your Z Field value from TRQ, you can use retrieve by association.

Thanks,

Bharath.K

rohan_hardikar
Explorer
0 Kudos

Hi Bharath,

Can you help me with BADI /SCMTMS/TRQ_SE_REQREQ.

My requirement is to create a Z field in table /SCMTMS/D_TRQROT and update this field with a value when a new Transport Request Root is created. I have created an append tsructure in this table as well as the structure /SCMTMS/S_TRQ_ROOT_K which is used in the BADI.

I am also passing this new field in Change fields parameter in the BADI. But it is still not updated in table.

Can you please help me understand if this new field needs to be maintained anywhere or I am missing anything?

Thanks & Regards,

Rohan Hardikar.