cancel
Showing results for 
Search instead for 
Did you mean: 

Error Message using BBP_DOC_SAVE_BADI for PO

former_member191111
Participant
0 Kudos

Hi,

I need to show an error message for custom field which I have added on Header level of PO .I am using SRM 5.0 I need to show that error using <b>BBP_DOC_SAVE_BADI</b> .While I will save that PO if certain value is not there I want to popup that error message.

I wll get detail of PO in Doc_Save BADI .

How could I can populate error message from there ?

Thanks,

SS

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

Which SRM version are you using ?

All the Data after makning changes in the PO document, will be also aviavale in BBP_DOC_CHANGE_BADI for the filter type- BUS2201 (Purchase orders) in your case. You can either do a validation there using BBP_DOC_CHECK_BADI.

The Business Add-Ins [BADI] - BBP_DOC_CHECK_BADI should be used for customer messages to be triggered ->

Do let me know, incase still face any issues.

Regards

- Atul

former_member191111
Participant
0 Kudos

Hi,

Can I achieve this using : BBP_DOC_SAVE_BADI

Thanks,

SS

Former Member
0 Kudos

Hi

<u>I am not sure, since i have not tried this using BBP_DOC_SAVE_BADI.</u>

I don't think it's possible.

<b>The sequence of BADI calls is this...

Firstly BBP_DOC_CHANGE_BADI is called,

then BBP_DOC_CHECK_BADI,

then BBP_DOC_SAVE_BADI in the last call.</b>

Hope this will help.

Regards

- Atul

Former Member
0 Kudos

Why would you want to use the BBP_DOC_SAVE_BADI? You can just as easily implement the CHECK badi and add an additional IF statement that you only want the code to run after pushing the save/order button. That way you have all the standard SAP functionality available and only when you want it.

former_member191111
Participant
0 Kudos

Hi,

I ahave an requirement where by using BBP_DOC_SAVE_BADI only I want to add

an error message ..

Is there any idea for that ?

Thanks.

Former Member
0 Kudos

Hi

When you want to save this Error message in the shopping cart. (Before / After clicking on Shopping cart )

<b>Try this, it will help -></b>

<u>Standard SAP calls the function module before saving the Shopping cart document, once you press on "Hold / Held" the Shopping cart button.</u>

<b>Use the function module - CALL FUNCTION 'BBP_PD_SC_CHECK' and get all the et_messages[] (Standard and custom error messages) - This will call BBP_DOC_CHECK_BADI and will generate Error messages, if any on the shopping cart screen (Web page).</b>

Hope this will definitely help.

Regards

- Atul

Ramki
Active Contributor
0 Kudos

Hi Sachin

You cannot use BBP_DOC_SAVE_BADI to give error messages.

Pl use BBP_DOC_CHECK_BADI

Best regards

Ramki