Skip to Content

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

Added in to fieldcat but do not display in the output

Dear Experts,

I meet a problem that I add one recode into the fieldcat.But in output, the field's name do not appear in the output.The following is my code.The content 'Duodate' does not appear on the screen.

form fieldcat_init using l_fieldcat type slis_t_fieldcat_alv.

data: ls_fieldcat type slis_fieldcat_alv.

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

*head field categories *

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

clear ls_fieldcat.

ls_fieldcat-fieldname = 'LIFNR'.

ls_fieldcat-tabname = 'ITAB_HD_IT'.

ls_fieldcat-seltext_l = 'Vonder'.

ls_fieldcat-key = 'X'.

ls_fieldcat-fix_column = 'X'.

  • ls_fieldcat-outputlen = 12.

append ls_fieldcat to l_fieldcat.

clear ls_fieldcat.

ls_fieldcat-fieldname = 'NAME1'.

ls_fieldcat-tabname = 'ITAB_HD_IT'.

ls_fieldcat-seltext_l = 'Vonder'.

ls_fieldcat-key = 'X'.

ls_fieldcat-fix_column = 'X'.

ls_fieldcat-outputlen = 40.

append ls_fieldcat to l_fieldcat.

clear ls_fieldcat.

ls_fieldcat-fieldname = 'VBLNR'.

ls_fieldcat-tabname = 'ITAB_HD_IT'.

ls_fieldcat-seltext_l = 'Payment'.

  • ls_fieldcat-outputlen = 10.

ls_fieldcat-do_sum = 'X'.

append ls_fieldcat to l_fieldcat.

clear ls_fieldcat.

ls_fieldcat-fieldname = 'WAERS'.

ls_fieldcat-tabname = 'ITAB_HD_IT'.

ls_fieldcat-seltext_l = 'CURR.'.

  • ls_fieldcat-outputlen = 10.

ls_fieldcat-do_sum = 'X'.

append ls_fieldcat to l_fieldcat.

clear ls_fieldcat.

ls_fieldcat-fieldname = 'WRBTR'.

ls_fieldcat-tabname = 'ITAB_HD_IT'.

ls_fieldcat-seltext_l = 'Amount'.

ls_fieldcat-outputlen = 15.

ls_fieldcat-do_sum = 'X'.

append ls_fieldcat to l_fieldcat.

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

*item field categories *

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

clear ls_fieldcat.

ls_fieldcat-fieldname = 'BELNR'.

ls_fieldcat-tabname = 'ITAB_ITEM_IT'.

ls_fieldcat-seltext_l = 'Docu.'.

ls_fieldcat-key = 'X'.

ls_fieldcat-fix_column = 'X'.

ls_fieldcat-outputlen = 12.

append ls_fieldcat to l_fieldcat.

clear ls_fieldcat.

ls_fieldcat-fieldname = 'BLDAT'.

ls_fieldcat-tabname = 'ITAB_ITEM_IT'.

ls_fieldcat-seltext_l = 'Document Date'.

ls_fieldcat-outputlen = 10.

ls_fieldcat-key = 'X'.

ls_fieldcat-fix_column = 'X'.

append ls_fieldcat to l_fieldcat.

clear ls_fieldcat.

ls_fieldcat-fieldname = 'ZFBDT'.

ls_fieldcat-tabname = 'ITAB_ITEM_IT'.

ls_fieldcat-seltext_l = 'BasDte'.

ls_fieldcat-outputlen = 10.

ls_fieldcat-key = 'X'.

ls_fieldcat-fix_column = 'X'.

append ls_fieldcat to l_fieldcat.

clear ls_fieldcat.

ls_fieldcat-fieldname = 'ZDUED'.

ls_fieldcat-tabname = 'ITAB_ITEM-IT'.

ls_fieldcat-seltext_l = 'DueDate'.

ls_fieldcat-outputlen = 10.

append ls_fieldcat to l_fieldcat.

clear ls_fieldcat.

ls_fieldcat-fieldname = 'ZTERM'.

ls_fieldcat-tabname = 'ITAB_ITEM_IT'.

ls_fieldcat-seltext_l = 'Cond'.

ls_fieldcat-outputlen = 4.

ls_fieldcat-key = 'X'.

ls_fieldcat-fix_column = 'X'.

append ls_fieldcat to l_fieldcat.

clear ls_fieldcat.

ls_fieldcat-fieldname = 'ZPAYT'.

ls_fieldcat-tabname = 'ITAB_ITEM_IT'.

ls_fieldcat-seltext_l = 'Pmnt term'.

ls_fieldcat-outputlen = 12.

ls_fieldcat-key = 'X'.

ls_fieldcat-fix_column = 'X'.

append ls_fieldcat to l_fieldcat.

clear ls_fieldcat.

ls_fieldcat-fieldname = 'WAERS'.

ls_fieldcat-tabname = 'ITAB_ITEM_IT'.

ls_fieldcat-seltext_l = 'Currency'.

ls_fieldcat-outputlen = 4.

append ls_fieldcat to l_fieldcat.

clear ls_fieldcat.

ls_fieldcat-fieldname = 'WRBTR'.

ls_fieldcat-tabname = 'ITAB_ITEM_IT'.

ls_fieldcat-seltext_l = 'Amount'.

ls_fieldcat-outputlen = 15.

append ls_fieldcat to l_fieldcat.

ENDFORM. " FIELDCAT_INIT

Former Member
Not what you were looking for? View more on this topic or Ask a question