09-19-2014 10:44 AM
Dear All ,
Hi,
i have a requirement that , i develop a one report program that contain one header and item internal table values . Those header and item table details append to the final internal table(which contain all the header and item) . when i display the values all the the ticket_no will repeated.
But client wants to display all the ticket_no will not repeated. He wants output like..
Please give me steps how to do this issue ?
09-19-2014 10:46 AM
Dear Gopi,
1) In decleration part you decleare like...!
DATA: LT_SORT TYPE SLIS_T_SORTINFO_ALV,
WA_SORT TYPE SLIS_SORTINFO_ALV.
2) Before using ' REUSE_ALV_GRID_DISPLAY' Function module
WA_SORT-FIELDNAME = 'TICK_NO'.
APPEND WA_SORT TO LT_SORT.
CLEAR WA_SORT.
3) use FM : REUSE_ALV_GRID_DISPLAY. Like...!
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = 'X'
I_CALLBACK_PROGRAM = SY-REPID
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ''
* I_CALLBACK_HTML_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME = LT_STRUCT
* I_BACKGROUND_ID = ' '
* I_GRID_TITLE =
* I_GRID_SETTINGS =
* IS_LAYOUT =
IT_FIELDCAT = LT_FLDCAT
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
IT_SORT = LT_SORT
* IT_FILTER =
* IS_SEL_HIDE =
I_DEFAULT = 'X'
* I_SAVE = ' '
* IS_VARIANT =
* IT_EVENTS =
* IT_EVENT_EXIT =
* IS_PRINT =
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* I_HTML_HEIGHT_TOP = 0
* I_HTML_HEIGHT_END = 0
* IT_ALV_GRAPHICS =
* IT_HYPERLINK =
* IT_ADD_FIELDCAT =
* IT_EXCEPT_QINFO =
* IR_SALV_FULLSCREEN_ADAPTER =
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = LT_FINAL
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2 .
May be it is solve your issue.
Regards
K. Chinna..
09-19-2014 1:26 PM
Hello Gopi,
Try with control break statment in loop it wiil resolve your issue.
Loop at it_tab into wa_tab.
at new ticket no.
continue.
endat.
clear:tickrt no.
endloop.
Thanks
Sam
09-19-2014 1:45 PM
This will cause that the standard ALV-functions (sort etc.) will no longer work.
Use the solution as suggested by chinna kollam.
09-19-2014 2:03 PM
You just need to uncheck this checkbox in the layout settings and save the layout as default:
Cheers
09-21-2014 12:57 PM
Simple Sort will work. Just pass Sort table (only Ticket No. & Serial No. ) to FM "Reuse_ALV_GRID_DISPLAY".