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

Using BAPI to create sales order

Former Member
0 Likes
641

Hi

i use this BAPI 'BAPI_SALESORDER_CREATEBOS' to create SO, and This BAPI is with SAP E&C solution.

it is similar to BAPI_SALESORDER_CREATEFROMDAT2. and when i call this BAPI, it give the error 'only quantity 1 ST are permitted (item 000010)'. This because the material i use is service material and with unit 'ST' and only 1. it means one project i sell.

The partial code is as below.

i_orderitemsin-itm_number = '000010'.

i_orderitemsin-material = it_sdmaster-MATNR.

I_ORDERITEMSIN-SHORT_TEXT = it_sdmaster-ARKTX.

I_ORDERITEMSIN-TARGET_QU = 'ST '.

I_ORDERITEMSIN-SALES_UNIT = 'ST '.

I_ORDERITEMSIN-TARGET_QTY = '1.000'.

I_ORDERITEMSIN-TARGET_QU = 'ST '.

I_ORDERITEMSIN-TRG_QTY_NO = 1.

I_ORDERITEMSIN-TRGQTY_DEN = 1.

i_orderitemsin-pckg_no = v_package.

APPEND i_orderitemsin .

clear i_orderitemsin .

You see, i have input the unit(ST) and quantity(1). tks for ur advice.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
537

Are you filling in the appropriate values in the Schedule Line int table?

3 REPLIES 3
Read only

Former Member
0 Likes
537

This may sound crazy, but have you tried using 'PC' instead of 'ST'?

Read only

Former Member
0 Likes
537

I think you dont need to pass data in the fields TRG_QTY_NO and TRGQTY_DEN.

Refer the data element documentation of the above fields.

-Kiran

Read only

Former Member
0 Likes
538

Are you filling in the appropriate values in the Schedule Line int table?