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: 

Creating EDI/IDOC format data in test system.

Former Member
0 Kudos

ABAP Gurus,

I want to write a code in which I extract the data that I get through EDI, for e.g Logistics Invoice. Now before starting with the code, I need some test data. Is there a way, I can create a simple invoice and then, get the same information in EDI/ IDOC format so that I will know what tables to use for formating data I get in IDOC segements and also it will help me in unit testing.

Thanks.

Regards,

Rajesh.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello,

First identify the IDoc type to be used. Then, identify the Segments / Fields which are to be filled mandatorily. Then, create Some Test Data (Invoice Per say), then Start Coding your Posting Program in which you'll:

a) Extract the Data from the Segments.

b) Validate the Data received in the Inbound IDoc (whether the

Invoice Number received is a Valid Invoice or not).

c) If the Data is Valid, then Update the Transaction with the

Data received using any FM / BAPI.

Hope it was clear.

Thanks and Regards,

Venkat Phani Prasad Konduri

5 REPLIES 5

Former Member
0 Kudos

Hello,

First identify the IDoc type to be used. Then, identify the Segments / Fields which are to be filled mandatorily. Then, create Some Test Data (Invoice Per say), then Start Coding your Posting Program in which you'll:

a) Extract the Data from the Segments.

b) Validate the Data received in the Inbound IDoc (whether the

Invoice Number received is a Valid Invoice or not).

c) If the Data is Valid, then Update the Transaction with the

Data received using any FM / BAPI.

Hope it was clear.

Thanks and Regards,

Venkat Phani Prasad Konduri

0 Kudos

Creating test data is my point. I know how to create invoice but how do I create the data so that I will get it in in IDOC format ?

0 Kudos

Hello,

In order for you to Create Test Data, you have two options.

1. First to Check if all the Configuration is done by the Functional in the Client, that is setting up the Billing Type etc.

2. See if you have some Deliveries with which you can create

an Invoice.

3. Option two is to see Pick up already existing Invoices, pick up the Data from those Invoices and create another Invoice for the same Data by populating the existing Data of an Invoice into the Fields of the IDoc.

Thanks and Regards,

Venkat Phani Prasad Konduri

0 Kudos

How can I go for option 3 ? What are the transaction codes to do this option ? Also, since I am looking for the incoming invoice that will be used by MIRO or FV60 to post the invoice, what invoice type should I look for ? Should it be INVOIC01 or INVOIC02 ?

0 Kudos

Hello,

To go for Option 3, you can go to WE19. Please remember to use the IDoc Type INVOIC02. Fill in the Data in to the Segments manually / or Search for an Existing IDoc of type INVOIC02. Then make minor modifications of the Data as per your convenience.

If you want to know what are all the Billing Types that are maintained, you can go to the Transaction VOFA and see the List.

Thanks and Regards,

Venkat Phani Prasad Konduri