‎2008 Mar 05 4:00 AM
Hi,
I have created a ALV report but i need special formatting in ALV .I have a internal table which has 60 column now due to large number of columns i want to have special formating in ALV like this
Vendor No Material No Po Number Assignment
1 XXXXXXXXXXXX XXXXXXXX XXXXXXXX
Line Item description Date
0001 XXXX XXX
0002 XXXX XXXX
0003 XXXXX XXXXX
Vendor No Material No Po Number Assignment
2 XXXXXXXXXXXX XXXXXXXX XXXXXXXX
Line Item description Date
0001 XXXX XXX
0002 XXXX XXXX
0003 XXXXX XXXXX
But i have all records in normal internal table,but i need this special format.Is it possible in ALV.
‎2008 Mar 05 4:02 AM
‎2008 Mar 05 4:02 AM
‎2008 Mar 05 4:09 AM
Hi,
YOu can acheive your requirement by using the FM REUSE_ALV_HIERSEQ_LIST_DISPLAY. For this you can prepare header table and item table and need to pass those to tables parameters header and item tables. And also need to pass keyinfo, in the export parameters which define the link between your two header and item tables.
Check the test program BCALV_TEST_HIERSEQ_LIST if you have any confusion.
Rgds,
Bujji
‎2008 Mar 05 4:14 AM
hi friend go for 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
wa_keyinfo is key of your parent table and child table ok.
v_progname is your report program name
rest u can see by this sample code
wa_keyinfo-header01 = 'EBELN'.
wa_keyinfo-item01 = 'EBELN'.
call function 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
exporting
I_INTERFACE_CHECK = ' '
i_callback_program = v_progname
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
is_layout = wa_layout1
it_fieldcat = it_fieldcat1
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_DEFAULT = 'X'
I_SAVE = 'A'
IS_VARIANT =
it_events = it_eventcat
IT_EVENT_EXIT =
i_tabname_header = 'IT_HEADER'
i_tabname_item = 'IT_ITEMS'
I_STRUCTURE_NAME_HEADER =
I_STRUCTURE_NAME_ITEM =
is_keyinfo = wa_keyinfo
IS_PRINT =
IS_REPREP_ID =
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
IR_SALV_HIERSEQ_ADAPTER =
IT_EXCEPT_QINFO =
I_SUPPRESS_EMPTY_DATA = ABAP_FALSE
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
tables
t_outtab_header = it_header
t_outtab_item = it_items
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.
plz reward if useful
vivek