2007 Sep 27 11:35 AM
How can we change the field headings in alv reports?
2007 Sep 27 11:37 AM
hi anil,
In the fieldcat use seltext_l = 'Example' to change the heading.
exxample : wa_fcat type slis_fieldcat_alv.
wa_fcat-seltext_l = 'Example'.
regards,
Santosh Thorat
2007 Sep 27 11:44 AM
Hi,
DATA: first(01) type c,
events type slis_t_event,
gt_list_top_of_page type slis_t_listheader,
ls_event type slis_alv_event.
initialization.
call function 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = events
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2.
read table events with key name = 'TOP_OF_PAGE'
into ls_event.
if sy-subrc = 0.
move: 'TOP_OF_PAGE' to ls_event-form.
append ls_event to events.
clear ls_event.
endif.
End of additions
Start-of-selection
START-OF-SELECTION.
-
Top-of-page
TOP-OF-PAGE.
PERFORM TOP_OF_PAGE.
FORM TOP_OF_PAGE .
data: ls_line type slis_listheader.
if first is initial.
ls_line-typ = 'S'.
ls_line-key = 'Run Date :'.
write: sy-datum to ls_line-key+10 mm/dd/yyyy.
ls_line-info = 'Billing Date:'.
write: s_fkdat-low to ls_line-info+15 mm/dd/yyyy.
ls_line-info+28 = 'To'.
write s_fkdat-high to ls_line-info+32 mm/dd/yyyy.
append ls_line to gt_list_top_of_page.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = gt_list_top_of_page.
first = 'N'.
else.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = gt_list_top_of_page.
endif.
ENDFORM. " top_of_page
_________________
Have fun,
S.Agarwal
2007 Sep 27 11:48 AM
Hi
you will define a fieldcatalog for that field
in that you are declaring that field heading
if you want to change that field heading for perticular field or for all fields
then go to that field catalog and there you will find
<b>WA_FEILDCATALOG-SELLTEXT = 'FIELDNAME'.</b>
CHANGE THAT FIELDNAME THATS OK
THE OPUPUT WILL AUTOMATICALLY CHANGE
REWARD IF USEFULL
2007 Sep 27 11:52 AM
Gor each field fill fieldcatalog as
wa_fieldcat-seltext_l = 'Heading'.
wa_fieldcat-ddtext = 'L'.
You have to give ddtext as S M or L depending upon whether u have assigned heading to seltext_s,seltext_m or seltext_l .
If u will not set ddtext then it will take the heading given in dictionary field's data element.
2007 Sep 27 11:53 AM
Hi Anil,
Add this to the fieldcat.....
BELNR
w_fieldcat-col_pos = 4.
w_fieldcat-fieldname = 'BELNR'.
w_fieldcat-seltext_m = 'Invoice Number'. <b>"<----Enter Field heading</b>
w_fieldcat-tabname = 'T_FINAL1'.
w_fieldcat-ref_tabname = 'BSIK'.
APPEND w_fieldcat TO t_fieldcat.
CLEAR w_fieldcat.
2007 Sep 27 11:54 AM
Hi Anil,
U have to give all the field names of field catalog in capitals within quotes.
CLEAR line_fieldcat.
line_fieldcat-fieldname = 'RECORD'.
line_fieldcat-tabname = 'I_MSG_LOG'.
line_fieldcat-seltext_l = 'Record'.
line_fieldcat-outputlen = '60'.
APPEND line_fieldcat TO i_fieldcat.
Hope it helps.
2007 Sep 27 11:58 AM
While populating the Fieldcatelog
Update the structure with the heading.
Below is the code.
line_fieldcat-seltext_l = 'HEADING FOR thE FIELD'.
This will do.
Message was edited by:
Mohammed Jaleel
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |