04-06-2006 10:55 AM
let's try somting else.
i can do title <mantr> in 1 cell
and under to saparate to 3 cell and put there 3 fields
like in excel
example
matnr |
<b>123344</b> |
<i>2</i>|<i>3</i>|<i>5</i> |
04-06-2006 11:39 AM
HI
You have not mentioned clearly what is your requirement actually what you want to print actually in the title of REUSE_ALV_GRID_DISPLAY
REPORT ZALV_GRID.
TABLES :vbap.
type-pools : slis.
data i_events TYPE slis_t_event.
DATA : my_alv TYPE REF TO cl_gui_alv_grid.
TYPES : BEGIN OF itab,
vbeln LIKE vbap-vbeln,
arktx LIKE vbap-arktx,
END OF itab.
TYPES : itab1 TYPE TABLE OF itab.
DATA : display TYPE itab1.
DATA : fcat TYPE SLIS_T_FIELDCAT_ALV.
DATA : wa LIKE LINE OF FCAT.
DATA WA1 LIKE VBAP.
DATA: container TYPE REF TO cl_gui_custom_container.
data report_id like sy-repid.
SELECT-OPTIONS s_vbeln FOR vbap-vbeln.
report_id = sy-repid.
SELECT * FROM vbap INTO CORRESPONDING FIELDS OF TABLE display WHERE
vbeln IN s_vbeln.
wa-fieldname = 'VBELN'.
wa-tabname = 'VBAP'.
wa-key = 'X'.
WA-HOTSPOT = 'X'.
wa-text_fieldname = 'Doc no.'.
APPEND wa TO fcat.
CLEAR wa.
wa-fieldname = 'ARKTX'.
wa-tabname = 'VBAP'.
wa-text_fieldname = 'Item Text'.
APPEND wa TO fcat.
PERFORM f0650_build_event USING 'USER_COMMAND'
'F0750_USER_COMMAND'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY '
EXPORTING
I_CALLBACK_PROGRAM = report_id
IT_FIELDCAT = FCAT
IT_EVENTS = i_events
TABLES
t_outtab = DISPLAY
.
FORM f0650_build_event USING value(w_c_event_name)
value(w_c_event_form).
DATA: f0650_wa_event TYPE slis_alv_event.
CLEAR f0650_wa_event.
f0650_wa_event-name = w_c_event_name.
f0650_wa_event-form = w_c_event_form.
APPEND f0650_wa_event TO i_events.
ENDFORM.
FORM f0750_user_command USING w_ucomm TYPE sy-ucomm
w_selfield TYPE slis_selfield.
CASE w_ucomm.
WHEN '&IC1'.
READ TABLE DISPLAY INTO WA1 INDEX w_selfield-tabindex.
MESSAGE E000 WITH
' You have no authorization to view the report'.
call transaction 'SE11'.
ENDCASE.
ENDFORM.
End of Program
Try out this report,i hope this will help you to solve your problem
Thanks
Mrutyunjaya Tripathy
04-06-2006 11:44 AM
Hi,
Its like you want a single title for 3 different columns. That is not possible in ALV, you cannot merge cells row wise.
Regards,
Ravi
04-06-2006 1:44 PM
There is a way, using REUSE_ALV_HIERSEQ_LIST_DISPLAY. You must have the header table with only one record (with empty fields), and play with row_pos and outputlen of fieldcat.