on 02-10-2012 2:13 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Moved to SRM Workflow Forum
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.