‎2008 Jan 02 3:15 AM
Hi all,
how do i create dynamic checkboxes according to a internal table?
‎2008 Jan 02 3:23 AM
Hi Daphne,
Could you be a little more specific in your request? Where do you want to create the dynamic checkboxes, in a report, alv, table control, etc...?
Jerry
‎2008 Jan 02 3:27 AM
i want to create those dynamic checkboxes and make it appear on the screen itself?
‎2008 Jan 02 3:32 AM
Hi Daphne,
hope this is what u r looking at.
PARAMETER : p_c0 TYPE c AS CHECKBOX USER-COMMAND m1.
PARAMETER : p_c1 TYPE c AS CHECKBOX USER-COMMAND m2.
PARAMETER : p_c2 TYPE c AS CHECKBOX USER-COMMAND m2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_c0 = 'X'.
IF screen-name = 'P_C1' OR
screen-name = 'P_C2'.
screen-active = 1.
MODIFY SCREEN.
ENDIF.
ELSE.
IF screen-name = 'P_C1' OR
screen-name = 'P_C2'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.Regards
Gopi
‎2008 Jan 02 3:38 AM
hi gopi & all...
for my case i cannot limit only 2 checkbox, it must dynamically create checkbox according to the internal table fields. it can be 10 or more than 10 checkboxes according to the records inside the internal table.
‎2008 Jan 02 4:25 AM
Hi,
Just Check out this link.
http://www.sap-img.com/abap/regarding-runtime-creation-of-check-boxes.htm
Regards
Vadi
‎2008 Jan 02 4:28 AM
loop at itab into wa.
write:/ wa-field1, wa-field1 AS CHECKBOX.
endloop.
‎2008 Jan 02 4:38 AM
hai,
create a field in ur internal table .
example:
data : begin of itab occurs 0,
check type c, [last field of internal table]
end of itab.
loop at itab.
write : check as check box,itab-vgh,itabj,.............
endloop.
then u get check box for all ur internal table entries
‎2008 Jan 02 4:49 AM
Hello Daphne ,
As per my understanding when the thing come to dynamic fields ,it is not possible to have it on screen For that you must have to use Table Control in the screen.
I am quite sure you are well aware how to use table control in screen, if any other problem let me know.
Regards
Swati namdeo.
‎2008 Jan 02 4:56 AM
‎2008 Mar 12 3:55 PM
Hi,
May i know how do you resolve the dynamic checkbox.
please kindly share and advise.
thanks so much.
‎2008 Mar 13 11:28 AM
Firstly i pass the itab to another itab1 to another program from there I declare a itab1 tat contain the value i want it to be displayed as a checkbox. After that i call the function:
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
E_GRID = REF.
CALL METHOD REF->CHECK_CHANGED_DATA.
that's all i could actually remember.