2009 Jul 21 1:23 PM
HI,
How to create dynamic internal table bsed on select options.
for examle if i give site as 1111 & 2222 . i want internal table with 2 fields.
Regards,
Sky
2009 Jul 21 1:31 PM
HI,
How to create dynamic internal table bsed on select options.
for examle if i give site as 1111 & 2222 . i want internal table with 2 fields.
Regards,
Sky
2009 Jul 21 1:31 PM
2009 Jul 21 1:31 PM
hi,
what you can do is, have all fields in your internal table(say 10 fields).
and based on your condition 1111 or 2222 you can fill the required fields.
Regards
Sajid
2009 Jul 21 1:34 PM
Hi,
see following example.
PARAMETERS : p_table(10) TYPE C.
DATA: w_tabname TYPE w_tabname,
w_dref TYPE REF TO data,
w_grid TYPE REF TO cl_gui_alv_grid.
FIELD-SYMBOLS: <t_itab> TYPE ANY TABLE.
w_tabname = p_table.
CREATE DATA w_dref TYPE TABLE OF (w_tabname).
ASSIGN w_dref->* TO <t_itab>.
Populating Dynamic internal table
SELECT *
FROM (w_tabname) UP TO 20 ROWS
INTO TABLE <t_itab>.
Displaying dynamic internal table using Grid.
CREATE OBJECT w_grid
EXPORTING i_parent = cl_gui_container=>screen0.
CALL METHOD w_grid->set_table_for_first_display
EXPORTING
i_structure_name = w_tabname
CHANGING
it_outtab = <t_itab>.
CALL SCREEN 100.
Best regards,
pravin
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |