Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SALV - Changing the fieldname descriptions of my grid

Former Member
0 Kudos

Hi Guys

Now that we're on ECC 6.0, I'm trying to get to grips with the new SALV functionality. I've created an SALV grid, but I'm having trouble trying to get it to behave like its predecessor.

eg EKBE-MENGE is "Quantity" and this field appears several times in my report with diffrent meanings, eg Goods Receipt Qty, Invoice Receipt Qty etc.

Whilst using cl_gui_alv_grid, I could build a field catalog and pass it when method set_table_for_first_display was called.

Basically, is there an SALV equivalent that allows me to change the fieldnames of my SALV grid?

Many Thanks

Chris

1 ACCEPTED SOLUTION

Former Member
0 Kudos

See below

DATA:  GO_TABLE type ref to CL_SALV_TABLE,  " Your ALV Model
             GO_COLUMNS_TAB type ref to CL_SALV_COLUMNS_TABLE,
             GO_COLUMN type ref to CL_SALV_COLUMN.

* Set Text for Columns...
  GO_COLUMNS_TAB = GO_TABLE->GET_COLUMNS(  ).

      GO_COLUMN  = GO_COLUMNS_TAB->GET_COLUMN( 'MENGE' ).
      GO_COLUMN->SET_SHORT_TEXT( 'Quantity' ).
      GO_COLUMN->SET_MEDIUM_TEXT( 'Quantity' ).

3 REPLIES 3

Former Member
0 Kudos

See below

DATA:  GO_TABLE type ref to CL_SALV_TABLE,  " Your ALV Model
             GO_COLUMNS_TAB type ref to CL_SALV_COLUMNS_TABLE,
             GO_COLUMN type ref to CL_SALV_COLUMN.

* Set Text for Columns...
  GO_COLUMNS_TAB = GO_TABLE->GET_COLUMNS(  ).

      GO_COLUMN  = GO_COLUMNS_TAB->GET_COLUMN( 'MENGE' ).
      GO_COLUMN->SET_SHORT_TEXT( 'Quantity' ).
      GO_COLUMN->SET_MEDIUM_TEXT( 'Quantity' ).

0 Kudos

Many thanks for your help guys.