cancel
Showing results for 
Search instead for 
Did you mean: 

WF Initiator is always PO creator on change of release code

pokrakam
Active Contributor
0 Kudos

Hi all,

A back to basics question: if a PO is changed so that it raises BUS2012.RELEASESTEPCREATED, the workflow initiator will always be the PO creator, <b>not</b> the user who changed it.

I've found out that this is hardcoded into the RELEASESTEPCREATED event, EVTCREATOR comes from EKKO-ERNAM, which is nonsense from both a technical and business point of view. (FM ME_REL_EVENT_EKKO if anyone wants to have a look).

I will probably log this with OSS but wanted to know if anyone had to deal with it, and/or had a sneaky workaround, or had asked OSS themselves in the past. I know I can build workarounds by using BUS2012.CHANGED and checking release codes, but this scenario is just plain wrong and I wondered if anyone had a <b>simple</b> fix or an OSS note that I may have overlooked in my searches.

4.7 system here but I think this applies to other versions.

Any input appreciated,

Mike

(Cross-posted to SAP-WUG and SDN-BPM)

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos


Hello All, old post but maby helping others

we where having the same problem, we try to go with a new event from the user exit EXIT_SAPMM06E_013 on new po lines replacing event releaseStepCreated,

the FM  SWE_EVENT_CREATE was call with the sy-uname as the _WF_Initiator in the container.

recently some problem force to find a better route, but some code in FM SWW_WI_CREATE_VIA_EVENT_INTERN, I had to get the last change by in CDHDR and set it as the wf initiator

if event = 'RELEASESTEPCREATED' and rectype = 'WS93100003'.

data: w_cdhdr type cdhdr.

  select * from cdhdr into w_cdhdr

  where OBJECTCLAS = 'EINKBELEG'

    and OBJECTID = sender(10) "po number

    and udate = sy-datum "today

    and utime <= sy-timlo

    order by OBJECTCLAS OBJECTID changenr descending.

      CONCATENATE 'US' w_cdhdr-username into w_cdhdr-username.

      swf_set_element event_container_handle '_EVT_CREATOR' w_cdhdr-username.

      swf_set_element event_container_handle '_Wf_Initiator' w_cdhdr-username.

      exit.

  endselect.

endif.

Former Member
0 Kudos

Hi Mike,

Have you managed to figure out a way to pass sy-uname to the workflow.

I am on ECC6 and facing the same problem.

Do share if you have a solution.

Thanks in advance.

Vipin Varghese.

pokrakam
Active Contributor
0 Kudos

short update:

I queried this with OSS, who confirmed that this is by design. When I complained that this design is nonsense they agreed and were going to release a BAdI to address this. However this turned out to be too much work so we must just live with it.

sumant_gupta2
Discoverer
0 Kudos

Hi Mike,

Did you go with a workaround? If yes, then would you be able to assist your approach please.

We are on ECC6, so i am thinking of Enhancing the Function that builds this WF info.

Any thoughts?

KKilhavn
Active Contributor
0 Kudos

Just to confirm: There is no change in ECC 6.0 - so "it works as designed"

I suppose they have been thinking that everything must be released - not a big surprise... When the event "SignificantlyChanged" is created, SY-UNAME is used as event creator, and that is the most sensible value for "ReleaseStepCreated" as well. After all, it is event creator this parameter is for, not document creator.