Application Development 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: 

How to make Parameter field i/p enable & disable?

Former Member
0 Kudos

Hello Friends,

I need yr help.

Description:-

2 radio buttons in selection screen i.e.

Frame F1:-

1.p_curr radiobutton group g1

2.p_prev radiobutton group g1

Frame F2:-

Parameter:

a) p_period(2) type c

b) p_year(4) type c

End of Frame F2.

End of Frame F1.

Functionality:-

When Radiobutton 1st i.e. "p_curr" selected report generate output based on current month & year of SY-DATUM.

When i opt 2nd radiobutton i.e. "p_prev" then in that case i need to enter "period & year" in the parameter field. Based on the month & year, report generate the output.

Problem:-

I want that when I select the radio button 1st i.e. "p_curr" in that case the parameter field should not accept any input i.e. input disable or invisible mode.

When 2nd radiobutton opted i.e. "p_prev" then the parameter field should be enabled & ready to accept input.

4 REPLIES 4

Former Member
0 Kudos

CONSTANTS OFF VALUE '0',

ON VALUE '1'.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF NOT P_CURR IS INITIAL.

IF SCREEN-NAME = <PARAMETER FIELD>

SCREEN-INPUT = OFF.

ENDIF.

IF NOT P_PREV IS INITIAL.

IF SCREEN-NAME = <PARAMETER FIELD>

SCREEN-INPUT = ON.

ENDIF.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

Thanks,

Santosh

0 Kudos

Also put a dummy USER-COMMAND on your radiobuttons, so when user select or deselect these, the program get the hand and go through AT SELECTION SCREEN then AT SELECTION-SCREEN OUPUT and re-display the selection screen.

Else user will have to press ENTER to get the fields visibles/invisibles

regards.

Former Member
0 Kudos

Hello ,

Do like this,

AT selection-screen on radiobutton.

loop at screen.

case 'X'.

when 'R1'.

if screen-name = 'P_YEAR'.

screen-input = '0'.

screen-output = '1'.

modify screen

ENDif.

When 'R2'.

if screen-name = 'P_PERIOD'.

screen-input = '0'.

screen-output = '1'.

modify screen

ENDif.

endcase.

endloop.

If useful reward.

Vasanth

Former Member
0 Kudos

Thnx guys for yr help.