cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error with BAdI Implementation PRCG_DOC_ITEM_CONDITION_AMOUNT

Adrianqui192
Explorer
0 Kudos
466

Hello everyone,

I’m currently implementing the BAdI PRCG_DOC_ITEM_CONDITION_AMOUNT in SAP S/4HANA Cloud Public Edition. My goal is to include custom logic for calculating the condition type TPE1.

Here’s what I’ve done so far:

  • In the BAdI implementation, I inserted my logic for condition TPE1 and assigned the enhancement ID FORMULA=TPE1. (see screenshot placeholder)

Adrianqui192_0-1760473732504.png

  • After publishing the BAdI, I went to the configuration activity Set Alternative Calculation of Condition Amount (102430)
  • I created a new calculation routine with the number 3009999 and linked it to the enhancement identifier TPE1, which I had used in the BAdI. (see screenshot placeholder)
 

Adrianqui192_5-1760473844845.png

Adrianqui192_6-1760473944534.png

 

  • Then, I assigned this routine in the pricing procedure under the Condition Amount calculation field.

Adrianqui192_7-1760474345264.png

However, when I test the BAdI during pricing execution, I get the following unexpected error message:

“Enhancement identifier for routine number 3009999 must exist.”

Adrianqui192_1-1760508198497.png

Based on the error details, you recommend implementing the PRCG_DOC_CONDITION_AMOUNT BADI alongside the previous BADI and assigning it the same routine. But I haven't seen this implementation in the examples.

I’ve already double-checked the enhancement ID and configuration, but I couldn’t find any additional details or documentation related to this specific error.

Has anyone faced a similar issue with this BAdI or the linkage between the enhancement ID and the routine number in the configuration? Any insights or troubleshooting steps would be greatly appreciated.

Thanks in advance for your help!

Best regards,

Accepted Solutions (1)

Accepted Solutions (1)

Chris1973
Active Contributor
0 Kudos

Good day @Adrianqui192 

Thank you for your question.

Based on your screenshots, the error regarding enhancement identifier happens in public cloud when you don’t properly link your defined BAdI or if it is not recognised in SSSCUI. There are steps to manage it:

1.  First is to ensure your BAdI implementation has FORMULAR equals TPEI, then ensure the status is set to published and your extension point ID is PRCG_DOC_ITEM_CONDITION_AMOUNT. This can be achieved in your custom logic app. Ensure you create

Chris1973_0-1760485172206.png

2.  Secondly, in you SSCUI, ensure you create a new routine with the Enhancement Identifier TPEI. You can achieve this by following the 3 steps required creation.

Chris1973_1-1760485193537.png

Chris1973_4-1760485248420.png

Chris1973_3-1760485207377.png

3.  Thereafter, assign the routine in your pricing procedure under the condition type and re-publish the BAdI.

Once concluded, the pricing engine will call your custom routine when condition type is processed.

Have a look at these links for more details.

Custom Logic: Condition Amount

How to configure a Routine for SSCUI 102430 and 102808

https://community.sap.com/t5/technology-q-a/not-able-to-update-sales-pricing-data-dynamically-for-di...

Let me know if you have any questions.

Best regards

Chris

Adrianqui192
Explorer
0 Kudos
Hi @Chris1973, I've tried to replicate the steps you recommended but the same error keeps occurring.
Adrianqui192
Explorer
0 Kudos
Hi @Chris1973. I've tried to replicate the steps you recommended, but the same error continues to occur. Based on the error details, you recommend implementing the PRCG_DOC_CONDITION_AMOUNT BADI alongside the previous BADI and assigning it the same routine. Have you also worked on a similar case where both BADIs needed to be implemented at the same time (PRCG_DOC_CONDITION_AMOUNT and PRCG_DOC_ITEM_CONDITION_AMOUNT)?
Adrianqui192
Explorer
0 Kudos

Hi Chris1973. I've tried to replicate the steps you recommended, but the same error continues to occur. Based on the error details, you recommend implementing the PRCG_DOC_CONDITION_AMOUNT BADI alongside the previous BADI and assigning it the same routine. Have you also worked on a similar case where both BADIs needed to be implemented at the same time (PRCG_DOC_CONDITION_AMOUNT and PRCG_DOC_ITEM_CONDITION_AMOUNT)?

Chris1973
Active Contributor
0 Kudos

Hi @Adrianqui192

Yes, I have. Let me provide more context to my previous message.

In public cloud both BadIs participate in the calculation framework, this means if only one is implemented the system might still show the enhancement error. This is because the enhancement ID has not been registered across both contexts. The solution is to implement both BadIs with the same enhancement ID.

Let me know if you have any questions.

Best regards

Chris

Answers (1)

Answers (1)

Joey_Chen1
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi @Adrianqui192, Good day! As a assumption, can you check on whether the condition type TPE1 is set a group condition? If TPE1 is a group condition, then you must also implement Define Alternative Calculation of Condition Amount in Document. And you must assign both implementations to the same routine number in the Set Alternative Calculation of Condition activity Hope the message can help. Best Regards, Joey
Adrianqui192
Explorer
0 Kudos
TPE1 is not a group condition, is it still required to implement the other BADI? and assign both implementations to the same routine number?