Skip to Content
author's profile photo Former Member
Former Member

Error when workflow created from Function Module

Hi All,

I am trying to implement leave module workflow for one of my requirement.

when i create a leave from PTARQ transaction workflow it is being triggered, but when i tried to do the same from a custom function Module using the same FMs used in PTARQ, workflow initiated but stopped at initial stage( at switch branch )

i went to SWI1 transaction and executed it manually, it end up with error saying ' Error when starting a SWITCH branch'

what should i do to move it forward.



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Oct 07, 2010 at 01:12 PM

    Hi Kishore,

    For leave workflow, SAP has the separate frame work. They called the FM SAP_WAPI_START_WORKFLOW and pass all necessary data's to Process the leave workflow.

    Its not advisable to overwrite the standard behavior. Please check your 'REQ' workflow container in the log. There will be a no data or Some data's might be Missed.

    Before Call the FM, make sure that all data's are passed to the Table parameter, SImple_Container.

    The reason for the Error in your workflow is, there is no data stored in REQ.STATUS container.

    please check the Workflow log.


    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Kishore,

      Please check in the Workflow log and get the Request Id.

      then go to Table PTREQ_HEADER and execute the table with this Request ID.

      Check all the fields are correctly passed in the Table.

      My assumption is, that BADI PT_GEN_REQ has some more method's for some more functionality's for leave workflow.

      So I think Its impossible to create a leave workflow with out the BADI.


Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.