‎2007 Apr 13 4:07 PM
Hi all,
how can we add checkbox on to a screen dynamically. please send me some details.
thanks,
samm
‎2007 Apr 13 4:15 PM
Hi,
are you trying to use checkbox in the Abap List?
For creating checbox, you can use
the write addition "as checkbox".
Do 5 times
WRITE:/ FLAG AS CHECKBOX INPUT OFF.
WRITE:/ FLAG_on AS CHECKBOX INPUT ON.
enddo
regards
‎2007 Apr 13 4:42 PM
If its a screen that you are adding the checkbox to, you can select whether to hide/unhide your checkbox in the PBO as follows:
LOOP AT screen.
IF screen-name = 'CHK1'.
screen-invisible = 0.
screen-input = 0.
ENDIF.
ENDLOOP.
To enable the checkbox, just reverse the values to 1.
Hope this helps.
Sudha
‎2007 Apr 14 11:17 AM
Hi Sudha,
could you please give me some more inputs since i am not getting any check box on the screen after i used your codes in PBO.
thanks,
Samm
‎2007 Apr 14 1:54 PM
Hi Samm,
In the code suggesed by Sudha, just add the statement MODIFY SCREEN before the ENDLOOP and it should work.
Also if the name of your checkbox is CHK1 then:
to hide the checkbox
LOOP AT SCREEN.
IF SCREEN-NAME EQ 'CHK1'.
SCREEN-INPUT = '0'.
SCREEN-INVISIBLE = '1'.
SCREEN-ACTIVE = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
And inverse values for input/active and invisible when u want to display the checkbox.
Regards,
Aditya
Message was edited by:
Aditya Laud
‎2007 Apr 14 12:15 PM
Hi Try this ..
Let Us say u have a Check box on selection screen p_cbox , if user selects this u want Check box ( for selection ) to appear in the output list ..
While Setting the layout parameters for the Output you can use :
DATA g_r_layo1 TYPE lvc_s_layo ,
FORM alv_layo1.
g_r_layo1-grid_title = 'SD Delivery Note(Printed)'.
g_r_layo1-cwidth_opt = g_c_mark.
g_r_layo1-zebra = g_c_mark.
g_r_layo1-no_rowmark = space.
IF ALready Printed Delivery to be printed
IF p_cbox = 'X'.
g_r_layo1-sel_mode = g_c_selmode.
ENDIF.
ENDFORM. " alv_layo
g_r_layo1-sel_mode will get u the check box ..
This works for classes ..
Thanks .