Portal seems to cache RFC results

Hi,
we are calling an RFC in an R/3 4.6C server from an
EP6 SP9 (sneak preview) using JCA. The call is succesful,
but the portal seems to cache the call results; i.e. if
we change the data returned by the RFC the portal receives
the old values. If we restart the portal the returned data
changes, but only on the first call.
I suppose there is some setting for caching RFC results,
but I am not able to find it.
Thanks in advance.
Mattia

Here it is:
BAPI:
FUNCTION zep_test.
*"*"Local interface:
*"  EXPORTING
*"     VALUE(RETURN) LIKE  BAPIRET2 STRUCTURE  BAPIRET2
*"  TABLES
*"      T_AVVISI STRUCTURE  ZLIST_AVVISI
  DATA:
      l_wa_avvisi   LIKE LINE OF t_avvisi
  CLEAR return.
  CLEAR t_avvisi.
  REFRESH t_avvisi.
*  l_wa_avvisi-cdl    = 'E'.
*  l_wa_avvisi-avvisi = 1.
*  APPEND l_wa_avvisi TO t_avvisi.
*  l_wa_avvisi-avvisi = 7.
*  APPEND l_wa_avvisi TO t_avvisi.
*  l_wa_avvisi-avvisi = 8.
*  APPEND l_wa_avvisi TO t_avvisi.
*  l_wa_avvisi-avvisi = 55.
*  APPEND l_wa_avvisi TO t_avvisi.
*  l_wa_avvisi-avvisi = 7.
*  APPEND l_wa_avvisi TO t_avvisi.
*  l_wa_avvisi-avvisi = 1.
*  APPEND l_wa_avvisi TO t_avvisi.
  l_wa_avvisi-cdl    = 'R'.
  l_wa_avvisi-avvisi = 12.
  APPEND l_wa_avvisi TO t_avvisi.
  l_wa_avvisi-avvisi = 30.
  APPEND l_wa_avvisi TO t_avvisi.
  l_wa_avvisi-avvisi = 1.
  APPEND l_wa_avvisi TO t_avvisi.
  l_wa_avvisi-avvisi = 5.
  APPEND l_wa_avvisi TO t_avvisi.
  l_wa_avvisi-avvisi = 10.
  APPEND l_wa_avvisi TO t_avvisi.
  l_wa_avvisi-avvisi = 27.
  APPEND l_wa_avvisi TO t_avvisi.
  l_wa_avvisi-cdl    = 'M'.
  l_wa_avvisi-avvisi = 13.
  APPEND l_wa_avvisi TO t_avvisi.
  l_wa_avvisi-avvisi = 7.
  APPEND l_wa_avvisi TO t_avvisi.
  l_wa_avvisi-avvisi = 8.
  APPEND l_wa_avvisi TO t_avvisi.
  l_wa_avvisi-avvisi = 10.
  APPEND l_wa_avvisi TO t_avvisi.
  l_wa_avvisi-avvisi = 2.
  APPEND l_wa_avvisi TO t_avvisi.
  l_wa_avvisi-avvisi = 34.
  APPEND l_wa_avvisi TO t_avvisi.
  return-type = 'S'.
ENDFUNCTION.
The component is a variation of the jca.SampleComponent.par I found either on SDN or in a note (sorry, I can't seem to find it anymore). I only
changed the doJca method (below).
public void doJca(IPortalComponentRequest request, IPortalRequestEvent event) {
    System.out.println("doJca()");
    Context ctx = null;
//    IConnectionFactory connectionFactory = null;
    IConnection client = null;
    ConnectionProperties prop = null;
    String rfm_name = "ZEP_TEST";
    String system_alias = request.getParameter("system");
    if (system_alias == null) {
               app.putValue(
                    "error",
                    "Couldn't establish a connection with a target system " + system_alias + ".");
               return;   
    System.out.println("system_alias = " + system_alias);
    app.putValue("error", "");
    app.putValue("exportParams", "");
    app.putValue("system_alias", system_alias);
    try {
      // Obtain the initial JNDI context
      //   ctx = new InitialContext();
      // Perform JNDI lookup to obtain connection factory
      //   connectionFactory = (IConnectionFactory) ctx.lookup("EISConnections/SAPFactory");
      //   IConnectionSpec spec = connectionFactory.getConnectionSpec();
      //   ((Map) spec).put("client", "100");
      //      ((Map) spec).put("UserName", "");
      //      ((Map) spec).put("Password", "");
      //      ((Map) spec).put("logonmethod", "UIDPW");
      //      ((Map) spec).put("Language", "EN");
      //      ((Map) spec).put("ashost", "");
      //      ((Map) spec).put("sysnr", "01");
      //      IConnection client = connectionFactory.getConnectionEx(spec);
      IConnectorGatewayService cgService =
        (IConnectorGatewayService) request.getService(IConnectorService.KEY);
      try {
                    prop = new ConnectionProperties(request.getLocale(), request.getUser());
      } catch (Exception e) {
                    app.putValue(
                         "error",
                         "Couldn't establish a connection with the user " + request.getUser() + "." + e);
                    return;     
      try {
                    client = cgService.getConnection(system_alias, prop);
      } catch (Exception e) {
                StringWriter wr = new StringWriter();
                e.printStackTrace(new PrintWriter(wr));
                    app.putValue(
                         "error",
                         "Couldn't establish a connection with a target system " + system_alias + "." + wr.toString());
                    return;
       * Start Interaction
      IInteraction interaction = client.createInteractionEx();
      System.out.println("Starting Interaction...");
      IInteractionSpec interactionSpec = interaction.getInteractionSpec();
      interactionSpec.setPropertyValue("Name", rfm_name);
       * CCI api only has one datatype: Record
      RecordFactory recordFactory = interaction.getRecordFactory();
      MappedRecord importParams = recordFactory.createMappedRecord("CONTAINER_OF_IMPORT_PARAMS");
      IFunctionsMetaData functionsMetaData = client.getFunctionsMetaData();
      IFunction function = functionsMetaData.getFunction(rfm_name);
      if (function == null) {
        app.putValue(
          "error",
          "Couldn't find " + rfm_name + " in a target system " + system_alias + ".");
        return;
       * How to invoke Function modules
      System.out.println("Invoking... " + function.getName());
      MappedRecord exportParams = (MappedRecord) interaction.execute(interactionSpec, importParams);
      app.putValue("exportParams", exportParams);
       * How to get structure values
      IRecord exportStructure = (IRecord) exportParams.get("RETURN");
      String columnOne = exportStructure.getString("TYPE");
      String columnTwo = exportStructure.getString("NUMBER");
      String columnThree = exportStructure.getString("MESSAGE");
      System.out.println("  RETURN-TYPE    = " + columnOne);
      System.out.println("  RETURN-CODE    = " + columnTwo);
      System.out.println("  RETURN-MESSAGE =" + columnThree);
       * How to get table values
      IRecordSet exportTable = (IRecordSet) exportParams.get("T_AVVISI");
      exportTable.beforeFirst(); // Moves the cursor before the first row.
      while (exportTable.next()) {
        String column_1 = exportTable.getString("CDL");
        String column_2 = String.valueOf(exportTable.getInt("AVVISI"));
        System.out.println("  COMPANYCODE_LIST-COMP_CODE = " + column_1);
        System.out.println("  COMPANYCODE_LIST-COMP_NAME = " + column_2);
       * Closing the connection
       interaction.getConnection().close();
      client.close();
    } catch (ConnectorException e) {
      app.putValue("error", e.toString());
      System.out.println("Caught an exception: n" + e);
      throw new RuntimeException(e);
    } catch (Exception e) {
      app.putValue("error", e.toString());
      System.out.println("Caught an exception: n" + e);
      throw new RuntimeException(e);
  When I uncomment the commented section in the BAPI
(or I comment out some more of it), the result displayed
by the iView does not change until I restart the portal.
Thanks in advance!
Mattia

Similar Messages

  • Caching XSLT results?

    Hi,
    I am a newbie to XML/XSLT, and we have just written our first XSL stylesheet.
    I am using the WebLogic JSP Tag Library to do the transformation from XML to HTML
    and all seems to work well. My question is this: Does WebLogic cache the HTML
    somewhere so that the transformation does not need to be reperformed each time
    the page is requested by the user? It sounds like an obvious thing to do, but
    I'm not sure if this functionality is included in WebLogic. If it is not, are
    there others out there who have this same need (to cache XSLT results for performance
    reasons) and how have you dealt with this issue. Any help would be appreciated.
    I'm running WLS 6.0 SP2 on HP-UX 11.x. Thanks...
    Vasuki.

    I tried this example based on a view:
    CREATE MATERIALIZED VIEW MV_TEST2
         REFRESH COMPLETE
         START WITH SYSDATE
         NEXT  SYSDATE + 1/48
         WITH ROWID
         AS SELECT * FROM test1;REFRESH COMPLETE -- The complete refresh re-creates the entire materialized view.
    START WITH SYSDATE -- run now
    NEXT SYSDATE + 1/48 -- run again in half an hour
    WITH ROWID -- I think this option is important if you use partial refresh of the view.
    AS SELECT * FROM test1; -- test1 is a view:
    CREATE OR REPLACE VIEW TEST1 AS
    SELECT st_id, st_name
        FROM aaw_solution_tree;Are column indexes still possible? I'm not sure:
    Indexing: !with respect to MV's on 10gR2 Jonathan Lewis wrote! ... you are allowed to create indexes on the tables that sit under materialized views - just don't make them unique indexes
    How much freedom is there in setting the refresh rate?
    What type of refreshing do you need?
    Another useful link: [http://asktom.oracle.com/pls/ask/search?p_string=materialized+view|http://asktom.oracle.com/pls/ask/search?p_string=materialized+view]
    Hope it helps.
    Tobias

  • Firefox 5 seems to cache error redirects.

    Firefox 5 seems to cache error redirects.If for example I get redirected to a 404 then fix the problem with the site, it will still redirect me to the 404.

    Try to Reload web page(s) and bypass the cache.
    * Press and hold Shift and left-click the Reload button.
    * Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    * Press "Cmd + Shift + R" (MAC)

  • Caching XQuery Result in OSB for Performance Improvement

    Hi,
    I have written a custom XPath function in Java to pick the IP address of the machine and registered the same with Oracle Service Bus 11g.
    In the Proxy Message Flow, the server IP is picked at run time by using XQuery that refers to the Custom Function.
    Now, is there a way to cache this result some where in OSB so that in the subsequent execution, the XQuery will pick the cached value from Cache instead of making a call to Custom Function registered with OSB.
    I'm asking this question to understand if performance optimization is possible here by caching the result.
    Thanks,
    CC

    Hi All,
    Have implemented Java Callout and Custom XPath in the same flow and kept current datetime stamp before and after each of these steps to calculate the difference b/w timestamps thereby finding the execution times of Java Callout and Custom XPath steps (this may not be an elegant way of calculating the execution time of each step in OSB message flow, request someone to suggest the most recommended approach here!) ...
    For a load of 10 users, each submitting 10 requests (total 100 requests), following are the execution times (in milliseconds) collected for 10 requests (Server is not occupied with any other activity at this time):
    Java Callout(milliseconds) |     Custom XPath(milliseconds)
    13 |     1
    4 |     0
    5 |     1
    1 |     2
    0 |     1
    1 |      0
    1 |     0
    1 |     0
    1 |     0
    1 |     2
    Where the value of '0' is appearing, I assume it could be some micro seconds. The difference happens to be zero in some cases as we don't have microsecond level logging.
    Thanks,
    CC
    Edited by: Chandu on 19-Jul-2011 22:02

  • Cannot query using both conforming and cached query result

    TopLink doesn't allow me to both use conforming and cached query result at the same time.
    Conforming is certainly not a superset of the [cached query result] features.
    Can you confirm that it's a limitation of TopLink?
    Any know workaround to end-up with the same features as using both conforming and cached query result?
    Conforming is about seeing modifications you do in the same transaction. As a bonus, if you query for one object and specify at least the id as criteria because TopLink will have to check in memory anyway it can avoid going to the database.
    But if I do a query like "give me employees hired before now and after 30 days ago" it's about more than one objects and about finding existance so cached query result is needed to get acceptable performance in a complex application trying to avoid the same SQL generated over and over again.

    Thats where the trace just ends? It doesnt look like there's any LIKE or filtering going on (with respect to the Oracle pieces anyway), apparently MSAccess simply requested the whole table.
    What do you mean by 'hang' exactly? Are you sure it's just not taking a long time to complete? How long have you waited? How fast does it complete on the other environment?
    ODBC tracing isnt likely to help much for that. SQLNet tracing would be better to see what is going on at a lower level. Specifically, what is going on at the network level? Is the client waiting for a packet to be returned from the database?
    Is the database having a hard time processing the query, perhaps due to index/tuning issues?
    Assuming that is indeed the query that is "hung", how much data does that return?
    Are you able to reproduce the same behavior with that query and vbscript for example?
    Greg

  • cache-query-results question

    I have another post for general descriptor tag information but I do have a specific question. In a project I am looking at I see:
    <cache-usage> check cache by primary key </cache-usage>
    <cache-query-results>false</cache-query-results>
    <maintain-cache>true</maintain-cache>
    I'm not sure how to interpret this. Does this mean that a cache is in place or not? cache-query-rests is set to false which implies no caching, yet the other parameters imply a cache is in place. What overrides here?
    Thanks

    The XML maps directly to the API so the JavaDocs and related documentation are the best tools:
    cache-usage: query.setCacheUsage(int)
    This option indicates how the object cache should be used when processing the query. This is how in-memory query is configured as well as support for cache-hits on ReadObjectQuery.
    cache-query-result: query.setShouldCacheQueryResults(boolean)
    This option allows you to indicate that the results returned from the query execution should be held. When the query is executed again these results will be returned without going to the database or searching the object cache. This is just caching the results locally within the query.
    maintain-cache: query.maintainCache() or query.dontMaintainCache()
    This setting determines if the results returned from the query should be cached in the shared object cache. It is on by default and turning this off is very rare. Occasionally done to compare the cache version with the database verision when handling an optimistic locking failure.
    Doug

  • Caching query results?

    Hi guys,
    I have this page which calls the same query (across a database link!) four times! First when an initial LOV is generated (and the page is loaded), again for another LOV based off the initial one and finally for the report generated based off the 2 selections. This is crazily slow (30-40 seconds each load~) and also: When you try to sort with an Interactive Report by clicking the column names it then queries the database again (I assumed this part was cached but apparently not). I therefore need to cache the results from an initial query and then just limit the results locally. How can I do this? Guides? Examples?
    Thanks for help.
    Mike

    I tried this example based on a view:
    CREATE MATERIALIZED VIEW MV_TEST2
         REFRESH COMPLETE
         START WITH SYSDATE
         NEXT  SYSDATE + 1/48
         WITH ROWID
         AS SELECT * FROM test1;REFRESH COMPLETE -- The complete refresh re-creates the entire materialized view.
    START WITH SYSDATE -- run now
    NEXT SYSDATE + 1/48 -- run again in half an hour
    WITH ROWID -- I think this option is important if you use partial refresh of the view.
    AS SELECT * FROM test1; -- test1 is a view:
    CREATE OR REPLACE VIEW TEST1 AS
    SELECT st_id, st_name
        FROM aaw_solution_tree;Are column indexes still possible? I'm not sure:
    Indexing: !with respect to MV's on 10gR2 Jonathan Lewis wrote! ... you are allowed to create indexes on the tables that sit under materialized views - just don't make them unique indexes
    How much freedom is there in setting the refresh rate?
    What type of refreshing do you need?
    Another useful link: [http://asktom.oracle.com/pls/ask/search?p_string=materialized+view|http://asktom.oracle.com/pls/ask/search?p_string=materialized+view]
    Hope it helps.
    Tobias

  • Portal and Database Cache

    All,
    Any pointers on using Portal with Database Cache. Can we identify Portal tables as 'hot', so that Portal page, content area rendering will be faster ? I was told that Portal and iCache have different approaches to caching. What if I turned off Portal caching and let iCache do it for me?
    Would appreciate some response.
    Thanks
    Sanjay

    The caching portal provides isn't a product. It's an optimization on the architecture, basically storing information wherever we can so it doesn't have to be pregenerated.

  • Cache database results within any of your software applications?

    Have you had to cache database results within any of your software applications? What are the advantages and pitfalls developers should be aware of when caching database results.
    plz reply....
    ........thnks.

    We have cached the database results in client side cache (partially in arrays and in files on OS as well). But this caching is restricted to purely STATIC data (which undergoes no change under any circumstances).
    Our application relies a lot on static data and we managed to reduce 10% of network bandwidth with this implementation.
    We tried using client side cache for not-so-static data but had lot of issues related to refresh of the same so we reverted that change.
    On a side note, this does remind me of the client result cache available in Oracle 11g.
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28279/chapter1.htm#FEATURENO06989
    See if it helps you.

  • Caching RFC Calls

    We have SAP BW whose RFC functions will be invoked many times with the same parameters. We want to improve performance without storing content on XI side.
    Is it possible to configure RFC Adapter for caching RFC calls?

    Hi Sergey,
    Just check with Tcode SICF and check for all the services are working fine.
    Go thru following links
    http://service.sap.com/NW04 ->How-to Guides-> Exchange Infrastructure->How to handle Caches in SAP XI 3.0
    Also go thru following thread.
    problem with xi cache
    Hope this helps you solve your problem.
    Regards,
    abhy
    PS: AWARD POINTS FOR HELPFUL ANSWERS.

  • Caching search results required

    We have the following scenario:
    1. Custom search portlet is on a tab on a page and
    is used for searching portal items.
    2. When the search results are displayed - the item
    has an Edit link associated with it which links to
    a custom jsp page where the item attributes can be
    edited.
    3. After editing the attributes on the jsp page, we would like
    to return to the page where the user came from (the search
    results) - but the last search results must be retained on the
    page when the user returns back. Currently every time we go back to the
    search results - the old results are not cached.
    Any thoughts on how we could achieve this caching of
    the search results?
    Thanks,
    Suzanne

    Hi,
    Unfortunately that is not something that is happening with us..my search form still shows the same serach results of the previous search even if i navigate to another tab and get back to it !
    I am using a custom search portlet with Oracle 10g as portal version
    thanks

  • Portal 10 p13n cache

    hi,
    We are migrating our portal 8.1 application to 10.
    i am facing the following issue,
    We are using CacheManagerMBean to flush the portal cache in our program.
    But it seems in portal 10
    'com.bea.p13n.mbeans.CacheManagerMBean' is not available.
    Could you tell me how can i manage (flush) the portal cache using the admin mbean in portal 10?
    Many thanks,

    That information is very old and IMHO mostly wrong.
    Read the javadocs on CacheFactory.flush():
    [url http://edocs.bea.com/wlp/docs100/javadoc/com/bea/p13n/cache/CacheFactory.html
    It does a cluster-wide flush of the cache, removing the key or the whole cache on all nodes of the cluster.
    The underlying implementation uses the same multicast that the WLS server nodes use to keep in sync with each other. It is also exactly the same method that all the WLP internals use to keep caches in sync across a cluster.
    If it doesn't work for you, then I'm sure support would like to hear why.
    -- Dave, WLP Architect

  • Change RFC result language unicode to Turkish ASCII?

    Hi,
    Our SAP system has unicode character set. We receive some information from SAP via RFC with Delphi. is it possible to change only this RFC's results from unicode to Turkish ASCII?
    Thanks.

    Hi,
    This may help:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60a35b0b-de0a-2a10-4ea5-dd82e6bbd74d
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0845138-600b-2a10-6d86-e458d67a8b2b

  • Performance problem...is there a way to cache query results?

    Greetings team,
    I've been deploying DS5.2 for a while now, and am on the cusp of pushing it into our production environment, however I've been noticing lately that some hosts are taking an exorbitantly long time to log in (actually, a user noted it, and I'm now investigating).
    Logins to hosts in this environment can take anywhere from 10-50 seconds. One thing that I've noticed is that any time you run a command that requires any amount of awareness of uid->username translation (i.e. if you ls -l /opt/home), queries are made to the configured directory server for this information. Is this normal? Since uid's and usernames don't often change (in most environments, anyway), is there a way this could be cached?
    I see also in my access log for my primary server (configured as a hub, btw) that there is near constant traffic to that host for LDAP info. I'm not sure why it's so chatty, but it does appear to be slowing things down a bit. The load on my LDAP host (a SunFire V210 w/ 1GHz processor, 1024MB RAM) seems to float between 1 and 12, with sar reporting an average idle time of about 44%.
    Any ideas? I'm really at a loss to explain why there's so much traffic to this host when much of it seems to come from hosts with nobody logged into them.
    Patrick

    It is great that you have found the root cause of
    your issue.
    nscd is by default started at boottime by a usual OS
    install. There is a /etc/nscd.conf but I doubt that
    anyone will change anything there as the default
    settings are good for most cases.
    I think LDAP search performance is affected by the
    existence of Search Indexes also.
    I have observed that if the user home directory is
    NFS mounted especially over a WAN, be it via
    /etc/fstab or automount maps, the login process will
    be very slow, it will take a while to obtain a
    command prompt at the home directory level.
    GaryGary et al,
    In my environment nscd has been explicitly disabled for some historical reasons, none of which are still a problem. So, I'm going to enable it for only passwd and group caching, with the default values for those caches.
    I'm in the process of working out my performance tuning plan for my LDAP servers, but I'm definitely going to have an eye on indices and caches. Those will probably have the least impact on search times and such for the moment since my directory is so tiny (261 entries!), but preventing that traffic from hitting the server at all will be a huge savings.
    I can definitely see why WAN mounted homedirs would cause things to lag. That's not the case here since NFS is a big no-no.
    Patrick

  • Disable Navigation framework of BW iview in portal page of KM Search result

    We have BW Bookmarks in KM as Portal pages and recently we implemented search_from_here option for searching bookmarks of the KM folders. Trex index has been created. Search results of Trex displays the links of the searched BW Bookmarks.
    When clicking on these links BW iview is embedded in the Portal page and is displayed along with header framework.
    Is there a way we can customize link in the search result to launch in headerless portal window.
    Tried to maintain Content link parameters option '3' to display in new headerless window of the bookmark and also maintained NavMode=3 option in the content link of the Bookmark properties under access links but didnt work.
    Thanks.

    Resolved by appending NavMode=3 to Content link URL should launch in Headerless Portal window.

Maybe you are looking for

  • Dropped Frames During Playback, How Much Hardware Should I have

    I have a Mac Pro Dual Xeon 2.66 with 1 gig of ram and the Nvidia 256 meg card, I added a second hard drive which is a Seagate Barracuda 320GB 7200 RPM SATA 3.0Gb/s and that is my scratch disk. I was trying to play a sequence that is from the tutorial

  • Need Advice WRT iPod Purchase - Which Model?

    I've never considered buying an iPod before, but I've been making a lot of business trips by car in the past couple of years, so having music to play all long the way would be A Good Thing. But, which model to buy??? I don't think I'll have the need

  • Can't Put Movie into my iTunes Libarary or iPod Video(5g)

    I recently converted a video to mp4 using ImTOO DVD to iPod Converter. It's in the mp4 format and should be perfect to be put into iTunes. Well when I try sticking it in there it says that it can't be played on my iPod or something like that. How can

  • Which file gets updated in WebLogic domain when a user is created

    Hi All, I have a query regarding In a weblogic domain when we create a user or group in security realm--> myrealm in Dfault Authenticator, then which file or folder under Domain directory structure gets updated? Thanks in Advance!!

  • Production Order CIF Error

    Does anyone know what the following error is? "Continuous I/O nodes not allowed for sequence-dependent setup activities" Thanks Rob