cancel
Showing results for 
Search instead for 
Did you mean: 

Explode BOM Compoents in BAPI_PR_CREATE

saurabh_goels
Explorer

Hi Experts ,

We are facing issues while creating the Subcontracting PR (not PO ) by exploding BOM. We are using the FM : BAPI_PR_CREATE , but it is not happening . While doing it manually via transaction ME51N , We can explode BOM and put the components manually and able to create PR . But it is not happening via BAPI_PR_CREATE.

Please help , what parameters we need to pass or what techniques we need to acquire to create PR via BOM explosion using BAPI_PR_CREATE. I am also passing the item category as 'L'.

Note: We are using S/4HANA system.

I had already explored all the sources in SAP . But Nothing helps , No SAP Note will help.

See the Image , for more details

Error while using the BAPI_PR_CREATE, I tried passing the Components in the tables : PRCOMPONENTS

Need urgent help

Accepted Solutions (1)

Accepted Solutions (1)

saurabh_goels
Explorer

Hi All,

I resolved it myself .

Solution :

1. For the given material ( in MRP 1 View ) - make sure MRP type - ND (No planning)

2. Make sure for in BOM, Txn : CS02 , all the component should be marked as "Production Relevant"

3. While creating the PR using BAPI_PR_CREATE , Make sure you are passing Item category as L .

It worked. Thanks all for your help.

Regards

Saurabh Goel

Answers (2)

Answers (2)

lingaiahvanam
Active Contributor

Hi Saurabh,

Please refer below SAP notes.

https://launchpad.support.sap.com/#/notes/2643184 - BAPI_PR_CHANGE does not update the subcontracting components

https://launchpad.support.sap.com/#/notes/2660836 - BAPI is not returning the components for a subcontracting purchase requisition

Resolution:

To have the BAPI working properly with components you have to activate the business function LOG_MMFI_P2P, which will automatically activate switch MM_SFWS_CI_01.

Best Regards,

Lingaiah

saurabh_goels
Explorer

Hi Lingiah,


Thanks for the reply , but all the above suggestion is related to CHANGE. As per my requirement , I need to explode bom while creating the PR while using the BAPI_PR_CREATE.

robvid
Participant
0 Kudos

Hi Lingaiah

When using the CREATE ABAPI is it necessary to << activate the business function LOG_MMFI_P2P, which will automatically activate switch MM_SFWS_CI_01>> ?

I know that is what you wrote but because it was in reference to the BAPI_PR_CHANGE I didnt know if for the BAPI_PR_CREATE it was needed as well

Thanks in advance

0 Kudos

thanks,Mark, I also encountered this issue

ankurch
Active Contributor
0 Kudos

Hi Saurabh,

Your Bapi for PR creation is working fine, but its not able to find any component, so basically you are facing issue while exploding BOM.

Thanks,

saurabh_goels
Explorer
0 Kudos

Hi Ankur ,

Correct , Issue is with exploding the BOM while creating the PR with BAPI_PR_CREATE.

Do you know , how to resolve it ?

ankurch
Active Contributor
0 Kudos

Need to debug the code and check where its stuck!