cancel
Showing results for 
Search instead for 
Did you mean: 

controlling screen parameters in workflow item

former_member203501
Active Contributor
0 Kudos

Hi Team,

I have developed a custom transaction and activated a custom workflow using a custom business object. In the work item I can able to see the transaction which i have executed. it is having many approval cycles, in each step approver will fill some fields. But i wanted to control the screen parameters ( disabling and enabling fields based on the approver ) , for example there are 5 approvers and 5 fields , first approver have to see only one field and rest of the 4 fields must be disabled. generally user clicks ( in SBWP/ User inbox )on the work item then it will open the custom screen and then he will fills the fields then approves it ) in each step.


Please share your ideas. Thanks in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

SandySingh
Active Contributor
0 Kudos

Hello

As per my understanding, you are calling custom transaction ZTXN in the approval method.

- Call the Approval step in a loop in WF . Create a container operation to increment the approval counter.

- Pass the  approval counter in the method; and set it using EXPORT memory ID . Call the Transaction ZTXN using CALL TRANSACTION statement. In the PBO of approval screen, read the value of approval counter using IMPORT memory ID statement and using LOOP AT SCREEN, make the fields invisible or visible.


LOOP AT SCREEN.

       IF screen-name = 'APPROVER_NAME1'.

         screen-required    = '0'.

         screen-invisible = '1'.

         screen-active = '0'.

         MODIFY SCREEN.

       ENDIF.

     ENDLOOP.

ENDIF .

Sample ABAP Program to EXPORT or IMPORT internal table TO or FROM ABAP Memory - ABAP Development - S...

Regards

Sandy

Former Member
0 Kudos

How is the code in your business object (or class) method? (The one that gets executed when you click the work item from SBWP). Are you just calling a transaction? Couldn't you for example call a function that is part of your program/include that includes the screen? Then in the function you could call the screen. And of course in the function you can do whatever you want (you can set parameters etc. which you can use to control the screen/logic - if approver level is A, then hide field X, etc.)

To be honest I don't perhaps understand your problem correctly. Hiding fields is just pure and simple screen/dialog programming, which should be as easy as it gets. Then perhaps you just need to five some input from the workflow (=the method I explained above) to the screen.

Regards,

Karri