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

Error in bapi BAPI_SALESORDER_CREATEFROMDAT2

Former Member
0 Likes
1,057

Hi,

I am using BAPI BAPI_SALESORDER_CREATEFROMDAT2 for sales order upload.

I am putting quanity in field TARGET_QTY of Item Data table.

Problem is all the remaining data is getting uploaded and i can see it in va01/va02/va03 but the target quantity fields remain empty.

Please help is there any other field to which data should be passed.

regards

vivek

1 ACCEPTED SOLUTION
Read only

Vijay
Active Contributor
0 Likes
928

hi,

you need to fill the field REQ_QTY in table ORDER_SCHEDULES_IN of the same bapi and also need to mark the X for the same field in table ORDER_SCHEDULES_INX.

you need to pass the item no also for which you are passing quantity

this will solve ur problm

thanks & regards

vj

Edited by: Vijay Sharma on May 20, 2009 10:53 AM

5 REPLIES 5
Read only

Vijay
Active Contributor
0 Likes
929

hi,

you need to fill the field REQ_QTY in table ORDER_SCHEDULES_IN of the same bapi and also need to mark the X for the same field in table ORDER_SCHEDULES_INX.

you need to pass the item no also for which you are passing quantity

this will solve ur problm

thanks & regards

vj

Edited by: Vijay Sharma on May 20, 2009 10:53 AM

Read only

Former Member
0 Likes
928

Hi Vivek,

Please check BAPISDITMX (Item Data Checkbox) for traget quantity field. You need to pass value 'X' into this field.

Best Regards,

Deepa Kulkarni

Read only

former_member188827
Active Contributor
0 Likes
928

are you giving appropriate units with target quantity?

Read only

Former Member
0 Likes
928

Hi,

Try doing in the following way:

wa_order_items_in-itm_number = posnr_temp.

wa_order_items_in-material = wa_salesitem-matnr.

wa_order_items_in-plant = wa_salesitem-werks.

wa_order_items_in-target_qty = wa_salesitem-kwmeng.

wa_order_items_in-ref_doc = wa_salesitem-vbeln.

wa_order_items_in-ref_doc_it = wa_salesitem-posnr.

wa_order_items_inx-itm_number = wa_salesitem-posnr.

wa_order_items_inx-material = 'X'.

wa_order_items_inx-plant = 'X'.

wa_order_items_inx-target_qty = 'X'.

wa_order_items_inx-ref_doc = 'X'.

wa_order_items_inx-ref_doc_it = 'X'.

APPEND wa_order_items_in TO it_order_items_in.

APPEND wa_order_items_inx TO it_order_items_inx.

Then pass these two structures, wa_order_items_in & wa_order_items_inx to the item tables of the BAPI.

Hope it helps.

Regards,

Arnab.

Read only

Former Member
0 Likes
928

Hi ,

May be check out the field size for quantity.Check the quantity as BAPISDITM-TARGET_QTY

It has worked for me .