Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Inbound IDOC processing.

0 Kudos

Hi Experts,

I got an requirement like creating the sales orders by using Inbound IDOC processing and calling the BAPI to update . Data will come through Application server

In IDOCs i am very poor . IF any knows the process kindly suggest me, Its very urgent assignment to me.

I look forward hearing from you.

Kind regards,

Indra neel P

7 REPLIES 7

Former Member
0 Kudos

Hi!

First of all, check out transaction WEDI it collets all useful transactions.

IDOCs:

- IDOC is an Intermediate Document'. It is simply a data container used to exchange information

between any two processes that can understand the syntax and semantics of the data.

An IDOC is created as a result of executing an Outbound ALE or EDI process.

In an inbound ALE or EDI process, an IDOC serves as input to create an application document.

-When an IDOC is created in the system , an unique number(16 Digits) is assigned to it.

This number is unique with in the client.

- IDOCs are independent of the sending and receiving systems.

- IDOCs are independent of the direction of data exchange.

- In the IDOCs, data is stored in text format.

- IDOC will wait until the Remote System is Active.

*IDOC Definition Components

-

-


- Basic Idoc Type: Basic Idoc type defines the structure and format of the business document

that is to be exchanged between two systems. Basic Idoc type can refer to an SAP provided

basic IDOC type or a customer developed basic IDOC type.

- A basic IDOC type has the following characteristics:

Name : A basic Idoc type can be assigned upto a thirty character name.

List of permitted segments: The segments make up the IDOC structure.

Hierarchy of segments : The hierarchy of segments specifies the physical sequence and

any parent - child relationship in the segments.

Mandatory Vs Optional Segments : When used in the IDOC type, each segment has

an attribute that defines whether the segment is option or mandatory.

Minimum/Maximum range for each segment: It defines the maximum and minimum

number of timesa data record corresponding to a segment cn exist in an IDOC.

- Segments : A segment defines the format and structure of a data record.

Segments are reusable componets. A segment consists of various fields that represent data

in data record.

  • IDOC Run time components:

-

-


- A unique IDOC number 16 digits is allocated.

- One control record is attached to the IDOC.

- Segments translate into data records.

- Status records are attached.

- Sytax rules are checked.

  • IDOC Record Types:

-

-


1. Control Record : The control record contains all of the control information about an IDOC,

this information basically includes the IDOC number, sender and receiver information,

and information such as the message type it represents and the IDOC type.

- there is only one control record per IDOC.

- The stucture of the control record is the same for all the IDOCs and is defined by SAP.

- The structure of the control record is defined by the data dictionary structure EDI_DC40.

- The control record is stored in the EDIDC table.

2. Data Record : Data records contain the application data. A data record has two sections

Administrative Section and a Data section.

- The Administrative section cotain the segment name, client, IDOC number, segment number,

hierarchy level information.

- The Data section of a data record is a stram of 1000 bytes where the actual data resides.

- The data record is defined by the data dictionary structure EDI_DD40.

- Data records for IDOCs stored in the EDID4 table.

3. Status Record : Status records are attaced to an IDOC throughout the process as

the IDOC achieves different milestones or encounters an error. At every milestone a statu code,

date and time are assigned.

- Status codes 01 to 49 are reserved for OUtbound process, 50 and above are reserved for

inbound processes.

  • Message Type: Identifies what type of information transformed between logical systems or partners.

Message type is not a local object type , it is transportable.

  • Port : A Port defines the medium in which data is exchanged between the two systems in

the ALE process, IDocs are transferred via memory.

1. TRFC ports are used for ALE communicaion.

2. File Ports used by EDI

3. CPI-C ports used to communicate with R/2 systems.

4. Internet ports used to connect with Internet Applications.

5. ABAP-PI ports used to process data via the ABAP programming interface.

6. XML ports used to process files in XML format.

  • Partner Profiles:

A partner profile has three views, which maintain different parameters for the partner.

1. The General Parameters View : Values are stored in table EDPP1.

2. The Outbound Parameters view : Values are stored in table EDP13, except for the

Message control parameter , which are stored in table EDP12.

3. The Inbound Parameters View: Values are stored in table EDP21.

  • Transaction Codes :

WE31- Segment Creation

WE30 - IDOC structure

WE81 - Message type creation

WE82 - Link between Message type and IDOC type.

WE21 - Creation of POrt

WE20 - Partner Profile creation

WE19 - Test tool for IDOC Processing.

SALE - ALE (Application Linking and Enabling) settings

Go through the link for basics related to IDOCs:

http://help.sap.com/saphelp_nw04/helpdata/en/0b/2a6cdd507d11d18ee90000e8366fc2/plain.htm

Check these links.

http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm

http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc

http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419

http://www.netweaverguru.com/EDI/HTML/IDocBook.htm

http://www.sapgenie.com/sapedi/index.htm

http://www.sappoint.com/abap/ale.pdf

http://www.sappoint.com/abap/ale2.pdf

http://www.sapgenie.com/sapedi/idoc_abap.htm

http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm

http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm

http://www.allsaplinks.com/idoc_sample.html

http://www.sappoint.com/abap.html

http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm

http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc

http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419

http://www.netweaverguru.com/EDI/HTML/IDocBook.htm

http://www.sapgenie.com/sapedi/index.htm

http://www.allsaplinks.com/idoc_sample.html

http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.docs

Please check this PDF documents for ALE and IDoc.

http://www.sappoint.com/abap/ale.pdf

http://www.sappoint.com/abap/ale2.pdf

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEIO/BCMIDALEIO.pdf

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEPRO/BCMIDALEPRO.pdf

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEQS/CABFAALEQS.pdf

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDISC/CAEDISCAP_STC.pdf

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDI/CAEDI.pdf

Check below link. It will give the step by step procedure for IDOC creation.

http://www.supinfo-projects.com/cn/2005/idocs_en/2/

Check these out..

Check below link. It will give the step by step procedure for IDOC creation.

http://www.supinfo-projects.com/cn/2005/idocs_en/2/

ALE/ IDOC

http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm

http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc

http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419

http://www.netweaverguru.com/EDI/HTML/IDocBook.htm

http://www.sapgenie.com/sapedi/index.htm

http://www.sappoint.com/abap/ale.pdf

http://www.sappoint.com/abap/ale2.pdf

http://www.sapgenie.com/sapedi/idoc_abap.htm

http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm

http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm

http://www.allsaplinks.com/idoc_sample.html

http://www.sappoint.com/abap.html

http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm

http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc

http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419

http://www.netweaverguru.com/EDI/HTML/IDocBook.htm

http://www.sapgenie.com/sapedi/index.htm

http://www.allsaplinks.com/idoc_sample.html

http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.docs

go trough these links.

http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm

http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc

http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419

http://www.netweaverguru.com/EDI/HTML/IDocBook.htm

http://www.sapgenie.com/sapedi/index.htm

http://www.sappoint.com/abap/ale.pdf

http://www.sappoint.com/abap/ale2.pdf

http://www.sapgenie.com/sapedi/idoc_abap.htm

http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm

http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm

http://www.allsaplinks.com/idoc_sample.html

http://www.sappoint.com/abap.html

http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm

http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc

http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419

http://www.netweaverguru.com/EDI/HTML/IDocBook.htm

http://www.sapgenie.com/sapedi/index.htm

http://www.allsaplinks.com/idoc_sample.html

http://http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm

Regards

Tamá

0 Kudos

Hi Thamus,

Thanks for your immediate response. Please give me the high level flow once i read the data from Application server how to use Inbound IDOC and finally i have to call the BAPI to create sales order ?

I know in this process no need to call IDOC also but my PM is saying to keep the error records call the inbound IDOC no need to use ALE configuration settings.

Kindly help me on this situation.

Kind regards,

Indra neel P

0 Kudos

Hi!

If you are reading the data from the application server, then you wanted create an IDoc and send it to yourself? It seems just a lot of additional and unneccessary work for me.

If logging is needed, set up a Z-table and log into this.

Regards

Tamá

0 Kudos

Hi Indra,

I think your PM want to keep track of the error records in easy way,

Here are the options

Process1:

1) Normally middleware technologies will create IDOCs and put them in folder in SAP application server.

2) SAP IDOC port layer will trigger and immediately create IDOC for the corresponding IDOC Type and you will see IDOC in WE02 transaction with status 64

3) This stage you need to configure your WE20 setting with that particular IDOC type settings, in inbound use profile as use BAPI and trigger immediately or Collect IDOCS, if you collect IDOCS you need to schedule another background program RBDAPP01 with this IDOC type, so that it will process your collected IDOCS explicitly.

Process2:

1) you need to read the file from Application server and create IDOC for that data.

2) when you create IDOC you need to put the status as 64 in your coding.

3) <i>as above</i>

If for some reason IDOC errored out you can track it by error code 51. you can edit these IDOCs and re-process easily. That's the concept.

Hope it helps you

Pavan

0 Kudos

Hi pavan,

Thanks for your use full answer. yes your right to track the error records he is asking me to use IDOC logic. Bez we are getting the sales orders from diffrent diffrent web sites and finally they put together into centralized location, We need to read the data from application server and create the IDOCS, by calling the BAPI we need to create the sales orders. If any errors will come we can resend to respective website owners via mail.

This is my first program using IDOCs.

This is the right approach to resolve my problem. If its possible could you please elaborate the 3rd step in detailed or if you have any test code similar to this situation kindly send the same.

Kind regards,

Indra neel P

0 Kudos

Here are the details about 3rd step:

goto WE20 t.code

Choose your partner type

and in Inbound parameters: add your message type and give the process code BAPI

and choose Process Imediately option

-Pavan

0 Kudos

Hi Pavan,

Thanks for your great help.

Kind regards,

Indra neel P