cancel
Showing results for 
Search instead for 
Did you mean: 

Raised error messages are not thrown in ITEM_CHECK and DOC_CHECK BADI

benjamin_herzig
Participant
0 Kudos

Hi,

we are on SRM 7.0.

ITEM_CHECK_BADI and DOC_CHECK_BADI are called when an approver submits a shopping cart. But raised error messages in et_message are not thrown before the shopping cart is submitted.

Is this a default behavior or a bug?

backround:

I want to throw an error message, when a shopping cart is rejected and no reason is set in approval note. I get the info that the position is rejected and i check the approval note. When no approval not is set, a append an error message to et_messages.

Regards,

Ben

Accepted Solutions (0)

Answers (2)

Answers (2)

benjamin_herzig
Participant
0 Kudos

Hi,

any ideas how to throw an error message when a shopping cart is rejected without adding a approval note?

Regards,

Ben

Former Member
0 Kudos

Hello Ben,

Could you please advise which field you are checking for Approval Long text? If you are using BBP_PD_SC_GETDETAIL Function module to extract the Shopping cart data then in ET_LONGTEXT with TDID as NOTM.

Also please review the below SCN http://scn.sap.com/thread/212246 for your requirement as well.

Thank you

Ritesh

benjamin_herzig
Participant
0 Kudos

Hi Ritesh,

yes i use ET_LONGTEXT with TDID = 'NOTM' to check the approval note. If the longtext is not initial, i additionally check if longtext contains the sy-uname. This is not a 100% check, because an approver can reject a shopping cart more the once. But for us it is OK.

My problem is that the error message i append to et_messages are not thrown! Our approvers open the shopping cart from the UWL, set the radio-button to "reject" and click the button "submit".

Regards,

Ben

Former Member
0 Kudos

Hi Ben,

Please go through the link which i have mentioned. You first have to execute DOC_CHANGE_BADI to update the approval note and then use DOC_CHECK_BADI to trigger the error message.

Thank you

Ritesh

benjamin_herzig
Participant
0 Kudos

Hi Ritesh,

sorry. i don´t understand http://scn.sap.com/thread/212246. In my SRM 7.0 system first DOC_CHECK_BADI is callend and then DOC_CHANGE. Why should i change the approval note in DOC_CHANGE Badi?

Is the error message not thrown because there are no changes at shopping cart?

How do i test:

I open the shopping cart out of the UWL. Then i set "reject" on position level and then i click "Submit".

I don´t understand why the error message appended to "et_messages" in DOC_CHECK_BADI is not thrown? I can see in debugger that the error message is appended to et_message.

Hope someone can help me out.

Regards,

Ben

Former Member
0 Kudos

Hi Ben,

That is very interesting as you are able to see the error message in debug that is filled in et_message.

Could you please advise if you have any other error message set from Doc check badi at shopping cart creation?

Thank you

Ritesh

benjamin_herzig
Participant
0 Kudos

Hi Ritesh,

yes we have a lot of error messages that could be raised in DOC_CHECK_BADI. When we create or edit an shopping cart the messages raised and thrown without problems. But when an approver only reject an shopping cart, without being in edit mode, the error messages don´t be thrown!

But again, could someone please explain me this solution:

http://scn.sap.com/thread/212246. Did this work for SRM 7.0 too?

Regards,

Ben