‎2008 Dec 13 5:29 AM
Hi All,
Is it possible to create a dynamic selection-screen checkbox parameters at runtime. My requirement is :
I have Object parameter on the selection-screen, based on this it has to fetch the info structures and display it with checkboxes on the same selection-screen, so that the user can select which info structures to be processed and can save it as a variant.
Thanks,
Satya Priya
‎2008 Dec 13 5:38 AM
Hi Satya Priya
You can handel this AT Selection-Screen output.
Loop at screen
Check the screen group for parameter:
Screen-invisible = 1
Modify screen.
Endloop.
‎2008 Dec 13 8:11 AM
Hi,
Try this:
SELECTION-SCREEN BEGIN OF BLOCK bl1.
PARAMETERS: q1 TYPE c LENGTH 10,
q2 TYPE c LENGTH 10 MODIF ID GR1,
q3 TYPE c LENGTH 10 MODIF ID GR1,
c1 AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK bl1.
SELECTION-SCREEN PUSHBUTTON /1(20) but01 USER-COMMAND US01.
INITIALIZATION.
MOVE '@B_CREA@Show/Hide' to but01.
AT SELECTION-SCREEN.
CASE sy-ucomm.
WHEN 'US01'.
ENDCASE.
AT SELECTION-SCREEN OUTPUT.
IF c1 EQ 'X'.
LOOP AT SCREEN.
IF screen-group1 EQ 'GR1'.
Screen-ACTIVE = 0.
Modify screen.
ENDIF.
ENDLOOP.
ENDIF.
‎2008 Dec 13 8:18 AM
[Here are over 1K search results:|https://www.sdn.sap.com/irj/scn/advancedsearch?query=dynamicselectionscreen&cat=sdn_all]
‎2008 Dec 13 9:07 AM
as per ur requirment....execute it and see
tables :DD02L,t002t,t002.
data : begin of itab occurs 0,
tabname like DD02L-TABNAME,
end of itab.
data : tabname1 like DFIES-TABNAME,
RSSELTEXTS1 type table of RSSELTEXTS with header line.
data : begin of RSSELTEXTS2 occurs 0,
RSSEL type RSSELTEXTS,
initial type c,
end of RSSELTEXTS2.
data : begin of imakt occurs 0 .
include structure t002.
data : end of imakt.
data : begin of ipara occurs 0,
name(132) type c,
text(132) type c,
end of ipara.
data :srch_str(10) TYPE c,
tot type i,
ind type sy-tabix.
select-options : s_lang for t002-spras.
*PARAMETERS show_all AS CHECKBOX USER-COMMAND flag.
PARAMETERS showall1 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showall2 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showall3 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showall4 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showall5 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showall6 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showall7 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showall8 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showall9 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showal10 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showal11 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showal12 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showal13 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showal14 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showal15 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showal16 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showal17 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showal18 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showal19 AS CHECKBOX USER-COMMAND flag modif id sd.
PARAMETERS showal20 AS CHECKBOX USER-COMMAND flag modif id sd.
initialization.
at selection-screen output.
if s_lang ne ' '.
select * from t002 into table imakt where spras in s_lang.
describe table imakt lines tot.
loop at screen .
if screen-group1 = 'SD'
and screen-group3 = 'PAR'.
ipara-name = screen-name.
ind = screen-group4.
read table imakt index ind.
ipara-text = imakt-laiso.
append ipara.
clear ipara.
endif.
endloop.
endif.
loop at ipara.
RSSELTEXTS1-name = ipara-name.
RSSELTEXTS1-kind = 'P'.
RSSELTEXTS1-text = ipara-text.
append RSSELTEXTS1.
clear RSSELTEXTS1.
endloop.
CALL FUNCTION 'SELECTION_TEXTS_MODIFY'
EXPORTING
PROGRAM = sy-repid
TABLES
SELTEXTS = RSSELTEXTS1
EXCEPTIONS
PROGRAM_NOT_FOUND = 1
PROGRAM_CANNOT_BE_GENERATED = 2
OTHERS = 3
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
if s_lang ne ' '.
loop at screen .
if screen-group1 = 'SD'
and screen-group3 = 'PAR'
and screen-group4 > tot.
screen-input = '0'.
screen-active = '0'.
modify screen.
endif.
endloop.
endif.
if s_lang = ' '.
loop at screen .
if screen-group1 = 'SD'.
screen-input = '0'.
screen-active = '0'.
modify screen.
endif.
endloop.
endif.