Techskills


September 19, 2008

Learn SAP — IDOC basic

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

In this post let us see about IDOC.

What is a IDOC?

    IDOC is a Intermediate DOCument[IDOC] that is used in SAP. The best way to import data from Any system to SAP is thru IDOC. Once the data is in the IDOC format SAP can read the information and store the data in that as IDOC which it stores in the database and will be available for processing and posting the data in the SAP system.

Each IDOC has a message type by which we can group a particular type of data by a message type and message code. We can make the IDOC process immediately by the Message type and Message code.

Let us see some basic function of how to look in to a IDOC and how the IDOC data looks and how to process the idoc.

View the existing IDOC:

use WE05 or WE02 to get the list of IDOC. In this example let us select all the message type ORDERS. Look the following Screen shot for the IDOC selection List.

Click execute the next screen will show all the IDOC for Orders in the system. I removed the date in the selection else it will select only for current day. (I created 4 order IDOCS). See the following screen shot.

Double click on the IDOC number that will take you to that single IDOC where you can see the segments of the IDOC. See the following screen shot.

Each IDOC has a segment and each segment has fields and values. SAP stores all the value information in the sdata format and when every we use this tool that will map the data and show it to us in the readable format.

Now we have the data you need to have a function module to process this IDOC. That function module can do any thing from validation this data to post the data in to the SAP system. In this example this is a Purchase order. We need to execute this idoc and post this purchase order in the system. Let us see how to execute this IDOC.

You can execute this IDOC as soon as you created by batch process or Manually using WE19 or take a existing IDOC and USE DB87 to process the idoc. Remember if you use WE19 and view a existing IDOC and process that IDOC SAP will create a NEW IDOC with the same data and process the new idoc only not the one you want to do. For processing a existing IDOC use BD87.


Create a new and Process immediately using WE19:

Click on create (F8) that will take you to the following screen. Where you need to enter all the necessary data in the segment fields.

Click on the right hand side a pop-up will show with the fields and the values (as blank) will appear. See the screen shot as follows.

Enter all the necessary values for the Order processing or the values that is minimum needed for the order processing. Once the data is entered we can process directly from here. When you process directly from here that will create the IDOC and process the data or you can just store the data.

When you click on standard Inbound or the standard outbound then the system will consider as a inbound data or outbound data and store the idoc data. If you want to process the idoc then click on the inbound function module and select the function module that you want this idoc to execute that will create the idoc and execute the function module and show you the status as success or error.

see the following screen shot.

 

Select the function module and click execute that will give you error or process successfully.

Process IDOC using BD87:

In bd87 you can take a existing IDOC and process. See the following screen shot. You no need to select the function module to execute. SAP will get that information from the configuration.

See the following screen shots.

select the idoc and click process that will take care of the processing.

This is how you can view or create or process a idoc. I will write about IDOC configuration in another post.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress