Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

alv grid problem

Dear friends,

Iam not getting data on the screen when iam using the ALV grid control,

iam getting blank screen , with only the top of page details.

could any one correct me where i went wrong.

This perform is used for Layout settings

perform st_layout_build using gs_layout.

*----


*

form st_layout_build using st_ls_layout type slis_layout_alv.

st_ls_layout-colwidth_optimize = 'X'.

st_ls_layout-zebra = 'X'.

st_ls_layout-detail_popup = 'X'.

endform. " st_layout_build

*****************************************************************

  • Field Catalog details

perform st_fieldcat_init changing gt_fieldcat.

form st_fieldcat_init changing fp_i_fieldcat type slis_t_fieldcat_alv.

data: ls_fieldcat type slis_fieldcat_alv.

clear ls_fieldcat.

ls_fieldcat-col_pos = 4.

ls_fieldcat-fieldname = 'JOB'.

ls_fieldcat-no_out = 'X'.

append ls_fieldcat to fp_i_fieldcat.

clear ls_fieldcat.

ls_fieldcat-col_pos = 5.

ls_fieldcat-fieldname = 'DEPT/DIV'.

ls_fieldcat-no_out = 'X'.

append ls_fieldcat to fp_i_fieldcat.

clear ls_fieldcat.

ls_fieldcat-col_pos = 6.

ls_fieldcat-fieldname = 'ACTUAL'.

ls_fieldcat-no_out = 'X'.

append ls_fieldcat to fp_i_fieldcat.

clear ls_fieldcat.

ls_fieldcat-col_pos = 7.

ls_fieldcat-fieldname = 'FORECAST'.

ls_fieldcat-no_out = 'X'.

append ls_fieldcat to fp_i_fieldcat.

clear ls_fieldcat.

ls_fieldcat-col_pos = 8.

ls_fieldcat-fieldname = 'VACANCIES'.

ls_fieldcat-no_out = 'X'.

append ls_fieldcat to fp_i_fieldcat.

*********************************************

  • Variant

perform st_variant_init using gs_variant g_repid.

form st_variant_init using st_gs_variant type disvariant

st_repid like sy-repid.

clear st_gs_variant.

st_gs_variant-report = st_repid.

endform. " st_variant_init

g_repid = sy-repid.

**********************************************************

perform st_comment_build using gt_list_top_of_page[].

form st_comment_build using st_lt_top_of_page type slis_t_listheader.

data: ls_line type slis_listheader.

  • Listen├╝berschrift: Typ H

clear ls_line.

ls_line-typ = 'H'.

  • LS_LINE-KEY: not used for this type

ls_line-info = text-000.

append ls_line to st_lt_top_of_page.

endform. " st_comment_build

***********************************************************

*

call function 'REUSE_ALV_GRID_DISPLAY'

exporting

i_buffer_active = 'X'

i_callback_top_of_page = 'TOP_OF_PAGE'

i_callback_program = g_repid

is_layout = gs_layout

it_fieldcat = gt_fieldcat[]

i_structure_name = c_i_final "'objec'

  • i_save = g_save

is_variant = gs_variant

tables

t_outtab = fp_i_staff_final ---> i can see data in this internal table

exceptions

program_error = 1

others = 2.

if sy-subrc ne 0.

MESSAGE e018. " Displaying the ALV GRID has failed

endif.

Could any one please letl me know why iam getting blank screen with only header details .....

Regards

Latha

Tags:
Former Member
Former Member replied

you dint define any text at your field catalog

like

clear ls_fieldcat.

ls_fieldcat-col_pos = 4.

ls_fieldcat-fieldname = 'JOB'.

<b>ls_fieldcat-seltext_l = 'Job name'.</b>

append ls_fieldcat to fp_i_fieldcat.

for each field you have to give the text.

regards

shiba dutta

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question