Pricing Conditions on the Purchase Order sent to Ariba Network
One of the requirements that comes up from time to time while implementing Ariba Network or Commerce Automation is the inclusion of additional pricing details onto the Purchase Order.
Some customers when sending a Purchase Order to their suppliers would like to include pricing conditions related to:
- freight / shipping cost
- surcharges such as administrative fee or custom related fees
- pre-negotiated discounts
Example from SAP:
SAP Purchase Order
While implementing this, following considerations needs to be done:
- The SAP PO item could have more than one type condition: Freight 1, surcharge 1, surcharge 2, etc (e.g. ZB00,RB00, etc) --> Supported by this solution
- Purchase orders could have many items with many different conditions (freights and surcharges) by item --> Supported by this solution
- The same type of condition could appear on the same PO item (e.g. FR00 could appear twice under the same PO item) --> Not supported by this solution
- Customer cannot duplicate conditions in the same PO item, otherwise both values would be concatenated in the same line on XML. For example, if the same PO line has 2 conditions “Freight 1”, this information would be concatenated on the XML into the same source <Modification> element for “Freight 1”.
- The solution presented here shows the mapping of price conditions related to surcharges (see screenshot above – conditions ZB00 and FRB1, for example). In order to add type conditions of discounts (see screenshot above – condition RB00, for example) , the customer must use the PO XML segment <AdditionalDeduction> instead of <AdditionalCost> as presented in the following solution.
Purchase Order XML
Solution
Price conditions are not part of the SAP PO IDOC. The ARBCIG_ORDERS IDOC has a standard segment for conditions, the E1EDP05 (item) in which is not populate by CIG Add-on as out of the box solution. In order to have this information in E1EDP05, customer needs to customize it picking the PO condition information and adding it to this IDOC segment:
Next step after having values appearing in the PO IDOC is to map it in CIG mapping tool:
Assuming that:
- PO item is represented by IDOC element E1EDP01
- Conditions are represented by PO IDOC element E1EDP05
- Each PO item could have 0 or 1+ conditions
- Xml element <Modifications> refers to Allowances and surcharges
- Xml element <Modifications> contains 1 or more element <Modification>.
- The xml element in which matches with the IDOC element E1EDP05 is the element <Modification>.
The corresponding values from IDOC and cXML (Ariba Purchase Order) can be outlining in the following manner:
IDOC to cXML
Going one step further, PO IDOC Element <E1EDP05> under element <E1EDP01> has to be mapped to XML <Modification> element under <Modifications> element
Step 1
Righ-click on <Modifications> and Create/Replace node à A green line on the right side of the node will appears. This step is required in order to activate the node to be displayed on the XML.
Step 2
Pick the fields of <E1EDP05> to be mapped to xml element <Modifcation>. For this requirement I had 4 IDOC elements to be mapped (KSCHL, KOTXT, BETRG, KOEIN) and 7 different conditions.
The element <KSCHL> shows the condition type in which will be used as value of “Add Source of condition”
a. Mapping <KSCHL> to <ModificationDetail name="YFR0">
- For field <KSCHL>, please run steps of section a.1.
Section a.1
p.s. Steps on section a.1 must be executed for all the 4 fields KSCHL, KOTXT, BETRG, KOEIN.
- Create loop over xml element <ItemOut> to IDOC item element <E1EDP01>
- Right-click on the target field @name > Click on xml node ItemOut
- Righ-click on the mapped line > Add source condition > Click on <E1EDP01>
- Adding source of condition to use field (PO pricing condition type) to differentiated each IDOC pricing condition received per PO item
- Right-click on the mapped line > Add source Condition > Click on KSCHL > type in the type condition to be used
After you finish the Steps a.1 and place the mouse over the mapped line the following information should shows up:
----- END of Section a.1 -----
b. Mapping <KOTXT> to <Description xml:lang="en-US"> Manual Freight </Description>
- Right-click on field @xml:lang > Add Constant Value > Type “en-US” and click “OK”à Blue line will appears on the right side of the field
<Description xml:lang="en-US"> Manual Freight </Description>
- Run steps of section a.1 for field <KOTXT>
c. Mapping <BETRG> to Money. <AdditionalCost> <Money>
- Run steps of section a.1 for field <BETRG>
d. Mapping <KOEIN> to @currency
<AdditionalCost> <Money alternateCurrency="" alternateAmount="" currency="USD">
- Run steps of section a.1 for field <KOEIN>
Step 3
So far, we have mapped the pricing condition to the condition type YFR0 only. In order to have different condition types mapped, the xml element <Modification> has to be duplicated until we have 7 <Modification> elements (for this case I need to map 7 different condition types).
- Right-click on <Modification> node > Click on Duplicate Node à A new node <Modification #2> will be added to xml structure.
Step 4
Repeat the
STEP 2 all over again, now considering the remaining condition types to be mapped. That is, remember to use the specific condition type to be mapped instead of the condition YFR0 shown above (<ModificationDetail name="YFR0">).
Conclusion
Ariba Network does accept pricing conditions as out of the box solution, but CIG AddOn and CIG doesn't. So, in order to send pricing conditions to AN, customers need to customize it on their end with 2 different actions: populating the segment E1EDP05 in ARBCIG_ORDERS IDOC with the PO pricing conditions and creating a CIG mapping to map this segment to the cXML PO document which will be read by Ariba Network.