Skip to Content
avatar image
Former Member

Maintain Substution Rule based on Spend value

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.

substution.jpg (140.5 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Jul 22, 2013 at 06:53 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • avatar image
    Former Member
    Jul 23, 2013 at 12:42 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

  • avatar image
    Former Member
    Jul 25, 2013 at 07:31 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded