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

Hide a parameter in a select-screen

Former Member
21,264

hi

I have this selection screen

SELECTION-SCREEN BEGIN OF BLOCK tipo WITH FRAME.

PARAMETERS: p_resumo RADIOBUTTON GROUP tipo,

p_farm RADIOBUTTON GROUP tipo.

*RP(20.02.2009)-Reestruturação do módulo

SELECT-OPTIONS: s_kunnr FOR qmel-kunum.

*

PARAMETERS: p_sform LIKE tnapr-sform OBLIGATORY

DEFAULT 'ZLYSD_RESUMO_RECLAMACOES'.

SELECTION-SCREEN: END OF BLOCK tipo,

END OF BLOCK inicial.

and i need

if p_resumo is not initial, the select option s_kunnr doesn'appear or isn't a input field.

How can i do this ?

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
8,103

Hi,

SELECTION-SCREEN BEGIN OF BLOCK tipo WITH FRAME.

PARAMETERS: p_resumo RADIOBUTTON GROUP tipo,

p_farm RADIOBUTTON GROUP tipo.

*RP(20.02.2009)-Reestruturação do módulo

SELECT-OPTIONS: s_kunnr FOR qmel-kunum.

*

PARAMETERS: p_sform LIKE tnapr-sform OBLIGATORY

DEFAULT 'ZLYSD_RESUMO_RECLAMACOES'.

SELECTION-SCREEN: END OF BLOCK tipo,

END OF BLOCK inicial.

and i need

if p_resumo is not initial, the select option s_kunnr doesn'appear or isn't a input field.

You have to write the following code in AT SELECTION-SCREEN OUTPUT event.

LOOP AT SCREEN.

IF NOT p_resumo IS INITIAL.

IF ( SCREEN-NAME EQ 'S_KUNNR-LOW' or SCREEN-NAME EQ 'S_KUNNR-HIGH' ).

SCREEN-ACTIVE = '0' ---Field will be disabaled...

SCREEN-INVISIBLE = '1' ---Field will be invisible...

ENDIF.

MODIFY screen .

ENDIF.

ENDLOOP.

Regards,

Anil Salekar

4 REPLIES 4
Read only

gaursri
Active Contributor
8,103

Hola Ricardo,

Please look at this excerpt.It might be helpful to you.

AT SELECTION SCREEN OUTPUT
LOOP AT SCREEN.
IF SCREEN-NAME = '*******'.
SCREEN-ACTIVE = 0.
SCREEN-INVISIBLE = 1.
MODIFY SCREEN.
ENDIF.

ENDLOOP.

Have a best day ahead.

Read only

Former Member
0 Likes
8,103

We can hide parameter by set screen-active to 0.

Here is example of how to hide parameter in selection screen. Write it, and change click on radiobutton to hide parameter.

REPORT ZAALGAL0006.

DATA: d_ucomm LIKE sy-ucomm.

PARAMETERS: p_grpa1(10) MODIF ID A,

p_grpa2(5) MODIF ID A,

p_grpb1(2) MODIF ID B.

PARAMETERS: p_actA RADIOBUTTON GROUP rad1 USER-COMMAND ACT DEFAULT 'X',

p_actB RADIOBUTTON GROUP rad1.

AT SELECTION-SCREEN.

d_ucomm = sy-ucomm.

AT SELECTION-SCREEN OUTPUT.

LOOP AT screen.

IF p_actA = 'X'.

IF screen-group1 = 'B'.

screen-active = 0.

ENDIF.

ELSEIF p_actB = 'X'.

IF screen-group1 = 'A'.

screen-active = 0.

ENDIF.

ENDIF.

MODIFY screen.

ENDLOOP.

START-OF-SELECTION.

I hope this help you!

Read only

Former Member
0 Likes
8,103

PARAMETERS: p_resumo RADIOBUTTON GROUP tipo OBLIGATORY

Read only

Former Member
8,104

Hi,

SELECTION-SCREEN BEGIN OF BLOCK tipo WITH FRAME.

PARAMETERS: p_resumo RADIOBUTTON GROUP tipo,

p_farm RADIOBUTTON GROUP tipo.

*RP(20.02.2009)-Reestruturação do módulo

SELECT-OPTIONS: s_kunnr FOR qmel-kunum.

*

PARAMETERS: p_sform LIKE tnapr-sform OBLIGATORY

DEFAULT 'ZLYSD_RESUMO_RECLAMACOES'.

SELECTION-SCREEN: END OF BLOCK tipo,

END OF BLOCK inicial.

and i need

if p_resumo is not initial, the select option s_kunnr doesn'appear or isn't a input field.

You have to write the following code in AT SELECTION-SCREEN OUTPUT event.

LOOP AT SCREEN.

IF NOT p_resumo IS INITIAL.

IF ( SCREEN-NAME EQ 'S_KUNNR-LOW' or SCREEN-NAME EQ 'S_KUNNR-HIGH' ).

SCREEN-ACTIVE = '0' ---Field will be disabaled...

SCREEN-INVISIBLE = '1' ---Field will be invisible...

ENDIF.

MODIFY screen .

ENDIF.

ENDLOOP.

Regards,

Anil Salekar