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

Module Pool When case problem

Former Member
0 Likes
496

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
***************************************************

1 ACCEPTED SOLUTION
Read only

former_member209920
Active Participant
0 Likes
455

Yes it will work.

Best way is to use and find out.

2 REPLIES 2
Read only

Kartik2
Contributor
0 Likes
455

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

Read only

former_member209920
Active Participant
0 Likes
456

Yes it will work.

Best way is to use and find out.