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.
Thanks Bernd! Very helpful!
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?
not 100% sure, but if the name is identical in tTRQ-root and FU-root, I think they are moved automattically
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.
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 !
yes, in this case OTR/DTR are so far used to represent the transportaiton requirement in the TM box.
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.
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.
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.