Tuesday, 9 February 2010

Idoc Data Conversion. E.g. ( Partner Profile for Vendor etc. )

Converting External Customer Number To Internal Customer Number – SAP EDPAR Table

Have you ever had a project where you are converting a customer file into an SAP Sales Document IDOC (ex: ORDERS05) and the customer file contains their Internal Customer Number?  So you need to determine what the SAP Customer Number will be on the IDOC.  If you are not familiar with the SAP interface process you may hardcode the SAP Customer Number or create external tables in your third party mapping software to accomplish this conversion process.  However, this involves customer specific logic or updating the tables with your SAP Customer Numbers and having a process to maintain this table as new SAP Customer Numbers are created.  There is a much easier way to perform this conversion with no additional coding as it is a standard SAP utility.

Customer Conversion For IDOCS ORDERS05 and DELFOR02

This utility is available in the standard SAP package to convert External Customer Numbers to SAP Customer numbers (Sold-To, Ship-To, etc.) when processing inbound IDOCs (ex: ORDERS05, DELFOR02) from non-SAP systems.  When working with data that will be imported into SAP via IDOC format the data usually  contain your customers external sold-to and ship-to numbers and not the associated SAP customer numbers.    Therefore, you would need to convert this External Customer Number to  your internal SAP Customer Number.  Instead of creating cross-reference tables or conversion routines in your third-party translation software you can populate the E1EDKA1-LIFNR field of the inbound IDOC with the External Customer Number and use transaction VOE4 to populate the EDPAR table.  By properly doing this, the standard SAP function module will use the EDPAR table values to convert the External Customer Number to the SAP Customer number.  The following instructions will explain how to populate the inbound IDOC and the EDPAR table.

Configuration Of IDOC Segment E1EDKA1

On the inbound IDOC, the only fields you will need to populate on the E1EDKA1 segment is the PARVW(Partner Function) field and the LIFNR(Vendor Number at Customer Location) field.  In most cases you will have an E1EDKA1 segment for the Sold-To party and another E1EDKA1 segment for the Ship-To party.  For the Sold-To party you would enter ‘AG’ in the PARVW field and the External Sold-To Number in the LIFNR field.

clip_image001

For the Ship-To party you would enter ‘WE’ in the PARVW field and the External Ship-To Number in the LIFNR field.

clip_image002

Populating SAP EDPAR Table Via Transaction VOE4

Prior to processing an inbound IDOC you would use transaction VOE4 to populate the EDPAR table.  The SAP Sold-To number will always be entered in the Customer number field.  The Ext Function field will be populated depending on the External number.  If you are converting the Sold-To number you would enter ‘SP’ in the Ext Function field.  If you are converting the Ship-To number you would enter ‘SH’ in the Ext Function field.  The External Sold-To/Ship-To number would be entered in the External partner field.    Finally, you would enter the SAP Sold-To number or Ship-To number in the Int no. field.  This value will be used as the Sold-To/Ship-To on the SAP Sales Document once the IDOC is processed.

clip_image003

So if you ever need to convert External Customer Number to SAP Customer Numbers take advantage of the utilities that SAP supplies.  You can even incorporate the EDPAR table entry updates  into the SD Business Configuration processes so when a new customer number is created and it is designated as an EDI Customer, the personnel creating the new customer can also update the EDPAR table entries.

1 comment:

  1. Thanks for the detailed information. I works like a charm.

    ReplyDelete