How to call SP automatically when issue a select clause?

I have a dw to get data from sql select like:
select * from tab, proxytab where tab.id = proxytab.id ...
the proxy table is created based on a stored procedure result set.
When dw retrieve data, it will call sp automatically by proxy table. but there is a big performance problem. So I decided to replace proxy table with a physical table with same name to save the result set from sp.
As I don't want to change any code in powerbuilder. Question is: how to call sp to put the result data in the physical table when dw retrieve data?

What is the backend DBMS here?
You're using the phrase "proxy table", but it doesn't sound like that's what you might mean.  A Proxy Table is like a "remote query" against a table in a different database.  It allows you to do table joins when the two tables are stored in physically separate databases. 
What you're describing sounds more like a "global temporary table", where some process (your stored procedure, for example) runs a bunch of complex queries, then inserts its result set into this temp table.  The temp table looks and feels exactly like a real table, but the data is only available to the current connection, and the table and all its data is deleted when the connection is dropped.
Is that it?  Because you can define the table as a GLOBAL TEMPORARY, and it's definition is available in the system catalog.  You can write queries against them without having to define the table as a physical table...
Now - to your original question - how to call the stored procedure to populate the temp table before you execute the query against it?  I'd use the RetrieveStart event of the datawindow that queries the temp table.
::retrieveStart
if (select count(*) from temp_table) > 0  then RETURN
EXECUTE stored_procedure arg1, arg2, arg3 using SQLCA;

Similar Messages

  • How to call an action when the user selects a radiobutton

    Hai
    PLease help me in providing the information.
    In my Project i have two radio buttons as
    New
    Asssessment
    when the user selects new button, i want to automatically call an action in the controller(.jpf file)
    Simalarly when he selects the other radio button i need to call a separate action in the controller.
    Remember i dont have the submit button.
    I want to dynamically call an action when the user selects the radio button.
    i dont have any field inthe radio button which actually takes action as an attribute .
    please provide me the necessary

    Hi,
    You can use JavaScript to call the action in interest upon the Radio Button Element Being Selected.Should be simple, and if your controller is part of the portlet dont forget to use the jpfScopeId to asscoiate the controller instance with the one in the portlet.
    Let me know if you have any further questions.

  • I could do this before installing Maverick but cannot do it now.It is nice and convenient how Mac OS X Mail displays messages semi-automatically when you just select them. But wouldn't a bigger view of the mailbox be useful sometimes? Yes, and it's easier

    It is nice and convenient how Mac OS X Mail displays messages semi-automatically when you just select them. But wouldn't a bigger view of the mailbox be useful sometimes?
    Yes, and it's easier to get than you maybe think.
    Hide the Preview Pane and Delete Mail Without Opening It in Mac OS X Mail
    To hide the message preview pane in Mac OS X Mail:
    Double-click the bar that separates the message pane from the mailbox pane.
    Now, to delete any email:
    Highlight the message or messages you want to delete.Hold down the Command key while selecting with the mouse to highlight multiple emails and Shift to highlight a range.
    Press Del.
    To get the preview pane back, double-click the same bar again.
    Cannot do this now since installing Maverick

    It is nice and convenient how Mac OS X Mail displays messages semi-automatically when you just select them. But wouldn't a bigger view of the mailbox be useful sometimes?
    Yes, and it's easier to get than you maybe think.
    Hide the Preview Pane and Delete Mail Without Opening It in Mac OS X Mail
    To hide the message preview pane in Mac OS X Mail:
    Double-click the bar that separates the message pane from the mailbox pane.
    Now, to delete any email:
    Highlight the message or messages you want to delete.Hold down the Command key while selecting with the mouse to highlight multiple emails and Shift to highlight a range.
    Press Del.
    To get the preview pane back, double-click the same bar again.
    Cannot do this now since installing Maverick

  • How to "Open iTunes automatically when iPod is connected"....

    ...without having them sync automatically?  I'm able to do this on my MBP just fine.  The solution on my MBP is to uncheck "prevent ipods, ipads, iphones from syncing automatically" under Devices Preferences.  Then I'm able to check "Open iTunes when Ipod is connected" under my iPod's Summary Options.  After that i can then go back a uncheck "prevents Ip.... from syncing automatically". 
    Unfortunately, this option doesn't seem to be available to Windows users.  or is it?
    Thanks,
    Mike

    this will solve half of my issue while coincidentally causing the other half of it. 
    I want to be able to:
    Open iTunes automatically when iPod is connected
    AND
    Prevent my ipod from syncing automatically *(when this is enabled the prior feature becomes disabled)

  • ***How to call BSP App when custom button event fired from toolbar group***

    Dear PCUI Experts,
       I have created one custom button for the transaction CRMD_BUS2000116.
    And my urgnet requirement is , I need to call BSP application which is used to   take data from custom fields and stores into BP table.
    How to call the BSP App. when i clicks on the button.
    Please help me..
    I will reward with great points.
    Regards,
    Stella.

    Hi Purushothaman,
                                 I have created a button in CRRM_ACCOUNT application.
    Now i want to call  a custom bsp application by clicking on that button.I have followed step given in this blog
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1646. [original link is broken] [original link is broken] [original link is broken] [original link is broken]
    But the event is not triggered.Do I have to create an iview for my bsp application?
    How to do that?Plz help.
    Regards,
    Ruby.

  • How do I connect automatically when opening Firefox

    When I click Mozilla Firefox to open it,it open and I get a Window message to dial my connection. IE used to do it automatically. Can I do that with Mozilla Firefox?

    Does the following article help?
    * [[How to make Firefox automatically dial up]]

  • How to call a method when the browser is closing

    Hello,
       In my application I need to execute a specific treatment when the WD4A application is closing.  So how can we have a handle method for this specific event.
       I've seen some documentation about the "exit plugs" , and about the doonclose method of the window.. but I don't think it can be useable for me in this case.
    Can you please help me
    Thanks in Advance
    Hamza

    I wrote an insert into the method i set up a break point, the program never call this code and therefore, the new row is never inserted.
    But i think, it's a misunderstand. 
    to summarize :
    I have an application in WD4A
    The application is running, and then I decide to close the browser (in my case internet explorer) and before the browser close I want to execute a piece of code.
    If the method wddoonclose is to be used, is there any default handler or listener to trigger it automatically on the browser closing ?
    If no, how to trigger a method base on this special event .
    Thx
    Hamza

  • How to call a method when navigating records?

    Jdev 11.1.1.2.0
    I have an app displaying records one at a time in a panelFormLayout.
    I have a selectManyShuttle object linked to the form with a PartialTrigger.
    The shuttle is being populated using the methods from the SRDemo app and are functioning correctly when adding/removing records including the correct parent id through the partialtrigger.
    But, the shuttle is not refreshing as the parent record is changed. I have to manually refresh it.
    How can I attach a method call #{backing_MessageTrainingCenters.refreshSelectedList} to fire when the parent record navigates or is there a way to do this automatically?
    Same question with the commit button. I currently have a save button for the shuttle and a commit for the parent. I would like to call the method to save the shuttle records when the commit is pressed.

    What I've done to sort of get this to work
    In the backing bean (using the SRDemo stuff) I changed the refreshSelectedList to use an ActionEvent
    public void refreshSelectedList(ActionEvent event) {
    refreshSelectedList = true;
    I right-clicked one of the the built in nav buttons and told it to create method binding for action then took that method and made it take a string for the operation.
    public String navAction(String navigate) {
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding(navigate);
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    return null;
    I made 4 buttons and set the ActionListener to #{backing_MessagePrograms.refreshSelectedList} on each one then did a create method binding for action.
    Inside each of these methods I made a call to navAction(String navigate) above passing in the operation I want.
    public String cb8_action() {
    cb2_action("First");
    return null;
    This works ok for this single scenario but I have 2 multi select lists to refresh when navigating. So I'm still stuck with trying to tell the other component to refresh.
    I cannot find the "magic" that happens when I click the button with the listener ActionListener set that makes it refresh.
    How can I tell both multiselect components to refresh from one of my methods?
    or
    *How can I set a button to use 2 ActionListeners like #{backing_MessagePrograms.refreshSelectedList} & #{backing_MessageTCs.refreshSelectedList}?*

  • How to call a BAPI when there are structure tables as Input.

    Environment: Data Services 3.1  SAP ECC 6.
    I can run simple BAPI's where I just populate the Input Parameters.
    My question is around more complex BAPI's.
    I created a data flow that looks like:
    Row Generation > Query > Unnest Query > Template table.
    Inside of the query I created a new Function and called the BAPI_PROJECT_MAINTAIN.
    This BAPI requires adding data as part of the Structure Tables in the BAPI.  I see these tables in the SAP Data Store and I also see a single input field in the Data Services Function Wizard that desribes the Structure.
    My question is - how do I populate the fields when it comes from a Structure Table in the BAPI?

    A table parameter is a schema, so you need an upfront query where you create that schema with the nested data. The schema is then mapped to the table parameter, the columns of the schema have to match by name.
    https://wiki.sdn.sap.com:443/wiki/display/BOBJ/Calling+RFCs-BAPIs

  • When reflow text; How to change paragraph automatically when changing frame

    Hi
    Im new to indesign scripts, but thought that this maybe was the right forum to ask the following question. (Im using Adobe Indesign CS.5 )
    Im currently trying to import a file (word file / excel both is possible) into an indesign book and formatting the text automatically!
    My question is: How is it possible to reflow text into frames and when changing frame it changes paragraph?
    I have already figured out how to reflow the text, and actually also managed to relow text into the frames and change paragraph style. I know how to use the keep option, and by this change the paragraph style when e.g. changing frame break/page break etc.  (but if the content being flowed-in is not tagged with style names then I cannot figure out how to do it)
    The document and its content I whish to import do not have any tagged paragraphs!
    If any of you have a hint, I would be more than happy to hear from you

    My question is: How is it possible to reflow text into frames and when changing frame it changes paragraph?
    This question is not gramatically correct and I cannot understand what you are trying to ask.

  • Newbie: How to call a method when a JFrame closed ?

    Hya,
    how I can call a method to perform some operations when the JFrame's close(x) button is pressed?
    thanks in advance

    try this
    (change System.exit(0) if you don't want to close the app)
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    class Testing extends JFrame
      public Testing()
        setLocation(300,200);
        setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);//<---------
        setSize(300,200);
        addWindowListener(new WindowAdapter(){//<-----------
          public void windowClosing(WindowEvent we){
            someMethod();
            System.exit(0);}});
      public void someMethod()
        JOptionPane.showMessageDialog(this,"Closing...");
      public static void main(String[] args){new Testing().setVisible(true);}
    }

  • How to open PDF automatically when printing with distiller?

    Does anybody know how to get the PDF to automatically open when I print a  document using distiller please?  It is driving me crazy
    Thanks
    Mark

    I am printing to a single PS file from my wordprocessor. Distiller watches the PS file folder and automatically converts the PS file to PDF. Then nothing happens, despite toggling of the 3 options. Is this universal, does it never work?
    When I use a Windows wordprocessor (like MS Word or WordPerfect for Windows) and the Adobe PDF printer driver, then the PDF is automatically opened in Acrobat, but I understand that Distiller is bypassed. Acrobat ignores the product of Distiller -- unless, of course, you doubleclick on Distiller's PDF output icon, or right-click on it and choose View.
    Acrobat 7 (I believe it was) opened automatically for us from Distiller. How disappointing if 9 has irretrievably lost this ability.

  • How to call jquery function when i close modal dialog box ?

    Hello,
    I need to call one jquery function when I click on close button of modal dialog box.Can anyone please let me know how can I implement it ?
    Thanks,
    Dipti Chhatrapati

    Hi Dipti,
    If my understanding is correct, you are using SP Modal Dialog and want to track the close event of this dialog. Then you may use
    dialogReturnValueCallback parameter of Options variable. Follow is the code sample:
    function ShowModal() {
        ExecuteOrDelayUntilScriptLoaded(function () {
            var options = {
                url: 'page1.aspx',
                tite: 'Add Title',
                width: 800,
                height: 450,
                allowMaximize: true,
                showClose: true,
                dialogReturnValueCallback: scallback
            SP.UI.ModalDialog.showModalDialog(options);
        }, 'sp.js');
     function scallback(dialogResult, returnValue) {
          if (dialogResult == SP.UI.DialogResult.OK) {
               // call your Jquery method here...
    Thanks, Ram

  • How to call java file when entering the another jsp page.

    when i click the link to link to another page, when enter the page, how can i call java file and passing id parameter to call method, which is connected to DB.
    when enter the page, how can i call java file together with one arguement???

    I would strongly suggest to go the MVC way. Please perform all DB operations through a Servlet/Action instead of directly hitting the JSP and then invoking a java bean to do the DB operation. JSP should only do the rendering.

  • How to "Call by Reference" when running in RealTime (path does not work)

    I have a .vi which has been "uploaded" to a PXI chassis to run in RealTime.
    I have this feeling that one of my sub-vi's are not functioning properly. I have a sub-vi which "Opens a VI reference" to a .vi located on my Windows harddrive. But, when everything is setup in Realtime, it cannot locate this .vi anymore.
    I need to load a .vi dynamicaly, multiple times. Is there another way around it?

    Yes, that worked well. I had gotten it to work, but had not replied to this post to indicate my success. My actual problem had to do with me forcing a "close front panel". I had read in some other posts that you cannot modify front panels or other user-activity type of options when running real time. By removing the "FP Close" function, the call to the specific .vi worked great (and with the addition of the IP address for the opening of a local reference). Thanks again for all the input.

Maybe you are looking for

  • Lion 10.7.5 cant connect to printer via Buffalo print server

    Hi everyone, I'm at my wits end with this one having spent over 20 hours on it. I have a Macbook Air running Lion 10.7.5 and a Macbook running OSX 10.6.8.  I have a Photosmart 8050 printer attached to a Buffalo Linkstation Live LS-CH1 running firmwar

  • How to display 16 weeks data in the output of the query

    Hi experts, I have to display 16 weeks data from current week(Thursday to wednesday).            (19/07/07 - 12/07/07) (11/07/07 - 6/07/07) like these 16 weeks                          sales                       sales product1              200      

  • Advantages of  Upgrading  Weblogic 8.1 sp5 to 10.3

    Hi I am very much novice to the weblogic.We are planning to upgrade the weblogic 8.1sp5 version to 10.3.We need to convince the clients regarding certain issues with respect ti the upgrade.Say performance, what are the performance advantages of upgra

  • Did the whole *61*1(VOICEMAIL NUMBER)*11*30# to get extended ring time and

    Now when my phone goes to voicemail it is a busy signal instead of my voicemail. Anyone have any thoughts on how to correct this issue? Below are the steps I fllowed... It is NOT necessary to call CS to do this and the max time is NOT 15 seconds. Fir

  • Making website universal no matter what program your viewing it on

    I have created a website for my church and I burned it to a cd to view before i publish it. When I open index.html it only opens the home page and does not show any links to other pages at the top. To view the other pages I have to open each site.htm