08-10-2010 3:11 PM
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
08-10-2010 3:19 PM
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' ).
08-10-2010 3:19 PM
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' ).
08-10-2010 3:32 PM
This is covered in these tutorials. Check them out.
Regards,
Rich Heilman
08-11-2010 10:33 AM