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

Error in BAPI_PO_CREATE1

Former Member
0 Likes
1,166

HI,

I am using function module BAPI_PO_CREATE1 to do mass upload PO creation.

I get a BAPI error for regular vendor when creating PO for 2nd vendor saying 1st vendor is the regaular vendor for the article.

When actually both 1st & 2nd vendor have regular vendor ticks maintained for the same material. The same happens with the rest of the vendors.

Have tried clearing all the work areas & internal tables being passed to the BAPI.

Manual PO creation works for these vendors.

Could anyone tell me why it ignores rest of the vendors as regular vendor and just accepts the first vendor as regular vendor.

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
604

You can put a breakpoint in FM ME_CHECK_MAIN_SUPPLIER and find out if the FM is called differently between ME21N and BAPI...

If I had to guess, ME_CHECK_MAIN_SUPPLIER is being called differently by ME21n (check importing parameter I_MESSAGE) when compared to BAPI.. If that is the case, your only option may be to ensure that warning message is configured for Message 642(06) in T160M (SPRO) instead of error message...

If you notice, ME_CHECK_MAIN_SUPPLIER reads only the first entry from EINA table for which regular vendor is set...

2 REPLIES 2
Read only

Former Member
0 Likes
605

You can put a breakpoint in FM ME_CHECK_MAIN_SUPPLIER and find out if the FM is called differently between ME21N and BAPI...

If I had to guess, ME_CHECK_MAIN_SUPPLIER is being called differently by ME21n (check importing parameter I_MESSAGE) when compared to BAPI.. If that is the case, your only option may be to ensure that warning message is configured for Message 642(06) in T160M (SPRO) instead of error message...

If you notice, ME_CHECK_MAIN_SUPPLIER reads only the first entry from EINA table for which regular vendor is set...

Read only

0 Likes
604

Thanks Kris,

The BAPI is working when the message was kept to warning type.