‎2012 Mar 10 3:55 PM
Hi Experts,
When i am trying to create Sales Order by using 'BAPI_SALESORDER_CREATEFROMDAT2',the program is giving the error
'Please enter sold-to-party or ship-to-party'.
I checked the header structure 'BAPISDHD1' but there is no field for sold-to party or ship-to party.
I checked the partners structure 'BAPIPARNR'.In this structure there is field 'partn_nub'
I passed values to that field still it giving the same error.
Can anyone suggest me how to solve this error.
Thanks & Regards,
Gopalakrishna.K
‎2012 Mar 10 4:32 PM
Hi,
You to pass the values to the partner table order_partners for sold to party and ship to party.
There is a field in this structure Partner Function. In that you have to pass value SP for Sold to party and SH for ship to party.
You can take reference from VBPA table which is a partner function table to create a sales order.
Sample code :-
wa_part-parvw = 'SP'.
wa_part-itm_number = '10'.
wa_part-partn_numb = '520'
wa_part-unload_pt =
append wa_part to it_part. " it_part is of type BAPIPARNR which is there in BAPI
Hope this will solve your problem.
Thanks,
Regards,
Jhings
‎2012 Mar 11 5:35 AM
Hi,
Thanks for your reply.I solved that error 'Please enter sold-to party or ship-to party'.
But still it giving the error 'document 35 does not have a document catagery but'.
I will give you my code what I havae written in my partners tab.
wa_partners1-partn_role = 'AG'.
wa_partners1-PARTN_NUMB = wa_header-sold_to.
wa_partners1-itm_number = '10'.
append wa_partners1 to it_partners1.
clear wa_partners1.
can you please suggest me how to solve this error,
Thanks & Regards,
Gopalakrishna.K