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.
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
I just checked the business object and my container value is not based on its attributes. I tried to create that value which is Purchase Order Price as an attribute of the business object but it gives an error, apparently that value exist in table CEKKO while the business object only allows for table EKKO.
Is there a way i can make the business object read a value from table CEKKO has one of its attributes?
Hi,
Create a virtual attribute that reads the value from table CEKKO and assigns the value.
Regards,
Eddie
I created the attribute that reads the value from CEKKO using tcode SW01, but it gives an error that the business object does not have CEKKO implemented as a component but has EKKO.
And with this error, i cannot make use of the business object at all.
Hello,
How did you define that attribute? Any virtual attribute can select from a table.
regards
Rick Bakker
hanabi technology
Using tcode SWO1, i defined the attribute. Please can you give a step by step guide on how to define the virtual attrribute.
Thanks.
Hi,
See [Online Help|http://help.sap.com/saphelp_nw73/helpdata/en/c5/e4abde453d11d189430000e829fbbd/frameset.htm].
Regards,
Eddie
Hello,
Step-by-step? Wouldn't it be quicker if you said what you did?
regards
Rick Bakker
hanabi technology
I followed the link given by Eddie to create the virtual attribute. But the problem now is this attribute does not show in my workflow when i want to use it as a condition.
How do i make use of this attribute as a condition if it does not show in my workflow? Is there as program i need to write?
Edited by: Ooladipo on Feb 24, 2012 4:37 PM
Hello,
If you have an instance of the object in your workflow container, then you can expand it and see the attribute.
You can also refer to it in conditions. No extra programming needed. Have you done SWU_OBUF?
regards
Rick Bakker
hnabi technology
The attribute is visible if i expand the container, but its apparent that it is not picking any value. what does SWU_OBUF do pls?
Hello,
"The attribute is visible if i expand the container,"
That's good. Does it show a value? If not, there is something wrong with how you programmed that virtual attribute.
Test it in SWO1.
SWU_OBUF refreshes the buffer. You should run it after any change connected with workflow.
regards
Rick Bakker
hanabi technology
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.
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
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.
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
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?
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
Yeah I get it and I would look at it, thanks for all your help