19 Replies Latest reply: Feb 28, 2012 12:51 PM by Oluwatosin Oladipo RSS

Create Condtition with Step User Decision

Oluwatosin Oladipo
Currently Being Moderated

Hello All,

 

I create a workflow for the approval of Purchase Order using the step user decision which works fine. But in my configuration, i have 2 release strategies, one is for approval of Purchase Order with sum lesser than 250,000 while the other strategy is for approval of Purchase Order with sum greater than 250,000. Due to this release strategy, i created a condition step (Using container of net price)  before the user decision step, which has a false and a true branch. But for every time i create a Purchase Order, only the false branch gets triggered.

 

How do i create this condition and where should it fall, bearing in mind that my start event is the creation of release step of BUS2012

 

Thanks for anticipated help.

  • Re: Create Condtition with Step User Decision
    Eddie Morris
    Currently Being Moderated

    Hi,

     

    Is the container element 'net price' based on an object attribute or is it filled in some other way?

     

    Does it hold the correct value in the workflow container? If your condition takes the false branch each time then the container element is not filled (Is empty) or the attribute it is based on has no value or its values has not been updated to the database that the time of your condition.

     

    Is the condition the firsts tep in the workflow? Maybe put a dummy step first which gives time for the system to update the database...after executing this does the condition work correcty?

     

    Regards,

    Eddie

  • Re: Create Condtition with Step User Decision
    Vijayalaxmi Pradhan
    Currently Being Moderated

    Hi,

     

    I think along with the condition check on Net price ,you should also do a condition check on the release code triggered from T16FS and place this combined check correctly before the user decision step.I think it should work.

     

     

    SELECT SINGLE FRGGR FRGSX FRGZU FROM EKKO INTO WA_EKKO WHERE EBELN EQ PONUMBER.

     

      IF SY-SUBRC = 0.

    *Get the Release code FRGC1 and FRGC2 as maintained in T16FS

        SELECT SINGLE FRGC1

                      FRGC2

               FROM   T16FS

               INTO   WA_T16FS

               WHERE  FRGGR = WA_EKKO-FRGGR

               AND    FRGSX = WA_EKKO-FRGSX.

     

        IF SY-SUBRC = 0.

          CASE WA_EKKO-FRGZU.

     

            WHEN ' '.

              RELCODE = WA_T16FS-FRGC1.

     

            WHEN 'X'.

              RELCODE = WA_T16FS-FRGC2.

          ENDCASE.

        ENDIF.

     

      ENDIF.

  • Re: Create Condtition with Step User Decision
    Karri Kemppi
    Currently Being Moderated

    Hi,

     

    Did you release the new attribute in SWO1 (through the menu). If you didn't, it is not visible in WF builder. Also, did you do the delegation between your Z object and the standard object => is the Z version in use?

     

    Another thing, are you absolutely sure that your approach is correct? Shouldn't you have done the "condition" already in the configuration in SPRO when defining the release strategies/codes - not in workflow level? Of course I don't know the details of your project, but it just sounds a bit odd. My experience has been that the "approval levels" have been defined in SPRO - not in workflow at all (well, my experience was about purchase requisitions, but I guess POs have the same configuration possibilitites). 

     

    Or if you have two release strategies, don't you have the release strategy/code in the workflow container. Can't you put the release code in your condition instead of the value? But even this should not be necessary, if you configured everything in SPRO.

     

    Regards,

    Karri

    • Re: Create Condtition with Step User Decision
      Oluwatosin Oladipo
      Currently Being Moderated

      Yes i have done the configuration back - end for the release strategy but i also need to put it as a start condition in the workflow.

      What do you mean by did you do the delegation between your Z object and the standard object => is the Z version in use?.

      I have also released the attribute which i did not do before, this made the attribute visible in the workflow. The problem is that the conditions are not picking any value, be it the net value or the release strategy, that is why i feel a programing is needed or what do you think might be wrong.

      • Re: Create Condtition with Step User Decision
        Karri Kemppi
        Currently Being Moderated

        The delegation part should be OK, if you are now able to see the new attribute, so you can forget that part.

         

        What I meant by the configuration part: Basically I would understand that if you say that you have two release strategies for different net amounts (configured in SPRO), then you will have two release codes. In other words, if you create a PO that is under your limit (250.000), and then you go to see the PO again and see the release strategy/code part, you will see release code A. Then create another PO that is over your limit, and then go to see the PO => now you will see that it has release code B. Or is this assumption all wrong?

         

        If the assumption is correct, then I really don't understand why you try to create your condition based on the amounts instead of the release codes. If someone some day wants to change the limits, then he just needs to do the changes in release strategy in SPRO instead of calling a WF developer to change some conditions...

         

        If my assumption is incorrect, then you can just forget what I said...

         

        Regards,

        Karri

        • Re: Create Condtition with Step User Decision
          Oluwatosin Oladipo
          Currently Being Moderated

          Your assumptions are correct and i have tried using the release code has a start condition, but i get this error message when i check in SWEL after creation of Purchase Order

          Operator 'EQ': The value of the left operand cannot be determined

          Message no. SWF_RLS_001101

           

          what could be wrong?

          • Re: Create Condtition with Step User Decision
            Karri Kemppi
            Currently Being Moderated

            It seems that there is something wrong with the event.

             

            If you start a workflow, can you see the release code in the workflow container (in workflow log), or is the container element initial? I am thinking that you might be missing the binding for release code. IF this is the case, open the workflow in WF builder and go to the "header" and see the starting event. You should find the bindings there. And the release code should be binded from event container to WF container.

             

            In short: Once you get the release code into the WF container, you should be able use it for whatever purpose. Then stop for a while and think about what you are doing and what is the requirement. If your requirements are even bit close to the standard, you shouldn't need any conditions or whatever. You can for example use the release code in your agent assignment (rule) and use the same workflow & the same approval decision step for everybody, etc.

             

            Good luck.

             

            Regards,

            Karri

             

            Edited by: Karri Kemppi on Feb 28, 2012 11:29 AM

Actions