Text Determination insights for propagation from ERP documents
Enhancing the text determination explanations by Dragos here, I wanted to share some insights on top of that focusing on texts coming from ERP documents.
In my example I will define a text Type TM_D1 which takes over the Delivery Note Text from a Purchase Order
So this text should end up in the FU root:
Lets start with some basics.
Defining the class based external access
The basis for all those propagations is the what is called “External Source” in the Text Schema. For the standard cases, the ERP SD/MM-entry with class /SCMTMS/CL_TEXT_ACCESS_ERP is key:
The interesting part is, that you can also assign parameters to such an external source, but the definition is optional. However, this specific access is using the parameter USE_ORIG_BTD. This parameter defines for delivery based documents, if the texts should be copied from the delivery (no parameter required) or from e.g. the Sales Order (USE_ORIG_BTD is filled, we come to that later).
Mapping ERP Texts to TM Texts
First we have to map the ERP Texts to the TM counterparts. This needs to be done in separately for Order based and delivery based documents(shown for internal integration, similar path exists for side-by-side scenarios)
Transportation Management -> Integration -> Logistics Integration -> Internal TM Component Integration -> Assign SD/MM Text Types to TM Text Types for SO/PO
Transportation Management -> Integration -> Logistics Integration -> Internal TM Component Integration -> Assign Logistics Execution Text Types to TM Text Types for Deliveries
Here it becomes a bit tricky, since there is no F4-help for the ERP text type (yet). So we have to identify the ERP Text type we maintained in the PO. This is a bit hidden. For POs, it is defined in
Materials Management -> Purchasing -> Messages -> Texts for Messages -> Define Texts for Purchase Order
So, the Text ID we are looking for is F05.
The respective path for SD is Sales and Distribution -> Basic Functions -> Text Control -> Set Up Text Determination
So, we have the required data for the mapping entry which is must look like this:
Now, we are so close!
Define the Text Schema
The Text Schema (defined in Cross-Application Components -> Processes and Tools for Enterprise Applications -> Reusable Objects and Functions for BOPF Environment -> Dependent Object Text Collection -> Maintain Text Schema) is next:
Now we can have a little side quest talking about the USE_ORIG_BTD-parameter available for the ERP text determination:
What it basically does is reading the order based texts, event when the document is already delivery based. This e.g. makes sense in cases where the text is not copied from the sales order to the delivery, but should be used in the Freight Unit. It seems to work only for already delivery based documents, so when set, the access is not executed for order based documents, but this might be a false observation or may be adapted in the future.
One note: For Our example the parameter must not be set, otherwise the text will not be available in the FU as long as the freight unit is order based.
Now we define a Access Sequence with only one access, the one we have defined before:
And, finally, we define our text schema:
And in there, assign the text type:
Two little remarks here:
- You should make sure that the settings regarding language dependencies are in sync throughout the definitions, there is also a similar setting in the access profile, all of them should be either for all languages or for one language / language independent.
- The “Reference” Flag indicates, that the data is always read from the source, e.g. the PO. This makes sure, the latests data is read when showing/printing the texts. Otherwise the original text is kept.
Last step is the assignment of the text schema to the document type, in our example the FU type (TA code /SCMTMS/C_FU):
And, here we go: