When creating IDOCs in SAP to send Invoices to customers via EDI you will likely have to send the customers their internal partner numbers on the EDI ANSI X12 810 Invoice Document. In almost all cases this will not be the same as the SAP partner numbers. So how can we set up a cross reference of SAP and external partner numbers? Well, the answer is simple because SAP has set up a utility to handle this for you. All you need to do is populate the EDPAR table in SAP using the VOE4 transaction. Once this is completed the IDOC_OUTPUT_INVOIC function module will read the EDPAR table when the Invoice document output is processed and populate the LIFNR element of the E1EDKA1 or E1EDPA1 segments of the INVOIC IDOC with the external partner number. Entries in EDPAR can be set up for multiple partners including the Sold-to, Ship-to, and Bill-To numbers so that external customer number cross-references can be passed on the IDOC if needed.
Let’s look at how this process works. Let’s say we have created an invoice document in SAP. In this case, the Sold-to, Ship-to, and Bill-to partners are all SAP customer number 15. If we want to create an INVOIC02 IDOC on which the external customer numbers are populated for all three of these partners we would have to set up three EDPAR entries as displayed on the below screen shot. The Customer field will contain the SAP partner number (Sold-to, Ship-to, Bill-to). The Ext. Function field will contain the Partner Function (SP = Sold-to, SH = Ship-to, BP = Bill-to). The External Partner field will contain the external partner number that the customer is expecting on the EDI file. And the Int. no. field will contain the SAP partner number (Same as the Customer field).


