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

Selection Screen based on a table output

Former Member
0 Likes
1,594

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!

#HeaderHeader
(X)blablablablablabla
(  )blablablablablabla
(  )blablablablablabla
(X)blablablablablabla
(X)blablablablablabla
(  )blablablablablabla
3 REPLIES 3
Read only

Former Member
0 Likes
967

You mean like a table maintenance generator with events?

Rob

Read only

kirill_smirnov
Explorer
0 Likes
967

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

Read only

Former Member
0 Likes
967

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