Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3180

Reuse_alv_grid_display change default column header

$
0
0

Hi

 

I'm having difficulty getting the default column header of an alv grid to display correctly.  When the alv grid is first displayed the column header is being pulled from the ddic for data element EMNAM of field ENAME in structure ZSCR_INCOMING_PO.

 

emp_bad.jpg

 

After shrinking the column the heading displayed is correctly shown from the list of seltext entries below in code.  I'm imagining it's a fieldcat option I'm missing, but I haven't been able to find it in my searching of SCN and trial or trial and error.

 

emp_good.jpg

 

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

     EXPORTING

*     I_PROGRAM_NAME         =

       i_internal_tabname     = g_tabname_header

       i_structure_name       = 'ZSCR_INCOMING_PO'

*     I_CLIENT_NEVER_DISPLAY = 'X'

     CHANGING

       ct_fieldcat            = e01_lt_fieldcat[].

 

   READ TABLE  e01_lt_fieldcat INTO  ls_fieldcat

                               WITH KEY fieldname  = 'ENAME'.

   IF sy-subrc EQ 0.

     ls_fieldcat-seltext_s   = 'Emp Resp'.

     ls_fieldcat-seltext_m   = 'Employee Responsible'.

     ls_fieldcat-seltext_l   = 'Employee Responsible'.

     ls_fieldcat-reptext_ddic = 'Employee Responsible'.

     MODIFY e01_lt_fieldcat FROM ls_fieldcat INDEX sy-tabix

                    TRANSPORTING seltext_s seltext_m seltext_l.

   ENDIF.


Viewing all articles
Browse latest Browse all 3180

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>