‎2012 Jun 07 5:20 AM
Hi All,
Can I pass <FS> in when case,will it work.
example--
MODULE wz_user_command_wizard INPUT.
CLEAR g_save_ok_code.
swf_okcode_get g_ok_code.
g_save_ok_code = g_ok_code.
CLEAR g_ok_code.
FIELD-SYMBOLS <fs> like sy-ucomm.
ASSIGN g_save_ok_code TO <fs>.
CASE g_save_ok_code.
when '<fs>' .
DATA: container_doc TYPE REF TO cl_gui_custom_container,
g_container_doc TYPE scrfname VALUE 'CC_SELECTION',
obj1 TYPE REF TO cl_gui_toolbar.
DATA : return_code1 TYPE i .
CREATE OBJECT container_doc
EXPORTING
container_name = g_container_doc.
CREATE OBJECT obj1
EXPORTING
parent = container_doc.
CALL METHOD cl_gui_cfw=>dispatch
IMPORTING
return_code = return_code1.
Regards,
Abhinav Johri
***************************************************
‎2012 Jun 07 5:35 AM
‎2012 Jun 07 5:32 AM
Hi,
Here, i have no idea, why you want a condition such as
when '<FS>'.
You are assigning the sy-ucomm to your field symbol, which is correct, the next step woud be to monitor various values of sy-ucomm by using the following statements.
FIELD-SYMBOLS :
<fs_ucomm> TYPE syucomm.
<fs_ucomm> = sy-ucomm.
CASE <fs_ucomm>.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN .
WHEN OTHERS.
ENDCASE.
Hope it helps. Thank you.
Regards,
kartik
‎2012 Jun 07 5:35 AM