Skip to Content
0
Former Member
Sep 13, 2007 at 05:26 PM

Worklow Settings without transaction SBWP

87 Views

Hello,

If I want to make the configuration of workflow settings in transaction SBWP, simply I go to the menu and I make the activities. The problem is that I must make a program that simulates this functionality, so that it can be executed from iview of the Sap Portal.

I create the program, but the options ADOPT SUBSTITUTION and END SUBSTITUTION, does not work .

Internally, I use the same module function that uses the standard program.

Thank you very much by its aid, them send the code.

REPORT ZWF_OPC_SWBP .

DATA: FCODE LIKE SY-UCOMM,

FOLRG TYPE SIN_FOLRG,

SUBCLASS TYPE SIN_SUBCL,

REFRESHS TYPE SIN_S_REFR.

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

PARAMETERS:

OPC1 TYPE CHAR1 RADIOBUTTON GROUP R1, " refresh organizational enviroment

OPC2 TYPE CHAR1 RADIOBUTTON GROUP R1, " adopt substitution

OPC3 TYPE CHAR1 RADIOBUTTON GROUP R1, " end substitution

OPC4 TYPE CHAR1 RADIOBUTTON GROUP R1, " maintain substitute

OPC5 TYPE CHAR1 RADIOBUTTON GROUP R1. " activate substitute

SELECTION-SCREEN END OF BLOCK B1.

START-OF-SELECTION.

IF OPC1 = 'X'.

FCODE = 'OREF'.

PERFORM EXECUTE_FUNCTION.

ENDIF.

IF OPC2 = 'X'.

FCODE = 'SBWF'.

PERFORM EXECUTE_FUNCTION.

ENDIF.

IF OPC3 = 'X'.

FCODE = 'SEWF'.

PERFORM EXECUTE_FUNCTION.

ENDIF.

IF OPC4 = 'X'.

FCODE = 'SMWF'.

PERFORM EXECUTE_FUNCTION.

ENDIF.

IF OPC5 = 'X'.

FCODE = 'SUBA'.

PERFORM EXECUTE_FUNCTION.

ENDIF.

&----


*& Form EXECUTE_FUNCTION

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM EXECUTE_FUNCTION .

CALL FUNCTION 'SIN_GRID_EXECUTE_WF'

EXPORTING

FCODE = FCODE

OWNER = SY-UNAME

FOLRG = FOLRG

SUBCLASS = SUBCLASS

IMPORTING

REFRESHS = REFRESHS.

COMMIT WORK AND WAIT.

ENDFORM. " EXECUTE_FUNCTION