‎2009 Nov 12 2:51 PM
Hi Experts,
I have a requirement of creating dynamic check boxes based on the number of records that are retrieved from a database table.
Can you please suggest me how to achieve it.
Regards
RP.
‎2009 Nov 12 2:55 PM
‎2009 Nov 12 3:12 PM
‎2009 Nov 12 4:27 PM
Hi ,
why dont you provide a pop-up to select checkboxes and corresponding selection.....will be too simple
‎2009 Nov 12 10:41 PM
Hi RPReddy16,
where do you want the check boxes?
- List: You can create the list just the way you need it, WRITE ... AS CHECKBOX HOTSPOT ON and pocess -> interactive list events.
- Screen: Must define maximum af all possible check boxes, set invisible not wanted boxes.
Kind regards,
Clemens
‎2009 Nov 13 2:14 AM
Hey RP,
Try this way.
Thanks
Venkat.O
REPORT ztest_program .
DATA: it_data TYPE TABLE OF t001.
DATA:check TYPE char3.
DATA:sy_index TYPE char2.
DEFINE checkbox.
parameters:&1 as checkbox.
END-OF-DEFINITION.
CHECKbox:c01,c02,c03,c04,c05,c06,c07,c08,c09,c10,
c11,c12,c13,c14,c15,c16,c17,c18,c19,c20,
c21,c22,c23,c24,c25,c26,c27,c28,c29,c30,
c31,c32,c33,c34,c35,c36,c37,c38,c39,c40.
AT SELECTION-SCREEN OUTPUT.
DESCRIBE TABLE it_data LINES sy-tfill.
sy-tfill = 39. "This will be changed based on the itab records. I just hardcoded the value
sy_index = 1.
LOOP AT SCREEN.
CONCATENATE 'C' sy_index INTO check.
IF screen-name = check.
IF sy_index GT sy-tfill.
screen-active = '0'.
MODIFY SCREEN.
sy_index = sy_index + 1.
CONTINUE.
ENDIF.
sy_index = sy_index + 1.
ENDIF.
ENDLOOP.
‎2009 Nov 13 3:18 AM
Hi ,
You can achive the same as below ,
Suppose you want 5 checkboxes , then make a counter and loop on it.
Inside this loop you decide the name of the checkbox like BOX1, BOX2...etc.
So, concatenate BOX with counter , now use this name to make a checkbox by select option.
Hope its help you.
‎2009 Nov 13 8:02 PM
Hi Harsh,
I don't understand. Can you give a few code lines?
Many thanks in advance
Clemens
‎2009 Nov 13 8:12 PM
try something like this :
suppose you require 5 checkbox.
loop 5 times :
concatenate a common name and a number like BOX and number.
now make checkbox with this name using select option.
end loop.
hope you get it
‎2009 Nov 14 12:41 AM
Harsh,
no kidding: Where is the syntax for
now make checkbox with this name using select option.We want you to try to help not to help your mechanical frothing.
Regards,
Clemens
‎2009 Nov 13 9:02 PM
Why don't you define a subscreen with a table control?
That way you can place all the checkboxes you want without worrying about screen area