2006 Jan 25 9:37 AM
hai,
my requirement is iam displaying the fiels in alv grid and while displaying i have the total value(vbrk-netwr) and it is displayed with the column header "NET AMOUNT', now my requirement is i want to change the column heading to my own heading where should i set it??
cheers
2006 Jan 25 10:12 AM
Hi Rajani
The column header displays the name of a column for the user. You are able to define three different texts as column header.
To Determine Wording of the Column Header :
The column header is a property of the COLUMN object. In this way you are able to specify the column header for every column in the internal data table.
You can specify three different variants of the column header: The long, medium and short column header. If the user changes the column width, the column header that fits the column best is automatically used.
Methods
Function Class Method
Determine version CL_SALV_COLUMN SET_LONG_TEXT
of the column header SET_MEDIUM_TEXT
SET_SHORT_TEXT
Dont forget to reward pts, if it helps ;>)
Regards,
Rakesh.
Hi Rajani
The column header displays the name of a column for the user. You are able to define three different texts as column header.
To Determine Wording of the Column Header :
The column header is a property of the COLUMN object. In this way you are able to specify the column header for every column in the internal data table.
You can specify three different variants of the column header: The long, medium and short column header. If the user changes the column width, the column header that fits the column best is automatically used.
Methods
Function Class Method
Determine version CL_SALV_COLUMN SET_LONG_TEXT
of the column header SET_MEDIUM_TEXT
SET_SHORT_TEXT
Dont forget to reward pts, if it helps ;>)
Regards,
Rakesh.
2006 Jan 25 9:40 AM
2006 Jan 25 9:43 AM
hai frederic,
thanks for the reply , but which attribute in the fieldcatlog has top be modified
cheers
2006 Jan 25 9:43 AM
2006 Jan 25 9:45 AM
You have to modify the field seltext_m of the fieldcatalog.
like..
line_fieldcat-seltext_m = 'NET AMOUNT.'. "
APPEND line_fieldcat TO i_fieldcat.
now pass i_fieldcat as parameter to 'REUSE_ALV_GRID_DISPLAY'
2006 Jan 25 10:12 AM
Hi Rajani
The column header displays the name of a column for the user. You are able to define three different texts as column header.
To Determine Wording of the Column Header :
The column header is a property of the COLUMN object. In this way you are able to specify the column header for every column in the internal data table.
You can specify three different variants of the column header: The long, medium and short column header. If the user changes the column width, the column header that fits the column best is automatically used.
Methods
Function Class Method
Determine version CL_SALV_COLUMN SET_LONG_TEXT
of the column header SET_MEDIUM_TEXT
SET_SHORT_TEXT
Dont forget to reward pts, if it helps ;>)
Regards,
Rakesh.
2006 Jan 25 10:16 AM
Hi Kumar,
i think you populated the field catalog using FM, in that case you just need to
read the fieldcatalog with fieldname.
and change the sel_text.
some thing like this..
read table it_fieldcat with key fieldname = 'NETWR'.
if sy-subrc = 0.
it_fieldcat-seltext_l = 'New text'.
it_fieldcat-seltext_m = 'New text'.
it_fieldcat-seltext_s = 'New text'.
modify it_fieldcat index sy-tabix.
endif.if you are populating manually then include
along with fieldcat entries for netwr.
it_fieldcat-seltext_l = 'New text'.
it_fieldcat-seltext_m = 'New text'.
it_fieldcat-seltext_s = 'New text'.regards
vijay
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |