Dear all,
My requirement is to group three columns under a common header. Pls send in some sample code demonstrating how to do it.
my requirement is:
-
..........................................|..........Transfers........|.........Recipts.................|
Material No.|....Description...|----
|
.........................................|..Quantity..|..Amount..|...Quantity...|...Amount... |
-
.................|........................|...............|..............|....................|..................|
.................|........................|...............|..............|....................|..................|
.................|........................|...............|..............|....................|...................|
The fields material no., description, t_quantity, t_amount, r_quantity and r_amount are in a internal table. This is the output format i need to print.
I am ready to use either LIST o/p or GRID o/p.
Any help will be appreciated.
Thanks in advance
hi col heading breaking is not possible for alv but you can do it in top-of-page .
i dont know whether it will solve your problem or not.....
data : ievents type slis_t_event,
wevent type slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = ievents
EXCEPTIONS
LIST_TYPE_WRONG = 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.
ilayout-no_colhead = 'X'.
read table ievents into wevent with key name = 'TOP_OF_PAGE'.
if sy-subrc eq 0.
wevent-form = 'TOP_OF_PAGE'.
modify ievents from wevent index sy-tabix.
endif.
perform show.
form TOP_OF_PAGE.
write : / sy-vline no-gap,(10) 'Production' no-gap,sy-vline no-gap,
(18) 'Material No' no-gap,sy-vline..
write : / sy-vline no-gap,(10) 'Order No.' no-gap,sy-vline,(17) ' ' no-gap,sy-vline.
write : /(31) sy-uline.
endform.
form show.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = sy-repid
I_CALLBACK_PROGRAM = prepid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME =
IS_LAYOUT = ilayout
IT_FIELDCAT = ifieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = 'A'
IS_VARIANT =
IT_EVENTS = ievents[]
IT_EVENT_EXIT =
IS_PRINT = iprint
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = itab
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.
endform.
here full coding is not there....
regards
shiba dutta
Add a comment