Skip to Content
author's profile photo Former Member
Former Member

Module Pool When case problem

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Jun 07, 2012 at 04:35 AM

    Yes it will work.

    Best way is to use and find out. 😊

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 07, 2012 at 04: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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.