Skip to Content
Technical Articles
Author's profile photo Bernd Dittrich

WKS: How to access “TRQ” data in TM embedded in S/4

Order based Transportation requests (OTR) and delivery based transport requests (DTR) are required in standalone version of TM required to replicate Sales/Purchase/Stock Transfer Order /Delivery data into the TM instance.

When TM runs as part of S/4 (which is possible since S/4 1709) no OTR/DTR is required, we have direct access to the underlying objects and replicating them would be a waste.

However, you might want to access similar structures in conditions, e.g. for the freight unit building rule determination. Hmh, sounds a bit complicated. But basically it´s simple, just add the magic class /SCMTMS/CL_COND_TRQ_CT_EXTR  or better /SCMTMS/CL_COND_TRQTR_EXTR to your data access definition at the data is available.

A data access definition accessing the “TRQ” item product could e.g. look like this:

What´s the magic behind?

We are still mapping the different S/4 objects like Sales Orders etc. into one normalized format, which has the same structure like the TRQ, but this is done only during runtime, it is not stored on database. This data access class accesses the node data in this transient TRQ (we call it tTRQ internally) and provides it the way you are used to when accessing the normal TRQ. Full data crawler access is not possible, since there is no real BO instance.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Joseph Hou
      Joseph Hou

      Thanks Bernd!  Very helpful!

      Author's profile photo Thomas Pongratz
      Thomas Pongratz

      Thanks Bernd! Very helpful.

      I have another question: we have a z-field in the root-node  of the TTRQ and are able to fill it. The question is how I can transfer the field value from the TTRQ to the FU? is this done via Determination? If so, do you have any class / method that we could use?




      Author's profile photo Bernd Dittrich
      Bernd Dittrich
      Blog Post Author

      not 100% sure, but if the name is identical in tTRQ-root and FU-root, I think they are moved automattically

      Author's profile photo Wolfgang Dreher
      Wolfgang Dreher

      Hi Thomas

      How were you able to fill a z-field in the root-node? Is possible with the enhacement spot /SCMTMS/TRQ_SE_SPOT_TRQ?


      Thanks and regards.


      Author's profile photo kamal zniqa
      kamal zniqa

      Thanks Bernd, you saved my life in a project some months ago :-),  now I have a question, if we implement a standalone S4 TM  (so S4 Hana version but not embedded) do we still need OTR and DTR ? Thank you again for your help !

      Author's profile photo Bernd Dittrich
      Bernd Dittrich
      Blog Post Author

      yes, in this case OTR/DTR are so far used to represent the transportaiton requirement in the TM box.

      Author's profile photo Sanjit Kumar
      Sanjit Kumar

      Thanks Bernd. Just one question for Inbound Processing Receiving Point data is not getting read. All the values maintained as per screenshot above but FUBR is getting skipped. Any suggestion.

      Author's profile photo Mohit Gupta
      Mohit Gupta

      Hi Bernd,

      We are working on HANA 2020 Embedded TM, hence don't have OTR/DTR.

      We would like to fetch some custom Partner Functions from Delivery Document and populate it in resulting Freight Unit.

      Can a Data Access definition with the determination class mentioned by you help us achieve our goal? Since there is no Partner determination in Freight Units, nor any condition definitions available, I am struggling to figure out how to achieve this.




      Author's profile photo Prashant Suryawanshi
      Prashant Suryawanshi

      Hi Mohit,

      Did you find any solution for the PF copy to FU?

      I am exploring at the BADI BADI_LO_TM_SHP for the same requirement.