Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to Display the table data ?

Former Member
0 Kudos

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 ?

5 REPLIES 5

0 Kudos

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..

Former Member
0 Kudos

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

0 Kudos

This will cause that the standard ALV-functions (sort etc.) will no longer work.

Use the solution as suggested by .

Former Member
0 Kudos

You just need to uncheck this checkbox in the layout settings and save the layout as default:

Cheers

s_nnoorie
Active Participant
0 Kudos

Simple Sort will work. Just pass Sort table (only Ticket No. & Serial No. ) to FM "Reuse_ALV_GRID_DISPLAY".