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

how to change GUI status in program?

Hi, I have this problem:

I want to have 2 buttons on Application toolbar - Hide red, Hide Yellow... When Hide red will be pushed, it should change to Show red, and if Hide yellow will be pushed, it should change to Show yellow... How to do it easily? I tried to change GUI status (with statemen "set pf-status") to another with different buttons but it doest nothing... 😔

Thanks.

Zuzana

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 23, 2008 at 09:58 AM

    it is not done by pf-status

    you should try to modify screen table so that whenever you press hide red it enters user command and then update contents of screen table for that hide button to invisible.

    reward if useful plz

    regards

    vivek

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 23, 2008 at 10:01 AM

    hi,

    now goto the transaction SE41(Menu Painter)

    then Give the protram name and Status name and click on the button Create.

    it will create a new gui status for your program...

    Then add your buttons in the application tool bar....

    then press in the function keys ..

    there u give these values.....

    now use this GUI Ststus in your program....

    Now these exit , cancel will enables and u can use these.

    reward if its useful

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 23, 2008 at 10:01 AM

    SELECTION-SCREEN FUNCTION KEY 1.

    SELECTION-SCREEN FUNCTION KEY 2.

    INITIALIZATION.

    sscrfields-functxt_01 = 'Hide Red'.

    sscrfields-functxt_02 = 'Hide Yellow'.

    AT SELECTION-SCREEN.

    CASE sscrfields-ucomm.

    WHEN 'FC01'.

    sscrfields-functxt_01 = 'Show Red'.

    sscrfields-functxt_02 = 'Hide Yellow'.

    WHEN sscrfields-ucomm.

    sscrfields-functxt_01 = 'Hide Red'

    sscrfields-functxt_02 = 'Show Yellow'.

    Regards,

    Mohaiyuddin

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 23, 2008 at 10:16 AM

    Hi

    Hope it will solve ur problem.

    Reward if help.

    You can use FM RS_SET_SELSCREEN_STATUS at event AT SELECTION-SCREEN OUTPUT.

    AT SELECTION-SCREEN OUTPUT.

    IF SY-DYNNR = 1000.

    CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'

    EXPORTING

    P_STATUS = 'ZSELK' "your status

    TABLES

    P_EXCLUDE = EXCLUDE

    EXCEPTIONS

    OTHERS = 1.

    ENDIF.

    Also check program DEMO_SEL_SCREEN_STATUS and this link.

    https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=https%3A//forums.sdn.sap.com/thread.jspa%3FthreadID%3D51617%26tstart%3D195

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 23, 2008 at 10:36 AM

    First create your own status by se41 .Pass this into Fun module . it will work definately rewards me .

    like here 'status' is a form . into this form 'ZPF_STATUS' is my own which i create by se41 .

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    i_callback_program = 'ZRCSM03A'

    i_callback_top_of_page = 'TOP-OF-PAGE'

    it_fieldcat = itfld[]

    i_callback_pf_status_set = 'STATUS'

    i_callback_user_command = 'USER_COMMAND'

    TABLES

    t_outtab = italv.

    ----


    • FORM STATUS *

    ----


    • ........ *

    ----


    • --> i_rt_extab *

    ----


    FORM status USING i_rt_extab TYPE slis_t_extab.

    DATA:x_extab TYPE slis_extab.

    x_extab-fcode = '&LFO'.

    x_extab-fcode = '&OAD'.

    x_extab-fcode = '&CRE'.

    x_extab-fcode = '&CRR'.

    x_extab-fcode = '&CRL'.

    x_extab-fcode = '&CRB'.

    x_extab-fcode = '&NFO'.

    x_extab-fcode = '&LFO'.

    x_extab-fcode = '&AVE'.

    x_extab-fcode = '&OAD'.

    x_extab-fcode = '&ABC'.

    x_extab-fcode = '%SL'.

    APPEND x_extab TO i_rt_extab.

    SET PF-STATUS 'ZPF_STATUS' EXCLUDING i_rt_extab.

    ENDFORM.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 23, 2008 at 10:43 AM

    Hi

    Hope it will solve ur problem.

    Reward if help.

    You can use FM RS_SET_SELSCREEN_STATUS at event AT SELECTION-SCREEN OUTPUT.

    AT SELECTION-SCREEN OUTPUT.

    IF SY-DYNNR = 1000.

    CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'

    EXPORTING

    P_STATUS = 'ZSELK' "your status

    TABLES

    P_EXCLUDE = EXCLUDE

    EXCEPTIONS

    OTHERS = 1.

    ENDIF.

    Also check program DEMO_SEL_SCREEN_STATUS and this link.

    https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=https%3A//forums.sdn.sap.com/thread.jspa%3FthreadID%3D51617%26tstart%3D195

    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.