ABAP interactive report problem

ABAP - Interactive Report problem.
In Interactive report when I double click to one field a window arises (here sy-lsind = 0) displaying some required info. And again after double clicking the appeared window another window will open (here sy-lsind = 1). from the 2nd window I can't go to the previous window.
If there is only one way to go to the previous window is to activate the RIGHT UPPER CROSS OPTION of the particular window, then please help me giving the code or idea about how to activate it. Thanks.

Moderator message - Welcome to SCN
Cross posting is not allowed in these forums.
Please read [Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement], How to post code in SCN, and some things NOT to do... and [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers] before posting again.
Thread locked
Rob

Similar Messages

  • Interactive report - Problem in coming back to the same cursor position

    Hi,
    I have an interactive report. In the first list of the output, a set of data will be displayed. In that first list, if I double click on a field, it goes to a Custom Screen. There, I have to enter some data and save and come back to the first list of the output. This is what my report does.
    I have no issues when the output in the first list is one page. But, when I have the output for more than one page I have a problem. I am going to the 2nd or 3rd page of the output. From there I double click on the field and it goes to the Custom screen. After saving the data in the screen, when I click BACK button, it displays the report from the first page again instead of displaying the output in the 3rd page where I double clicked.
    My requirement is, when I come BACK from the screen to the list, the cursor should stay in the same page where I double clicked earlier. It shouldn't go to the first page of the list again.
    To my knowledge, we have to use a statement in the code after displaying the output.
    Could someone tell me how to do this..?
    Thanks in advance.
    Best Regards,
    Paddu.

    Have a look at the ABAP command "scroll list"... you will need to hold onto the values of sy-lsind, sy-cpage, and sy-staro prior to the call to your popup, and then after you come "BACK" from this, you will need to re-write your report followed by something like:
    scroll list index gs_rpt-lsind   "gs_rpt used to hold the previous SY- values
      to page gs_rpt-cpage
         line gs_rpt-staro.
    Jonathan

  • Double click on interactive report problem

    Hi All,
    I have a problem in interactive report, I copied a interactive list report program and I pasted in the new program. when I double click on first list display, it is not taking to the second list display whereas it is working fine in the old program which I copied.
    Can anyone help me...

    Hi, Selva
    Before Double Click Switch On Debugger and try to Check in Both program where is difference, Hope you will be able to find problem, also check the copied problem that all the components are Active ?
    Please Reply in case of any Issue,
    Best Regards,
    Faisal

  • ABAP Interactive report

    Hi,
    What is Interactive report?
    what are the specific statements you write when do u write interactive Report??
    Thanks in advance.

    Hi,
    t helps you to create easy-to-read lists. You can display an overview list first that contains general information and provide the user with the possibility of choosing detailed information that you display on further lists.
    What are the uses of interactive reporting?
    The user can actively control data retrieval and display during the session. Instead of an extensive and detailed list, you create a basic list with condensed information from which the user can switch to detailed displays by positioning the cursor and entering commands. The detailed information appears in secondary lists.
    What are the event key words in interactive reporting?
    Event Keyword Event
    AT LINE-SELECTION Moment at which the user selects a line by double clicking on it or by positioning the cursor on it and pressing F2.
    AT USER-COMMAND Moment at which the user presses a function key.
    TOP-OF-PAGE DURING Moment during list processing of a
    LINE-SELECTION secondary list at which a new page starts.
    What is secondary list?
    It allows you to enhance the information presented in the basic list. The user can, for example, select a line of the basic list for which he wants to see more detailed information. You display these details on a secondary list. Secondary lists may either overlay the basic list completely or you can display them in an extra window on the screen. The secondary lists can themselves be interactive again.
    How to select valid lines for secondary list?
    To prevent the user from selecting invalid lines, ABAP/4 offers several possibilities. At the end of the processing block END-OF-SELECTION, delete the contents of one or more fields you previously stored for valid lines using the HIDE statement. At the event AT LINE-SELECTION, check whether the work area is initial or whether the HIDE statement stored field contents there. After processing the secondary list, clear the work area again. This prevents the user from trying to create further secondary lists from the secondary list displayed.
    How to create user interfaces for lists?
    The R/3 system automatically, generates a graphical user interface (GUI) for your lists that offers the basic functions for list processing, such as saving or printing the list. If you want to include additional functionality, such as pushbuttons, you must define your own interface status. To create a new status, the Development Workbench offers the Menu Painter. With the Menu Painter, you can create menus and application toolbars. And you can assign Function Keys to certain functions. At the beginning of the statement block of AT END-OF-SELECTION, active the status of the basic list using the statement: SET PF-STATUS ‘STATUS’.
    What is interactive reporting?
    A classical non-interactive report consists of one program that creates a single list. Instead of one extensive and detailed list, with interactive reporting you create basic list from which the user can call detailed information by positioning the cursor and entering commands. Interactive reporting thus reduces information retrieval to the data actually required.
    Can we call reports and transactions from interactive reporting lists?
    Yes. It also allows you to call transactions or other reports from lists. These programs then use values displayed in the list as input values. The user can, for example, call a transaction from within a list of change the database table whose data is displayed in the list.
    What are system fields for secondary lists?
    SY-LSIND Index of the list created during the current event (basic list = 0)
    SY-LISTI Index of the list level from which the event was triggered.
    SY-LILLI Absolute number of the line from which the event was triggered.
    SY-LISEL Contents of the line from which the event was triggered.
    SY-CUROW Position of the line in the window from which the event was triggered (counting starts with 1)
    SY-CUCOL Position of the column in the window from which the event was triggered (counting starts with 2).
    SY-CPAGE Page number of the first displayed page of the list from which the event was triggered.
    SY-STARO Number of the first line of the first page displayed of the list from which the event was triggered (counting starts with 1). Possibly, a page header occupies this line.
    SY-STACO Number of the first column displayed in the list from which the event was triggered (counting starts with 1).
    SY-UCOMM Function code that triggered the event.
    SY-PFKEY Status of the displayed list.
    How to maintain lists?
    To return from a high list level to the next-lower level (SY-LSIND), the user chooses Back on a secondary list. The system then releases the currently displayed list and activates the list created one step earlier. The system deletes the contents of the released list. To explicitly specify the list level, into which you want to place output, set the SY-lsind field. The system accepts only index values, which correspond to existing list levels. It then deletes all existing list levels whose index is greater or equal to the index specify. For example, if you set SY-LSIND to 0, the system deletes all secondary lists and overwrites the basic list with the current secondary list.
    What are the page headers for secondary lists?
    On secondary lists, the system does not display a standard page header and it does not trigger the event. TOP-OF-PAGE. To create page headers for secondary list, you must enhance TOP-OF-PAGE: Syntax TOP-OF-PAGE DURING LINE-SELECTION. The system triggers this event for each secondary list. If you want to create different page headers for different list levels, you must program the processing block of this event accordingly, for example by using system fields such as SY-LSIND or SY-PFKEY in control statements (IF, CASE).
    How to use messages in lists?
    ABAP/4 allows you to react to incorrect or doubtful user input by displaying messages that influence the program flow depending on how serious the error was. Handling messages is mainly a topic of dialog programming. You store and maintain messages in Table T100. Messages are sorted by language, by a two-character ID, and by a three-digit number. You can assign different message types to each message you output. The influence of a message on the program flow depends on the message type. In our program, use the MESSAGE statement to output messages statically or dynamically and to determine the message type.
    Syntax:REPORT <rep> MESSAGE-ID <id>.
    What are the types of messages?
    A message can have five different types. These message types have the following effects during list processing:
    .A (=Abend):
    .E (=Error) or W (=Warning):
    .I (=Information):
    .S (=Success):
    What are the user interfaces of interactive lists?
    If you want the user to communicate with the system during list display, the list must be interactive. You can define specific interactive possibilities in the status of the list’s user interface (GUI). To define the statuses of interfaces in the R/3 system, use the Menu Painter tool. In the Menu Painter, assign function codes to certain interactive functions. After an user action occurs on the completed interface, the ABAP/4 processor checks the function code and, if valid, triggers the corresponding event.
    What are the drill-down features provided by ABAP/4 in interactive lists?
    ABAP/4 provides some interactive events on lists such as AT LINE-SELECTION (double click) or AT USER-COMMAND (pressing a button). You can use these events to move through layers of information about individual items in a list.
    What is meant by stacked list?
    A stacked list is nothing but secondary list and is displayed on a full-size screen unless you have specified its coordinates using the window command.
    Is the basic list deleted when the new list is created?
    No. It is not deleted and you can return back to it using one of the standard navigation functions like clicking on the back button or the cancel button.
    What is meant by hotspots?
    A Hotspot is a list area where the mouse pointer appears as an upright hand symbol. When a user points to that area (and the hand cursor is active), a single click does the same thing as a double-click. Hotspots are supported from R/3 release 3.0c.
    What is the length of function code at user-command?
    Each menu function, push button, or function key has an associated function code of length FOUR (for example, FREE), which is available in the system field SYUCOMM after the user action.
    Can we create a gui status in a program from the object browser?
    Yes. You can create a GUI STATUS in a program using SET PF-STATUS.
    In which system field does the name of current gui status is there?
    The name of the current GUI STATUS is available in the system field SY-PFKEY.
    Can we display a list in a pop-up screen other than full-size stacked list?
    Yes, we can display a list in a pop-up screen using the command WINDOW with the additions starting at X1 Y1 and ending at X2 Y2 to set the upper-left and the lower-right corners where x1 y1 and x2 y2 are the coordinates.
    What is meant by hide area?
    The hide command temporarily stores the contents of the field at the current line in a system-controlled memory called the HIDE AREA. At an interactive event, the contents of the field are restored from the HIDE AREA.
    When the get cursor command used in interactive lists?
    If the hidden information is not sufficient to uniquely identify the selected line, the command GET CURSOR is used. The GET CURSOR command returns the name of the field at the cursor position in a field specified after the addition field, and the value of the selected field in a field specified after value.
    How can you display frames (horizontal and vertical lines) in lists?
    You can display tabular lists with horizontal and vertical lines (FRAMES) using the ULINE command and the system field SY-VLINE. The corners arising at the intersection of horizontal and vertical lines are automatically drawn by the system.
    What are the events used for page headers and footers?
    The events TOP-OF-PAGE and END-OF-PAGE are used for pager headers and footers.
    How can you access the function code from menu painter?
    From within the program, you can use the SY-UCOMM system field to access the function code. You can define individual interfaces for your report and assign them in the report to any list level. If you do not specify self-defined interfaces in the report but use at least one of the three interactive event keywords. AT LINE-SELECTION, AT PF<nn>, OR AT USER-COMMAND in the program, the system automatically uses appropriate predefined standard interfaces. These standard interfaces provide the same functions as the standard list described under the standard list.
    How the at-user command serves mainly in lists?
    The AT USER-COMMAND event serves mainly to handle own function codes. In this case, you should create an individual interface with the Menu Painter and define such function codes.
    How to pass data from list to report?
    ABAP/4 provides three ways of passing data:
    ---Passing data automatically using system fields
    ---Using statements in the program to fetch data
    ---Passing list attributes
    How can you manipulate the presentation and attributes of interactive lists?
    ---Scrolling through Interactive Lists.
    ---Setting the Cursor from within the Program.
    ---Modifying List Lines.
    How to call other programs?
    Report Transaction
    Call and return SUBMIT AND RETURN CALL TRANSACTION
    Call without return SUBMIT LEAVE TO TRANSACTION
    You can use these statements in any ABAP/4 program.
    What will exactly the hide statement do?
    For displaying the details on secondary lists requires that you have previously stored the contents of the selected line from within the program. To do this, ABAP/4 provides the HIDE statement. This statement stores the current field contents for the current list line. When calling a secondary list from a list line for which the HIDE fields are stored, the system fills the stored values back into the variables in the program. In the program code, insert the HIDE statement directly after the WRITE statement for the current line. Interactive lists provide the user with the so-called ‘INTERACTIVE REPORTING’ facility. For background processing the only possible method of picking the relevant data is through ‘NON INTERACTIVE REPORT’ . After starting a background job, there is no way of influencing the program. But whereas for dialog sessions there are no such restrictions.
    How many lists can a program can produce?
    Each program can produce up to 21 lists: one basic list and 20 secondary lists. If the user creates a list on the next level (that is, SY-LSIND increases), the system stores the previous list and displays the new one. Only one list is active, and that is always the most recently created list.
    FALSE.
    *& Report ZLAXMI_REPORT6 *
    REPORT ZLAXMI_REPORT6 .
    tables: mara,
    makt,
    marc,
    mard.
    data: begin of it_mara occurs 0,
    matnr like mara-matnr,
    end of it_mara.
    data: begin of it_makt occurs 0,
    maktx like makt-maktx,
    matnr like makt-matnr,
    end of it_makt.
    data: begin of it_marc occurs 0,
    werks like marc-werks,
    matnr like marc-matnr,
    end of it_marc.
    data: begin of it_mard occurs 0,
    lgort like mard-lgort,
    labst like mard-labst,
    speme like mard-speme,
    matnr like mard-matnr,
    end of it_mard.
    data: begin of it_final occurs 0,
    matnr like mara-matnr,
    maktx like makt-maktx,
    werks like marc-werks,
    lgort like mard-lgort,
    labst like mard-labst,
    speme like mard-speme,
    end of it_final.
    selection-screen: begin of block b1 with frame title text-001.
    select-options: s_matnr for mara-matnr.
    selection-screen: end of block b1 .
    start-of-selection.
    perform get-data.
    perform write_data.
    end-of-selection.
    at line-selection.
    perform sec_list.
    *& Form get-data
    text
    --> p1 text
    <-- p2 text
    FORM get-data .
    select matnr
    from mara
    into table it_mara
    where matnr in s_matnr.
    if sy-subrc = 0.
    select maktx
    matnr from makt
    into table it_makt
    for all entries in it_mara
    where matnr = it_mara-matnr.
    endif.
    ENDFORM. " get-data
    *& Form write_data
    text
    --> p1 text
    <-- p2 text
    FORM write_data .
    loop at it_makt.
    write:/ it_makt-matnr, it_makt-maktx.
    endloop.
    ENDFORM. " write_data
    *& Form sec_list
    text
    --> p1 text
    <-- p2 text
    FORM sec_list .
    case sy-lsind.
    when '1'.
    perform basic_1.
    endcase.
    ENDFORM. " sec_list
    *& Form basic_1
    text
    --> p1 text
    <-- p2 text
    FORM basic_1 .
    select werks
    matnr
    from marc
    into table it_marc
    for all entries in it_makt
    where matnr = it_makt-matnr.
    if sy-subrc = 0.
    select lgort
    labst
    speme
    matnr
    from mard
    into table it_mard
    for all entries in it_makt
    where matnr = it_makt-matnr.
    endif.
    *clear it_makt.
    *clear it_mard.
    read table it_marc with key matnr = it_mara-matnr binary search.
    read table it_mard with key matnr = it_mara-matnr binary search.
    clear it_marc.
    clear it_mard.
    move:it_makt-matnr to it_final-matnr,
    it_makt-maktx to it_final-maktx.
    move: it_marc-werks to it_final-werks,
    it_mard-lgort to it_final-lgort,
    it_mard-labst to it_final-labst,
    it_mard-speme to it_final-speme.
    append it_final.
    *loop at it_final.
    write:/ it_final-matnr, it_final-maktx,
    it_final-werks,
    it_final-labst, it_final-speme.
    *endloop.
    ENDFORM. " basic_1
    regards,
    Omkar.

  • Interactive Reports - Problem (possible bug) with button template?

    Hey all,
    I possibly noticed a problem with the use of the button template of the search bar in an interactive report.
    When I for example choose 'Button Alternative 1' as Button template and then save my report then it looks perfect.
    When I now Export/import my application, I loose the button template of my interactive report, if I open the report attributes it isn't selected anymore.
    Does anyone else have this problem?
    Apex version: 3.1.2.00.02
    Kind regards,
    Oli

    Oli,
    Thanks for bringing this up. One of my beta testers just called to say that two of our IRs weren't showing the Cancel or Apply buttons at all. But the third IR worked fine. In my Alpha version, all three had Buttons as the selected style, so I'm a bit confused what went wrong.
    But now I'm thinking if the fact that I had multiple themes defined in the application might have caused the confusion. I didn't deploy the themes from Alpha to Beta because they were all based on Theme 13, and I thought my extensions were included in the application export (which I didn't realize until recently). I'm guessing that if I drop the extraneous themes on Alpha and re-select the button theme, I should be okay when I deploy again?
    I just dropped the extra themes in my Beta and the IRs button theme was undefined again, so I'm thinking they were pointing to the wrong "button" style. Hopefully cleaning up in alpha and changing these buttons will resolve this and I won't have deployment problems!
    Wish me luck!
    Stew

  • Interactive Reports - problem with umlaute like 'ü'

    Hello,
    when i display an interactive report, all data and umlaute like "ü" was display correct.
    But when i set an filter like "häuser" and then press search, the filtertext was changed to: 'häuser'.
    Is this a language or character-set problem of the ajax engine?
    thank you for any hint.
    Daniel

    hi there,
    this helped me to solve the problem:
    http://www.oracle.com/technology/products/database/application_express/html/freq_solved_faq.html#04
    regards
    frank

  • Interactive Report - problem with export by email

    Hi,
    We're upgrading to Apex 4.0 and we encountered a problem with the email export in html format for the Interactive Reports. The french accents are displayed with some weird symbols in the HTML file.
    When I export directly in html from my report instead of the email, the accents are fine. So the problem must be the encoding of the email which is set to UTF-8. Our database use WE8MSWIN1252 encoding for the NLS Characterset.
    Without changing our NLS Characterset, is there something I can do to correct this ?
    Thanks

    Hi Denes,
    The administrator have created a mapping table,and they send me this two lines in JMT.conf file:
    /htmldb-test /i/fck/*
    /htmldb-test /pls/*
    The error still exists,i would like to know if these two lines generate a kind of confusion in any treatment of filtre in interactive report.
    Aymen

  • Abap interactive reports

    Code to develop a sales report, which is an interactive report that gives the complete information of sales based upon the sales office, sales group and the sales area.

    Hi Lalith,
         Check this, It will help you.
    https://forums.sdn.sap.com/click.jspa?searchID=2651341&messageID=1671145.
    Thanks.

  • Interactive reporting problem in CRM 5.2

    Hello Everybody,
    We have installed SAP CRM 5.2 and with the help of Web UI able to do all transactions like account management,lead,Opportunity management and creating sales order etc...
    but when i click on Reports ( as BI is integrated to CRM in SAP CRM 5.2 ) and try to genarate a  standard report i.e Opportunity Funnel Analysis then i am getting error as Error loading template 0TPLB_CSALMC02_Q005_1
    and if i click on All report in search option i get message as :Details An exception has occurred during program processing
    Diagnosis
    An exception occurred during request processing. This was handled centrally. It changed the program flow and the result of the request probably contains errors.
    Procedure
    Contact your system administrator.
    Procedure for System Administration
    Activate checkpoint group BSP_WD_EXCEPTION_DISPLAY. To do this, use transaction SAAB. If the error recurs, further details are displayed.
    If i click on Pipeline Analysis report i am getting as: System error in program CL_RSR_RRK0_ATTR_C and form CHECKALVL-01- (see long text)
    Why am i getting different different messages for different reports?
    Any ideas / suggestions step by step to resolve this will be highly appreciated.
    Regards,

    When creating an Opportunity in CRM we want to assign the competitor and competitor product to the item on the opportunity. When we are trying to gain business with a new customer or offtering them a new product we want to document who we are competing against and the product they are selling to the customer.
    Competitor products (material type WETT) are a standard material type delivered by SAP in ERP. They have only a Basic Data view, no sales or plant views. Basically, they provide just a material number, short text description, and a link to the competitor number. We have used these for a long time in quotation document items in ERP. These are not products to sell, they are just a way to establish master data for your competitors products.
    We do not understand why SAP apparently supported these via middleware download up until CRM 3.0 and then removed the capability; then, they give us a response to an OSS note on this issue with a small mod to allow them to be processed via the middleware to bring them over from ERP to CRM. Then, we have to figure out the additional customizations in the middleware so they will function as they should.
    Apparently, you can create materials with product subtype WETT directly in CRM, but we do not wish to do that. We have a couple of thousand of these already created in ERP, wish to download via middleware, and use the same materials in CRM. Why SAP would not support this, or removed the support from an earlier release, is hard to understand.

  • Interactive reports in abap objects

    Hi,
           plz send me the code of  interactive report using ABAP Objects .
    Thanks,
    T.Sreekanth.

    Hi,
    It will be similar to what you do in normal report.
    Here you may create an object instance and then call some method on the object.
    AT LINE-SELECTION.
    create object obj.
    CALL METHOD obj->method1
    IMPORTING
      text = im_text.
    write: im_text.
    Regards,
    Sesh

  • Problems with Page Break in an Interactive Reporting report

    Hello everybody,
    Platform: Hyperion System 9.3.1.
    I have serious problems in managing the 'page break' in an Interactive Reporting report.
    The report shows sales data by store, with article and colour details and it is organized like this:
    group 1: geographic area
    group 2: country
    group 3: city
    group 4: store
    columns: article, colour
    facts: quantity, price, value
    My client's request is to perform a page break at the store group level, meaning that apart from the first store occurance, any change in the store value shoul start a new page.
    The requested result is like this:
    page1: geographic area1
    country1
    city1
    store1
    data store1...
    page 2: store2
    data store2...
    page3: store3
    data store3...
    I tried several combinations of using Break After and Break Before on the store group, with Keep Next / Keep Together and it was impossible to obtain the desired result.
    If I use Break Before the result is as follows:
    page 1: geographic area1
    country1
    city1
    page 2: store1
    data store1...
    page 3: store2
    data store2...
    If I use Break After the result is as follows:
    page 1: geographic area1
    country1
    city1
    store 1
    page 2: data store1...
    store 2
    page 3: data store2...
    even if I specify 'Keep with next' or 'Keep together' for store group and the store data table.
    Any help will be very very appreciated because I've been trying for weeks to figure out this issue.
    Daniela

    First start without using any of the Keep with Next and Keep together.
    Second. try putting the Page Break in the Group Footer. You do not need to keep it visible
    Then you may want to repeat headers on Store in case the Store's Detail rolls onto next page
    Hope this helps
    Wayne

  • Problem with DATE in Interactive Report

    Hello,
    In Interactive Report when I click on the header of any column with DATE datatype, nothing happens due to Javascript error:
    Line: 2
    Char: 14838
    Error: Expected identifier, string or number
    Code: 0
    Click on any other column works perfectly as well as sorting by DATE column from Action Menu.
    I tried to set different format masks for my DATE column and for Application Date Format, but it didn't help.
    Finally I found out that this error disappeared when in properties of my DATE column in "List of Values" section I set "Report Filter Date Ranges" = 'Past' instead of 'All'. In this case I get the list with values "Last 5 Years", "Last 2 Years", etc, but not with "Next Hour", "Next 2 Hours", etc...
    Can someone help me on this issue, because this functionality might be usefull and also it's not very convinient to change this property for all date columns in all Interactive Report.
    By the way, my database version is 9.2.0.5 - maybe it can cause such problem?
    Best regards,
    Vladimir

    Hi Marco,
    1) French Canada (fr-ca)
    2) This filter works
    More informations about the error when I call the function gReport.controls.widget():
    &lth;div id="apexir_DT" style="text-align: center;" onclick="gReport.controls.widget(this.id)"&gth;Date de naissance&lth;/div&gth;
    *************POST*************
    flowid     48579
    p_flow_step_id     5
    p_instance     1412541985987586
    p_request     APXWGT
    p_widget_action     SORT_WIDGET
    p_widget_mod     CONTROL
    p_widget_name     worksheet
    x01     5775894815382747091
    x02     5775899227924757464
    x03     apexir_DT
    *************RESPONSE*************
    {"dialog":{"id":"1966481623126322611","hide":["apexir_info","apexir_computation"],"coltype":"DATE","filter"
    :false,"uv":true,{"dialog":{"uv":true,"row":[{"V":"Failure<br />ORA-20001: get_dbms_sql_cursor error
    ORA-00923: FROM keyword not found where expected"}]}}
    Louis-Guillaume
    Homepage: http://www.insum.ca
    Blog: http://insum-apex.blogspot.com

  • Interactive report performance problem over database link - Oracle Gateway

    Hello all;
    This is regarding a thread Interactive report performance problem over database link that was posted by Samo.
    The issue that I am facing is when I use Oracle function like (apex_item.check_box) the query slow down by 45 seconds.
    query like this: (due to sensitivity issue, I can not disclose real table name)
    SELECT apex_item.checkbox(1,b.col3)
    , a.col1
    , a.col2
    FROM table_one a
    , table_two b
    WHERE a.col3 = 12345
    AND a.col4 = 100
    AND b.col5 = a.col5
    table_one and table_two are remote tables (non-oracle) which are connected using Oracle Gateway.
    Now if I run above queries without apex_item.checkbox function the query return or response is less than a second but if I have apex_item.checkbox then the query run more than 30 seconds. I have resolved the issues by creating a collection but it’s not a good practice.
    I would like to get ideas from people how to resolve or speed-up the query?
    Any idea how to use sub-factoring for the above scenario? Or others method (creating view or materialized view are not an option).
    Thank you.
    Shaun S.

    Hi Shaun
    Okay, I have a million questions (could you tell me if both tables are from the same remote source, it looks like they're possibly not?), but let's just try some things first.
    By now you should understand the idea of what I termed 'sub-factoring' in a previous post. This is to do with using the WITH blah AS (SELECT... syntax. Now in most circumstances this 'materialises' the results of the inner select statement. This means that we 'get' the results then do something with them afterwards. It's a handy trick when dealing with remote sites as sometimes you want the remote database to do the work. The reason that I ask you to use the MATERIALIZE hint for testing is just to force this, in 99.99% of cases this can be removed later. Using the WITH statement is also handled differently to inline view like SELECT * FROM (SELECT... but the same result can be mimicked with a NO_MERGE hint.
    Looking at your case I would be interested to see what the explain plan and results would be for something like the following two statements (sorry - you're going have to check them, it's late!)
    WITH a AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_one),
    b AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_two),
    sourceqry AS
    (SELECT  b.col3 x
           , a.col1 y
           , a.col2 z
    FROM table_one a
        , table_two b
    WHERE a.col3 = 12345
    AND   a.col4 = 100
    AND   b.col5 = a.col5)
    SELECT apex_item.checkbox(1,x), y , z
    FROM sourceqry
    WITH a AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_one),
    b AS
    (SELECT /*+ MATERIALIZE */ *
    FROM table_two)
    SELECT  apex_item.checkbox(1,x), y , z
    FROM table_one a
        , table_two b
    WHERE a.col3 = 12345
    AND   a.col4 = 100
    AND   b.col5 = a.col5If the remote tables are at the same site, then you should have the same results. If they aren't you should get the same results but different to the original query.
    We aren't being told the real cardinality of the inners select here so the explain plan is distorted (this is normal for queries on remote and especially non-oracle sites). This hinders tuning normally but I don't think this is your problem at all. How many distinct values do you normally get of the column aliased 'x' and how many rows are normally returned in total? Also how are you testing response times, in APEX, SQL Developer, Toad SQLplus etc?
    Sorry for all the questions but it helps to answer the question, if I can.
    Cheers
    Ben
    http://www.munkyben.wordpress.com
    Don't forget to mark replies helpful or correct ;)

  • Problem adding column in an interactive report

    Hi all
    I am dealing with many interactive projects in my application. Sometimes I have to add a column to the interactive report. When I do so, the column doesn't appear in the interactive report...On the page I have to click on "Actions" then go to "Selected columns" and then display it ! the problem is when I logout and login again
    the column desappear again and I have to do samething again and again...Is there a way to set it appear by defaul always ???
    THank you

    Moun wrote:
    I am dealing with many interactive projects in my application. Sometimes I have to add a column to the interactive report. When I do so, the column doesn't appear in the interactive report...On the page I have to click on "Actions" then go to "Selected columns" and then display it ! the problem is when I logout and login again
    the column desappear again and I have to do samething again and again...Is there a way to set it appear by defaul always ???After adding new columns to an existing IR, you need to select them for display as a developer, and save the new report as the Primary Default.

  • Problem passing parameter to Interactive report

    Morning!
    I'm having problems when passing a parameter value to a report - I'm using IR_<column_name>, which works fine most of the time, except when the value I'm passing has a leading '#' ie. '# No People' - I have tried encoding it ie. '&#36. No People' but it still doesn't work. Anybody know how I can work around this one?
    Thanks for your help

    Another thread < a href="http://forums.oracle.com/forums/message.jspa?messageID=9319781#9319781">Interactive reports - Issues with column link values </a> discusses the same issue.
    Strangely enough,that thread is still showing in the first page as I am posting this reply,, you could have just done a quick scroll and seen it.

Maybe you are looking for

  • Referencing Region ID

    Is there substitution string for region ID that I can use in a URL?

  • Badi for CRM billing information...

    Hi experts... Is there  any Badi or Exit in ECC to see the CRM Billing Document informatin before accounting document gets generated. Or In CRM any BAdi is there to send some values to ECC when billing document gets release. Actually i need contract

  • Default Configuration files

    If you sequence an app-v 5.0 package it output's an .appv and _DeploymentConfig.xml and _UserConfig.xml (and .msi wrapper). By default the .appv contains the same information as in the _DeploymentConfig.xml and _UserConfig.xml (?) Therefore one can a

  • RMI in weblogic cluster

    Hi all,           Say I have a cluster of two weblogic server. I deployed two remote           object, of same class, on each of           these server, individually (not replicated) by the same name. This           remote object has a state variable

  • Problem with h:message and ajax

    Hello, I noticed a strange problem occurring with my richfaces application. It is as follows: I have a contact form with "real-time" validation of each field. When a valid submission of the form occurs, the form is reRendered and strangely, the first