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

AVL in Function modul for WorkFlow

Former Member
0 Kudos
210

I am doing an ALV in FM for a WF and I have three possible action there.

VALID

REFUSE

CANCEL

I want to put a value in my FM export parameter called action and end the FM.

Then the WF use the parameter action to know which action have been chosen.

But when I do exit or leave screen I return to the ALV.

When I code leave program I terminate the FM without passing the value.

Do you have any solution for me ?

Thanks for help.

Bertrand

*&----


*

*& Form alv_user_command

*&----


*

  • Gestion commande écran choix des métiers

*----


*

FORM alv_user_command USING ucomm LIKE sy-ucomm

selfield TYPE slis_selfield.

CLEAR w_action.

CASE sy-ucomm.

WHEN '&VAL'.

w_action = 1.

exit.

  • leave screen.

  • leave program

WHEN '&REF'.

w_action = 2.

WHEN '&BACK'.

w_action = 0.

ENDCASE.

ENDFORM. "alv_user_command

1 ACCEPTED SOLUTION
Read only

Former Member
0 Kudos
175

Hi,

you can try this..

*&----


*

*& Form alv_user_command

*&----


*

  • Gestion commande écran choix des métiers

*----


*

FORM alv_user_command USING ucomm LIKE sy-ucomm

selfield TYPE slis_selfield.

CLEAR w_action.

CASE sy-ucomm.

WHEN '&VAL'.

w_action = 1.

selfield-exit = 'X'.

WHEN '&REF'.

w_action = 2.

WHEN '&BACK'.

w_action = 0.

ENDCASE.

ENDFORM. "alv_user_command

Now you can get what you want with selfield-exit = 'X'.

Regards

Vijay

1 REPLY 1
Read only

Former Member
0 Kudos
176

Hi,

you can try this..

*&----


*

*& Form alv_user_command

*&----


*

  • Gestion commande écran choix des métiers

*----


*

FORM alv_user_command USING ucomm LIKE sy-ucomm

selfield TYPE slis_selfield.

CLEAR w_action.

CASE sy-ucomm.

WHEN '&VAL'.

w_action = 1.

selfield-exit = 'X'.

WHEN '&REF'.

w_action = 2.

WHEN '&BACK'.

w_action = 0.

ENDCASE.

ENDFORM. "alv_user_command

Now you can get what you want with selfield-exit = 'X'.

Regards

Vijay