‎2015 Feb 06 8:57 PM
Hi, I work in a SAP BW Team and we use ABAP regularly at work. Based on a parameter in a report (SE38) I would like to filter a table, create the output of it, and add e.g. a radio button or check box on every line so the user can select single lines. Afterwards I would like do something with the selected items ... I know how to create a "static" selection screen with parameters, check boxes, radio buttons etc. but how can I make this input screen dynamic? I don't need the coding just a good hint on how to solve these issue would be nice Cheers!
| # | Header | Header |
|---|---|---|
| (X) | blablabla | blablabla |
| ( ) | blablabla | blablabla |
| ( ) | blablabla | blablabla |
| (X) | blablabla | blablabla |
| (X) | blablabla | blablabla |
| ( ) | blablabla | blablabla |
‎2015 Feb 06 9:41 PM
‎2015 Feb 06 10:20 PM
Hi Christian,
Do you want to create a dynamic selection-screen based on the table, OR do you need a way to display a table with an opportunity to perform a single/multiple selection?
If you require a dynamic selection-screen generation, please refer to dynamic programming (GENERATE SUBROUTINE-POOL would be a key phrase). This technology would let you to create your own report dynamically - that means that you could generate as many selection-screen elements as you like.
If you need to display a table with single/multiple line selection, then the simplest way to display table data (IMHO) is an ALV grid - either function module based ('REUSE_ALV_GRID_DISPLAY') or class-based ('CL_GUI_ALV_GRID').
Cheers,
Kirill
‎2015 Feb 07 9:45 AM
hi christian,
This is a very good link for dynamic selection screen.
ABAP Program to generate select-options dynamically - Code Gallery - SCN Wiki
The main code which could be useful for you can be as follows:
MODULE status_0200 OUTPUT.
DATA: lv_txt TYPE string.
lv_txt = 'Selection Paramters List'(008).
SET PF-STATUS 'DIALOG'.
LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
SUPPRESS DIALOG.
MOVE lv_txt TO sy-title.
**--display list of fields that can be selected for creating dynamic select-options
LOOP AT it_dd03l INTO wa_dd03l.
AT FIRST.
WRITE: (60) sy-uline.
ENDAT.
READ TABLE it_flds INTO wa_flds WITH KEY fieldname = wa_dd03l-fieldname.
IF sy-subrc NE 0.
CLEAR gv_temp.
ELSE.
gv_temp = 'X'.
ENDIF.
WRITE:/ '|' ,gv_temp AS CHECKBOX.
WRITE: (20) wa_dd03l-fieldname,'|', wa_dd03l-ddtext, AT 60 '|'.
HIDE: gv_temp, wa_dd03l-fieldname, wa_dd03l-keyflag.
AT LAST.
WRITE: (60) sy-uline.
ENDAT.
ENDLOOP.
ENDMODULE. " STATUS_0200 OUTPUT
give it a try..... from the above link