Skip to Content
0
Former Member
Oct 22, 2008 at 06:13 AM

ALV - add another column

31 Views

good day experts...

I just want to ask why is it that when I added another column in an ALV,

the one in bold letter) It does not appear when I execute it? My declarations is herein below:

Please tell me what to do to correct my statements.

Thank you.

CODE:

FORM f_display_aging .

SORT it_aging BY swenr smenr.

REFRESH it_fdcat.

PERFORM f_create_layout USING wa_layout.

PERFORM f_create_fieldcat USING it_fdcat.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = v_repid

i_callback_pf_status_set = 'PFSTATUS'

i_grid_title = text-alv

is_layout = wa_layout

it_event_exit = it_event

it_fieldcat = it_fdcat[]

TABLES

t_outtab = it_aging.

ENDFORM. " f_display_aging

&----


*& Form f_create_layout

&----


  • ALV Layout

----


FORM f_create_layout USING p_wa_layout TYPE slis_layout_alv.

p_wa_layout-zebra = 'X'.

p_wa_layout-colwidth_optimize = 'X'.

ENDFORM. " f_create_layout

&----


*& Form pfstatus

&----


  • Set PF-Status

----


FORM pfstatus USING ut_extab TYPE slis_t_extab.

SET PF-STATUS 'STANDARD_FULLSCREEN' OF PROGRAM 'SAPLKKBL'.

ENDFORM. " PF_STATUS_SET

FORM f_create_fieldcat USING p_it_fdcat TYPE slis_t_fieldcat_alv.

DATA: ls_fieldcat TYPE slis_fieldcat_alv.

CLEAR ls_fieldcat.

ls_fieldcat-fieldname = text-f01.

ls_fieldcat-seltext_l = text-t01.

ls_fieldcat-outputlen = 15.

APPEND ls_fieldcat TO p_it_fdcat.

CLEAR ls_fieldcat.

ls_fieldcat-fieldname = text-f02.

ls_fieldcat-seltext_l = text-t02.

ls_fieldcat-outputlen = 15.

APPEND ls_fieldcat TO p_it_fdcat.

CLEAR ls_fieldcat.

ls_fieldcat-fieldname = text-f17.

ls_fieldcat-seltext_l = text-t17.

ls_fieldcat-outputlen = 15.

APPEND ls_fieldcat TO p_it_fdcat.

CLEAR ls_fieldcat.

ls_fieldcat-fieldname = text-f18.

ls_fieldcat-seltext_l = text-t18.

ls_fieldcat-outputlen = 15.

APPEND ls_fieldcat TO p_it_fdcat.

CLEAR ls_fieldcat.

ls_fieldcat-fieldname = text-f19.

ls_fieldcat-seltext_l = text-t19.

ls_fieldcat-outputlen = 15.

APPEND ls_fieldcat TO p_it_fdcat.

CLEAR ls_fieldcat.

ls_fieldcat-fieldname = text-f20.

ls_fieldcat-seltext_l = text-t20.

ls_fieldcat-outputlen = 15.

APPEND ls_fieldcat TO p_it_fdcat.

CLEAR ls_fieldcat.

ls_fieldcat-fieldname = text-f21.

ls_fieldcat-seltext_l = text-t21.

ls_fieldcat-outputlen = 15.

APPEND ls_fieldcat TO p_it_fdcat.

CLEAR ls_fieldcat.

ls_fieldcat-fieldname = text-f22.

ls_fieldcat-seltext_l = text-t22.

ls_fieldcat-outputlen = 15.

APPEND ls_fieldcat TO p_it_fdcat.

CLEAR ls_fieldcat.

ls_fieldcat-fieldname = text-f03.

ls_fieldcat-seltext_l = text-t03.

ls_fieldcat-outputlen = 15.

APPEND ls_fieldcat TO p_it_fdcat.

CLEAR ls_fieldcat.

ls_fieldcat-fieldname = text-f04.

ls_fieldcat-seltext_l = text-t04.

ls_fieldcat-outputlen = 15.

APPEND ls_fieldcat TO p_it_fdcat.

CLEAR ls_fieldcat.

ls_fieldcat-fieldname = text-f05.

ls_fieldcat-seltext_l = text-t05.

ls_fieldcat-outputlen = 15.

APPEND ls_fieldcat TO p_it_fdcat.

CLEAR ls_fieldcat.

ls_fieldcat-fieldname = text-f06.

ls_fieldcat-seltext_l = text-t06.

ls_fieldcat-outputlen = 15.

APPEND ls_fieldcat TO p_it_fdcat.

CLEAR ls_fieldcat.

ls_fieldcat-fieldname = text-f24.

ls_fieldcat-seltext_l = text-t24.

ls_fieldcat-outputlen = 25.

APPEND ls_fieldcat TO p_it_fdcat.

CLEAR ls_fieldcat.

ls_fieldcat-fieldname = text-f07.

ls_fieldcat-seltext_l = text-t07.

ls_fieldcat-outputlen = 15.

APPEND ls_fieldcat TO p_it_fdcat.

CLEAR ls_fieldcat.

ls_fieldcat-fieldname = text-f08.

ls_fieldcat-seltext_l = text-t08.

ls_fieldcat-outputlen = 15.

APPEND ls_fieldcat TO p_it_fdcat.

CLEAR ls_fieldcat.

ls_fieldcat-fieldname = text-f09.

ls_fieldcat-seltext_l = text-t09.

ls_fieldcat-outputlen = 15.

APPEND ls_fieldcat TO p_it_fdcat.

CLEAR ls_fieldcat.

ls_fieldcat-fieldname = text-f10.

ls_fieldcat-seltext_l = text-t10.

ls_fieldcat-outputlen = 15.

APPEND ls_fieldcat TO p_it_fdcat.

CLEAR ls_fieldcat.

ls_fieldcat-fieldname = text-f11.

ls_fieldcat-seltext_l = text-t11.

ls_fieldcat-outputlen = 15.

APPEND ls_fieldcat TO p_it_fdcat.

CLEAR ls_fieldcat.

ls_fieldcat-fieldname = text-f12.

ls_fieldcat-seltext_l = text-t12.

ls_fieldcat-outputlen = 15.

APPEND ls_fieldcat TO p_it_fdcat.

CLEAR ls_fieldcat.

ls_fieldcat-fieldname = text-f13.

ls_fieldcat-seltext_l = text-t13.

ls_fieldcat-outputlen = 15.

APPEND ls_fieldcat TO p_it_fdcat.

CLEAR ls_fieldcat.

ls_fieldcat-fieldname = text-f14.

ls_fieldcat-seltext_l = text-t14.

ls_fieldcat-outputlen = 15.

APPEND ls_fieldcat TO p_it_fdcat.

CLEAR ls_fieldcat.

ls_fieldcat-fieldname = text-f15.

ls_fieldcat-seltext_l = text-t15.

ls_fieldcat-outputlen = 15.

APPEND ls_fieldcat TO p_it_fdcat.

ENDFORM.