cancel
Showing results for 
Search instead for 
Did you mean: 

Create Multiline Order in reference to Contract line item using custom BAPI

Former Member
0 Kudos

Hello,

We are using the 'BAPI_SALESORDER_CREATEFROMDAT2' to create an order where the customer uses the contract to place a single line order through a web interface. The issue is they wish to create a multiline order that references the same contract and our current ZBAPI that calls the BAPI mentioned above is that it will only create a single line order. I am the functional analyst on this 'project' but don't have the ABAP resource strong enough to code this without specific instructions. I am not looking for the exact code but if you can give me some pointers on how to explain what is needed to a rookie ABAP developer that would be great. Here is what we currently have created and all I need to do is make it so we can do multiple lines

Accepted Solutions (0)

Answers (1)

Answers (1)

shashi_thakur
Contributor
0 Kudos

Hi Grant,

I can see a Loop on ORDER_ITEMS_IN. Where is this getting populated from,as I could not see it being populated earlier in the code.

Regards,

Shashi Thakur

Former Member
0 Kudos

Hello Shashi,

Maybe that is what is missing. So if we have some code that comes before the loop like we do for populating the header where we move all same name fields of contract item to sales order item and then perform the loop, do you think that will be our missing logic in the code?

Thanks

shashi_thakur
Contributor
0 Kudos

Hi Grant,

I think that is the probable reason, as from the code it is not clear how the Loop would even run if the particular structure ORDER_ITEMS_IN is empty or it will run once if it has only one entry for the item populated before coming inside this BAPI.

Regards,

Shashi Thakur