Skip to Content

Problem in Debugging a Method of Class in Class Based Workflow

Hello Experts,

I am new to classes and objects and also to class based workflow. Before this I have created workflows only using BOR.

I have a requirement of adding one more level in standard leave request workflow.

For that I made a copy of standard workflow template and also created a subclass of ZCL_PT_REQ_WF_ATTRIBS called ZCL_PT_REQ_WF_ATTRIBS_COPY (since ZCL_PT_REQ_WF_ATTRIBS was already created and used by other workflow templates and not allowing me to add my method).

Then I added my method in ZCL_PT_REQ_WF_ATTRIBS_COPY called REVERT_REQUEST_STATUS.

When I executed my workflow the method went into error raising exeption CX_SY_REF_IS_INITIA.

I tried to debug my method by adding an infinite do...enddo loop in my code, also tried function module K_PLAN_WAIT_FOR_DEBUGGING and K_PLAN_WAIT_FOR_DEBUGGING_CTRL, also tried following the instruction in SAP note 1782731 but with any of these methods I am unable to see my class method in SM50.

I checked SCN for similar threads but couldn't get the solution.

I checked WF-BATCH authorizations which seems to be correct since I am able to debug methods of BOR by creating infinite loop in my BOR method.

I certainly don't know where I am going wrong and why I am not able to see my class method in SM50.

Experts Please help.

Regards,

Shraddha.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Sep 06, 2016 at 06:31 PM

    Just a guess: you must implement the method IF_WORKFLOW~FIND_BY_LPOR, to return an instance of your class. Refer to the numerous threads in SCN, and in the SAP library.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 07, 2016 at 07:06 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 10, 2016 at 06:12 PM

    Hi Shraddha,

    Could you please execute the method directly from SE24 as method CREATED declared as STATIC & check whether coming in SM50 or not.As per your screenshots DO-ENDO should display in SM50 from workflow execution.

    Regards,

    Shailesh

    Add a comment
    10|10000 characters needed characters exceeded

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.