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

Re: chek box validation

Former Member
0 Likes
414

Hi Expert,

I have developed a report  with around  89 field in the output and one field name called STATUS in my report.This field will show RED GREEN AND YELLO

color indication.My requirement is to put the  3 check box in the selection screen for red green yello.If red is selected then all red should come if green check box is selected all green status fieldshlod come.

My all data is in table IT_ITAB.on what basis i have to seperate the status field.

Regards,

Addu

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
369

Hi Md. Addu,

You can get the required result

1. With the use of radio-buttons all assigned to one group, no complex validations required. At a time, the user can select only one Radio-button and logically, one can get only 1 status at a time ie

Red/Green/Yellow.

2. If you still want to stick with the check-boxes, you can try the below code :

" when you check a single check box - the other two will get disabled.

tables screen.

parameters: w1 as checkbox modif id 1 user-command flag,
             w2 as checkbox modif id 2 user-command flag1,
             w3 as checkbox modif id 3 user-command flag2.

at selection-screen output.

IF w1 = 'X' .
loop at screen.
   if screen-group1 = '2' or screen-group1 = '3'.
     screen-input = '0'.
endif.
modify screen.
endloop.



elseif w2 = 'X'.

   loop at screen.
   if screen-group1 = '1' or screen-group1 = '3'.
     screen-input = '0'.
endif.
modify screen.
endloop.


elseif w3 = 'X'.

loop at screen.
   if screen-group1 = '1' or screen-group1 = '2'.
     screen-input = '0'.
endif.
modify screen.
endloop.

ENDIF.

Please let me know if the answer was usefull and kindly revert in case of any issues.

Thanks & Regards

Vivek Batta

2 REPLIES 2
Read only

Former Member
0 Likes
369

Hi MD. Addu,

     I am not clear with the requirement. So with my assumption, You are making reports output by ITAB, and in ITAB you are making them red green yellow. So for this you will be using certain indexes or conditions(while marking them red green yellow).

     All you need to do is to put certain if and else doing this while putting colors. If the all the check boxes are empty add all lines.

     If red is checked then append lines only with red.

     Similarly for yellow and green.

Read only

Former Member
0 Likes
370

Hi Md. Addu,

You can get the required result

1. With the use of radio-buttons all assigned to one group, no complex validations required. At a time, the user can select only one Radio-button and logically, one can get only 1 status at a time ie

Red/Green/Yellow.

2. If you still want to stick with the check-boxes, you can try the below code :

" when you check a single check box - the other two will get disabled.

tables screen.

parameters: w1 as checkbox modif id 1 user-command flag,
             w2 as checkbox modif id 2 user-command flag1,
             w3 as checkbox modif id 3 user-command flag2.

at selection-screen output.

IF w1 = 'X' .
loop at screen.
   if screen-group1 = '2' or screen-group1 = '3'.
     screen-input = '0'.
endif.
modify screen.
endloop.



elseif w2 = 'X'.

   loop at screen.
   if screen-group1 = '1' or screen-group1 = '3'.
     screen-input = '0'.
endif.
modify screen.
endloop.


elseif w3 = 'X'.

loop at screen.
   if screen-group1 = '1' or screen-group1 = '2'.
     screen-input = '0'.
endif.
modify screen.
endloop.

ENDIF.

Please let me know if the answer was usefull and kindly revert in case of any issues.

Thanks & Regards

Vivek Batta