10-06-2008 8:51 AM
Dear ABAPers,
I want to create the Sales order Using the BAPI 'BAPI_SALESORDER_CREATEFROMDAT2'.
Sales order is Repair order.When i create the First line item of the Sales order it internally generates
the Second line item.In configuration Functional Consultant Designed in such a way that it should generate
the Sub item for the First line item.
When i create the Sales order using the Transaction code VA01 it generates the Second line item i.e
sub item for the First line item.Can anyone explain me how to do this using BAPI.
Thanks & Regards,
Ashok.
10-06-2008 9:45 AM
Hi,
The BAPI will use the same configuration as VA01 so you should just pass the one line item and the sub items will be automatically generated.
Darren
10-06-2008 11:07 AM
Hi Darren,
Thank you very much for your reply.
I can able to create the Main line item and Sub line item using bapi.But i am missing some fields and link between the main line item and sub line item.
Here i give you what all are the Fields i am missing in the Second line item while i am creating the Sales order through BAPI.
What i did is that i created one Sales order in the Transaction VA01 and I created another Sales order Using BAPI.I compared both the Sales order in VBAP Table.I found some fields are missing in the Sales order which is created via BAPI.
The Fields are
VKGRU is missing
POSNV is 10000 in Sales order which is created using VA01 and 10100 in the Sales order Which is created using BAPI.
STLNR is missing
KMPMG is missing
ANZSN is missing
UEPVW is missing
If you need any more information feel free to revert back to me.
Thanks & Regards,
Ashok.
10-24-2008 12:45 PM
10-06-2008 10:47 AM
Hi,
You have configurable item. You must enter the configuration data in the ORDER_CFGS_REF, ORDER_CFGS_INST, ORDER_CFGS_PART_OF and ORDER_CFGS_VALUE tables.
Check out for OSS note 93091 as well.
Regds,
Rudra
10-06-2008 11:02 AM
Hi...
What ever Darren told is correct. This BAPI can supply license and service materials if you provide configured materials.
http://www.sap-img.com/abap/bapi-salesorder-createfromdat2.htm
Thanks,
Naveen.I