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

Parameter on the selection screen

Former Member
0 Likes
956

Hi All,

I have a check box and a parameter on the selection screen. If the checkbox is initial, the paramter shouldn't be editable but if the checkbox is ticked, the parameter should be made mandatory to be enetered with value. How can this be done ?

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
928

Hi,

Modify the screen fields in AT SELECTION-SCREEN OUTPUT

parameters: r1 as checkbox user-command abc,

p1(10).

at selection-screen output.

if r1 is initial.

loop at screen.

if screen-name = 'P1'.

screen-input = '0'.

endif.

modify screen.

endloop.

else.

loop at screen.

if screen-name = 'P1'.

screen-input = '1'.

endif.

modify screen.

endloop.

endif.

Thanks and Regards,

Ruthra

8 REPLIES 8
Read only

Former Member
0 Likes
928

hi,

at selection on that radio button, check if it is initial then loop at screen, make that disable, if it is not initial then create some other parameter which is obligatory field,

if useful reward points..........

Read only

former_member156446
Active Contributor
0 Likes
928

Hi there welcome to SDN check the rules of the community....

and to answer ur question check this [link|http://www.saptechnical.com/Tutorials/ABAP/DynamicSScreen/demo.htm]

Read only

Former Member
0 Likes
928

HI,

Modify the screen fields in AT SELECTION_SCREEN OUTPUT.

AT SELECTION_SCREEN OUTPUT

Loop at screen.

if screen-group1 eq 'GRP1'.

screen-input = 0.

modify screen.

endif.

endloop.

Read only

Former Member
0 Likes
928

After defining the check box and parameter.

parameter: ch_bx as check box.

parameter: p_a type c modif id xyz obligatory.

AT selection-screen output.

if ch_bx is initail.

loop at screen.

if scrren-group1 = 'XYZ'.

screen-active = 0.

endif.

modify screen.

endloop.

else.

loop at screen.

if screen-group1 = 'xyz'.

screen-active = 1.

endif.

modify screen.

endloop.

Read only

Former Member
0 Likes
928

hi,

do this way ...


at selection-screen.
if not p_check is initial.
  if not p_price is initial.
  message e000(zfi) with 'Please Enter Price Field'.
 endif.
endif.

Read only

Former Member
0 Likes
928

Hi,

Refer to the following code.In this change radiobuttons with the checkbox.

SELECTION-SCREEN BEGIN OF BLOCK B1.

parameters: p_erdat like zirpactivity-erdat modif id SC1 ,

r1 radiobutton group RAD1 user-command ABC default 'X',

r2 radiobutton group RAD1.

SELECTION-SCREEN END OF BLOCK B1.

AT SELECTION-SCREEN.

check sy-ucomm = 'ABC'.

check sy-ucomm = 'F8'.

AT SELECTION-SCREEN OUTPUT.

loop at screen.

if r1 = 'X' and screen-group1 = 'SC1' .

screen-input = 0.

ENDIF.

IF r2 = 'X'.

screen-group1 = 'SC1' .

screen-input = 1.

endif.

modify screen.

endloop.

Hope this helps.

Reward if helpful.'

Regards,

Sipra

Read only

Former Member
0 Likes
928

Hi,

Heres the code

PARAMETERS : parameter MODIF ID sg1.

If <checkbox> NE 'X'.

LOOP AT SCREEN.

IF screen-group1 = 'SG1'.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

else.

if parameter is initial.

message 'Pls fill the values' type 'E'.

endif.

endif.

Thanks

Nayan

Read only

Former Member
0 Likes
929

Hi,

Modify the screen fields in AT SELECTION-SCREEN OUTPUT

parameters: r1 as checkbox user-command abc,

p1(10).

at selection-screen output.

if r1 is initial.

loop at screen.

if screen-name = 'P1'.

screen-input = '0'.

endif.

modify screen.

endloop.

else.

loop at screen.

if screen-name = 'P1'.

screen-input = '1'.

endif.

modify screen.

endloop.

endif.

Thanks and Regards,

Ruthra