2006 Nov 29 9:50 AM
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
2006 Nov 29 10:02 AM
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
2006 Nov 29 10:02 AM
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