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

how to change GUI status in program?

Former Member
0 Likes
5,558

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

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

10 REPLIES 10
Read only

Former Member
0 Likes
2,451

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

Read only

0 Likes
2,451

Thanks, but I don't know how to hide button on Application toolbar (I'm still looking for it), if you know it, please tell/write

Thanks

Zuzana

Read only

0 Likes
2,451

hi, pls. tell me how I can loop at screen.. But it's not selection screen... It's output screen... And I can't access button on application toolbar by it...

Read only

Former Member
0 Likes
2,451

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

Read only

0 Likes
2,451

I know how to create GUI status I just don't know how to make it work...

Read only

Former Member
0 Likes
2,451

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

Read only

0 Likes
2,451

It's not on selection screen, it's on output screen

Read only

Former Member
0 Likes
2,451

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/t...

Read only

Former Member
0 Likes
2,451

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.

Read only

Former Member
0 Likes
2,451

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/t...