Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

WorkFlow specific

Former Member
0 Likes
402

In a workflow activity, I call (using an object method) an ABAP function module which displays an ALV with commands. I would like that one of these commands to enable the user to keep the workitem in his businessworkplace without take making any action.

How can i design the communication between my workflow and the ABAP function module to do so ?

I try with a loop in the workflow but the work item is regenerated too quickly and it looks as if I stayed in the ALV screen.

Thanks in advance for your answer.

1 ACCEPTED SOLUTION
Read only

morten_nielsen
Active Contributor
0 Likes
317

Hi

Yeah it possible, just pass back to the method that the command has been executed either as a parameter or as an exception.

In the method, you the use the Workflow macro <b>exit_cancelled</b>, see example below:

begin_method changeviadialog changing container.
CALL FUNCTION 'PRELIMINARY_POSTING_UPDATE'
     EXPORTING
          belnr     = object-key-documentno
          bukrs     = object-key-sourcecompanycode
          gjahr     = object-key-fiscalyear
*          workf     = 'X'
     EXCEPTIONS
          cancelled = 01
          OTHERS    = 02.
CASE sy-subrc.
  WHEN 0.            " OK
  WHEN 01.    " to be implemented
    exit_cancelled.
  WHEN OTHERS.       " to be implemented
    exit_cancelled.
ENDCASE.
end_method.

Regards

Morten Nielsen

Message was edited by:

Morten Nielsen

1 REPLY 1
Read only

morten_nielsen
Active Contributor
0 Likes
318

Hi

Yeah it possible, just pass back to the method that the command has been executed either as a parameter or as an exception.

In the method, you the use the Workflow macro <b>exit_cancelled</b>, see example below:

begin_method changeviadialog changing container.
CALL FUNCTION 'PRELIMINARY_POSTING_UPDATE'
     EXPORTING
          belnr     = object-key-documentno
          bukrs     = object-key-sourcecompanycode
          gjahr     = object-key-fiscalyear
*          workf     = 'X'
     EXCEPTIONS
          cancelled = 01
          OTHERS    = 02.
CASE sy-subrc.
  WHEN 0.            " OK
  WHEN 01.    " to be implemented
    exit_cancelled.
  WHEN OTHERS.       " to be implemented
    exit_cancelled.
ENDCASE.
end_method.

Regards

Morten Nielsen

Message was edited by:

Morten Nielsen