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

Query on BAPI BAPI_SALESORDER_CREATEFROMDAT2

Former Member
0 Likes
1,202

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
759

Hi Keys.,

try following link

http://wiki.sdn.sap.com/wiki/display/Snippets/ABAP-Simpleprogramtocreatesalesorderusing+BAPI

4 REPLIES 4
Read only

Former Member
0 Likes
760

Hi Keys.,

try following link

http://wiki.sdn.sap.com/wiki/display/Snippets/ABAP-Simpleprogramtocreatesalesorderusing+BAPI

Read only

Former Member
0 Likes
759

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

Read only

Former Member
0 Likes
759

This message was moderated.

Read only

Former Member
0 Likes
759

This message was moderated.