Execute query only once in mapping

Hi All,
I hav a scenario where I hav to Query a DB using all the child nodes. the source structure is as follows:
<root>
     <employee>     -
0..unbounded
          <empNo>
          <emdpName>
     </employee>
</root>
I hav to retrieve all the empNo and frame a query and shud execute the query only once and hav to retrieve the results and store it in a HashMap so that, i can map it to the target structure.
I had followed JAVIER PORRAS blog. but it seems to be not the executed one. Can any one suggest me how to do it. Any help wud b appreciated.
Thnx in Adv
Anil

Hi,
My requirement is something like this.
Source : External System
Target : BW
Source Structure:
<Root>
     <Emp>
          <Col1>
          <Name>
     </Emp>
     <Emp>
          <Col1>
          <Name>
     </Emp>
     <Emp>
          <Col1>
          <Name>
     </Emp>
     <Emp>
          <Col1>
          <Name>
     </Emp>
</Root>
I'm getting Data from External System in which a column (Col1) has to be replaced by some other column (Col2)
which exists in the DB. Col2 can b accessed using a query (select col1, col2 from myTable where col1 = x1 or x2 or x3 etc..). The values of X1, X2, X3 etc hav to be filled using the
Col1 values of each segment of the <Emp> in the source structure. The condition here is that, i shud execute the query only once for all the values of col1 to prevent the bottleneck.when i get the result, i hav to store it in a hashmap and use the result to map it to the target structure element by element.
This is my require ment. seems to b exactly the blog of JAVIER PORRAS. but the blog doesn't seem to b the executed one.Any help in resolving this.
Thnx
Anil

Similar Messages

  • Running a query only once for a report in Reports 6i in a BEFORE REPORT trigger.

    Hello all -
    I am using Oracle Reports 6i on Windows NT 4.0 SP 6.0.
    The report I am converting from Access to Oracle Reports is
    rather complex, and features detail by decile (a rank) within
    territory (geographical sales area). Also it features a summary
    at the bottom of each territory/decile combination which
    summarizes not only the territory information, but goes above
    that to higher levels like district, region, and national.
    With the help of a consultant, we have managed to get the report
    almost finished. However, we are running into a snag with the
    summary. While my two main queries need to run in the data
    model as normal, I would like to run the summary query _only
    once_ during the entire cycle of the report, and have the report
    fields populated once for the entire report. This is possible
    because for a district, the summary numbers are the same on
    every page of the report, only the territory information
    changes. So by only having the query run once and fill the
    report values once, this would save considerably on the report
    runtime.
    However, I have tried a few different methods but cannot get the
    report to recognize the fields in the query, most likely because
    they are out of scope at report creation. Does anyone have any
    ideas on how I can accomplish this in Reports? Any help would
    be appreciated - I hope my question was clear, if not please let
    me know.
    Thanks,
    -Jennifer Prichard

    Hello!
    You can place in the data model editor formula and placeholder
    columns outside of any groups. I think you need for each of your
    summary-attibutes a placeholder column and one formula column.
    Use the formula column to populate the placeholders via PL/SQL.
    Afterwords you can reference the placeholders anywhere you want.
    Regards,
    Hajo Winkler

  • Execute delay only once the entire time

    I need ideas on how to execute a delay only once after start (and that's it, no more calling the delay ever again after start) in a while loop without affecting other codes in that same loop...
    Something like this http://forums.ni.com/t5/LabVIEW/put-a-delay-for-executing-case-structure/m-p/1095396/highlight/true#... but it is not working

    Why? That makes no sense. You need to change the loop termination inside the subVI as I already mentioned.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    DelayMod.png ‏10 KB

  • How to execute query only when user submits request in af:query

    Hi,
    I'm using an <af:query> based on a named view criteria. The view criteria contains a bind variable. When the web page is initially rendered the query is executed and the result is displayed in an <af:table>.
    Instead, I want the user to trigger the query by pressing the Search button in the <af:query> form.
    Is there a way to configure such a behavior without coding?
    Sorry, if this is a faq, but I didn't find a suitable answer for my problem.
    Any hints are welcome,
    Markus

    Hi Frank,
    it is not that easy, I'm afraid. In 10g apps, I used a combination of two iterators. One Find-iteratior and one iterator for the resultset. The resultset iterator had the refresh condition set to ${adfContext.postback}. But with 11g, it does not work. The result is rendered when the page comes up.
    What has changed from 10g to 11g? I have discovered the fact, the table does a second (asynch) request to get the resultset from the server when attribute contentDelivery="lazy". Changing the attribute to contentDelivery="immediate" the page comes up with an empty table and the user can enter the query criteria. The solution works fine as long as you stay on the search page. If you navigate to an 'Edit result' page and then back to the search page, the table is empty again (thanks to the postback condition). To solve the problem you have to work with a second flag in the refresh condition which indicates that the user has triggered a query. This is the background for my last posting (' Can I set an <af:setActionListener> on the search button of a <af:query>?', Re: Can I set an <af:setActionListener> on the search button of a <af:query
    Any other recommendations?
    Thanks,
    Markus

  • How do i fire a query/Stored procedure only once

    Hi,
    I have a master frame and multiple child frames. Master frame triggers child1 frame which triggers child 2 frame etc using some common keys between the frame.
    Now each frame executes a stored procedure and then uses the Db2 cursor as a record set. However when the same frame is fired again then the stored procedure is triggered again. But i could very well use the same record set from the record set that i already have,
    In other words i need to fire the stored procedure/query only once and not every time the frame is fired.
    I just need to get the record set for each frame and then operate on the retrieved record sets.
    Is there a way to do this?
    Currently I experience serious performance issues as the stored procedures get fired repeatedly thousands of times
    Any help will be greatly appreciated
    Thanks
    anand

    I am still haveing problems so I will try and attach my program and see if you can help a little more that. It will probably be easier for you to look at this way. When you look at the diagram sequence 0 is the one the problem is in. In that sequence you will see a case structure and that is where the finite pulse train vi is. When case 1 is selected the finite pulse train will run again and again until I leave case 1. I need to have the program run the finite pulse train once and then wait and do nothing until the case is changed. The finite pulse train will be in all cases inside the case structure I just haven't done that yet, I am waiting until it works. The pulse train is used to move a stepper motor that is why running only once is im
    portant because the stepper motor is used to position something.
    Attachments:
    AMC_Eagle_Both_Inputs_Working_2.vi ‏266 KB

  • PreparedStatement vs Statement - When executing only once

    Are there any performance implications in using PreparedStatement vs
    Statement when you are executing the SQL only once? I am talking about all
    kinds of SQL (Select, Update, Insert and Delete). If PrepatedStatement is
    used, I would expect some overhead in setting values for different columns
    separately and precompliling. Is that overhead significant enough to
    degrade performance? If we execute statement only once, I do not expect to
    any gain on performance.
    I would appreciate any comments.
    Sarat

    It also depends on the database/driver combination,several database can be
    configured to maintain a prepared statement cache at the DB level (I have
    never done it myself, but I know people who has done this. Lately I use
    mostly Oracle, for which I should not be configured an expert :)).
    Also the weblogic's prepared statement cache only caches first so many
    statements. If you have used them all up at the startup you are out of luck.
    I know you already knew that, but may be helpful to the original poster.
    .raja
    "Cameron Purdy" <[email protected]> wrote in message
    news:[email protected]..
    BTW - there is a case where prepped stmts are faster -- when they arecached
    by Weblogic's jdbc wrappers. So my previous answer can be wrong.
    Peace,
    Cameron Purdy
    Tangosol Inc.
    << Tangosol Server: How Weblogic applications are customized >>
    << Download now from http://www.tangosol.com/download.jsp >>
    "sarat" <[email protected]> wrote in message
    news:3b715901$[email protected]..
    Are there any performance implications in using PreparedStatement vs
    Statement when you are executing the SQL only once? I am talking aboutall
    kinds of SQL (Select, Update, Insert and Delete). If PrepatedStatement
    is
    used, I would expect some overhead in setting values for differentcolumns
    separately and precompliling. Is that overhead significant enough to
    degrade performance? If we execute statement only once, I do not expectto
    any gain on performance.
    I would appreciate any comments.
    Sarat

  • Pls give me the code to load method only once in JVM.

    Hi all,
    Pls give me the code to execute method only once in JVM.Even if we create more than one instance to call the method.
    Thanks & Regards,
    Vinodh

    [How to ask a question on these forums|http://catb.org/~esr/faqs/smart-questions.html]

  • When Press "Execute Query" LOV return Item not showing

    I created a LOV and defined return items.
    In the form I created display items, database property NO and assign variable name which is in LOV.
    When I enter a new record LOV shows the return item but when I am executing query only database record is showing and I want to show the all item even they are in database or not.
    Message was edited by:
    Kamran

    execute query populates only database items. To populate non database items after execute query, use post query trigger.

  • Query executes more than once

    Hello All,
    We have crystal reports integrated in the java web application. Reports with parameters are executing query more than once (found in the SQL Server Profiler).
    Scenario:
    Report query with parameter :- select * from cieuser where id >= {?userId}.
    User provides value '1' to this parameter and selects report execution.
    Before executing the report, our system updates the database connection details of the rpt with other configured details.
    Issues:
    During updating of the database details on execution of statement "databaseController.setTableLocation(orig.getTable(i), table);" , the profiler shows:
    select * from cieuser where id >=  NULL
    And on executon of the statement "viewer.processHttpRequest(request, response, getServletConfig()
                  .getServletContext(), null);" the profiler shows the following:
    select * from cieuser where id >= {?userId}
    select * from cieuser where id >= 1
    select * from cieuser where id >= 1
    When the same report is executed from the standalone crystal designer, the profiler shows one time query execution:
    select * from cieuser where id >= 1
    Environment:
    Crystal reports designer - 11.5.10.1263
    JRC - 11.5
    Please advise.
    Thanks,
    Ratan.

    Hello,
    SAP decided to allow the confirmation of orders with a final confirmation (status CNF) deliberately. So it is possible to confirm work that was maybe forgotten or if the flag 'final confirmation' was set mistakenly. Only the status CLSD will prevent further confirmations.
    If you want forbid further confirmations of  orders with status CNF you can use enhancements CONFPM* or BAdI WORKORDER_CONFIRM. However, the probably easiest way is to define a user status that is set at business transaction 'Confirm order' and, once set, forbid business transaction 'Confirm order'.
    Regards,
    Reinhard

  • Execute default case unless user presses one of several event buttons, in which case execute a different case only once.

    Hello everyone,
    I am communicating with a serial device using the VISA functions. My VISA commands are inside a loop, and per loop itteration I am sending a default command and receiving a message back from my device. However, I would like to incoroporate two non-default cases, which are to be initiated by buttons on the front pannel. When pressed, a corresponding command should be sent to the serial device only once, and then I'd like to go back to the default case. The message coming back fromt the device should be a string, common to all cases - I don't want a separate string per case. How can this be done efficiently?
    I tried to do a three-case case structure, but I haven't figured out how to use boolean switch buttons for more than two cases (I prefer buttons to a drop-down menu selection). I also tried an event structure (which I have no experience using), but these remain idle, and I can't figure out how to make a default case run actively.
    Thank you in advance for your help.
    Solved!
    Go to Solution.

    An event structure has a time out event which you could wire a value to.  The default value (nothing wired to it) is -1 which means never timeout.  You can put in a 0 which means zero timeout, execute the timeout case immediately if some other event hasn't already been queued.  Or put in any value meaning milliseconds.  Wait that many milliseconds and execute the timeout case if another event hasn't happened in the mean time.
    Do combine multiple boolean buttons, build them into an array.  Then search 1-D array for the first true.  A -1 means none are true, a number from 0 to n-1 means that particular element of the array is true.  So you just feed the value to the case structure.  (-1,default   0    1     2    ...)

  • What is the best approach for executing this code only once?

    Hi,
    What would be the best way to this using JSF/Java web architecture? I have a login page, login.jsf, that submits login credentials to another servlet and if successful, is redirected to a login success page, which I have called "main.jsf", my application's main page. What I want to do, however, is when the login success mechanism redirects to my application, I want to run a bit of Java code (which requires access to the session object) that executes only once, and then redirects to my application's main page.
    In other words, I could put this Java code on my application's main page, but then it would execute every time a user visited it.
    Any advice on the most efficient way to do this?
    Thanks, - Dave

    laredotornado wrote:
    Thanks for your reply but I have a question. If the filter is executed on every page, then, assuming the user is logged in, the code would be executed every time. How can I create this such that my code snippet is executed only once, preferably after the user is re-directed to the login success page?It is more secure. On login just put the User object as attribute of HttpSession and check in the filter if it is there.

  • CUP - field mapping from request to SU01 for Accnt No worked only once

    CUP - field mapping from request to SU01 worked only once. I configured the Field Mapping for Account Number with Account Id. First request worked fine in DEV systems, 2nd and 3rd requests failed. Same thing happened in QA systems. Not sure whether the difference in SP on GRC and ECC is causing this. Any help is greatly appreciated.
    We are currentky on GRC 5.3 ABAP stack SP 14.0  
    and
    ECC - SAPK-53315INVIRSANH VIRSANH 530_700: Support Package 0015
    Any help is greatly appreciated.
    Thanks,
    Vish

    Hi Diego,
    Yes, we are on VIRSANH SP15  also VIRSAHR SP13 for SAP_HR . My connector type is SAP HR System, Version ECC 6.0.
    We are on GRC 5.3  Support Pack 14.0 . Our GRC 5.3 installation is running on ABAP stack.
    It is very strange that in QA client, SU01 got updated atleast 3 times with new account number , user group. Tried 4th time, did not work. In DEV client, it worked only once.
    Thanks,
    Vish

  • How to execute only once the *copy* about LRF1 tcode ?

    Hi Experts !
    I duplicated the LRF1 tcode by ZLRF1 tcode with the main program SAPLZLRFMON (please see below).
    I have an issue with the execution about the ZRLF1 tcode, normally the LRF1 tcode can be execute only once under the same warehouse number, but my transaction ZLRF1 can be execute by more than one user at a time. I debug the execution about the ZLRF1 with a breakpoint set into LZLRFMONF01 include (include test connection) but the system excute the transaction without regard to the breakpoint set into LZLRFMONF01. Did I forget anything ?
    thanks in advance for your help.
      System-defined Include-files.                                 *
      INCLUDE LZLRFMONTOP.                        " Global Data
      INCLUDE LZLRFMONUXX.                        " Function Modules
      User-defined Include-files (if necessary).                    *
    *Class implementations
    INCLUDE LZLRFMONCL2.
    *INCLUDE LLRFMONCL2.
    INCLUDE LZLRFMONCL3.
    *INCLUDE LLRFMONCL3.
    INCLUDE LZLRFMONCL4.
    *INCLUDE LLRFMONCL4.
    INCLUDE LZLRFMONCL5.
    *INCLUDE LLRFMONCL5.
    INCLUDE LZLRFMONCL6.
    *INCLUDE LLRFMONCL6.
    INCLUDE LZLRFMONCL7.
    *INCLUDE LLRFMONCL7.
    INCLUDE LZLRFMONCL8.
    *INCLUDE LLRFMONCL8.
    INCLUDE LZLRFMONCL9.
    *INCLUDE LLRFMONCL9.
    INCLUDE LZLRFMONCLA.
    *INCLUDE LLRFMONCLA.
    *PBO-Modules
    INCLUDE LZLRFMONO01.
    *INCLUDE LLRFMONO01.
    INCLUDE LZLRFMONO03.
    *INCLUDE LLRFMONO03.
    *PAI-Modules
    INCLUDE LZLRFMONI01.
    *INCLUDE LLRFMONI01.
    INCLUDE LZLRFMONI03.
    *INCLUDE LLRFMONI03.
    INCLUDE LZLRFMONF01.
    *INCLUDE LLRFMONF01.
    INCLUDE LZLRFMONF02.
    *INCLUDE LLRFMONF02.

    CHRISTIAN MEYER wrote:>
    >  Did I forget anything ?
    Yes - Standard SAP programs quite often check the program name and transaction code being executed. If you look at program SAPLLRFMON, you'll see that it uses both the program name and transaction code (LRF1) in a number of places. You have to go through your copy, looking for these places and add the logic for your trasnaction code an program names.
    Rob

  • Strategy plan with package to be executed only once

    Hi All,
    Created a time based maintenance plan with strategy. Included 4 maintenance packages in the strategy. One of the maintenance package should be executed only once upon scheduling the maint. plan and should be due on the date on scheduling.
    What scheduling parameters are to be maintained?
    Regards,
    Abhijit

    Hi Abhijeet,
                      The Functionality of Offset is actually different.
    Suppose you procure a new Equipment, you have erected and comissioned, but the use will anly after 3 months as the predessing and subsequent Equipment needs some time for the Erection and comissioning, in this case, you maintenance plans should start after 3 months only,
    for this reason the Offsetting Field is used.
    that is if you maintain the offseting of 3 months then the cycle will start after 3 months.
    it means that if today is 20th December and you have a cycle frequency of 1 month and you give the offseting for 3 months then your plan will be only activated from 20th march,and the first order will be generated 1 month(cycle period) after that.
    that is 20th April.
    Hope it further clarifies your doubt.
    Regards,
    Yawar Khan

  • Execute Javascript in SCRIPT_ITEM onload, but only once

    Hi,
    if I publish my webtemplate then the javascript function (executeJS_SET_ITEM_PARAMETERS_R) inside the script item is executed. The execution is done via onload="javascript:executeJS_SET_ITEM_PARAMETERS_R".
    Within the JavaScript I create some parameters to change some settings of the webtemplate. At then end the command is executed and the template is refreshed.
    1.The problem is that the Javascript is executed recursively (always onload). How can I ensure that the JavaScript is executed only once (the template only refreshed once)?
    2.Within executeJS_SET_ITEM_PARAMETERS_R these lines are commented:
      //To extract specific values of parameters refer to the following:
      //var key = currentState.getParameter( <b>PARAM_KEY</b>).getValue();
      //alert( "Selected key: " + key );
      What is meant by PARAM_KEY? Maybe I can use this parameter to create a condition that ensures to execute the code only once. Where can I found these PARAM_KEYs?
    Thanks for the info.
    BR, Andreas

    You might try this approach, using the following workflow...
    1) *Get Specified Finder Items* -- press the "+" sign, navigate to the target folder and choose it.
    2) *Set Folder Views* -- move the icon slider to 128, etc., and check "Apply Changes to Sub-folders."
    From Automator's File menu select Save As Plug-in > Plug-in for: Folder Actions.
    The AppleScript, located in the User > Library > Scripts > Folder Action Scripts folder, can then be modified:
    on adding folder items to this_folder after receiving added_items
    tell application "Macintosh HD:Users:username:Library:Workflows:Applications:Folder Actions:Make 128.app"
    run -- 'run' replaces 'open added_items'
    end tell
    end adding folder items to
    This has worked for me consistently (so far) using Mac OS 10.4.11; not tested in Leopard. Your results may vary.
    Good luck.

Maybe you are looking for

  • Can't Start the SQL Server & SQL Server Agent Services

    Hello i had to make a copy of my setup for a coworker in a different country to work with i can't make this two services to start. A timed out error shows and  maybe the logs say something but i can't understand it.  Help Please.  2014-10-31 12:18:55

  • Can't delete anything in Mail

    When I delete a message from the Drafts, it comes right back. When I delete a message in my inbox, it gets "grayed out" but then when I restart mail, it's right there in the inbox again. no longer grayed out. I do not have this problem with my Gmail

  • Get a Path with a JFileChooser

    Hi, I'd like some user of my application to choose a textfile by a filechooser. Then (after closing the filechoosers window) present him/her the path on my main (JFrame) window. And the prog should start the file operations, after he/she has pressed

  • All I want for Christmas is a mute Icon, a mute icon, a mute icon. Is there any way to haver one? Iphone 4S

    All I want for Christmas is a mute Icon, a mute icon, a mute icon. Is there any way to have one? Iphone 4S And no the tiny metal slide on the side with the tiny orange liver is not the same. I just want to know is there a way to have an icon?

  • Pressure & temperatur​e monitoring with cRIO-9082

    Hello. I need to quickly write a simple VI that acquires analog input data from a cRIO-9082 using NI-9205 and NI-9213 modules to acquire pressure and temperature measurements. I don't need to log data, only monitor the sensors. If anyone already has