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 inbound Sales Orders IDOC within SAP

Former Member
0 Kudos

Hi,

I receive a flat file containing sales order information. I would like to create inbound Sales Order IDOCs from this flat file. I know I can use BAPI_SALESORDER_CREATEFROMDAT2 to create sales orders however I would like to retain the benefits of IDOCs e.g. error retention and re-processing.

There are a number of functions MASTERIDOC_CREATE* to create various IDOCs but I can't seem to find one for message type ORDERS. I know I can create a 'Z' version but would like to avoid that as much as possible as development budget is tight.

Any help would be greatly appreciated in the form of reward points.

Thanks and regards,

Liam

5 REPLIES 5

Frank711
Explorer
0 Kudos

Hi,

the SAP function for message type ORDERS is IDOC_INPUT_ORDERS. To call this function you need a program that creates the idoc header EDIDC and maps the flat file into the idoc structure EDIDD.

regards

Frank

Former Member
0 Kudos

Hi Frank,

The problem with this is there I will have to perform the mapping exercise and build the segment hierarchy in EDIDD which I'm trying to avoid. I was hoping to call a standard function (e.g. a MASTERIDOC_CREATE**) that I can just simply past order header and item information via internal tables which will generate and IDOC for me.

Thanks for your help.

Liam

Former Member
0 Kudos

Hi,

U can make use of LSMW and in its option select idoc . Message type being ORDER and basic type being ORDERS01.

follow the steps in lsmw to upload data from a flat file and post the idoc into SAP.

Hope this will help.

Reward useful answers.

Regards,

Shrita

Former Member
0 Kudos

Hello Mr.Liam,

I have the same requirement as urs where i have to create a sales order using an IDOC.

if u have resolved your query could please help me out with the same.

thanks,

Radhika.

0 Kudos

Hi,

Can u tell me the steps to create a sales order using idoc, i've created a bapi but thats a temprory use. I wanted to created a sales order automatically when a purchase order is saved.

Please let me know if u can help me, i wanted to do it using idoc

Regards

Sanju