cancel
Showing results for 
Search instead for 
Did you mean: 

Rejection reason

Former Member
0 Kudos

Hi,

I have a requirement as below.

Whenever the shopping cart will be rejected by any of the approvers, the reason for rejection needs to be provided.

We need to Capture the decision as rejected whenever a shopping cart is rejected at either line item or header level, if itu2019s rejected make NOTM(Approval Note) at the LONGTEXT level mandatory for the user to provide in the reason of rejection.

If the user doesnu2019t provide in the reason for rejection, an error message should be thrown to enter the reason of rejection.

I suggested in one of the SDN link "http://forums.sdn.sap.com/thread.jspa?threadID=1799956",I created a pre exit to methods approve and reject methods of the class " /SAPSRM/CL_CH_WD_BOM_SC".But when I try to reject the SC at item level ,control is not going to my pre exit methods.

Can naybody please guide me on this to acheive my requirement?

Regards,

Rohini

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

if you are using PCW, then use the calss to get the current decition. if the decision is 'REJECTED' then check the reason for rejection is entered by approver. if the reason for rejection is not enter then trigger the error message through check_Badi

DATA lv_decision TYPE /sapsrm/wf_decision.

CALL METHOD /sapsrm/cl_wf_apv_facade=>get_current_decision

EXPORTING

iv_document_guid = HEADER_GUID

IMPORTING

ev_decision = lv_decision.

Saravanan

Former Member
0 Kudos

Hi Saravanan,

I have used the method which you have told in the BBP_DOC_CHECK_BADI.whenever the shopping cart is rejected by clicking the reject button,I am getting the following error in the popup

"Document check returned at least one error message Document check returned at least one error message.For more details,please see message area".The et_messages is populated with the error message for entering the reason of rejection but it is not appearing in the message area.Could you please help me to resolve the issue?

Thanks and Regards,

Rohini

Former Member
0 Kudos

Hi,

I am also working on the SC workflow . If you have any idea regarding my problem , please suggest a solution to me.

That rejection reasons written in the 'Notes For Approval' text field should display to the lower level approvers in the mail(Lotus Notes ).

I am fetching that reasons from the FM BBP_PD_SC_GETDETAIL and pass that values into IT_MAIL_TEXT varible of Smartform BBP_OUT_EXCEPTION.

Now I am trying to display that reason from the Smartform BBP_OUT_EXCEPTION.

But I am not getting any thing. Is this correct way or not? Or Is there any other solutions please give me.

Thank you

Regards

Krishhna

Former Member
0 Kudos

hi Krishna,

try implementing the logic through badi 'BBP_OFFLINE_APP_BADI'..

Saravanan

Former Member
0 Kudos

In BBP_DOC_CHECK BAdi include a code which checks for rejection (BBP_BGRD_APPROVAL function code EXEC for transcation BBPSC07)

The rejection text should be entered in the approval note. The approval note can be read in the badi from shopping cart longtexts E_LONGTEXT with E_LONGTEXT-TDID = 'NOTM'.

If the approver has not changed the long texts then raise an error message:

Also maintain the error message that has to be shown if SC is rejected.

For this create a separate Message Class which has a Message Number and the Message Text( Error message which has to be show.

Thanks,

Prashanth

Former Member
0 Kudos

Hi Prashanth,

Thanks for your response.Can you please explain me in detail.I am new to workflow.what is BBP_BGRD_APPROVAL ?How should i use in my check badi to check whether the sc is rejected or not.

Regards,

Rohini Shankar

Former Member
0 Kudos

BBP_BGRD_APPROVAL is the transaction used ,and check for the click on Reject button. Use a ABAPer to implement this

Once this is checked, make it a mandatory field for entering comments if SC is rejected.

Thanks,

Prashanth

jason_boggans
Active Contributor
0 Kudos

Moved to SRM Workflow Forum