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

BAPI_SALESORDER_CREATEFROMDAT2 multiple items problem

Former Member
0 Likes
1,387

hi,

   experts ,I'm facing a problem when using  BAPI_SALESORDER_CREATEFROMDAT2 to creat SO,I create a sale order with six items and  one of the item has problem. It is possible for me to create the SO successfully with the the other three items ?

1 ACCEPTED SOLUTION
Read only

0 Likes
1,188

Hi,

When creating Sales Order with reference or without reference then you can do a test run and as per suggested by Maxim that if there is any issue with the particular line item then you can exclude that line and proceed to create order with the rest of the line items.

There is no such restriction that if there is error in the line item then you cannot create order with rest of the line items.

8 REPLIES 8
Read only

sivaganesh_krishnan
Contributor
0 Likes
1,188

hi,

You can add as much items you can there will be no issue with that. The Sales Order will be created even with no items specified.

Regards,

Sivaganesh

Read only

madhu_vadlamani
Active Contributor
0 Likes
1,188

Hi,

In the return parameters have you seen sales order created after commit.You can try and the same time correct the line item.

Regards,

Madhu.

Read only

0 Likes
1,188

hi Madhu,

   After calling  BAPI_SALESORDER_CREATEFROMDAT2  ,I only get the error message  in return table parameters  RETURN  .and the error says that the last item contains error materal .The error message  is enclosed in the attachment.

Read only

0 Likes
1,188

This message was moderated.

Read only

0 Likes
1,188

Hi,

You said you are trying one line item with wrong values. Is it allowing you to create. Are trying to create order directly in sap or from non sap system.

Regards,

Madhu.

Read only

Former Member
0 Likes
1,188

Hi, you can symulate so before creating, use parameter TESTRUN = 'X', then check errors in RETURN

Read only

0 Likes
1,189

Hi,

When creating Sales Order with reference or without reference then you can do a test run and as per suggested by Maxim that if there is any issue with the particular line item then you can exclude that line and proceed to create order with the rest of the line items.

There is no such restriction that if there is error in the line item then you cannot create order with rest of the line items.

Read only

Former Member
0 Likes
1,188

You need to check the material whether created under the sale order in material master data which metioned in your return internal table.

Thanks,

Yawa