2006 May 16 2:00 PM
I am Veerendra,
Please help me how to create sales order using this BAPI.
I am passing Header data to BAPISDHD1,
Partner data to ORDER_PARTNERS
and Item data to BAPISDITM.
I am filling the item data for only one item with item number(1000) , Material number(10135) and Qty 1 (target_qty).
In Bapi It is returning error messages like:
1.E |V1 <524 |Only quantity 1 EA is allowed (Item 001000)
2.E |V4 <248 |Error in SALES_ITEM_IN 001000
3.W |V1 <555 |The sales document is not yet complete: Edit data
PLease reply to these doubts as soon as possible.
Thanks
veerendra.
2006 May 16 2:04 PM
Check whether you have mentioned other unit of measure in the item other than 'EA'.
If the material is configured only for 'EA' in material master (MM01, MM02) then you can only give that of unit of measure.
2006 May 16 2:16 PM
Hi Sharath,
I checked by passing unit of measure (EA)to
item_in- SALES_UNIT.
Then also it is giving same problem.
iS THERE ANY OTHER CHANCES?.
Thanks.
VEERENDRA
2006 May 16 2:18 PM
2006 May 16 2:07 PM
Veerendra,
Can you create this order on-line with the same header data and line item info?
If not, resolve that first.
2006 May 16 2:10 PM
Veer,
Also note that you MUST fill in the schedule line table as well. This schedule line data MUST contain the ordered qty.
Example:
Build schedule line as well.
move l_number to schd_lin-itm_number. "line number
schd_lin-req_qty = i_vbap-kwmeng. "ordered qty
append schd_lin.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
ORDER_HEADER_IN = hdr
convert = 'X'
IMPORTING
SALESDOCUMENT = salesdoc
TABLES
return = ret_tbl
ORDER_ITEMS_IN = itm
ORDER_PARTNERS = prtnr
ORDER_ITEMS_inx = itmx
ORDER_CONDITIONS_IN = conds
ORDER_CONDITIONS_INX = condsx
order_schedules_in = schd_lin.
2006 May 16 2:12 PM
HI jhon,
Ya tried to create on-line also it is workin with the same header data. And Bapi also returning message like header data is sucessfull.
PLease suggest if somthing is else is missing.
veerendra.
2006 May 16 3:08 PM
HI JOhn,
Thanks it is working with shedule line item,
Still it is saying item data is incomplete.
Please what else i need to pass.
Thanks .
Veerendra
2006 May 16 3:22 PM
Is the order actually saving now... and just stating that the line item is incomplete?
2006 May 16 3:29 PM
If it is still NOT saving, do this in the debugger:
Set a breakpoint near the beginning of your program (before the call out to the BAPI).
Once you reach the breakpoint, from the menu bar of the debugger choose: Breakpoints > Breakpoint at > Function Module... Enter func module SD_SALES_DOCU_MAINTAIN as the func module.
Now execute.
You will now breakpoint at the core func module that attempts the creation of the sales document.
Execute just past this Func mod call. Once you return from this func mod, check the contents of internal table RETURN - which is returned from the func mod.
This table contains the details of an issues. These table contents are not passed back to the BAPI in their entirety... unfortunately.
But this should tell you WHY the creation is seeing incomplete data.
2006 May 16 2:11 PM
In the return table click for details in the first error and check in which table it is showing error
Correct that field and also pass the ISO unit of measusea also.
Some times this error occurs because of ISO UOM.
Rg,
VM
2006 May 16 2:19 PM
Hi,
Could you check what is the unit of measure maintained for material 10135 in MM03. it is available on basic data 1. Use the same in your bapi and let us know.
2006 May 16 2:20 PM
Veer,
As cited above, you must add the SCHEDULE LINE data.
You must also call the BAPI_TRANSACTION_COMMIT function module.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = ret_text.
2006 May 16 3:29 PM
Hi,
Best thing to know what are the fields to get the completeion status in item would be enter the same data that you are passing in BAPI in transaction VA01 and see the incompletion log. The transaction will traverse you through all the screens and fields where you need to fill valid data in order for it to be completed. Make a note of those fields and populate the same in your BAPI.