• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

SAP ABAP

version it

Lurker
Jul 5, 2023
1
0
Hi ABAP Experts,
I'm facing an issue with displaying data in an ALV grid using SAP ABAP. I have written the necessary code to retrieve the data from the database table, but I'm having trouble displaying it in the ALV grid format. I would appreciate any assistance or guidance on how to resolve this problem.
Here's the code snippet I've been working on:
abapCopy code
REPORT z_test_alv_grid.

DATA: it_data TYPE TABLE OF z_custom_table,
wa_data TYPE z_custom_table.

SELECT * FROM z_custom_table INTO TABLE it_data.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-rapid
i_callback_top_of_page = 'TOP-OF-PAGE'
it_fieldcat = lt_fieldcat[]
TABLES
t_outtab = it_data[].

IF sy-subarc <> 0.
MESSAGE 'Error displaying ALV grid.' TYPE 'E'.
ENDIF.
I have already defined the necessary field catalog in the lt_fieldcat internal table.
The issue I'm facing is that the data is not being displayed correctly in the ALV grid. It either shows blank cells or does not display any data at all. I have double-checked the field catalog and the internal table, and they seem to be populated correctly.
Any suggestions on what might be causing this issue or any alternative approaches to displaying the data in an ALV grid would be greatly appreciated.
Thank you in advance for your help!
Best regards, please consult for more details
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones