‎2012 Mar 06 10:58 AM
Hi,
We are using BAPI to create the sales order BAPI_SALESORDER_CREATEFROMDAT2
While creating a manual order, we are ordering using EAN code. We have maintained material determination records for the same using VB11. Therefore while creating a manual order using an EAN code, EAN code gets assigned to MATWA (Entered Material) field and SAP material code gets determined and is replaced at MATNR field.
Now while using the above BAPI, it is giving the error that u201CMaterial is not maintained for the given sales areau201C thus not allowing to create the order using just the EAN code.
IF we use any other material determination type i.e. speaking code ex A1234 and maintain the material determination record, we are able to create the order using above BAPI. It doesnu2019t allow to create an order with just an EAN no only.
Any pointers for the same will be highly appreciated.
Thanks in advance.
‎2012 Mar 06 11:20 AM
Hi Keys.,
try following link
http://wiki.sdn.sap.com/wiki/display/Snippets/ABAP-Simpleprogramtocreatesalesorderusing+BAPI
‎2012 Mar 06 11:20 AM
Hi Keys.,
try following link
http://wiki.sdn.sap.com/wiki/display/Snippets/ABAP-Simpleprogramtocreatesalesorderusing+BAPI
‎2012 Mar 06 12:36 PM
Before calling the BAPI to create the sales order, call the FM GET_MATNR_FOR_EAN or ISH_MM_MATERIAL_BY_EAN to get the material code and pass it to BAPI.
Regards,
Felipe
‎2013 Mar 28 10:39 AM
‎2013 Mar 28 10:40 AM