ALV Reporting with drill down capabillities

I'm creating a abap custom report using the ALV.  I want to drill down to CJ03 which is projects.  I know how to do it in regular custom reporting, but I don't seem to be able to get it to work using the ALV.  Can anyone help?
Thanks.
Linda

Hi Linda,
Take a look at this sample program. The logic to handle any interaction with the user is in my "PORCESS_USER_COMMANDS" routine.
This is defined in the "I_CALLBACK_USER_COMMAND" parameter in the ALV FM.
Hope this helps.
Cheers,
Pat.
[code]
Modification History
Date      | Author    | Chg Req #     | Description
15.08.2001| Pat Yee   | $TMP          | Program Creation
This program is an example of how the ALV Display works.
It will display Customer Data.
This report will also show how to display an ALV report with different
colored lines and icons
REPORT zpat.
Include Programs
INCLUDE <icon>.
Database Tables
TABLES: kna1.                  "Customer Master
Types
TYPE-POOLS: kkblo.
Structures
Structure to hold the Color Information
DATA: BEGIN OF st_color,
        color(3) TYPE c,
      END OF st_color.
Structure to hold the Icon Information
DATA: BEGIN OF st_icon,
        icon(4) TYPE c,
      END OF st_icon.
ALV Field Catalog Structure
DATA: st_fieldcat   TYPE slis_fieldcat_alv.
ALV Layout Structure
DATA: st_layout     TYPE slis_layout_alv.
Internal Tables
Output Table
DATA: BEGIN OF tbl_kna1 OCCURS 0.
        INCLUDE STRUCTURE st_icon.   "Icon Structure
        INCLUDE STRUCTURE kna1.      "Customer Master Structure
        INCLUDE STRUCTURE st_color.  "Color Structure
DATA: END OF tbl_kna1.
ALV Field Catalog Table
DATA: tbl_fieldcat  TYPE slis_t_fieldcat_alv.
Variables
DATA: fieldname(30) TYPE c,
      g_repid       LIKE sy-repid.
Start of Selection
START-OF-SELECTION.
  g_repid = sy-repid.
  PERFORM get_data.
End of Selection
END-OF-SELECTION.
  PERFORM do_fancy_stuff.
  PERFORM get_layout.
  PERFORM get_fieldcat.
  PERFORM create_report.
*&      Form  CREATE_REPORT
      Learn to read the subroutine name!
FORM create_report.
  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
            i_interface_check       = ' '
            i_callback_program      = g_repid
            i_callback_user_command = 'PROCESS_USER_COMMANDS'
            it_fieldcat             = tbl_fieldcat
            i_default               = 'X'
            i_save                  = ' '
            is_layout               = st_layout
       TABLES
            t_outtab                = tbl_kna1
       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.                               " CREATE_REPORT
*&      Form  GET_FIELDCAT
      Build the Field Catalog
FORM get_fieldcat.
Here the field catalog is created. To display more fields simply
'uncomment' the additional lines and add the field name. Also note
that the field catalog is much more powerful than this. You can
intensify fields, change the colour, assign reference fields, etc.
Look at type slis_fieldcat_alv for more options.
  PERFORM write_fieldcat USING 'ICON'  'TBL_KNA1' '    ' 'X' 1 '2' 'X'
  PERFORM write_fieldcat USING 'KUNNR' 'TBL_KNA1' 'KNA1' 'X' 2 ' ' ' '
  PERFORM write_fieldcat USING 'NAME1' 'TBL_KNA1' 'KNA1' ' ' 3 '10' ' '
                               'X'.
  PERFORM write_fieldcat USING 'STRAS' 'TBL_KNA1' 'KNA1' ' ' 4 ' ' ' '
  PERFORM write_fieldcat USING 'TELF1' 'TBL_KNA1' 'KNA1' ' ' 5 ' ' ' '
  PERFORM write_fieldcat USING 'ORT01' 'TBL_KNA1' 'KNA1' ' ' 6 ' ' ' '
  PERFORM write_fieldcat USING 'PSTLZ' 'TBL_KNA1' 'KNA1' ' ' 7 ' ' ' '
  PERFORM write_fieldcat USING 'SORTL' 'TBL_KNA1' 'KNA1' ' ' 8 ' ' ' '
  PERFORM write_fieldcat USING 'ERNAM' 'TBL_KNA1' 'KNA1' ' ' 9 ' ' ' '
  PERFORM write_fieldcat USING 'SPRAS' 'TBL_KNA1' 'KNA1' ' ' 10 ' ' ' '
perform write_fieldcat using '     ' 'TBL_KNA1' 'KNA1' ' ' 10 ' '.
perform write_fieldcat using '     ' 'TBL_KNA1' 'KNA1' ' ' 11 ' '.
perform write_fieldcat using '     ' 'TBL_KNA1' 'KNA1' ' ' 12 ' '.
ENDFORM.                               " GET_FIELDCAT
*&      Form  WRITE_FIELDCAT
      Write the Field Catalog data to the Field Catalog Table
     -->name   Field name
     -->tab    Table name
     -->st     Structure Name
     -->key    Is this field a Key?
     -->pos    Position Number
     -->length Field Length
     -->icon   Display as Icon
     -->hot    Hotspot
FORM write_fieldcat USING name tab st key pos length icon hot.
  st_fieldcat-fieldname   = name.
  st_fieldcat-tabname     = tab.
  st_fieldcat-ref_tabname = st.
  st_fieldcat-key         = key.
  st_fieldcat-col_pos     = pos.
  st_fieldcat-outputlen   = length.
  st_fieldcat-icon        = icon.
  st_fieldcat-hotspot     = hot.
  APPEND st_fieldcat TO tbl_fieldcat.
  CLEAR st_fieldcat.
ENDFORM.                               " WRITE_FIELDCAT
*&      Form  PROCESS_USER_COMMANDS
      Interactive Reporting Commands
FORM process_user_commands USING syst-ucomm LIKE syst-ucomm
                                 selfield TYPE slis_selfield.
This subroutine is called when there is user interaction in the output
In this case if the user double clicks the Customer Number then the
program will call transaction XD03 and display the Customer Master
Data
  CASE syst-ucomm.
    WHEN '&IC1'.
get cursor field fieldname.
      READ TABLE tbl_kna1 INDEX selfield-tabindex.
      SET PARAMETER ID 'KUN' FIELD tbl_kna1-kunnr.
      CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
  ENDCASE.
ENDFORM.                               " PROCESS_USER_COMMANDS
*&      Form  GET_LAYOUT
  set the layout of the ALV.
  add color to the row?
FORM get_layout.
  st_layout-info_fieldname    = 'COLOR'.
  st_layout-colwidth_optimize = 'X'.
  st_layout-get_selinfos      = 'X'.
ENDFORM.                    " GET_LAYOUT
*&      Form  get_data
      Get some data to play with
FORM get_data.
  SELECT * FROM kna1 INTO CORRESPONDING FIELDS OF TABLE tbl_kna1
         UP TO 30 ROWS.
ENDFORM.                    " get_data
*&      Form  do_fancy_stuff
      Do some fancy pants stuff for example changing the color of
      lines and adding icons
FORM do_fancy_stuff.
Here we will demonstrate changing the color of ALV Record lines as
well as displaying Icons
  LOOP AT tbl_kna1.
All records where NAME1 begins with 'M', will be displayed in Bluish
Green
    IF tbl_kna1-name1(1) EQ 'M'.
      tbl_kna1-color = 'C41'.  "Bluish Green
      MODIFY tbl_kna1 TRANSPORTING color.
    ENDIF.
All records with no TELF1 will be displayed in White and have a
Warning Icon
    IF tbl_kna1-telf1 IS INITIAL.
      tbl_kna1-color = 'C00'.  "White
      tbl_kna1-icon  = '@AH@'. "Warning Icon
      MODIFY tbl_kna1 TRANSPORTING icon color.
    ENDIF.
  ENDLOOP.
ENDFORM.                    " do_fancy_stuff[/code]

Similar Messages

  • Viewing reports with Drill Down option

    Hi all, here is the complaint that we received:
    Please try to find a means to help!
    When I’m in my Report and when in an account and I go to a deal to alter or look at it, when I return to reports I always am driven back to the top of the report file. If I’m in December and looking at the entire year I have to go through all accounts once again to get to the same starting point. A great irritant. I can’t help but think that there is a better way.
    Anyone know if this can be changed? Thank you in advance!!!

    Sorry, let me explain...
    The problem isn't with the report, they have issues with what happens after you drill down into the account from the report and go back to the report.
    When they go back to the report after adjusting the account/opp it doesn;t go back to what they were looking at, the view will go to the top of the report. Say they were looking at Account #100 out of 250 (250 total accounts in the report), if they drill down into account 100 and then go back to the report they will be taken back to account #1.
    Is that more clear?
    What they want is to be able to go back to the view of Account #100.

  • Reports with drill down links

    I have a report consisting of 8 columns, with 4 of them having a drill down link leading to 4 other pages. 1 column is not null, the other 3 can be null.
    How do I hide the links when the column value is null?
    At present I have defined the URL for each column under 'Column Link' in the column attributes.

    It would be nice if there was a way to specify conditions on the report attributes column editing pages not only for the entire column, but also for values within the column.
    E.G., if column value is negative, print the amount in red with parentheses.
    Maybe there's a way I don't know about. The only way so far I've found is to push the logic out into the query, which, as you point out, ends up mixing HTML output with SQL.

  • Integrating BI reports (with drill down) in EP

    Hi All,
    We want to integrate some BI reports in EP. What we want to achieve is:
    Display a graph (eg indicating sales revenue) in the iView
    Upon user click, drill down the report to view by various criteria.
    Would appreciate if anyone can provide tips on how to achieve this. Ive been contemplating on whether to use VC etc.  My apologies for not being so specific as im unfamiliar in the BW arena. Thanks!

    Hi,
    Once you've created the BW query, report or template in your Web Application Designer you can create a Bex report portal iView on top of it using the iViews templates.
    Read <a href="http://help.sap.com/saphelp_nw70/helpdata/en/bd/3d1640d4642402e10000000a1550b0/frameset.htm">this general info</a> on how to Display Content from BI in the Portal and <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/33/39fa40ee14f26fe10000000a1550b0/frameset.htm">here</a> about the Bex iView in specific.
    Hope it helps,
    Roy

  • Matirx Report with drill down

    I wana a create a matrix report like this
    Department Strength Total_Salary
    A 10 1000
    B 20 5000
    C 30 4000
    I will also need a drill down for every cell. How I can create that. Is there any live example of such type report available. I wana display it on webpage (not excel or rtf exports plz)

    Hello,
    The following should help you - http://download-uk.oracle.com/docs/cd/B32472_01/doc/appdev.300/b32469/rprt_drill.htm#CIHGBADI
    Regards,
    Arie.

  • Report with drill-down needs to start display at lowest level

    Hi,
    I'm not sure if this is in the correct forum but I'm hoping that a moderator will move it to the correct area if there is a better place for this.
    I have a report working that shows Master Project information, drills to Projects information and then to Tasks information and this is woking correctly. 
    For example:
    Master Project A
        Project A1
             Task A1-a
             Task A1-b
             Task A1-c
        Project A2
             Task A2-a
             Task A2-b
    Master Project B        and so forth.
    This works great; the report opens and shows all the data at the Master Project Level (Master Project A & B), the customer clicks on the Master Project name and the Master Project detail info is hidden and the Projects (A1 & A2) are displayed. 
    If one of these Project names is clicked, the Project detail info is hidden and the Tasks (A1-a, A1-b & A1-c) are displayed.  Everything is great!
    BUT, now the customer wants the display to start with the only the Master Project name and Project name displayed and all the Task information displayed.  Then if they click on the Project name, the Task info is hidden and the Project detail info is
    displayed.  In other words, the reverse of the normal procedure.
    I've attempted changing the hide/show on the groups, rows, anywhere I could think of and I cannot get it to display correctly.  Can anyone come up with a solution?
    Thanks in advance,
    Tina

    Hi BuildWithVS,
    Thank you for posting in the MSDN forum.
    I’m afraid that it is not the correct forum.
    If this issue is related to the SSRS, this forum would be better like this
    case:
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=sqlreportingservices
    If it is related to the report control, please post this issue in this forum:
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=vsreportcontrols
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • HTMLDB_ITEM report with 'Drill Down'

    I have created a report using the HTMLDB_ITEM Package and I would like to link to a form to add more detail. I have tried to create this using the tools but it assigns the value of the hyperlink to #column heading# which is not working. Am I missing something or is there another way of doing it?
    Thanks
    Simon

    Simon,
    Have you tried to contruct the link manually like so:
    select 'detail' link,
    htmldb_item.text (1, ename)
    from emp

  • REPORT PAINTER DRILL DOWN REPORT

    Hi,
    i need to develop report painter report with drill down for cost elments and month wise
    out should be cost elements and all months
    Please suggest how to use drill down
    Thanks and Regards
      RAVi

    Along these same lines. I have a user that cannot drill down into a drill down report. Let me clarify. This  report does have drill down capability as some people can drill down into it but others cannot. If a user has authorization to run a report via GRR3. When they click on an item to drill down they do not get an authorization error statement, all they get is a statment that says "list contains no data". Any ideas why some can drill down and some can't? Thanks
    Mark

  • Problem in Viewer with drill down, Working fine in Plus

    Hi,
    I am using the cross tab reports with drill down functionality. In the viewer version I am getting the following error:
    An error occurred while handling the event. See the application log for more details.
    - The numerical value entered was too low.
    This one working fine in Plus. .
    As for your information this one is working fine in both plus and viewer in development instance and not working in PROD instance.
    Please help me out.
    thanks.

    Update
    Hi Guys the report is working fine with cross tab . Its giving the above error when ever I click the Drill to link which takes to the another detail report.
    thanks in advance

  • Exporting a Report to a pdf file with drill down!

    Hi,
    I would like to export a Report to a pdf file.
    My Report includes drill down options. I require the exported pdf with drill down options.
    (Similar to Navigation options in a PDF file).
    I hope this makes sense.
    Please provide a better solution for me.
    If am not wrong, this facility is not available with Crystal Reports!!!
    Thanks,
    Ramesh.

    Hi Ramesh
    You can download the trial versions of the Crystal Report from the following link:
    https://websmp202.sap-ag.de/support (Please copy the link and paste it to your web browser).
    You can get the license by putting a request in the follwoing link:
    https://websmp202.sap-ag.de/support(Click on Request License key under Service Corner).
    Hope it helps.
    Regards
    Sourashree Ghosh

  • Calendar with Drill Down Report

    Hello,
    Everybody.
    I am new to Application Express.
    Please any one tell me step by step how to make calendar with drill down report.
    Waiting for valuable reply.
    Thanks
    Rahul

    Not sure if this is what you wanted, but I have links on a calendar, and when you click them, it branches to another page with details about the event.
    To do this, create a calendar region. The SQL statement should have at least 2 columns: The date of the "event", and the text to display as a link. You should also choose a primary key that you want to pass to the drill down report when the user clicks. Something like this:
    select hiredate date_scheduled,
              ename display_column,
              empno
       from empIn the calendar attributes of that region, there is a place to designate which column is the date, and which should be displayed. Go down a little further and set the column link. Put the page you want to show the drilldown report on, and set any variables you need to.
    Hopefully that helped. Its pretty simple once you play around with it - start simple and then once you get the hang of it, make it more complex.

  • How to insert "%" into the report figure in report painter/ drill down

    Please kindly advice how to insert "%" in the calculated amount in the report painter/ drill down report. 
    Thank you
    Sirirak

    Hi,
    Create a text variable (for query name, option available in query properties).
    Processing Type would be Replacement path, replace with variable.
    Give the variable name created for the selection box characteristic in 'Replace with variable' option.
    This would replace value of the text variable with the user input value.
    Hope this helps!

  • Create a Procedural ALV Report with editable fields and save the changes

    Hi,
    I am new to ABAP. I have created a Procedural ALV Report with 3 fields. I want to make 2 fields editable. When executed, if the fields are modified, I want to save the changes. All this I want to do without using OO concepts. Please help . Also, I checked out the forum and also the examples
    BCALV_TEST_GRID_EDIT_01
    BCALV_TEST_GRID_EDIT_02
    BCALV_TEST_GRID_EDIT_04_FORMS
    BCALV_TEST_GRID_EDITABLE
    BCALV_EDIT_01
    BCALV_EDIT_02
    BCALV_EDIT_03
    BCALV_EDIT_04
    BCALV_EDIT_05
    BCALV_EDIT_06
    BCALV_EDIT_07
    BCALV_EDIT_08
    BCALV_FULLSCREEN_GRID_EDIT
    But all these are using OO Concepts.
    Please help.
    Regards,
    Smruthi

    TABLES:     ekko.
    TYPE-POOLS: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
      line_color(4) TYPE c,     "Used to store row color attributes
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          gd_tab_group TYPE slis_t_sp_group_alv,
          gd_layout    TYPE slis_layout_alv,
          gd_repid     LIKE sy-repid.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
    fieldcatalog-do_sum      = 'X'.
    fieldcatalog-no_zero     = 'X'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
    fieldcatalog-edit             = 'X'
      fieldcatalog-col_pos     = 5.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-datatype     = 'CURR'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    FORM build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
      gd_layout-info_fieldname =      'LINE_COLOR'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    FORM display_alv_report.
      gd_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program      = gd_repid
                i_callback_pf_status_set = 'STATUS'
                i_callback_top_of_page   = 'TOP-OF-PAGE'
               i_callback_user_command = 'USER_COMMAND'
               i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
               it_special_groups       = gd_tabgroup
               IT_EVENTS                = GT_XEVENTS
                i_save                  = 'X'
               is_variant              = z_template
           TABLES
                t_outtab                = it_ekko
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      DATA: ld_color(1) TYPE c.
      SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
       UP TO 10 ROWS
        FROM ekpo
        INTO TABLE it_ekko.
      LOOP AT it_ekko INTO wa_ekko.
        ld_color = ld_color + 1.
        IF ld_color = 8.
          ld_color = 1.
        ENDIF.
        CONCATENATE 'C' ld_color '10' INTO wa_ekko-line_color.
        MODIFY it_ekko FROM wa_ekko.
      ENDLOOP.
    ENDFORM.                    " DATA_RETRIEVAL
          FORM top-of-page                                              *
    FORM top-of-page.
      WRITE:/ 'This is First Line of the Page'.
    ENDFORM.
          FORM status                                                   *
    FORM status USING rt_extab TYPE slis_t_extab.  .
      SET PF-STATUS 'ALV'.
    ENDFORM.
          FORM USER_COMMAND                                          *
    -->  RF_UCOMM                                                      *
    -->  RS                                                            *
    FORM user_command USING rf_ucomm LIKE sy-ucomm
                             rs TYPE slis_selfield.            
      DATA ref1 TYPE REF TO cl_gui_alv_grid.
      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        IMPORTING
          e_grid = ref1.
      CALL METHOD ref1->check_changed_data.
      CASE rf_ucomm.
    when 'SAVE'.
    get all the modified entries and store them in an internal table and udpate them in to the required transaction or your custom table.
    endcase.
    endform.
    ENDFORM.
    here u need to 2 performs for PF status and USER_COMMAND in the ALV parameters.
    create a custom PF status and create push buttons and assign your ok codes in your PF status.
    if the field has to be edited in the ALV then pass EDIT = 'X' for that field in the fieldcatlog preparation.
    Hope this will help you.
    Regards,
    phani.

  • Print or download ALV report with sort options

    Dear friends,
    How i can download into excel or print ALV report with sort options, like customer name column with similar values should not repeat in the print out or download file.
    Regards,
    Praveen Lobo

    Hi Praveen,
    Use this code, its working:-
    *FOR SORTING DATA
    DATA : it_sort TYPE slis_t_sortinfo_alv,
           wa_sort TYPE slis_sortinfo_alv.
    *          SORT W.R.T. CUSTOMER NAME
      wa_sort-spos = 1.
      wa_sort-fieldname = 'NAME1'. "field customer name
      wa_sort-tabname = 'IT_KNA1'. "internal table with records
      wa_sort-up = 'X'.
      APPEND wa_sort TO it_sort.
      CLEAR wa_sort.
    "this will sort the ALV o/p for customer with same name
    "now the name will not be repeated
    "records with same name will be grouped
    *          DISPLAY RECORDS IN ALV GRID
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program                = sy-repid "report id
        it_fieldcat                       = it_field "field catalog
        it_sort                           = it_sort "sort info
      TABLES
        t_outtab                          = it_kna1 "internal table
      EXCEPTIONS
        program_error                     = 1
        OTHERS                            = 2.
      IF sy-subrc <> 0.
      ENDIF.
    Hope this solves your problem.
    Thanks & Regards,
    Tarun Gambhir
    Edited by: Tarun Gambhir on Dec 31, 2008 1:13 PM

  • What is the difference in Interactive reports and Drill down reports?

    What is the difference in Interactive reports and Drill down reports? Are they same?

    Hi FRD ,
    Both are same .
    as far as i know there is no difference .
    bye .

Maybe you are looking for

  • Remote iPad App: can't access AppleTV, purchased music won't clear

    I can't access AppleTV screen. My "purchased music" pops up on the iPad screen and I can't clear it to access the AppleTV menu using the Remote app.

  • One instance of two-instance RAChang

    Hi all, I am having a big problem with instance hanging. I happened 5 times in this month. Server: HP-UX B.11.23 U ia64, 32 GB RAM/each , 4 CPU/each Cluster: Verita VCS 5 Oracle database: 10.2.0.3 Symptom: 1. One of the instance hang while the other

  • How can I get my Time Machine to Quit Failing?

    I've got a MacBook Pro running Mavericks 10.9.2, and I'm hooked up to two 27" external thunderbolt displays daisy chained together when I'm at work. On one of the monitors I've got a hard drive attached via USB that is my time machine backup. The ama

  • HDMI to Thunderbolt *IN* (PS3)

    Hello, I've been looking around and I'm only finding output options and posts from earlier this year. Have there been any new experiences, adapters, etc that would allow me to connect a PS3 to the 2011 iMac with Thunderbolt ports(targeted display mod

  • Is it necessary to null any unused objects?

    Hi folks, I have heard people said to null and not to null the unused objects both. To be honest, I really notice nulling the objects will help to reclaim the memory from the unused objects. Please tell me if I am doing it wrong, thanks! Billy