Techskills

September 19, 2008

Learn SAP — IDOC Configuration

Filed under: Learn SAP, SAP, SAP CCS, SAP CRM — Tags: , , — kumar @ 8:29 pm

If you want to know the IDOC basic (create , execute and select the list) then Click Here.

In this post let us see how to configure a new IDOC message type in the SAP system.

The Main SAP Transaction for IDOC processing is WEDI. AS soon as you go there you will see all the t-code associated with the IDOC will appear. This contains all the IDOC t-codes  from creating to processing to configuration.

Here we are going to look in to a business case and see how we can configure the IDOC and how to process the IDOC.  We have a Text file coming from a 3rd party with customer first name, last name and Age.

We need to create a new message type and store this information as idoc. Once we received this IDOC we need to process the data and load this data to a table(real life we call a SAP BAPI or sap function module normally BP create).

The text file format is as follows

First name char(20), last name char(20) and age number (3).

All of the following things are transportable. Save the transports. You can move the same config and the data from one system to another using this transport.

Create and/or Configure New IDOC segments:

T-Code is WE31.

Create a new Segment type ZTEST_CUST. See the following screen shot. 

Click create and see the following  screen shot. Now the Segment is created we are ready to create Idoc types and Message type.

Create and/or Configure New IDOC types:

T-Code is WE31.

Create a new IDOC type ZTEST_IDOC_TYPE.

Click create that will take you to the next screen. see the screen shot.

Click on the create segment. A pop-up will display. See the following screen shot. Select the created segment type and click continue.

Now click save and save the IDOC type. Now we have a IDOC structure that can have the first,last name and the age.Now let us go to the message type.

Create and/or Configure New Message types:

T-Code is WE81.

Go to the screen click on edit/change and add new entries and add a new message type ZTEST_MES_TYPE. See the following screen shot.

Now the new message type is created.

Configure the New Message type and the New IDOC Type:

 T-Code is WE82.

Now connect the Message type and the IDOC type. Go to the screen click on edit/change and add new entries and add the ZTEST_MES_TYPE ,ZTEST_IDOC_TYPE and version  as 46C or any SAP valid Version. Save the data and store the transport. See  the following screen shot.

Now Assign a function module to this new message type.

Create and/or Configure New Message types / Application Object :

T-Code is WE57.

Add the new function module to this message type so that when ever we get a new IDOC data then the SAP will call this function module where we need to put the code in for what ever process we need to do.(usually decode the idoc and validate the data and post the data in the system).

Go in to this transaction and go to change mode and add new entries. See the following screen shots.

In the new entry screen add the function module that you want to execute for this IDOC data. See the following screen shot.

Now setup the Inbound processing code. It is in WE42. Go to BD51 and add your function module.

go to WE42 and add your input processing code. See the following screen shot.

Now go to the Partner function and add this IDOC. So that for the same data type we can control what function we need to do if that comes from different partners.

 

Create and/or Configure Partner Profile:

T-Code is WE20.

Go to this transaction and setup this Message type to the partner that are sending the data to the SAP system. Our message is inbound so add this to the inbound parameters. See the following screen shot.

Hope this helps.  Let me know if you have any questions.

4 Comments »

  1. This document is helpful

    thanks
    gajanan

    Comment by Gajanan — December 7, 2009 @ 1:17 am

  2. Very good .Helps a lot

    Comment by Srinivas — December 18, 2009 @ 4:11 am

  3. Thanks a lot to share with us your knowlage.
    I’m new in SAP, so this kind of docs help me a lot.

    Comment by isabel — February 5, 2010 @ 11:51 am

  4. It is very good, good work and thanks for helping people

    Comment by karun — April 27, 2010 @ 5:52 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress