10-14-2008 10:09 AM
Hi all,
In my Requirent i want to Display data like this Using ALV.
Please help me how to display data using alv like this.
From: Plant. Order nr : Po.Number
To: Vendor Number
Date: System Date Doc. Currency : EUR
Ship To: Ship to Address Invoice To: Invoice Address.
Edited by: radhika jammula on Oct 14, 2008 11:12 AM
10-14-2008 10:15 AM
10-14-2008 10:16 AM
Hi,
This we can display directly.
i dont think that we can display data like this using ALV.
we can display data in tabular form using ALV.
Thanks
Rajesh
10-14-2008 10:19 AM
You need to build the alv events first. For this call the following function module.
Data:i_events type standard table of slis_alv_event,
wa_event type slis_alv_event,
v_top_of_page type slis_formname value 'TOP_OF_PAGE',
v_user_command type slis_formname value 'USER_COMMAND'.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = i_events.
read table i_events with key name = v_top_of_page
into wa_event.
if sy-subrc = 0.
move v_top_of_page to wa_event-form.
append wa_event to i_events.
endif.
read table i_events with key name = v_user_command
into wa_event.
if sy-subrc = 0.
move v_user_command to wa_event-form.
append wa_event to i_events.
endif.
build top of page.
for this
data: wa_line type slis_listheader,
i_header type slis_t_listheader,
l_count(6) type c .
clear wa_line.
wa_line-typ = 'S'.
wa_line-key = 'Run Date :'.
write sy-datum to wa_line-info dd/mm/yyyy.
append wa_line to i_header.
As i gave run date give all your required fields.
then
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
i_logo = 'ENJOYSAP_LOGO'
it_list_commentary = i_header.
and now in
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = 'XXX'
is_layout =
it_fieldcat =
i_save =
it_events = i_events
tables
t_outtab = i_tab
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
Edited by: Swetha on Oct 14, 2008 2:50 PM
10-14-2008 10:20 AM