cancel
Showing results for 
Search instead for 
Did you mean: 

Keep alive a session in CRM

Former Member
0 Kudos

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 !

Accepted Solutions (1)

Accepted Solutions (1)

alexander_schuchman
Participant
0 Kudos

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.

Answers (1)

Answers (1)

Former Member
0 Kudos

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