Show TOC

Background documentationTransportationOrderSCMExecutionRequest_to_SHPMNTSHPMNT05 Locate this document in the navigation structure

 

You can use this message mapping to map the message type TransportationOrderSCMExecutionRequest in SAP TM to the IDoc SHPMNT.SHPMNT05 in SAP ERP.

Note the following:

  • For each line in the root structure of the message that provides the input for the mapping, the system creates a line in the root structure of the message that is created as a result of the mapping.

  • The freight order ID (field ID of TransportatonOrderExecution) is mapped to field TKNUM in the resulting root structure E1EDT20; that is, the freight order ID in SAP TM is used as the ID of the shipment created in SAP ERP.

    To enable the freight order ID to be used as the shipment ID, you have to configure the use of external number ranges for the relevant shipment types.

  • The content of the fields E1EDT20-SHTYP (header level, shipment type) and E1ADRM4[2]-E1ADRE4-EXTEND_D (address, transportation planning point) are defined dynamically at runtime using value mapping. This means that during system configuration, mapping tables that depend on the actual system landscape are defined in the Integration Directory of the PI system.

The following user-defined functions are used in this message mapping:

  • convXSDduration

    This function converts the duration in XSD format into the duration format expected in the ERP shipment. It contains the following parameters:

    • Inbound parameter: Duration in XSD format

    • Outbound parameter: Duration in the simple format expected by the ERP shipment

  • GetLastTen

    This function reformats freight order IDs and delivery IDs to 10 digits, if necessary by padding the ID with leading zeros (for example, ID 1489 is reformatted to 0000001489). It contains the following parameters:

    • Inbound parameter: String (that is, the ID of the freight order or delivery)

    • Oubound parameter: String consisting of 10 digits

  • deriveStageDel

    This function derives the ID of the delivery that is assigned to a transportation stage. It contains the following parameters:

    • Inbound parameter: Item ID; ID of the delivery to which the item is assigned; ID of the assignment of a transportation stage to the item

    • Oubound parameter: ID of the delivery that is assigned to the transportation stage

  • remDupDlv

    This function removes duplicates in a list of deliveries. It contains the following parameters:

    • Inbound parameter: List of delivery IDs in transportation order items

    • Outbound parameter: Input list in which duplicates (deliveries with the same delivery ID) have been removed; that is, each delivery ID occurs once in the list