09-19-2014 7:51 AM
Hi,
i have a requirement that , i develop a one report that contain one header and item table values . Those header and item 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 my client wants to display all all the ticket_no will not repeated. they wants output like..
How can i do this Issue ?
Thanks & regards
Gopi.
09-19-2014 7:54 AM
Hi,
if it's an ALV Grid, your client have to make a sort on the column ticket_no and the result will only appear the first time.
(when you will export it, the result will appears several times)
regards
Fred
09-19-2014 7:54 AM
Might be the problem with in the LOOP and End LOOp.
If possible share ur coding
09-19-2014 7:57 AM
09-19-2014 8:07 AM
Hi
data: t_sort TYPE slis_t_sortinfo_alv,
w_sort TYPE slis_sortinfo_alv.
w_sort-fieldname = 'WERKS'.
APPEND w_sort TO t_sort.
CLEAR w_sort.
and now pass that T_SORT in alv FM
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
i_callback_program = sy-repid
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
i_callback_top_of_page = 'TOP_OF_PAGE'
* I_CALLBACK_HTML_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_END_OF_LIST = ' '
* I_STRUCTURE_NAME =
* I_BACKGROUND_ID = ' '
* I_GRID_TITLE =
* I_GRID_SETTINGS =
* IS_LAYOUT =
it_fieldcat = t_fcat
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
it_sort = T_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 = t_final
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.
REGARDS.
LAXMAN
09-19-2014 8:51 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 8:58 AM
09-19-2014 9:38 AM