Application Development 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: 

error determining material components with BAPI_PO_CREATE1

Former Member
0 Kudos

Dear SAP Gurus,

I'm trying to create sub contracting PO through BAPI_PO_CREATE1. But bapi give error "error determining material components".


After this i tried to use ME_COMPONENTS_UPDATE to create components. But components not get created with this FM also.


In our business scenario users are adding components manually without pick it from BOM.

I've gone several blogs to find a solution for this. But couldn't find it.

Pls. help me to solve this issue.

Thanks In Advance

Sajeewa

2 REPLIES 2

satyapriyanka_vana
Active Participant
0 Kudos

Hi,

Before calling the PO creation BAPI, Check table MAST for the BOM. If it's not created, create it using FM CSAP_MAT_BOM_CREATE(There is a detailed documentation available in SAP help for the same). Hope it helps.

Regards,

Priyanka.

周建华
Participant
0 Kudos

To be able to have this functionality working, on release 6 and higher, you have to:

  • Ensure that you are sending POITEM-ITEM_CAT = "L" and POITEMX-ITEM_CAT = "X".
  • Insert the components in table POCOMPONENTS.
  • Field CHANGE_ID should be set to "I" in structure POCOMPONENTS.
  • Field CHANGE_ID should be set to "X" in structure POCOMPONENTSX.
  • Fill in the correct data for the fields SCHED_LINE and ITEM_NO in both the structures POCOMPONENTS and POCOMPONENTSX.
  • The fields Batch and Storage Location are not available in the POCOMPONENTS structure of BAPI_PO_CREATE1. Both fields can be added in the POCOMPONENTS structure if one of the business function LOG_MM_OM_1 or LOG_MMFI_P2P is active in SFW5.
  • If you do not fill the components in the BAPI and a valid BOM is found, it will be exploded in the created purchase order.