Skip to Content

question on workflow custom events


we have a custom event for MIR4 ( Invoice doc approval ) workflow actually the issue is for one country the invoice amount is coming correct and for other country its coming incorrect. I checked the header part of the work flow and its actually coming as the input parameter in binding on the event container.

from the event container its coming to workflow container. can you please suggest where can I check the event is called and where the event containerrs are filled.



Add comment
10|10000 characters needed characters exceeded

  • What do you mean by

    " for one country the invoice amount is coming correct and for other country its coming incorrect "

    I mean could this be for different currencies? may be the container is not passing the currency key with the amount??

    I don't know about this workflow but have seen similar issue in Reports where if you ignore the currency key, the amount got displayed different from original.

  • Get RSS Feed

3 Answers

  • Aug 08, 2017 at 01:03 PM

    Hi Ramya,

    you can use Event trace to find out, where particular events come from. Transactions SWELS and SWEL.

    If you do it in production, make sure to turn it off after your experiments - event trace should not be on all the time for performance reasons.

    Add comment
    10|10000 characters needed characters exceeded

    • Ramya,

      I agree with Mike - some detective work is needed) some ideas:

      • if trace is impossible in production, maybe you can get it working in development system? from event trace you can see, what program created the event. this might help
      • from workflow log you can define when the event in question was created. You could analyse users activity in application logs for this short period of time (transaction SLG1). If you find out, what user action causes the event, it can help in finding the event-firing piece of code
      • there are few ways to create events programmatically ( FM SWE_EVENT_CREATE is most likely). you can scan your Z code (if it is under suspicion) for uses of this FM (transaction CODE_SCANNER). Also structure SWCONT is likely to be used to pass container values when firing an event.
  • Aug 08, 2017 at 03:48 PM

    There is no link, this is by design. A trace also won't provide any information on how the event was raised.

    You will have to do good old fashioned detective work:

    It is unlikely to be any of the standard SAP event mechanisms as those wouldn't give you a wrong invoice amount. So code is the most likely. You already know it's coming from an invoice, so look for any custom code (BAdIs, userexits) associated with invoices. In the majority of cases this should give you an answer quite easily. Failing that, debug.

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 09, 2017 at 10:11 AM

    Hi Ramya,

    In general at times I try to take a RFC trace by using ST05 transaction. Usually if any workflow is started by using events then it could be either by using SWE_EVENT_CREATE or SAP_WAPI_START_WORKFLOW. so both these function modules are RFC's so I would first try to check the trace if these function modules are somewhere called while executing the transaction.

    However, there is also a chance to trigger workflow by using change documents or by using Business classes which are workflow event compatible.

    Thanks, Pavan

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Pavan,

      thanks for your reply, so I would keep break points at function modules SWE_EVENT_CREATE and SAP_WAPI_START_WORKFLOW also by activating tarce in quality system and ask the functional consultant to create the invoice again so that the break point stops at the required place and we can check where exactly the event containers are filled.