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

How to create dynamic checkbox?

Former Member
0 Likes
1,772

Hi all,

how do i create dynamic checkboxes according to a internal table?

11 REPLIES 11
Read only

Former Member
0 Likes
1,254

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

Read only

Former Member
0 Likes
1,254

i want to create those dynamic checkboxes and make it appear on the screen itself?

Read only

0 Likes
1,255

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

Read only

Former Member
0 Likes
1,255

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.

Read only

i048168
Product and Topic Expert
Product and Topic Expert
0 Likes
1,255
Read only

Former Member
0 Likes
1,255

loop at itab into wa.

write:/ wa-field1, wa-field1 AS CHECKBOX.

endloop.

Read only

Former Member
0 Likes
1,255

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

Read only

Former Member
0 Likes
1,255

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.

Read only

Former Member
0 Likes
1,255

SOLVED

Read only

0 Likes
1,255

Hi,

May i know how do you resolve the dynamic checkbox.

please kindly share and advise.

thanks so much.

Read only

0 Likes
1,255

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.