ABAP query question on drill down

I want to be able to drill into a sales order listed in a sales abap query.  I thought I read somewhere that you can turn on something to make this query interactive but I cannot put my fingers on that.  Any help?
Thanks so much!
Susan

Hi Susan,
To use RRI in ALV mode, you'll have to follow indications in SAP note 675546 - ALV-RepRep: Report-report interface.
Other information are also give in notes 50629 - ABAP/4 query: Report-Report-Interface, and 174365 - ABAP query: Report/report interface call in ALV
BR
Sandra

Similar Messages

  • Query in EIS Drill-Down Reports

    Hi all:
    We want to build Drill-down reports in EIS. I know the basic of creating a drill-down report. Created a sample using SQL server database and Essbase 9.3.1 dummy(test) cube.
    Just to give you a background we have planning application and no Essbase-only applications.
    I wanted to know is it possible to use an already existing cube in essbase to create drill down reports. I do not want to go through a process of creating the hierarchy in EIS as we already have DRM and a process around metadata creation, which is not likely to change.
    Is there some tool that can take a outline and create a Model/Metaoutline in EIS ?
    Please let me know in case you have any suggestions or wild ideas on this :)

    The short answer is no, you can't do it that way.
    EIS development flows from the relational side to the Essbase side.
    The Metadata Outline cannot be built until the OLAP Model has been created. Drill through reports are LROs defined in the Metadata Outline and linked through the OLAP model to the source tables.
    I tried to do the same thing four years ago and learned that EIS has to build the Essbase Outline in order to enable drill-through. In Version 11.1.2 that has not changed.
    I am curious, though. I was told by my Oracle Planning instructors that EIS doesn't work with Planning. Is that no longer true?
    Good Luck.
    Tim

  • ABAP Query Question

    Hello.  Is there a way to dynamically generate a query? 
    For example:  I'm doing an RFC call that sometimes the strings contains data, the other times they don't.  Is there a way of building the query to only 'and' the values when there are values there?
    Like
    a = '1'
    b = ''
    c = '2'
    select * from whereever where a = 1 (dont include b because its empty) and c = 2
    Any ideas?
    thanks,  Graeme.

    Heres a good solution I found:
    Dynamic where clauses in open SQL
    You can use an internal table to build a dynamic where clause:
    data: where_tab(30) occurs 1 with header line,
    where_clause(30) type c.
    Build the where clause. Will look like this when finished
    WHERE ZAFSTMD02 = 'X' AND rbusa = '5145'
    With a constant, result: ZAFSTMD01 = 'X'
    concatenate 'ZAFSTMD' zcostcheck-zmaaned ' = ''X''' into where_clause.
    Append to internal table where_tab
    append where_clause to where_tab.
    With a variable, result: AND rbusa = '5145'
    concatenate 'AND rbusa = ' '''' i_tab-zgsber ''''
    append where_clause to where_tab.
    Select
    select * from zcostfreq
    where (where_tab).
    endselect.
    Note that you can combine static and dynamic where clauses:
    select * from zcostfreq
    where bukrs = '2021' AND
    (where_tab).
    endselect.

  • Two questions about drill-down of obiee

    First, when i dirll down next level, can i change the measure or hide needless measure. Can be implemented by obiee? How?
    Second, the navigation on web designer. I want to navigate from query_1 to query_2, how? For example,
    query_1
    class people_num
    class1 30
    class2 35
    class3 28
    query_2
    name sex phone
    I don't know that everyone understand it.
    Thanks
    Edited by: user10496160 on 2008-10-30 下午10:40

    For what you are doing, I think Presentation Variables would work best giving you the most flexibility for your users.
    First create a Dashboard prompt on Class and save it to a Presentation Variable called prmtClass, for example. Check the "All Choices" checkbox in the prompt so the user has that choice available.
    Now build your MAIN report with the columns you desire on the highest level.
    Next, build the DETAIL report with the Class, Name, Phone number, etc. columns, with the filter on the Class column set to the Presentation Variable prmtClass.
    Add the Navigation on Value Interaction feature on the Class column in the MAIN report.
    When the user clicks on a particular class, the navigation feature will direct the user to the DETAIl report. The PV will filter that report so only the particular class will show.

  • Drill-down and how to reset to the highest level?

    Good Morning,
    A second question on drill-down:
    My dashboard page still looks like this:
    Dummy Prompt 1: YearFrom
    Dummy Prompt 2: YearTo
    Prompt 3: Item
    All three prompts have a presentation variable to show their respective value in the title of the dashboard page.
    Below the prompts is the report, which is filtered by the three prompts and contains a column "year" with the option to drill-down.
    When I drill-down on a "year" value, a column "month" appears and shows the values of the year by month.
    Problem: In order to start a new query, the first query values have to be reset (I implemented a button for this) to get back to the "year" report. This is not obvious to the user.
    Question: Is there a way to implement the "Reset" button into the "Go" button or another way to avoid the reset for the user?
    Again every idea is appreciated
    Turalf

    The reset button does not work because when anything is entered in the operator field, and you press "reset", two events occur (1) a change is detected in the operator field and (2), a change in the reset is detected. Event (1) occurs first stopping the loop. The reset case is thus never reached.
    One solution would be to sense the reset state in the "operator" event. You need to keep the loop running if reset is pressed. (See attached modification.)
    Some other suggestions: Notice that I also made a data dependency between the case structure and the while loop. Without this, there is no guarantee that the case structure executes before the while loop and you might generate a race condition with unexpected results. I also re
    moved the timeout event, it doesn't seem to do anything. The three text fields should be set to "limit to single line" in this application so fields can be finished by hitting the enter key).
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    accessMOD.vi ‏65 KB

  • Letting drill-down on a column depending on permissions

    Hi friends,
    I have a question about drilling-down on a column. I've designed a hierarchial level security on my application, so, some users can't access to certain information, therefore the query will get back it no results. But i need dissable drill-down option when there is no information to show. So, I need to know if it's possible to dissable drill-down option in some rows and to let it for others rows at the same column.
    Thanks.

    HI my friend check this out hope this might help solve your problem if am right
    http://obiee101.blogspot.com/search/label/CHOOSE

  • Drill Down and Drill UP on Web Analysis Report

    Hi all,
    I have a question regarding Drill down and Drill up on Web Analysis Report.
    The situation is the following:
    I've created a report with some account parent elements in row. The dimension account has a multiple hierarchy.
    I need to drill down on the child of these elements keeping the parente on top and so i've selected the option "Selected Member First".
    The drill down it's ok for the first drill to go on the next level but when i drill down once more to go on the next level of the selected member hierarchy the drill move this level out hierarchy.
    Can someone help me on this point?
    After that i've drilled just to the last level when i drill up on these elements to return on the previous level i note that in the report happens a strange thing:
    The Drill Up works fine but on the report appears another elements which is the same parent with anothe code/alias of another hierarchy instead of the Selected member.
    On this i've noted tha this 2 different parente have the same elements...I think that the children of the selected memeber can be shared members....Can be this the problem?
    Thanks for the help.
    Best Regards
    Eugenio Gualtieri

    Hi John,
    thanks for your answer.
    I've trayed to set the report on Smart View to virify tou test your advise.
    The situatio is the following:
    IS05101010-PUBBLICITA'
    702000 - VEND. DI SPAZIO PUBBLICITARIO
    702010 - RETTIFICHE VENDITE SPAZIO PUBBLICITARIO     
    W10004 - RICAVI PUBBL ICITA' ATTIVA (Q.EDIT) INTE     
    W10007 - RICAVI DA SPAZIO PUBBL. INTERASA     
    W10029 - RETTIFICA RICAVI PUBBL. INTERASA     
    ED05101010-PUBBLICITA'
    702000 - VEND. DI SPAZIO PUBBLICITARIO
    702010 - RETTIFICHE VENDITE SPAZIO PUBBLICITARIO     
    W10004 - RICAVI PUBBL ICITA' ATTIVA (Q.EDIT) INTE     
    W10007 - RICAVI DA SPAZIO PUBBL. INTERASA     
    W10029 - RETTIFICA RICAVI PUBBL. INTERASA     
    If I take only one parent member the drill up works fine but if i take all 2 memeber as above and i decide to drill up on one of the two element occur that the drill work for the two elements at the same time.
    Afetr the drill in this case the situation is:
    IS05101010-PUBBLICITA'
    ED05101010-PUBBLICITA'
    Can be a problem due to shared memebers?
    Thanks for your help.
    Regards
    Eugenio Gualtieri

  • Drill Down in Report Designer

    Hi to all,
    I have create query in query designer with drill down, but when i format my query in  Report Designer and execute it, it is not showing drill down.
    can i show drilll down in Report Designer when executed.
    If yes, How to do that.
    I shall be thankfull to you  for this.
    Reagrds
    Pavneet Rana

    Hello,
    Because BEx Reports are optimized for presentation and printing, the drill down cannot be changed (you can set filter values only). If you want to navigate within the data on the Web, use the BEx Web Analyzer or create a Web Application using a Web item analysis.
    A dynamic section is based on a data provider thet contains a key figure in the columns and one more characteristics in the drill down od the rows.
    Regards,
    Edited by: Subbu_Amar on Oct 27, 2010 8:35 AM

  • How to collapse a drill down report

    Hi All,
    I have quick question on drill down report. I drill down from year to quarter / month / week and I get correct output. Now our client wants to collapse it back to year level. Is it possible and how?
    Thanks in advance

    Refer to this, it may be helpful
    http://prasadmadhasi.com/2011/12/15/hierarchicalnavigationinobiee11g/
    https://blogs.oracle.com/robreynolds/entry/obiee_11g_new_feature_-_hierar                                                                                                                                                                                                                                                                                                                                                                       

  • Drill down problem using 0FISCPER3

    Hi expert!
    I try to explain my BEX problem.
    I have a query where in column there are two restricted keyfigures and 0FISCPER3.
    Both Kfigures are filtred by 0fiscper3 range variable. This variable is entered by user input.
    <b>kfigure 1</b> --> 0fiscper3: from value 1 to variable value;
    <b>kfigure 2</b> --> 0fiscper3: from variable value+1 to value 12.
    When I run the query, filter on an individual 0fiscper3 value and then drill down a characteristic, the report miss the value and end up with "not data found", even if the data is existing.
    thanks a lot.
    C.
    Message was edited by:
            claudia martini

    Hi,
    Could you give us more details on the layout of your query and the drill down ?
    Cheers,
    Nicolas

  • How to make output of ABAp query interactive(drill down)..?

    Hi All,
    I have developed one ABAP query which shows the output in which there is a coloumm 'order number'.
    I want to make this coloumn interactive ,that means after double clicking on any row of this colomn ,it should go to transaction KO02.
    Where do i have to write the code  in ABAP query ?
    I am very new to ABAP query..this is the first query i have deloped till now.
    points will be rewarded.
    Thnks in advance.
    Regards,
    Sanjay.

    <b>The below sample code is one such example of Drill down reporting...
    Make the necessary modifications, change the statement CALL TRANSACTION to whatever you want to CALL. Proceed further.</b>
    *"Table declarations...................................................
    TABLES:
      EKKO,                                " Purchasing Document Header
      CDHDR,                               " Change document header
      SSCRFIELDS.                          " Fields on selection screens
    *"Selection screen elements............................................
    SELECT-OPTIONS:
      S_EBELN FOR EKKO-EBELN,              " Purchasing Document Number
      S_LIFNR FOR EKKO-LIFNR,              " Vendor's account number
      S_EKGRP FOR EKKO-EKGRP,              " Purchasing group
      S_BEDAT FOR EKKO-BEDAT,              " Purchasing Document Date
      S_UDATE FOR CDHDR-UDATE.             " Creation date of the change
                                           " document
    *" Data declarations...................................................
    Field String to hold Purchase Document Number                       *
    DATA:
      BEGIN OF FS_EBELN,
        EBELN(90) TYPE C,                  " Purchase Document Number
        ERNAM     TYPE EKKO-ERNAM,         " Name of Person who Created
                                           " the Object
        LIFNR     TYPE EKKO-LIFNR,         " Vendor's account number
        EKGRP     TYPE EKKO-EKGRP,         " Purchasing group
        BEDAT     TYPE EKKO-BEDAT,         " Purchasing Document Date
      END OF FS_EBELN,
    Field String to hold Purchase Document Header                       *
      BEGIN OF FS_EKKO,
        EBELN TYPE EKKO-EBELN,             " Purchasing Document Number
        ERNAM TYPE EKKO-ERNAM,             " Name of Person who Created the
                                           " Object
        LIFNR TYPE EKKO-LIFNR,             " Vendor's account number
        EKGRP TYPE EKKO-EKGRP,             " Purchasing group
        BEDAT TYPE EKKO-BEDAT,             " Purchasing Document Date
      END OF FS_EKKO,
    Field String to hold Account Number and name of the Vendor          *
      BEGIN OF FS_LFA1,
        LIFNR TYPE LFA1-LIFNR,             " Account Number of Vendor
        NAME1 TYPE LFA1-NAME1,             " Name1
      END OF FS_LFA1,
    Field String to hold Change date and the name of the user           *
      BEGIN OF FS_CDHDR,
        OBJECTCLAS TYPE CDHDR-OBJECTCLAS,  " Object Class
        OBJECTID   TYPE CDHDR-OBJECTID,    " Object value
        CHANGENR   TYPE CDHDR-CHANGENR,    " Document change number
        USERNAME   TYPE CDHDR-USERNAME,    " User name
        UDATE      TYPE CDHDR-UDATE,       " Creation date of the change
                                           " document
      END OF FS_CDHDR,
    Field String to hold Change document items                          *
      BEGIN OF FS_CDPOS,
        OBJECTCLAS   TYPE CDPOS-OBJECTCLAS," Object class
        OBJECTID(10) TYPE C,               " Object Value
        CHANGENR     TYPE CDPOS-CHANGENR,  " Document change number
        TABNAME      TYPE CDPOS-TABNAME,   " Table Name
        FNAME        TYPE CDPOS-FNAME,     " Field Name
        VALUE_NEW    TYPE CDPOS-VALUE_NEW, " New contents of changed field
        VALUE_OLD    TYPE CDPOS-VALUE_OLD, " Old contents of changed field
      END OF FS_CDPOS,
    Field String to hold Date Element Name                              *
      BEGIN OF FS_DATAELE,
        TABNAME   TYPE DD03L-TABNAME,      " Table Name
        FIELDNAME TYPE DD03L-FIELDNAME,    " Field Name
        ROLLNAME  TYPE DD03L-ROLLNAME,     " Data element (semantic domain)
      END OF FS_DATAELE,
    Field String to hold Short Text of the Date Element                 *
      BEGIN OF FS_TEXT,
        ROLLNAME TYPE DD04T-ROLLNAME,      " Data element (semantic domain)
        DDTEXT   TYPE DD04T-DDTEXT,        " Short Text Describing R/3
                                           " Repository Objects
      END OF FS_TEXT,
    Field String to hold data to be displayed on the ALV grid           *
      BEGIN OF FS_OUTTAB,
        EBELN      TYPE EKKO-EBELN,        " Purchasing Document Number
        ERNAM      TYPE EKKO-ERNAM,        " Name of Person who Created the
                                           " Object
        LIFNR      TYPE EKKO-LIFNR,        " Vendor's account number
        EKGRP      TYPE EKKO-EKGRP,        " Purchasing group
        BEDAT      TYPE EKKO-BEDAT,        " Purchasing Document Date
        WERKS      TYPE LFA1-WERKS,        " Plant
        NAME1      TYPE LFA1-NAME1,        " Name1
        USERNAME   TYPE CDHDR-USERNAME,    " User name
        UDATE      TYPE CDHDR-UDATE,       " Creation date of the change
                                           " document
        DDTEXT     TYPE DD04T-DDTEXT,      " Short Text Describing R/3
                                           " Repository Objects
        VALUE_NEW  TYPE CDPOS-VALUE_NEW,   " New contents of changed field
        VALUE_OLD  TYPE CDPOS-VALUE_OLD,   " Old contents of changed field
      END OF FS_OUTTAB,
    Internal table to hold Purchase Document Number                     *
      T_EBELN LIKE STANDARD TABLE
                OF FS_EBELN,
    Internal table to hold Purchase Document Header                     *
    T_EKKO LIKE STANDARD TABLE
              OF FS_EKKO,
    Temp Internal table to hold Purchase Document Header                *
    T_EKKO_TEMP LIKE STANDARD TABLE
                   OF FS_EKKO,
    Internal table to hold Account number and Name of the Vendor        *
      T_LFA1 LIKE STANDARD TABLE
               OF FS_LFA1,
    Internal Table to hold Change date and the name of the user         *
      T_CDHDR LIKE STANDARD TABLE
                OF FS_CDHDR,
    Internal Table to hold Change document items                        *
      T_CDPOS LIKE STANDARD TABLE
                OF FS_CDPOS,
    Temp. Internal Table to hold Change document items                  *
      T_CDPOS_TEMP LIKE STANDARD TABLE
                     OF FS_CDPOS,
    Internal Table to hold Data Element Name                            *
      T_DATAELE LIKE STANDARD TABLE
                  OF FS_DATAELE,
    Temp. Internal Table to hold Data Element Name                      *
      T_DATAELE_TEMP LIKE STANDARD TABLE
                       OF FS_DATAELE,
    Internal Table to hold Short Text of the Date Element               *
      T_TEXT LIKE STANDARD TABLE
               OF FS_TEXT,
    Internal Table to hold data to be displayed on the ALV grid         *
      T_OUTTAB LIKE STANDARD TABLE
                 OF FS_OUTTAB.
                   C L A S S   D E F I N I T I O N                      *
      CLASS LCL_EVENT_HANDLER  DEFINITION DEFERRED.
    *" Data declarations...................................................
    Work variables                                                      *
      DATA:
        W_EBELN       TYPE EKKO-EBELN,     " Purchasing Document Number
        W_LIFNR       TYPE EKKO-LIFNR,     " Vendor's account number
        W_EKGRP       TYPE EKKO-EKGRP,     " Purchasing group
        W_VALUE       TYPE EKKO-EBELN,     " Reflected Value
        W_SPACE       VALUE ' ',           " Space
        W_FLAG        TYPE I,              " Flag Variable
        W_VARIANT     TYPE DISVARIANT,     " Variant
    *--- ALV Grid
        W_GRID        TYPE REF TO CL_GUI_ALV_GRID,
    *--- Event Handler
        W_EVENT_CLICK TYPE REF TO LCL_EVENT_HANDLER,
    *--- Field catalog table
        T_FIELDCAT    TYPE LVC_T_FCAT.
                          AT SELECTION-SCREEN EVENT                     *
    AT SELECTION-SCREEN ON S_EBELN.
    Subroutine to validate Purchase Document Number.
      PERFORM VALIDATE_PD_NUM.
    AT SELECTION-SCREEN ON S_LIFNR.
    Subroutine to validate Vendor Number.
      PERFORM VALIDATE_VEN_NUM.
    AT SELECTION-SCREEN ON S_EKGRP.
    Subroutine to validate Purchase Group.
      PERFORM VALIDATE_PUR_GRP.
                          START-OF-SELECTION EVENT                      *
    START-OF-SELECTION.
    Subroutine to select all Purchase orders.
      PERFORM SELECT_PO.
      CHECK W_FLAG EQ 0.
    Subroutine to select Object values.
        PERFORM SELECT_OBJ_ID.
      CHECK W_FLAG EQ 0.
    Subroutine to select Changed values.
        PERFORM SELECT_CHANGED_VALUE.
      CHECK W_FLAG EQ 0.
    Subroutine to Select Purchase Orders.
        PERFORM SELECT_PUR_DOC.
    Subroutine to select Vendor Details.
        PERFORM SELECT_VENDOR.
    Subroutine to select Text for the Changed values.
        PERFORM DESCRIPTION.
                          END-OF-SELECTION EVENT                        *
    END-OF-SELECTION.
      IF NOT T_EKKO IS INITIAL.
    Subroutine to populate the Output Table.
        PERFORM FILL_OUTTAB.
    Subroutine to build Field Catalog.
        PERFORM PREPARE_FIELD_CATALOG CHANGING T_FIELDCAT.
        CALL SCREEN 100.
      ENDIF.                               " IF NOT T_EKKO...
    CLASS LCL_EVENT_HANDLER DEFINITION
    Defining Class which handles events
    CLASS LCL_EVENT_HANDLER DEFINITION .
      PUBLIC SECTION .
        METHODS:
            HANDLE_HOTSPOT_CLICK
                 FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
                           IMPORTING E_ROW_ID E_COLUMN_ID.
    ENDCLASS.                              " LCL_EVENT_HANDLER DEFINITION
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION
    Implementing the Class which can handle events
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION .
    *---Handle Double Click
      METHOD HANDLE_HOTSPOT_CLICK .
    Subroutine to get the HotSpot Cell information.
        PERFORM GET_CELL_INFO.
        SET PARAMETER ID 'BES' FIELD W_VALUE.
        CALL TRANSACTION 'ME23N'.
      ENDMETHOD.                           " HANDLE_HOTSPOT_CLICK
    ENDCLASS.                              " LCL_EVENT_HANDLER
    *&      Module  STATUS_0100  OUTPUT
          PBO Event
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'OOPS'.
      SET TITLEBAR 'TIT'.
    Subroutine to fill the Variant Structure
      PERFORM FILL_VARIANT.
      IF W_GRID IS INITIAL.
        CREATE OBJECT W_GRID
          EXPORTING
       I_SHELLSTYLE      = 0
       I_LIFETIME        =
            I_PARENT       = CL_GUI_CONTAINER=>SCREEN0
       I_APPL_EVENTS     =
       I_PARENTDBG       =
       I_APPLOGPARENT    =
       I_GRAPHICSPARENT  =
       I_NAME            =
       I_FCAT_COMPLETE   = SPACE
          EXCEPTIONS
            ERROR_CNTL_CREATE = 1
            ERROR_CNTL_INIT   = 2
            ERROR_CNTL_LINK   = 3
            ERROR_DP_CREATE   = 4
            OTHERS            = 5.
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                     WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.                             " IF SY-SUBRC <> 0
        CALL METHOD W_GRID->SET_TABLE_FOR_FIRST_DISPLAY
          EXPORTING
           I_BUFFER_ACTIVE               =
           I_BYPASSING_BUFFER            =
           I_CONSISTENCY_CHECK           =
           I_STRUCTURE_NAME              =
            IS_VARIANT                    = W_VARIANT
            I_SAVE                        = 'A'
           I_DEFAULT                     = 'X'
           IS_LAYOUT                     =
           IS_PRINT                      =
           IT_SPECIAL_GROUPS             =
           IT_TOOLBAR_EXCLUDING          =
           IT_HYPERLINK                  =
           IT_ALV_GRAPHICS               =
           IT_EXCEPT_QINFO               =
           IR_SALV_ADAPTER               =
          CHANGING
            IT_OUTTAB                     = T_OUTTAB
            IT_FIELDCATALOG               = T_FIELDCAT
           IT_SORT                       =
           IT_FILTER                     =
          EXCEPTIONS
            INVALID_PARAMETER_COMBINATION = 1
            PROGRAM_ERROR                 = 2
            TOO_MANY_LINES                = 3
            OTHERS                        = 4
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                     WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.                             " IF SY-SUBRC <> 0.
      ENDIF.                               " IF W_GRID IS INITIAL
      CREATE OBJECT W_EVENT_CLICK.
      SET HANDLER W_EVENT_CLICK->HANDLE_HOTSPOT_CLICK FOR W_GRID.
    ENDMODULE.                             " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          PAI Event
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'CANCEL'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                             " USER_COMMAND_0100  INPUT
    *&      Form  PREPARE_FIELD_CATALOG
          Subroutine to build the Field catalog
          <--P_T_FIELDCAT  Field Catalog Table
    FORM PREPARE_FIELD_CATALOG  CHANGING PT_FIELDCAT TYPE LVC_T_FCAT .
      DATA LS_FCAT TYPE LVC_S_FCAT.
    Purchasing group...
      LS_FCAT-FIELDNAME = 'EKGRP'.
      LS_FCAT-REF_TABLE = 'EKKO'.
      LS_FCAT-INTTYPE   = 'C'.
      LS_FCAT-OUTPUTLEN = '10'.
      APPEND LS_FCAT TO PT_FIELDCAT.
      CLEAR LS_FCAT.
    Purchasing Document Number...
      LS_FCAT-FIELDNAME = 'EBELN'.
      LS_FCAT-REF_TABLE = 'EKKO' .
      LS_FCAT-EMPHASIZE = 'C411'.
      LS_FCAT-INTTYPE   = 'C'.
      LS_FCAT-OUTPUTLEN = '10'.
      LS_FCAT-HOTSPOT   = 'X'.
      APPEND LS_FCAT TO PT_FIELDCAT .
      CLEAR LS_FCAT .
    Name of Person who Created the Object...
      LS_FCAT-FIELDNAME = 'ERNAM'.
      LS_FCAT-REF_TABLE = 'EKKO'.
      LS_FCAT-OUTPUTLEN = '15' .
      APPEND LS_FCAT TO PT_FIELDCAT.
      CLEAR LS_FCAT.
    Purchasing Document Date...
      LS_FCAT-FIELDNAME = 'BEDAT'.
      LS_FCAT-REF_TABLE = 'EKKO'.
      LS_FCAT-INTTYPE   = 'C'.
      LS_FCAT-OUTPUTLEN = '10'.
      APPEND LS_FCAT TO PT_FIELDCAT.
      CLEAR LS_FCAT.
    Vendor's account number...
      LS_FCAT-FIELDNAME = 'LIFNR'.
      LS_FCAT-REF_TABLE = 'EKKO'.
      LS_FCAT-INTTYPE   = 'C'.
      LS_FCAT-OUTPUTLEN = '10'.
      APPEND LS_FCAT TO PT_FIELDCAT.
      CLEAR LS_FCAT.
    Account Number of Vendor or Creditor...
      LS_FCAT-FIELDNAME = 'NAME1'.
      LS_FCAT-REF_TABLE = 'LFA1'.
      LS_FCAT-INTTYPE   = 'C'.
      LS_FCAT-OUTPUTLEN = '10'.
      LS_FCAT-COLTEXT   = 'Vendor Name'(001).
      LS_FCAT-SELTEXT   = 'Vendor Name'(001).
      APPEND LS_FCAT TO PT_FIELDCAT.
      CLEAR LS_FCAT.
    Creation date of the change document...
      LS_FCAT-FIELDNAME = 'UDATE'.
      LS_FCAT-REF_TABLE = 'CDHDR'.
      LS_FCAT-INTTYPE   = 'C'.
      LS_FCAT-OUTPUTLEN = '10'.
      LS_FCAT-COLTEXT   = 'Change Date'(002).
      LS_FCAT-SELTEXT   = 'Change Date'(002).
      APPEND LS_FCAT TO PT_FIELDCAT.
      CLEAR LS_FCAT.
    User name of the person responsible in change document...
      LS_FCAT-FIELDNAME = 'USERNAME'.
      LS_FCAT-REF_TABLE = 'CDHDR'.
      LS_FCAT-INTTYPE   = 'C'.
      LS_FCAT-OUTPUTLEN = '10'.
      LS_FCAT-COLTEXT   = 'Modified by'(003).
      LS_FCAT-SELTEXT   = 'Modified by'(003).
      APPEND LS_FCAT TO PT_FIELDCAT.
      CLEAR LS_FCAT.
    Short Text Describing R/3 Repository Objects...
      LS_FCAT-FIELDNAME = 'DDTEXT'.
      LS_FCAT-REF_TABLE = 'DD04T'.
      LS_FCAT-INTTYPE   = 'C'.
      LS_FCAT-OUTPUTLEN = '15'.
      APPEND LS_FCAT TO PT_FIELDCAT.
      CLEAR LS_FCAT.
    Old contents of changed field...
      LS_FCAT-FIELDNAME = 'VALUE_OLD'.
      LS_FCAT-REF_TABLE = 'CDPOS'.
      LS_FCAT-INTTYPE   = 'C'.
      LS_FCAT-OUTPUTLEN = '12'.
      APPEND LS_FCAT TO PT_FIELDCAT.
      CLEAR LS_FCAT.
    New contents of changed field...
      LS_FCAT-FIELDNAME = 'VALUE_NEW'.
      LS_FCAT-REF_TABLE = 'CDPOS'.
      LS_FCAT-INTTYPE   = 'C'.
      LS_FCAT-OUTPUTLEN = '12'.
      APPEND LS_FCAT TO PT_FIELDCAT.
      CLEAR LS_FCAT.
    ENDFORM.                               " PREPARE_FIELD_CATALOG
    *& Form  SELECT_PO
    Subroutine to select all the Purchase Orders
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_PO .
       SELECT EBELN                        " Purchasing Document Number
              ERNAM                        " Name of Person who Created
                                           " the Object
              LIFNR                        " Vendor's account number
              EKGRP                        " Purchasing group
              BEDAT                        " Purchasing Document Date
         FROM EKKO
      PACKAGE SIZE 10000
    APPENDING TABLE T_EBELN
        WHERE EBELN IN S_EBELN
          AND BEDAT IN S_BEDAT.
       ENDSELECT.
    IF SY-SUBRC NE 0.
       W_FLAG = 1.
       MESSAGE S401(M8).
    ENDIF.                                " IF SY-SUBRC NE 0
    ENDFORM.                               " SELECT_PO
    *&  Form  SELECT_OBJ_ID
      Subroutine to select Object ID
      There are no interface parameters to be passed to this subroutine.
    FORM SELECT_OBJ_ID .
    IF NOT T_EBELN IS INITIAL.
        SELECT OBJECTCLAS                  " Object Class
               OBJECTID                    " Object value
               CHANGENR                    " Document change number
               USERNAME                    " User name
               UDATE                       " Creation date
          FROM CDHDR
          INTO TABLE T_CDHDR
       FOR ALL ENTRIES IN T_EBELN
         WHERE OBJECTID EQ T_EBELN-EBELN
           AND UDATE IN S_UDATE
           AND TCODE IN ('ME21N','ME22N','ME23N').
       ENDSELECT.
       IF SY-SUBRC NE 0.
         W_FLAG = 1.
         MESSAGE S833(M8) WITH 'Header Not Found'(031).
       ENDIF.                              " IF SY-SUBRC NE 0.
    ENDIF.                                " IF NOT T_EBELN IS INITIAL
    ENDFORM.                               " SELECT_OBJ_ID
    *&  Form  SELECT_CHANGED_VALUE
      Subroutine to select Changed Values
      There are no interface parameters to be passed to this subroutine.
    FORM SELECT_CHANGED_VALUE .
    IF NOT T_CDHDR IS INITIAL.
        SELECT OBJECTCLAS                  " Object class
               OBJECTID                    " Object value
               CHANGENR                    " Document change number
               TABNAME                     " Table Name
               FNAME                       " Field Name
               VALUE_NEW                   " New contents of changed field
               VALUE_OLD                   " Old contents of changed field
          FROM CDPOS
       PACKAGE SIZE 10000
    APPENDING TABLE T_CDPOS
       FOR ALL ENTRIES IN T_CDHDR
         WHERE OBJECTCLAS EQ T_CDHDR-OBJECTCLAS
           AND OBJECTID   EQ T_CDHDR-OBJECTID
           AND CHANGENR   EQ T_CDHDR-CHANGENR.
        ENDSELECT.
        IF SY-SUBRC NE 0.
          W_FLAG = 1.
          MESSAGE S833(M8) WITH 'Item Not Found'(032).
        ENDIF.                             " IF SY-SUBRC NE 0.
    ENDIF.                               " IF NOT T_CDHDR IS INITIAL
      T_CDPOS_TEMP[] = T_CDPOS[].
    ENDFORM.                               " SELECT_CHANGED_VALUE
    *&   Form  SELECT_PUR_DOC
       Subroutine to select Purchase Order Details
       There are no interface parameters to be passed to this subroutine.
    FORM SELECT_PUR_DOC .
    IF NOT T_CDPOS IS INITIAL.
        SORT T_EBELN BY EBELN.
        LOOP AT T_CDPOS INTO FS_CDPOS.
          READ TABLE T_EBELN INTO FS_EBELN WITH KEY EBELN =
                                          FS_CDPOS-OBJECTID BINARY SEARCH.
          IF SY-SUBRC NE 0.
            DELETE TABLE T_EBELN FROM FS_EBELN.
          ENDIF.                           " IF SY-SUBRC NE 0.
        ENDLOOP.                           " LOOP AT T_CDPOS...
        LOOP AT T_EBELN INTO FS_EBELN.
          MOVE FS_EBELN-EBELN TO FS_EKKO-EBELN.
          MOVE FS_EBELN-ERNAM TO FS_EKKO-ERNAM.
          MOVE FS_EBELN-LIFNR TO FS_EKKO-LIFNR.
          MOVE FS_EBELN-EKGRP TO FS_EKKO-EKGRP.
          MOVE FS_EBELN-BEDAT TO FS_EKKO-BEDAT.
          APPEND FS_EKKO TO T_EKKO.
        ENDLOOP.                           " LOOP AT T_EBELN...
        T_EKKO_TEMP[] = T_EKKO[].
    ENDIF.                               " IF NOT T_CDPOS IS INITIAL
    ENDFORM.                               " SELECT_PUR_DOC
    *&  Form  SELECT_VENDOR
      Subroutine to select Vendor details
      There are no interface parameters to be passed to this subroutine.
    FORM SELECT_VENDOR .
      IF NOT T_EKKO IS INITIAL.
        SORT T_EKKO_TEMP BY LIFNR.
        DELETE ADJACENT DUPLICATES FROM T_EKKO_TEMP COMPARING LIFNR.
        SELECT LIFNR                       " Account Number of Vendor or
                                           " Creditor
               NAME1                       " Name 1
          FROM LFA1
          INTO TABLE T_LFA1
       FOR ALL ENTRIES IN T_EKKO_TEMP
         WHERE LIFNR EQ T_EKKO_TEMP-LIFNR.
       IF SY-SUBRC NE 0.
         MESSAGE S002(M8) WITH 'Master Details'(033).
       ENDIF.                              " IF SY-SUBRC NE 0.
      ENDIF.                               " IF NOT T_EKKO IS INITIAL
    ENDFORM.                               " SELECT_VENDOR
    *&  Form  DESCRIPTION
      Subroutine to get the description
      There are no interface parameters to be passed to this subroutine.
    FORM DESCRIPTION .
    IF NOT T_CDPOS IS INITIAL.
        SORT T_CDPOS_TEMP BY TABNAME FNAME.
        DELETE ADJACENT DUPLICATES FROM T_CDPOS_TEMP COMPARING TABNAME FNAME
        SELECT TABNAME                     " Table Name
               FIELDNAME                   " Field Name
               ROLLNAME                    " Data element
          FROM DD03L
          INTO TABLE T_DATAELE
       FOR ALL ENTRIES IN T_CDPOS_TEMP
         WHERE TABNAME EQ T_CDPOS_TEMP-TABNAME
           AND FIELDNAME EQ T_CDPOS_TEMP-FNAME.
        IF NOT T_DATAELE IS INITIAL.
        T_DATAELE_TEMP[] = T_DATAELE[].
        SORT T_DATAELE_TEMP BY ROLLNAME.
        DELETE ADJACENT DUPLICATES FROM T_DATAELE_TEMP COMPARING ROLLNAME.
          SELECT ROLLNAME                  " Data element
                 DDTEXT                    " Short Text Describing R/3
                                           " Repository Objects
            FROM DD04T
            INTO TABLE T_TEXT
         FOR ALL ENTRIES IN T_DATAELE_TEMP
           WHERE ROLLNAME EQ T_DATAELE_TEMP-ROLLNAME
             AND DDLANGUAGE EQ SY-LANGU.
          IF SY-SUBRC NE 0.
            EXIT.
          ENDIF.                           " IF SY-SUBRC NE 0.
        ENDIF.                             " IF NOT T_DATAELE IS INITIAL.
    ENDIF.                               " IF NOT T_CDPOS IS INITIAL.
    ENDFORM.                               " DESCRIPTION
    *&  Form  FILL_OUTTAB
      Subroutine to populate the Outtab
      There are no interface parameters to be passed to this subroutine.
    FORM FILL_OUTTAB .
      SORT T_CDHDR   BY OBJECTCLAS OBJECTID CHANGENR.
      SORT T_EKKO    BY EBELN.
      SORT T_LFA1    BY LIFNR.
      SORT T_DATAELE BY TABNAME FIELDNAME.
      SORT T_TEXT    BY ROLLNAME.
      LOOP AT T_CDPOS INTO FS_CDPOS.
        READ TABLE T_CDHDR INTO FS_CDHDR WITH KEY
                                       OBJECTCLAS = FS_CDPOS-OBJECTCLAS
                                       OBJECTID = FS_CDPOS-OBJECTID
                                       CHANGENR = FS_CDPOS-CHANGENR
                                       BINARY SEARCH.
          IF SY-SUBRC EQ 0.
            MOVE FS_CDHDR-USERNAME TO FS_OUTTAB-USERNAME.
            MOVE FS_CDHDR-UDATE    TO FS_OUTTAB-UDATE.
            READ TABLE T_EKKO INTO FS_EKKO WITH KEY
                                           EBELN = FS_CDHDR-OBJECTID
                                           BINARY SEARCH.
              IF SY-SUBRC EQ 0.
                MOVE FS_EKKO-EBELN TO FS_OUTTAB-EBELN.
                MOVE FS_EKKO-ERNAM TO FS_OUTTAB-ERNAM.
                MOVE FS_EKKO-LIFNR TO FS_OUTTAB-LIFNR.
                MOVE FS_EKKO-EKGRP TO FS_OUTTAB-EKGRP.
                MOVE FS_EKKO-BEDAT TO FS_OUTTAB-BEDAT.
                READ TABLE T_LFA1 INTO FS_LFA1 WITH KEY
                                               LIFNR = FS_EKKO-LIFNR
                                               BINARY SEARCH.
                  IF SY-SUBRC EQ 0.
                    MOVE FS_LFA1-NAME1 TO FS_OUTTAB-NAME1.
                  ENDIF.                   " IF SY-SUBRC EQ 0.
              ENDIF.                       " IF SY-SUBRC EQ 0.
          ENDIF.                           " IF SY-SUBRC EQ 0.
        MOVE FS_CDPOS-VALUE_NEW TO FS_OUTTAB-VALUE_NEW.
        MOVE FS_CDPOS-VALUE_OLD TO FS_OUTTAB-VALUE_OLD.
        READ TABLE T_DATAELE INTO FS_DATAELE WITH KEY
                                             TABNAME = FS_CDPOS-TABNAME
                                             FIELDNAME = FS_CDPOS-FNAME
                                             BINARY SEARCH.
          IF SY-SUBRC EQ 0.
            READ TABLE T_TEXT INTO FS_TEXT WITH KEY
                                           ROLLNAME = FS_DATAELE-ROLLNAME
                                           BINARY SEARCH.
              IF SY-SUBRC EQ 0.
                MOVE FS_TEXT-DDTEXT TO FS_OUTTAB-DDTEXT.
              ENDIF.                       " IF SY-SUBRC EQ 0.
          ENDIF.                           " IF SY-SUBRC EQ 0.
        APPEND FS_OUTTAB TO T_OUTTAB.
        CLEAR FS_OUTTAB.
      ENDLOOP.
    ENDFORM.                               " FILL_OUTTAB
    *&   Form  GET_CELL_INFO
       Subroutine to get the Cell Information
    -->  W_VALUE   Holds the value of Hotspot clicked
    FORM GET_CELL_INFO .
      CALL METHOD W_GRID->GET_CURRENT_CELL
        IMPORTING
         E_ROW     =
          E_VALUE   = W_VALUE
         E_COL     =
         ES_ROW_ID =
         ES_COL_ID =
         ES_ROW_NO =
    ENDFORM.                               " GET_CELL_INFO
    *&   Form  VALIDATE_PD_NUM
       Subroutine to validate Purchase Document Number
       There are no interface parameters to be passed to this subroutine.
    FORM VALIDATE_PD_NUM .
      IF NOT S_EBELN[] IS INITIAL.
        SELECT EBELN                       " Purchase Document Number
          FROM EKKO
          INTO W_EBELN
         UP TO 1 ROWS
         WHERE EBELN IN S_EBELN.
        ENDSELECT.
        IF SY-SUBRC NE 0.
          CLEAR SSCRFIELDS-UCOMM.
          MESSAGE E717(M8).
        ENDIF.                             " IF SY-SUBRC NE 0
      ENDIF.                               " IF NOT S_EBELN[]...
    ENDFORM.                               " VALIDATE_PD_NUM
    *&   Form  VALIDATE_VEN_NUM
       Subroutine to validate Vendor Number
       There are no interface parameters to be passed to this subroutine.
    FORM VALIDATE_VEN_NUM .
      IF NOT S_LIFNR[] IS INITIAL.
        SELECT LIFNR                       " Vendor Number
          FROM LFA1
          INTO W_LIFNR
         UP TO 1 ROWS
         WHERE LIFNR IN S_LIFNR.
        ENDSELECT.
        IF SY-SUBRC NE 0.
          CLEAR SSCRFIELDS-UCOMM.
          MESSAGE E002(M8) WITH W_SPACE.
        ENDIF.                             " IF SY-SUBRC NE 0
      ENDIF.                               " IF NOT S_LIFNR[]...
    ENDFORM.                               " VALIDATE_VEN_NUM
    *&   Form  VALIDATE_PUR_GRP
       Subroutine to validate the Purchase Group
       There are no interface parameters to be passed to this subroutine.
    FORM VALIDATE_PUR_GRP .
      IF NOT S_EKGRP[] IS INITIAL.
        SELECT EKGRP                       " Purchase Group
          FROM T024
          INTO W_EKGRP
         UP TO 1 ROWS
         WHERE EKGRP IN S_EKGRP.
        ENDSELECT.
        IF SY-SUBRC NE 0.
          CLEAR SSCRFIELDS-UCOMM.
          MESSAGE E622(M8) WITH W_SPACE.
        ENDIF.                             " IF SY-SUBRC NE 0
      ENDIF.                               " IF NOT S_EKFRP[]...
    ENDFORM.                               " VALIDATE_PUR_GRP
    *& Form  FILL_VARIANT
    Subroutine to fill the Variant Structure
    There are no interface parameters to be passed to this subroutine
    FORM FILL_VARIANT .
    Filling the Variant structure
      W_VARIANT-REPORT = SY-REPID.
      W_VARIANT-USERNAME = SY-UNAME.
    ENDFORM.                               " FILL_VARIANT
    Regards,
    Pavan

  • Drill Down in Abap Query

    Hi experts,
    i would like to ask how to create drill down in Abap Query. I would like to double click on my PO field and call transaction ME23N to display the particular PO. Please advise.
    Thanks and regards,
    Simonksh

    go to sq01 and enter your query and hit change button
    On this screen - from menu hit Goto and click on the report assignment
    on popup click on the insert raw (Green excel kind of symbol) and then hit other report and select transaciton and enter the tcode of transaction. in you case enter ME23N or ME23.
    this will open the po once you click on the report line of the PO.

  • Execute query with drill down using abap

    Hello together,
    I need to execute a query using abap and I need the result of the drill down on one characteristic in the query.
    I try to use RRX_GRID_CMD_PROCESS to execute query, but I don't understand how to do the drill down.
    I thought I have to specify somehow the name of the object on which I need to make the drill down. I tried to send this as a parameter to e_t_drill... but this is not working. I have also seen that
    e_t_drill[] = g_sx_buffer-r_request->n_sx_request-drill, but this is empty.
    Could you, please explain how to do this?
    Thank you,
    Iuliana

    Our RKF def is as follows:
    Keyfigure: 0deb_cre_lc
    Chars:
    Posting Keys: 01,02,11,12
    Year start date: Restricting it with a variable created on it. Variable is of type Customer exit.This variable
    gets value from key date which is entered by user dynamically.
    Specified the offsets of Yr start date as 0 to 365.
    Regards,
    smitha.

  • How to create drill down report in sap query

    how to create drill down report in sap query ,

    hi,
    The pdf below gives the steps to create drill down report.
    http://www.sappoint.com/abap/eis.pdf
    also check.
    <a href="http://72.14.203.104/search?q=cache:k-SFYy_rjPIJ:www.hrexpertonline.com/archive/Volume%252003%2520(2">http://72.14.203.104/search?q=cache:k-SFYy_rjPIJ:www.hrexpertonline.com/archive/Volume%252003%2520(2</a>
    regs,
    jaga

  • Preventing drill down after query runs

    I have an Order query with a hierarchy attached to the infoObject. I created select-option on the Hierarchy node with a node variable. When the query runs if we tell it to display 1 level it works as desired by showing the node name and total. The problem here is the user can then drill down on the hierarchy and we don't want that because we have three summary queries in a workbook and a grand total number at the bottom.
    We like the summary number but can we turn off the drill down?
    Thanks

    Hi Marcus,
    I do not know how to turn off interactive features once and for all.  But, here are a couple of ideas (implemented in a workbook).
    1. I need a certain characteristic displayed as "Key + Text".  Each time query is refreshed, I check to ensure the correct display of that characteristic.  If the characteristic is displayed correctly, OK.  If the characteristic is displayed, but not correctly, I use the OLAP command "PC02" to display it correctly.  If the characteristic is missing, I push the query all the way back to "start".  Here is code for this:
    Sub SAPBEXonRefresh(queryID As String, resultArea As Range)
    Dim c As Range, myCell As Range
        Set myCell = Nothing
        For Each c In resultArea.Cells
            If c = "Sales Area" Then
                Set myCell = c
                Exit For
            End If
        Next c
        If myCell Is Nothing Then
            Run "sapbex.xla!SAPBEXfireCommand", "STRT", myCell
        Else
            Run "sapbex.xla!SAPBEXfireCommand", "PC02", myCell
        End If
    End Sub
    2.  This example more directly addresses the question of restricting the interactive features.  In a workbook, the "Enable Interactive Functions" checked is stored in the query repository sheet (SAPBEXqueries) in column "O".  TRUE if checked, FALSE if not checked.  You can check to see if this has been changed from FALSE to TRUE, and if it has been changed, you can take the query back to "start".  Here is the code for that:
    Sub SAPBEXonRefresh(queryID As String, resultArea As Range)
    Dim bexWS As Worksheet
        Set bexWS = Sheets("SAPBEXqueries")
        numQ = bexWS.Range("A2")
        For i = 1 To numQ
            If bexWS.Range("F" & i + 3) = queryID Then
                If bexWS.Range("O" & i + 3) = True Then
                    bexWS.Range("O" & i + 3) = "FALSE"
                    Run "sapbex.xla!SAPBEXfireCommand", "STRT", resultArea
                End If
            End If
        Next i
    End Sub
    - Pete

Maybe you are looking for

  • Scanning into iPhoto -where are files landing, and how to get copies?

    Maybe if I describe my current situation, I can better understand what a good way of maintaining the archive of photos I've kept for 13 years is in a cross-platform manner. I just scanned a photo, and chose to tell the scanning software to send it in

  • Issue with desktop Opt/Click (right click) & 'Change Desktop Background'

    I have an issue with the opt/click in the desktop in ML 10.8.2. The 'Change Desktop Background' using opt/click (right click) works after reboot, but fails to open (work correctly) thereafter. The 'System Preferences' icon bounces in the dock but not

  • How to rename ASM diskgroups after having cloned the original disks to the same server. ASMlib is used

    Linux RHE 6 Oracle Grid single instance (Oracle Restart) 11.2.0.4 installed Oracle RDBMS 11.2.0.4 installed One 11.2.0.4 database single instance running Our ASM have DATA, REDO, FRA diskgroup mounted We need to do a storage snapshot for creating on

  • Configuring sync lookup scenario without receiver

    Hi experts, I want to do the following scenario and I'm not sure, if this is possible: I have a sync SOAP call to SAP PI. The request message is mapped to the response message of the sync call. Inside the message mapping, I'm executing a JDBC Lookup,

  • APEX strips HTML in LOV

    Hi, I have a hierarchical query to generate LOV values with a delimiter separating each level in the hierarchy. I use a regular expression to surround the last value with '<b>value</b>'. However, when I test the results, either the opening bold tag o