Skip to Content
author's profile photo Former Member
Former Member

Keep alive a session in CRM

Dear CRM folks -

I am calling CRM using BAPIs. The BAPIs are published as Web Services.

I would like that the session between 2 BAPI calls is maintained in an optimized way so I don't make specific calls to the DB to store my session info.

Anyone knows a way of keeping alive a session in the CRM between 2 BAPI calls?

Thanks !

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 29, 2007 at 07:08 PM

    BAPIs are just basically function modules. Two function modules which are in the same function group are able to share information while the session is open.

    If your two BAPIs are not in the same function group(you didn't mention the names or I could have checked) then you can create a wrapper function module which has it's own variables to store the information. Unfortunately once the RFC session/ICM Web Session is closed then you'll lose that in-memory information.

    I assume that you're making the two BAPI calls at different times which is why you're having this problem. Like one to get user information and then one more to get some other detailed info once the user inputs something.

    Without knowing much about what you are really trying to do, my quick idea is to create a Stateful BSP in CRM which accepts all your requests. The BSP can simply call the BAPIs(eliminate the need for the web service - unless you have some reason you need it) and then between the first and second BAPI call, the BSP will keep the state of the BAPI results in-memory.

    If you give more info, might be easier to answer your question.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 09:32 AM

    I finally found the solution using RFC calls to the BAPIS. These calls can maintain session. Obviously, using webservices is not an option.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.