How to logoff a session created by RFC

Hi All,
I'm using an RFC to call a funtion in another server and is working right now using a logical destination, but I have a problem with the session, everytime when the user execute this funtion to a come back to R/3, CRM server keep the session alive. I would like to know if the is a way to close the session when the user comes back to R/3.
This is the fuction that I'm using
CALL FUNCTION 'Z_FTT_ZTB1_FIND_RECORD' DESTINATION l_logsys
            EXPORTING
              i_claim          = ztsgendat-zzclaim
            IMPORTING
              brc_documentid   = l_bapiguid
              brc_documentclas = l_bapidclass.
Thanks in advance
Kind Regards
Alexis

call this FM to close RFC connection
call function 'RFC_CONNECTION_CLOSE'
  exporting
    destination = dest
  exceptions
    others      = 1.
Regards
Raja

Similar Messages

  • Session created by RFC Destination don't close.

    Hi Experts
    I create an RFC Destination in NetWeaver 7.2, and i use this destination to access some RFC from CAF project.
    The problem is when i access the RFC, the ECC create a session to the user and don't close this session.
    After some time i have a lot of session created in ECC. The session in ECC should be closed, because i get some error when there are a lot of session with the same user opened in ECC.
    I create the destination in NWA - Destination.
    Could someone help to solve this?
    Regards
    Marcos Brandã

    Not anwsered.

  • How to use a session, created in a jsp page, in a php page

    Hello, forgive me for the newbie question.
    Here is my problem:
    I want to have a jsp page create a session, set some session variables and then redirect to a php page which will access those same session variables.
    I have the redirection worked out, but I can't seem to find out how to use the jsp session in my php script.
    Is this possible at all, and if so, how does it work?

    Note that javascript runs on the client side, and JSP runs on the server. JSP and the session objects are NOT available to javascript in reaction to the user.
    If this function is called only when the page is first created, not when the user interacts with the page, or if you want that value to be constant with respect to the javascript, then you can do this:
    <%
      String someValue = (String)session.getAttribute("theAttributeName");
    %>
    <script type="text/javascript">
         Calendar.setup({inputField:"f_date_dfFirstPmtDate",
                                              button:"f_trigger_dfFirstPmtDate",
                                             singleClick:true,
                                              ifFormat:<%=someVale%>});
    </script>

  • How to create a RFC destination for extracting data to HANA

    Hello All,
    Could someone help me in providing a document or note on how to create a RFC destination for extracting data from SAP data source to HANA using SAP LT replication server ?
    I am able to create a data base connection while transforming data from non SAP data source,but wasnt able to transform data which is from SAP abap tables .

    Hi Venkatesh,
    In SM59 t.code we create RFC destinations.
    Go thru the video link for creating RFC destinations step by step
    How to setup a trusted RFC connection between SAP systems: a step-by-step guide - YouTube

  • How to create an RFC for MIGO transaction?

    How to create an RFC for MIGO transaction?
    I want my RFC to accept all details as accepted in MIGO transaction.
    For the entered PO no, display the materials against it and allow user to enter the quantity for the same.
    Then the user should be able to post the PO by executing the RFC.
    Kindly revert asap.
    Thanx in advance,
    Bhakti

    Put good movement header data in structure header
      l_header-pstng_date = sy-datum.
      l_header-doc_date = sy-datum.
      l_header-ver_gr_gi_slip = space.
    Assign goods movement code
      l_wa_goodsmvt_code-gm_code = c_gm_code.
    Add material, plant, and other line item details in
    goods movement item table
      l_wa_goodsmvt_item-material = l_wa_selected-matnr.
      l_wa_goodsmvt_item-plant = l_wa_selected-werks.
      l_wa_goodsmvt_item-stge_loc = l_wa_selected-lgort.
      l_wa_goodsmvt_item-batch = l_wa_selected-charg.
      l_wa_goodsmvt_item-move_type = l_wa_selected-mov_type.
      l_wa_goodsmvt_item-entry_qnt = l_wa_selected-deviceid.
      l_wa_goodsmvt_item-entry_uom = l_wa_selected-meins.
      l_wa_goodsmvt_item-move_plant = l_wa_selected-zwerks.
      l_wa_goodsmvt_item-move_stloc = l_wa_selected-zsloc.
      l_wa_goodsmvt_item-move_batch = l_wa_selected-rec_batch.
      l_wa_goodsmvt_item-serialno_auto_numberassignment = space.
      APPEND l_wa_goodsmvt_item TO l_i_goodsmvt_item.
      CLEAR l_wa_goodsmvt_item.
      l_wa_serial_num-matdoc_itm = l_c_mat_doc_item.
      l_wa_serial_num-serialno = l_wa_selected-sernr.
      APPEND l_wa_serial_num TO l_i_serial_num.
      CLEAR l_wa_serial_num.
    To call BAPI BAPI_GOODSMVT_CREATE to transfer material of transfer
    type one step
      CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
        EXPORTING
          goodsmvt_header       = l_header
          goodsmvt_code         = l_wa_goodsmvt_code
        IMPORTING
          goodsmvt_headret      = l_goodsmvt_headret
        TABLES
          goodsmvt_item         = l_i_goodsmvt_item
          goodsmvt_serialnumber = l_i_serial_num
          return                = l_i_return.
    cheers
    Aveek

  • How to use cdrw to create multi-session cd?

    I use cdrw to create multi-session cd as this:
    # cdrw -O -i /tmp/1.iso
    contents in 1.iso can be read by both Solaris and Windows, then
    # cdrw -O -i /tmp/2.iso
    Solaris consider the cd is empty and Windows consider the cd is not existed.
    My question is, how to handle multi-session cd in Solaris? From some cdrecord FAQ, the data was there but TOC was broken, so one tip is importing TOC of previous sessions before burn. But how?

    Honestly I know this is sort of a weak point with Macs. Not really sure why. I guess with the price of HD storage getting cheaper as well as writable media it's just not something people are interested in enough. But that's too bad because it does seem to have interest.
    Anyway you might check out Burn Again

  • How bapi different from session and call transaction?

    how bapi different from session and call transaction?
    thanks in advance.

    For one, Batch Data Communication (BDC) is older. Business Application Programming Interface (BAPI) came later, about 10 years ago (you can see this already from the name, which contains marketese like "business" ).
    More important though, they are different technologies. With BDC you build the "batch input transaction" yourself, with an ABAP program which creates the "batch input session" ("Batch-Input-Mappe" in german). You then take that session, like an object, and "run" it on a system (most of the time, this is done on a local system by the administrators, after it has been tested for correctness).
    With BAPI, a system (local or remote) exposes its interface to you through some kind of Remote Function Call (RFC). Practically, it tells you: "What do you want to do? Insert that data into Materials Management? Here is the function and the the parameters you have to use for each record". You only work with the Interface - the exposed function. How this function works does not have to interest you. You don't have sessions to "run", you fire your function calls filled with data, one after another and you're done.
    BAPI can be run remotely. With BDC, you probably have to call the administrators of the remote system and send them the session you created for them to run. With BDC you go through the whole transaction in one BDC session, with BAPI you may need more than one "BAPI calls" to do this.
    With BAPI you don't fill obcure field names with values, you just fill the parameters. You can use a BAPI from inside your ABAP program to let a "business object" do some clearly defined work for you, then you can continue with your code doing other things. You don't do this with BDC. With BDC you write a dedicated program that creates the "session", which is then executed separately.
    Batch Data Communication (BDC) is the oldest batch interfacing technique that SAP provided since the early versions of R/3. BDC is not a
    typical integration tool, in the sense that, it can be only be used for uploading data into R/3 and so it is not bi-directional.
    BDC works on the principle of simulating user input for transactional screen, via an ABAP program. Typically the input comes in the form of a flat file. The ABAP program reads this file and formats the input data screen by screen into an internal table (BDCDATA). The transaction is then started using this internal table as the input and executed in the background.
    In Call Transaction, the transactions are triggered at the time of processing itself and so the ABAP program must do the error handling.
    It can also be used for real-time interfaces and custom error handling & logging features. Whereas in Batch Input Sessions, the ABAP
    program creates a session with all the transactional data, and this session can be viewed, scheduled and processed (using Transaction SM35) at a later time. The latter technique has a built-in error processing mechanism too.
    Batch Input (BI) programs still use the classical BDC approach but doesnt require an ABAP program to be written to format the
    BDCDATA. The user has to format the data using predefined structures and store it in a flat file. The BI program then reads this and
    invokes the transaction mentioned in the header record of the file.
    Direct Input (DI) programs work exactly similar to BI programs. But the only difference is, instead of processing screens they validate
    fields and directly load the data into tables using standard function modules. For this reason, DI programs are much faster (RMDATIND - Material Master DI program works at least 5 times faster) than the BDC counterpart and so ideally suited for loading large volume data. DI programs are
    not available for all application areas.
    Business Add-In (BADI) are a new SAP enhancement technique based on ABAP Objects.
    They can be inserted into the SAP System to accommodate user requirements too specific to be included in the standard delivery. Since specific industries often require special functions, SAP allows you to predefine these points in your software.
    As with customer exits two different views are available:
    In the definition view, an application programmer predefines exit points in a source that allow specific industry sectors, partners, and customers to attach additional software to standard SAP source code without having to modify the original object.
    In the implementation view, the users of Business Add-Ins can customize the logic they need or use a standard logic if one is available.
    In contrast to customer exits, Business Add-Ins no longer assume a two-level infrastructure (SAP and customer solutions), but instead allow for a multi-level system landscape (SAP, partner, and customer solutions, as well as country versions, industry solutions, and the like). Definitions and implementations of Business Add-Ins can be created at each level within such a system infrastructure.

  • How do I access session data through an EJB?

    Hi
    How do I access session data through an EJB?
    I am currantly developing a Web service (using ejb's, JBoss.net and Apache Axis). A client making a call to this Web service, is expecting a bussiness-object in return. My problem is that this bussiness-object i stored in a users session data. How do I retrieve this bussiness-object from the users session.
    I have read that this does not work with httpsessions, is this true? If this is true, is it possible to store the bussiness object in a JavaBean e.g:
    <jsp:useBean id="userContextWebImpl" scope="session" class="com.ac.march.client.UserContextWebImpl">
    <%
    String key = "test";
    String value = "This is the value";
    userContextWebImpl.setValue( key, value1 );
    %>
    </jsp:useBean>
    and then retrieve this information through the EJB? Or is it possible to do this by using Statfull JavaBeans? Or can this be done through a nother solution?
    Please help!

    I have created a JavaBean with scope="application" to store some data. The data is stored when a user prefomes a spesific task.
    A different person then makes a call to a Web-Service on the server. The Web-Service then asks an EJB to retrieve the data stored in the JavaBean (servlet cotext). In other words: How do I retrieve this data from the EJB?
    I have tried with this code, but with no luck.
    (ApplicationContextWebImpl is the JavaBean)
    public static String getBookingResult( String key )
         String myResult = null;
         String myKey = key;
         ApplicationContextWebImpl applicationContextWebImpl = null;
         try
              applicationContextWebImpl = new ApplicationContextWebImpl();
              myResult = (String)applicationContextWebImpl.getValue( key );
         catch ( java.rmi.RemoteException e )
         return myResult;
    }

  • Creating a RFC application(SAP R/3) that connects to web portal.

    Hello Everyone,
    I need to create a rfc application that should connect to portal& fetch some data in some table according to some input parameters provided at runtime & display the data in TABLEVIEW control.
    Anyone can guide me on this i:e- how to go about it. What things i should know or should be aware of before creating this application. Any PDF documents , any help material, any guidance about the same will be of great help.
    Thanks,
    Prasad
    [email protected]

    Hi Prasad
    I guess you are trying to develop an application which will run in ABAP stack and will connect to JAVA stack and retrieve some data from there(i.e from java)-correct me if I am wrong. if this is exactly what you want to do then I must say sorry since establishing this route of communicaton is not known to me. But i can suggest you a workaround where you create your application in java so that in runs Java stack picks up data from portal(i.e. WAS database) make call to some RFC from ABAP to persist that data in some ABAP table.
    Let me know if it makes sense to you.
    Cheers
    Sudip

  • New session created with every request

    Hi there,
    I have an web application that we used to deploy on tomcat, websphere and bea without any trouble. We are trying to move to support OAS and the application gives this peculiar behavior:
    A new session is created with every single request by the client browser. I have searched these forums for the better part of today and read some interesting similar cases but none of the fixes seem to have any effect on my problem.
    Is there a different way I need to request the session object from the request in the app for OAS? Or is there a configuration that I should have? I am deploying the app as a .war file. Is there a better way to deploy on OAS, should I stick the war in a .ear?
    Any help on this would be most greatly appreciated!
    Thanks,
    -Adam

    I have a problem that matches with this subject line but its somewhat different. This original posting wants to create new session and invalidate the existing one but my problem is to keep the session invalide if it has expired for the browser.
    Anyways, here is my problem. I have JSP named entity_actions.jsp which has 3 pop-up links that opens up with code like:
    window.open('restaurantentry.do?entityName=restaurant')
    window.open('districtentry.do?entityName=district')
    window.open('baseentry.do?entityName=base')
    My web.xml has this tag:
    <session-config>
    <session-timeout>5</session-timeout>
    </session-config>
    And the way forward the response for each request is:
    context.getRequestDispatcher(urlString).forward(request, response);
    The code I check for session timeout is:
    private void checkForSessionTimeOut(HttpServletRequest request)
    throws SessionTimeoutException
    HttpSession current_session = request.getSession(false);
    logger.info(CLASS_OBJECT, "Session in checkForSessionTimeOut(): "+current_session);
    if (current_session == null)
    logger.error(CLASS_OBJECT, "SessionTimeOutException has thrown.");
    throw new SessionTimeoutException("sessionTimeOut");
    Now lets say I want to show the end user session expiry page after 5 mins of idle time. Now from entity_actions.jsp when I click/open any one popup first time after 5 mins of idle time/session expire,
    logger.info(CLASS_OBJECT, "Session in checkForSessionTimeOut(): "+current_session);
    this loggers shows current_session as 'null' and I can display session exp mesg on the popup page. But when I click/open any other popup or any other link on the page it DOES WORK instead of having current_session = null, it creates new one. And I can see the sessionid which is different than fist session created on the same base page/browser.
    The same pattern of code used to work on Tomcat and JRun before for showing consistant session expiry on all the clicks being made on the same browswer after session gets expire.
    Why OC4J / JDev 10.1.3 is creating new session on the same browser even after session has expired?
    How can I fix this?
    Thanks

  • How to invalidate a session based on the session id

    How to invalidate a session based on the session id

    You have to write your own support for this.
    It used to be in the API, but was deprecated as a security hole.
    The best way to do it is implement a session listener (javax.servlet.http.HttpSessionListener) which notifies you when sessions are created/destroyed.
    You can then keep a map of sessions in your own code, indexed by session Id, and access any/all of them to invalidate as you choose.

  • How to reprocess an interface with a RFC problem

    Hi.
    I have a simple scenario  File->RFC->FILE
    In the BPM that i use, i send some data vía RFC to a R3 Backend and retrieve it. FInally, i create a file with the result.
    The send step that sends the data to R3 backend has been defined with a transport confirmation.
    My problem is that the BPM has send the info to R3, has received the ACK and at this time, the R3 has crashed.
    Now R3 is back again and the Receive Step of the BPM is waiting for the answer. I've checked Sm58 in R3 Backend but no entries in it.
    How can i send once more the RFC now that R3 is ready?
    Thanks.
    Inigo.

    If so it is like of 2 scenarios. You need to have 2 receiver determinations
    1) Sender File to RFC in R/3
    2) R/3 to File
    But if you want to execute these 2 separate scenarios in sequence then the current design should have these BPM steps
    1) Receive File data
    2) Transofrmation step ( InputFile to RFC1)
    3) Send the RFC data
    4) Receive the RFC2 data
    5) Transformation Step (RFC2 to OutputFile)
    6) Send this to file
    You can avoid transformation steps inside the BPM. for this you need to do mapping outside the BPM
    Regards,
    Moorthy

  • How to get transacted session in direct mode with jmsra adapter

    Hi,
    I use MQ 4.4u1 release with GF in EMBEDDED mode. I configured several connection factories with NoTransaction/LocalTransaction/XATransaction support. In my app I get a connection factory from JNDI tree, create connection/session/producer and send several messages to queue. Everything works fine when I don't use transactions. But, when I want to send messages in one transaction, the connection always provided to me non-transacted session. The session created via
    Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
    request. I check the session transacted state and acknowledge mode right after i get it:
    log.fine("Session: " + session + "; transacted: " + session.getTransacted() + "; ackMode: " + session.getAcknowledgeMode());
    The log shows me that the session is not transacted and ackMode is 0 (DUPS_OK_ACKNOWLEDGE). If I try to commit the session after messages were sent I get the correct exception:
    javax.jms.IllegalStateException: MQJMSRA_DS4001: commit():Illegal for a non-transacted Session:sessionId=3361979872663370240
    Does anyone know how to get transactional session in direct mode?
    Thanks, Denis.

    I mentioned LOCAL because I misread your post and thought you were suggesting that LOCAL mode behaved differently.
    If you want to send messages in a transaction from within a Servlet then I think you're expected to use a UserTransaction: Here's an example that worked for me:
            Connection connection = outboundConnectionFactory.createConnection();
            Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
            userTransaction.begin();
            MessageProducer producer = session.createProducer(outboundQueue);
            int numberOfMessages = 10;
            for (int i = 0; i<numberOfMessages; i++) {
                Message message = session.createTextMessage("Hello world");
                producer.send(message);
            userTransaction.commit();
            connection.close();I obtained the UserTransaction with this resource declaration:
        @Resource(name = "java:comp/UserTransaction")
        private UserTransaction userTransaction;The EJB spec explicitly states that local transactions aren't supported in EJBs; I haven't found such an explicit statement for Servlets but suspect that JMSRA is taking the same approach.
    As for imq.jmsra.direct.disableCM property - this appears to disable connection pooling and from your post changes other behaviour as well. How did you find out about it (other than by examining the code)? As far as I can see this is not a documented feature and is not necessarily tested or supported.

  • How to understand the STAD relevant for RFC

    Hello performance experts.
    I have question about how to understand the STAD relevant for RFC.
    I want to know how to calculate the response time of action of "Push save buttion"
    which call function module by RFC.
    In our system, the screen is created using web dynpro and after push the button,
    function module for application will be called.
    When I push Save button, 2 STAD line is created.
    One is for function code " SAVE" and the other is for "RFC".
    Line for "SAVE" include RFC as client, and RFC line has RFC info as server (also client)
    I wonder how I should calculate the response time of action"Save" button in following case.
    Should I add the 2 response time?
    1) 5,867 ms +   5,797 m  is collect?
    2) 5,867 ms  include RFC time, so no need to sum the value and 5,867 ms is collect??
    3)  590 ms  +   5,797 ms is collect?
    4) Or other calculation is correct ?                                                   
    1) STAD for function code:    
    CPU time                     578 ms    
    RFC+CPIC time              5,280 ms                                                  
    Total time in workprocs      594 ms
    Response time            5,867 ms                                                                 
    Processing time              590 ms    
    Load time                      1 ms               
    Wait            5,273  ms
    Roll (in+wait) time        5,274 ms
    as Client
    Number    Connections                              1
               Destinations                             1
               Users                                    1
               Calls                                    2
    Time      Calling                              5,280   ms
               Remote execution                    10,527   ms
               Idle                                11,110   ms
    Data      Sent                               135,836   Bytes
               Received                               620   Bytes
    2) STAD for RFC
    CPU time                   1,406 ms
    RFC+CPIC time                  9 ms
    Total time in workprocs    5,080 ms
    Response time            5,797 ms
    Processing time            2,132 ms
    Load time                     50 ms
    Roll (in+wait) time          718 ms
    Database request time      2,882 ms
    Enqueue time                  16 ms
    Roll time
    Wait              717  ms
    as Client
    Number    Connections                              1
                      Destinations                             1
                         Users                                    1
                           Calls                                    4
    Time      Calling                                  9   ms
              Remote execution                         1   ms
              Idle                                     0   ms
    Data      Sent                                   686   Bytes
                 Received                             1,360   Bytes
    as Server
    Number    Connections                              1
              Destinations                             1
              Users                                    1
              Calls                                    2
    Time      Calling                              5,272   ms
              Remote execution                     5,269   ms
              Idle                                        11,118   ms
    Data      Sent                                   620   Bytes
              Received                           135,760   Bytes
    Thanks for your cooperation in advance.
    Keiichiro

    Hi Keiichiro,
    I wonder how I should calculate the response time of action"Save" button in following case.
    Should I add the 2 response time?
    1) 5,867 ms +   5,797 m  is collect?
    2) 5,867 ms  include RFC time, so no need to sum the value and 5,867 ms is collect??
    3)  590 ms  +   5,797 ms is collect?
    4) Or other calculation is correct ?
    It depends of what you mean with response time of action "Save" button.
    If you mean ALL time, the value is 5.867 because the local time from save was 594ms, the "external" RFC time was 5280ms.
    If you want separete analysis, the 594ms is your option since the 5280ms is in other part...
    Also, analysing the other part there's another other part which represents a good part of processing time:
    Database request time      2,882 ms
    Hope this help youl.
    Regards, Fernando Da Ró

  • How to make this function module as RFC to get data from different system?

    Hi
    I am trying to use following function module . This function module is used to copy data from one cube to another cube within same system however I need a this should happen across two different system. How can I use this function module to make it remote call to different system and do the same function what it is doing ?
    Name of function module -
    RSDRT_INFOCUBE_DATA_COPY
    Any help would be really helpful
    AG

    HI,
      let us say you want to copy the data of a cube in system A to a cube in system B .
      1) create a RFC function module in system B (in this function module  call the function module RSDRI_CUBE_WRITE_PACKAGE to update the data), this RFC function module should have same parametersa as RSDRI_CUBE_WRITE_PACKAGE .
    2) write a program in system A .. read the data from the infocube using the function module RSDRI_INFOPROV_READ and call the RFC function module in system B that you have created..
    for the details of the parameters to pass to these two function modules use the RSDRT_INFOCUBE_DATA_COPY and get the required code
    Thanks
    mahesh

Maybe you are looking for

  • Dynamic variable name

    Hi for all. I'm need create a object with "dynamic" name. For example Object ABCi = new ... where i is a indice. Please, help-me

  • Task created in onenote not syncing to iphone via outlook

    Hello, I am using OneNote for following the Getting Things Done book  by David Allen. I chose Onenote because it is more organized into notebooks, sections and pages and works well with Outlook. When I flag an item in OneNote and set a reminder for a

  • Redirect to "can't find the i-web page"/file name change

    i published a website thru mobileme (http://www.hale-o-lani-aloha.com). when i type my website address in e-mails and check the link, i sometimes got directed to a page that said "we're sorry but we can't find the i-web page you've requested..." (yes

  • N8 random theme changing bug?

    I've had my N8 for a couple of months now and on the whole it's pretty good. I've noticed that occasionally (and seemingly randomly) whatever theme I'm using gets changed to the default theme. I've not actually managed to watch it happen, so all I kn

  • Change background every N minutes broken?

    i'm running 10.5.3 on a 2.4GHz blackbook... i have my desktop background set to change every 5 minutes from a folder of about 375 pictures. it's changing the picture *at least* once a minute though, not 5 as i have set. i've updated the setting sever