cancel
Showing results for 
Search instead for 
Did you mean: 

Maintain Substution Rule based on Spend value

Former Member
0 Kudos

Hello All,

Currently we are in SRM 7.02 implementation, for this we got below reqirement.

Requirement: We need to maintain the substitution rule based on substitute spend value.

Example:

User                Spend Value

-------------------------------------------

USER 1            100

USER 2             200

USER 3              50

Here we are maintaing this information in Z table.

Procedure:

1.  If USER 1 is trying to Substitute USER 3, it should display error message like "Substitution is not possible", because USER 3 spend values is less than USER 1.

2. if USER 1 is trying to Substitue USER 2 , it should accept, because USER 2 spend values is more than USER 1.

  

Please find below screenshot.

Thanks & Regards

Siva.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Dear Karthik,

Thank you for your quick response.

i have tried the ways as per your response, but whenever i am trying to add substitute, if that substitute spend value is low, it is not displaying any message as well as automatically substitute is adding into Substitution rule area.

Requirement is : Once we are trying to add new substitution, if spend value is low.

1. it should display error message.

2. Substitute should not add at substitution rule area.

Thanks & Regards

Siva.

Former Member
0 Kudos

Hi Siva,

We also did the same kind of check on substitution rule, but in our case it was Approval limit and not the Spending limit.

We had created Class method and that was responsible to check and bring the substitute which has same or higher approval limit.

Best Regards,

Anil

Former Member
0 Kudos

Dear Anil,

Can you please eloborate little bit, in which class, you have created method as well as please share piece of code, it will be helpful for me to complete my requirement.

Thanks in advance.

Thanks & Regards

Siva.

Former Member
0 Kudos

Hi Siva,

Are you using Process Controlled or Application Controlled workflow?

If it is application controlled please try implementing the BADI BBP_WFL_APPROV_BADI


If you are using Process controlled please try implementing BADI /SAPSRM/BD_WF_ADHOC_AGENT_F4. this gets called whenever you search for approver and / or substitute.

You can then define your own logic here.

Hope this helps.

Regards,

Karthik Babu

Former Member
0 Kudos

Thanks Karthik for your quick reply.

currently we are using Process controlled workflow.

could you please let me know, what are the logic steps & code i have to implement  for the  BADI  /SAPSRM/BD_WF_ADHOC_AGENT_F4.

Thanks in advance.

Thanks & Regards

Siva.

Former Member
0 Kudos

Hi Siva,

Implement the badi, and in the method CHECK_INPUT_ADHOC_AGENT you can get the approver id in the field CV_AGENT_ID . write your logic . To restrict the approver being added set CV_BD_AGENT_INVALID to 'X'.

But to add your own custom message you'll have to look into this class  /SAPSRM/IF_CLL_DOM_APV_EXT~CHECK_ADHOC_AGENT where the error message is populated. This call internally calls the BADI above mentioned.

Hope this helps.

Regards,

Karthik Babu