2010 Aug 13 1:42 PM
I have written program to see alv list. When i run the program it shows first field value in all fields in same row.I mean it looks like
row1 : 1 1 1 1 1
row2 : 2 2 2 2 2
row3: 3 3 3 3 3
I am calling function to do list with this program :
gd_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gd_repid
is_variant = gs_variant
is_layout = gs_layout
it_fieldcat = gt_fieldcatalog[]
i_save = 'A'
TABLES
t_outtab = person_tab
EXCEPTIONS
program_error = 1
OTHERS = 2.
and my selection data program is here :
SELECT * INTO CORRESPONDING FIELDS OF TABLE person_tab
FROM zpersonel_bilg
WHERE id = p_id.
2010 Aug 13 2:04 PM
Hi,
Please check your field catalog, you might be building it wrongly. Better is use the FM: REUSE_ALV_FIELDCATALOG_MERGE
This will build the fieldcatalog automatically, you need to pass the output table and program name. For more details check the FM documentation.
Hope this helps
Regards
Shiva
I have written program to see alv list. When i run the program it shows first field value in all fields in same row.I mean it looks like
row1 : 1 1 1 1 1
row2 : 2 2 2 2 2
row3: 3 3 3 3 3
I am calling function to do list with this program :
gd_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gd_repid
is_variant = gs_variant
is_layout = gs_layout
it_fieldcat = gt_fieldcatalog[]
i_save = 'A'
TABLES
t_outtab = person_tab
EXCEPTIONS
program_error = 1
OTHERS = 2.
and my selection data program is here :
SELECT * INTO CORRESPONDING FIELDS OF TABLE person_tab
FROM zpersonel_bilg
WHERE id = p_id.
2010 Aug 13 1:48 PM
You are building your gt_fieldcatalog[] wrong. Same fields are append thrice.
2010 Aug 13 2:04 PM
Hi,
Please check your field catalog, you might be building it wrongly. Better is use the FM: REUSE_ALV_FIELDCATALOG_MERGE
This will build the fieldcatalog automatically, you need to pass the output table and program name. For more details check the FM documentation.
Hope this helps
Regards
Shiva
2010 Aug 14 9:43 AM
Hi,
REUSE_ALV_FIELDCATALOG_MERGE solved my problem but i am wondering why my function didnt do it. Because when
i write another select program to see on alv list it is working.
Regards.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |