Let’s say you are receiving EDI ANSI X12 850 Sales Orders from you customers that need to be uploaded into your SAP System using the ORDERS05 IDOC. Most customers will have their own internal customer numbers that they send in their EDI transmissions to represent the Sold-To and Ship-To partners.
How do you convert these external customer numbers into your internal SAP customer numbers?
Some may hard code these conversions into their EDI maps. This approach can be very high maintenance as customers can add new ship-to locations or reorganize their internal numbers which would require changes to your maps.
Others may set up a cross reference table within their EDI translation table to perform the conversion. This works well at times, but then you are at the mercy of your EDI group to update the table with any new additions or changes to existing entries.
I find the best way to perform this conversion is within your SAP system. Mainly because SAP has given you a standard utility to perform the conversion. All you need to do is populate a few fields of the incoming IDOC and populate the EDPAR table using transaction VOE4 with the internal and external customer numbers. The Function Module used to process the IDOC takes care of the rest. SAP uses the Sender Partner Number of the IDOC Control record along with the PARVW and LIFNR elements from the E1EDKA1 segment to look up the correct entry in the EDPAR table. In your EDI maps you would populate the PARVW element with the partner function code for the external customer number (AG = Sold-To, WE = Ship-To) and populate the LIFNR field with the external customer number received in the EDI file from that partner. All other fields would remain blank in the E1EDKA1 segment.
Sender Information Partner Number from the Control Record:
E1EDKA1 Segment for the Sold-To Partner (AG):
E1EDKA1 Segment for the Ship-To Partner (WE):
Use transaction VOE4 to populate the EDPAR table. You enter the value from the Sender Partner Number in the IDOC control record in the Customer field, the function code for the partner in the Ext. Function field. Note: The Ext. Function field will not be the same as the Partner Function (PARVW) element of the IDOC. (AG in IDOC = SP on VOE4, WE = SH). The External Partner is the number received in the EDI data from the customer which is also the number in the LIFNR element of the IDOC. Int. no is the SAP customer number associated with the External number.
VOE4 transaction with required entries for the Sold-To and Ship-To for IDOC information above:
Using the EDPAR table for customer conversion allows this function to remain in control of those responsible for customer accounts. Users can be trained to use the VOE4 transaction to update the EDPAR table so when new ship-to or sold-to numbers need to be added they can be done in a timely matter and not rely on other departments. It also takes this responsibility away from the EDI group so they don’t have to maintain maps or tables for this function.
This function can be used for other incoming IDOCs as well. You will need to check the Function Modules used to process incoming IDOCs to determine if EDPAR can be used for customer number conversion and on which IDOC segment you would send the external number.
Outbound IDOCs can use either the EDPAR table or the PUMA table to cross reference external customer numbers. Again, it depends on the IDOC type. I will cover this topic in a separate blog.