on 10-15-2015 7:51 AM
Dear All,
I have an workflow which triggers on creation/ change of contract agreement tcode - ME31K or ME32K. Work flow is working fine. I am using class local class methods to get approvers etc.
I have created custom container I_LV_INITIATOR inside work flow.
Whenever user is changing the contract through ME32K , value of container I_LV_INITIATOR is filled with
user id of person who has created the contract .
But the requirement is if purchase document category (EKKO-BSTYP) = 'K' then I want this container I_LV_INITIATOR
to be filled with user id of person who has changed the contract not with the one who has created the contract. and If I manually test the work flow from SWUS , value of container I_LV_INITIATOR is filled with user id of person who is manually processing the work flow.
Kindly help or give any suggestion f we could achieve this in enhancement or exits.
Thanks,
Arpita
I queried this with OSS a while back and apparently it's "by design", POs and Contracts will always show the PO creator as initiator for any changes.
They came close to admitting it was a stupid design, but it's been like this for too long and too many customers have made provision for it so SAP won't change it.
So the answer as per this thread is to determine who last changed it at the beginning of the WF.
Regards,
Mike
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
I will also add that I am avoiding putting the workflow initiator as agent or as a base to find my agent.
The reason is simply that if the workflow administrator has for one reason or another to restart the workflow then the workflow initiator will be the administrator and this could lead to error.
So as a recommandation always calculate (via an expression) the agent and do not take the easy way of using this variable.
Best regards
Stephane
PS: I would be happy if you share your view with me on this subject
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
Can you share binding for container element I_LV_INITIATOR.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi..
I have created Z business object for BUS2014. and created attribute as created by.
and I am using the same to trigger the workflow . and I have changed binding from workflow to step using this attribute created by.
but workflow is not triggering now.
what additional settings I need to do in SWEC or any where else.
Please someone guide me.
Thanks,
Arpita
Hello,
Put your workflow back to the way it was before, so that it's working.
If you can't check the value of EKPO-BSTYP directly in the workflow then add an attribute to ZBUS2014 that returns the userid of the user who last changed the contract. Make sure you delegate BUS2014 to ZBUS2014 - after that you do not reference ZBUS2014 anywhere (only BUS2014). Then in the workflow just pass that attribute to IV_WF_INITIATOR.
regards
Rick
Thanks Rick...
I have put back my business object from Z to BUS2014.
Now I am getting following error when I am trying to test workflow from SWUS as follow:
Import container contains errors (are any obligatory elements missing?)
Message no. SWF_RUN594
I have checked all binding. it is fine. and the same workflow is working in Sandbox.
Could you please help?
Thanks.
If you can't check the value of EKPO-BSTYP directly in the workflow then add an attribute to ZBUS2014 that returns the userid of the user who last changed the contract. Make sure you delegate BUS2014 to ZBUS2014 - after that you do not reference ZBUS2014 anywhere (only BUS2014). Then in the workflow just pass that attribute to IV_WF_INITIATOR.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.