Application Development and Automation 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: 
Read only

Debugging inbound idoc user exit

Former Member
0 Likes
2,497

Hi all,

I have a client who wishes to do some data validation when creating an inbound idoc. We've identified the appropriate user exit and set a break-point in it, but how do I get the inbound process to stop here so I can see the data coming through, particularly since the process is initiated from a source external to R/3.

The file data is coming from a warehouse management system into XI, and then being passed from XI through to the function IDOC_INPUT_DELVRY.

Cheers,

Stephen

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,108

HI,

Trhough WE19 you can debug.But first you can put the break point in the user-exit which you want and you can select the idoc number of IDOC_INPUT_DELVRY on we19 then press enter in the next screen you can press the INBOUND FUNCITON MODULE on the application tool bar then you will get the popup box here you will the funciton module IDOC_INPUT_DELVRY then press enter you will stop at the user-exit.

Thanks and regards,

shyla

4 REPLIES 4
Read only

Former Member
0 Likes
1,109

HI,

Trhough WE19 you can debug.But first you can put the break point in the user-exit which you want and you can select the idoc number of IDOC_INPUT_DELVRY on we19 then press enter in the next screen you can press the INBOUND FUNCITON MODULE on the application tool bar then you will get the popup box here you will the funciton module IDOC_INPUT_DELVRY then press enter you will stop at the user-exit.

Thanks and regards,

shyla

Read only

Former Member
0 Likes
1,108

go thru the below information.

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

You need to excahnge data between systems you need an interface as medium for data transfer.

IDoc also treat one of the interface options for data transfer.

Check this link

http://www.thespot4sap.com/Articles/SAP_ALE_Other_Concepts_Conclusion.asp

IDOC Debugging:

1) We generally go for customized IDocs if none of the SAP standard IDoc does not suit our need/business process. Creating is custom IDoc should be a very stringent process. The SAP standard IDocs should be rigorously checked (if any user exits can be of our help or IDoc extension will solve the purpose).

2) WE19 is the test tool by which we can create IDocs to see whether our functionality is working. It is mostly used to debug inbound function modules.

For outbound function module debugging you can use the following:

1) RBDMIDOC - for master IDocs configured via change pointers.

2) RSNASTED - for transaction IDocs with output/message control.

3) RSEOUT00 - For IDoc whose status is "to be processed".

Read only

Former Member
0 Likes
1,108

Hi ,

basically it's very simple and not at all complicated as some people have mentioned here.

As mentioned by one person above.. use T. Code <b>WE19</b>.

Now, what need to be done is to find the partner profile that' being used for IDOC creation.

Goto T. Code <b>WE20</b> and find that. From there find the FM that's going to process the IDOC.

Now you can do two things.

In T. Code <b>WE19</b> you can choose to use the existing IDOC that you may have as a template or you can create and IDOC by giving the BASIC TYpe that's being used. The BASIC type thing is bit difficult if the data segments are many so I recommend using the existing IDOC as template.

Now process in with Debugging ON.

It will stop at the start of the FM.

From here it's normal debugging .

Happy debugging.

Hope this helps

Regards

Nishant

Read only

Former Member
0 Likes
1,108

Thank you all for your suggestions. These answers have resolved my questions.