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

Idoc Testing! Need help!

Former Member
0 Likes
2,091

Hi!

(Please give answers specific to my question & pls read below)

i want to test idoc outbound as well as inbound.

First Consider inbound,

I ve read previous posted threads it was mentioned goto>we19> give idoc no

I want to know <b>what is idoc no how we get idoc no for the idoc.

</b>

Then i know the steps...

Now Outbound,

How to test outbound idoc -- i want to know how my posting program has correctly generated idoc to ale layer.

I want this in complete detail.

Thanks!

Rahul.

9 REPLIES 9
Read only

Former Member
0 Likes
1,353

i think we get idoc number from the table EDIDC

Read only

Former Member
0 Likes
1,353

Hi Rahul,

<b>idoc structure</b>

http://www.sapbrainsonline.com/ARTICLES/TECHNICAL/idoc/SAP_IDOC_structure_introduction.html

<b>What is Idoc?</b>

<b>I give overview of IDoc terminology and how IDocs work in an enterprise will clarify the process</b>

SAP’s presence in the IT world is justified by a central premise: It turns a company’s many individual systems into one, big supersystem. More than a linking together of applications, SAP’s implementation causes a redirection of the flow of information through a company and its partner companies that enhances the potential of its business functions.

This flow of information is enabled by a core element in SAP technology: the Intermediate Document, or IDoc. Technically, the IDoc is an example of Electronic Data Interchange (EDI). Unlike conventional EDI, IDocs are not based on a descriptive language.

The IDoc concept borrows the best features of EDI and combines them with the best features of conventional transaction file formats. The result is a lean data transport mechanism that is the engine of SAP data flow, tying together applications, databases, companies, and networks. Here is a look at the makeup of IDocs within the application architecture.

Form and content: IDoc terminology

As is often the case with proprietary technologies, SAP assigns specific, object-oriented meanings to familiar terms. When referring to IDocs, the term document refers to a set of data comprising a functional group of records with a business identity. (For example, all the data in a purchase order, or all the profile information of a supplier in a supplier master record.)

A message refers to the contents of a specific implementation of an IDoc; it’s a logical reference. This differs from a reference to the IDoc itself, which specifies the message’s physical representation. Think of it this way: If you’re watching a parade pass by, the mayor waving to the crowd from his limousine is the message, and the mayor’s limousine (which is specific to the mayor) is the IDoc. You’re building a logical object, and the IDoc is both its container and the vehicle that moves it.

The IDoc control record

Each IDoc has a single control record, always the first record in the set. The structure of this record describes the content of the data records that will follow and provides administrative information, such as the IDoc’s functional category (Message Type/IDoc Type), as well as its origin (Sender) and destination (Receiver) as in conventional EDI (see Figure A).

Figure A

IDOC number Sender Receiver Port Message type IDoc type

1234567890 R3NYC R3LA FILE INVOICES INVOICE01

This “cover slip” format informs the receiving system of the IDoc’s purpose, and the receiving system uses it to determine the correct processing algorithm for handling the arriving IDoc.

Data records

The data records following the control record are structured alike, including two sections: a segment information section and a data section.

In the first part of a data record, the segment information section describes the structure of the data that follows, for the benefit of the IDoc processor. There is a segment name (like an EDI segment identifier) that corresponds to a data dictionary structure to which the IDoc processor has access. The remaining information is useful for foreign systems, such as a partner company’s Oracle system, which has no such data dictionary.

The second part of the record is the data itself, a storage area of 1,000 characters.

Status records

If you’ve ever ordered a package from a faraway location and tracked its progress using the Internet-based tracking utilities now provided by most major parcel carriers, you’re familiar with the list of stops and transfer points through which a package passes on its way to you.

This collection of records is exactly what you’ll see in an IDoc that has begun its work. Following the data records in an IDoc, status records accumulate as an IDoc makes its way from one point in a process to another.

Typically, an IDoc will acquire several of these records as its does its job. They are simple records, consisting of a status code (there are more than 70 codes, covering a broad range of conditions and errors), a date/time stamp, and some additional status information fields for system audit purposes. In addition, as errors occur in the processing of an IDoc, status records (see Figure B) are used to record these errors and the date/time of their occurrence.

Figure B

(Display Status Record)

IDoc number 0000000000123456

Direction 1 Outbound

Status information

38 IDoc archived

(additional descriptive text)

Log time

Date 6-30-02

Time 14:35:21

Portion of IDoc status display

IDoc Base

IDocs, as data formatting tools, enable the easy sharing of data between databases and applications within a company as well as being an efficient data courier between companies. Typically in SAP, a database of IDoc definitions exists, to which any application may have access.

This “IDoc Base” gives all the applications and processes in your company domain the capacity to send, receive, and process a document in a contextually appropriate way, without doing anything to the data. For example, a purchase order IDoc can filter through every process it touches, passing from system to system, accumulating status records to track its progress.

Every department using the data can use it appropriately without any cumbersome intermediate processes, because each department draws its key to interpreting the IDoc from the same source.

Multiple messages

One cumbersome feature of conventional EDI is the embedding of more than one functional record type in a document. The unwieldy X-12 888 Item Maintenance transaction set is an example: It purports to handle so many different configurations of product master data that it is horrifically difficult to integrate into an existing system.

IDocs, on the other hand, handle multiple messages with ease. Given the centralized IDoc interpretation that SAP provides to all its parts, it’s no problem to define an IDoc that will contain more than one message, that is, more than one data record type.

A customer master IDoc, for example, may contain customer profile information records for a customer with many locations. But it may also contain location-specific pricing information records for that customer in the same document. This is an incredibly efficient way of bundling related records, particularly when passing large amounts of complex information from system to system (see Figure C).

Figure C

CONTROL RECORD

DATA RECORD - CUST PROFILE LOC #1

DATA RECORD - CUST PROFILE LOC #2

DATA RECORD - CUST PROFILE LOC #3

DATA RECORD - CUST DISCOUNT STRUCTURE LOC #1

DATA RECORD - CUST DISCOUNT STRUCTURE LOC #2

DATA RECORD - CUST DISCOUNT STRUCTURE LOC #3

STATUS RECORD

STATUS RECORD

STATUS RECORD

Records in a multiple-message IDoc

Final thought

There is no mastering SAP without mastering its workhorse, the IDoc. ERP environments utilizing SAP and similar platforms are made necessary in the first place by the increasing demands of ever more integrated business relationships. IDoc technology addresses this trend with a simple but powerful design philosophy: Data is no longer something to be stored; it’s something to be moved.

<b>And</b>

These links give u complete details abt idocs testing

Test Tool

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

Status Monitor for ALE Messages

http://help.sap.com/saphelp_nw04/helpdata/en/d4/0d67e4d85511d2a6080060087832f8/content.htm

Regards ,

Kumar.

Read only

0 Likes
1,353

Hi!

Giving specific answer is more usefull to me.

Thanks

Read only

Former Member
0 Likes
1,353

see these links

http://searchsap.techtarget.com/generic/0,295582,sid21_gci1130339,00.html

http://help.sap.com/saphelp_46c/helpdata/en/dc/6b80f643d711d1893e0000e8323c4f/content.htm

<b>http://help.sap.com/saphelp_nw04/helpdata/en/dc/6b80e943d711d1893e0000e8323c4f/content.htm</b>

Status Description

00 Not used, only R/2

01 IDoc generated

02 Error passing data to port

03 Data passed to port OK

04 Error within control information of EDI subsystem

05 Error during translation

06 Translation OK

07 Error during syntax check

08 Syntax check OK

09 Error during interchange handling

10 Interchange handling OK

11 Error during dispatch

12 Dispatch OK

13 Retransmission OK

14 Interchange Acknowledgement positive

15 Interchange Acknowledgement negative

16 Functional Acknowledgement positive

17 Functional Acknowledgement negative

18 Triggering EDI subsystem OK

19 Data transfer for test OK

20 Error triggering EDI subsystem

21 Error passing data for test

22 Dispatch OK, acknowledgement still due

23 Error during retransmission

24 Control information of EDI subsystem OK

25 Processing despite syntax error (outbound)

26 Error during syntax check of IDoc (outbound)

27 Error in dispatch level (ALE service)

28 Not used

29 Error in ALE service

30 IDoc ready for dispatch (ALE service)

31 Error - no further processing

32 IDoc was edited

33 Original of an IDoc which was edited

34 Error in control record of IDoc

35 IDoc reloaded from archive

36 Electronic signature not performed (timeout)

37 IDoc added incorrectly

38 IDoc archived

39 IDoc is in the target system (ALE service)

40 Application document not created in target system

41 Application document created in target system

42 IDoc was created by test transaction

50 IDoc added

51 Application document not posted

52 Application document not fully posted

53 Application document posted

54 Error during formal application check

55 Formal application check OK

56 IDoc with errors added

57 Test IDoc: Error during application check

58 IDoc copy from R/2 connection

59 Not used

60 Error during syntax check of IDoc (inbound)

61 Processing despite syntax error (inbound)

62 IDoc passed to application

63 Error passing IDoc to application

64 IDoc ready to be transferred to application

65 Error in ALE service

66 IDoc is waiting for predecessor IDoc (serialization)

67 Not used

68 Error - no further processing

69 IDoc was edited

70 Original of an IDoc which was edited

71 IDoc reloaded from archive

72 Not used, only R/2

73 IDoc archived

74 IDoc was created by test transaction

regards,

srinivas

Read only

Former Member
0 Likes
1,353

Testing inbound idoc :

Once you configured everything then goto WE19 Transaction :

Give message type or idoc type and execute .

now here you need to fill the Mandatory data in each segment,once you done then

idoc->edit control record -> here you need to fill sender and receiver details.

now you should get green color ,if you get red color then config issue.

now click on start inbound -> now you will get idoc number.

if you want to debug then click on inbound function module -> enter FM -> select call in debug mode and enter.

now cursor will go debug mode

http://www.photographybykevin.net/sap/idoc_overview.pdf

Testing Outbound idoc :

Once you done all configuration ..

Let me say example like invoice ,you need to send invoice from SAP R/3 to other system.

create invoice at VF01 -> Here customer should configure in Parter profile ,once you create invoice ,it creates the idoc.

debugging Outbound IDOC :

keep the break point in form routine above as i said

Create invoice or invoice list

when you maintain output type in invoice or invoice list -

Now click on Further data ->select peridoc scheduling-> back and save it.

Run RSNAST00 Program

Output application : V3

Object key : Invoice or invoice list number

Output type : RD00 or LR00

Medium = 6(EDI) ,A (ALE)

when you execute the program and it will goto debugging.

See the below status codes :

See table TEDS1 for all status codes via SE16 in SAP. Outbound ALE Status Codes

Successful Transmission:

03 - Successful outbound transmission

12 - Dispatch OK

IDoc being processed:

01 - IDoc created

30 - IDoc ready for dispatch (ALE service) (Program RSEOUT00 needs to be executed)

ALE Error Messages:

02 - Error passing data to port

04 - Error within control information on EDI subsystem

05 - Error during translation

25 - Processing despite syntax errors (outbound)

29 - Error in ALE service

32 - Resubmit edited intermediate document (DO NOT USE)

Syntax Error Messages:

26 - Error during syntax check of IDoc (outbound) Inbound ALE Status Codes

IDoc Processed Successfully:

50 - IDoc added

53 - Successful posting

IDoc ready for processing:

64 - IDoc ready to be passed to application. The IDoc will be passed to the application by program RBDAPP01.

Errors in IDoc Processing:

51 - Error - application document not posted

56 - IDoc with errors added (You should never see this error code)

60 - Error during syntax check of IDoc (inbound)

61 - Processing despite syntax error (inbound)

63 - Error passing IDoc to application

65 - Error in ALE service - indicates partner profiles are incorrect

69 - IDoc was edited

Thanks

Seshu

Read only

0 Likes
1,353

Hi Seshu!

Thanks for your very good xplanation!

I ve 2 issues.

First, How we check config settings for outbound idoc (as u said for inbound process) how to do that, we ve to follow the same process as inbound WE19.

Second, for tesing outbound idoc.

Here also same procedure is followed

going to we19 transaction

can u pls give steps.

Thanks.

Read only

0 Likes
1,353

There is no straight forward rahul incase if you want to check outbound.

Normally ( Let me say example about Invoice VF01 ) .

Whenever you create invoice ,output type will trigger.

you can see Invoice output in nace transaction

to see the output type navigation :

Goto NACE -> Select application V3 -> click on output type -> here select RD00 ( SAP Standard output type for Invoive)

-> click on processing routine -> here you will be able to see all information.

Functional guy will set all configuration.

This RD00 Output type will trigger when you create invoice.

When you create partner profile at WE20 -> here we need to give customer number -> we need to fill partner profile parameter

here we give Idoc type,message type ,Process code and output type.

if RD00 Triggers then it will communicate process code -> process code calls FM (WE42,WE41 Transaction).

This FM will create idoc.

now you can see the idoc status at WE02 ,if suppose if you get Red color then there might be issue.

check all status code at WE47.

For outbound testing ,we should not use WE19 Transaction.

depend upon application ,you need to test ,let me say purchase order.

if you want to test then you need to go Purchase order transaction,create purchase order ,NEU(SAP Standard output type) will trigger,then it creates idoc.

now you can see the status at WE02 .

Simple words WE19 is for Inbound idoc testing ,if you want to see the status ,then you need to go WE02 Transaction.

outbound idoc testing - you need to go application area ,create the invoice or purchase order or Sales order or delivery or shippment ,then it creates the idoc,

now you can see the status at WE02 .

Hope you got it.

Thanks

Seshu

Read only

0 Likes
1,353

Hi Seshu!

I ve a issue! Pls read ur first answer u gave me, u ill find,

<b>Once you configured everything then goto WE19 Transaction :

Give message type or idoc type and execute .

now here you need to fill the Mandatory data in each segment,once you done then</b>

Yes , after giving message type ot idoc type, it goes to another screen where i can see segments and if i click on segments i can c fields,

What mandatory data i ve to give? Pls Explain

Thanks

Rahul.

Read only

0 Likes
1,353

Hello Rahul,

Let me say one simple example :

Material creation - we use MM01 Transaction to create Material master.

here you can find out what are the mandatory fields for material.

If i want to create simple material - Then i need to follow below steps

Goto MM01 Transaction

First screen of material master :

material # - Mandatory

Material Type - Mandatory

Industrial sector - Mandatory

once you enter above details ,you hit enter ,here you get one more window ,you need to choose atleast one view

so you have seleceted Basic data1 View -> hit enter

in third screen -> Material description,unit of measure,Material group are mandatory,once i entered all information,one simple material will create.

Same thing in WE19 Transaction ->

Give message type MATMAS -> in segment wise please fill all above details and execute it. You are able to create material master.

suppose in WE19 Transaction ,if you are not giving Material description(MAKTX) then you get Idoc number with Status code 51 ( Application document not posted)

Same manner,you need to use for all other application

Thanks

Seshu