Skip to Content
0
Sep 22 at 09:16 AM

How to Auto Increase number in ALV Grid Fieldcat?

58 Views Last edit Sep 22 at 09:18 AM 2 rev

How to auto increase the number list in col_pos 1? I tried put ls_fcat-auto_value like the similar post but not working. It said that the error in ls_fcat-fieldname whenever I deleted or not. Please help!Thanks.
clear: ls_fcat.
  
ls_fcat-reptext = 'A'.
ls_fcat-coltext = 'A'.
ls_fcat-fieldname = 'VBELN'.
ls_fcat-AUTO_VALUE = 'X'.
ls_fcat-outputlen = '15'.
ls_fcat-col_pos = 1.
append ls_fcat to fieldcat.
clear: ls_fcat.
ls_fcat-reptext = 'B'.
ls_fcat-coltext = 'B'.
ls_fcat-fieldname = 'VBELN'.
ls_fcat-ref_table = 'IALV'.
ls_fcat-hotspot = 'X'.
ls_fcat-outputlen = '15'.
ls_fcat-col_pos = 2.
append ls_fcat to fieldcat.
clear: ls_fcat.
ls_fcat-reptext = 'C'.
ls_fcat-coltext = 'C'.
ls_fcat-fieldname = 'POSNR'.
ls_fcat-ref_table = 'IALV'.
ls_fcat-outputlen = '10'.
ls_fcat-col_pos = 3.
append ls_fcat to fieldcat.