cancel
Showing results for 
Search instead for 
Did you mean: 

Error : Invalid SFAPI session! when connecting to Successfactors

former_member184948
Active Participant
0 Kudos

Hi experts,

I am in a situation where I am getting this error : Invalid SFAPI session! when fetchiing data from SF.

I am running this interface for "Basic Employee Data", for which PI objects are come shipped and I used them in PI.

There are three com channels and SI interfaces  : 1 for login 2 for data transfer and 3 for logout, all make one interface.

Login channel runs and  creates a session id but its value is <sessionId>$Version=0;</sessionId>

I am not sure if $Version=0; is correct , what can I do???

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hi,

Were you able to figure out why was session ID being populated as $Version=0; ? We are encountering the same issue.

Regards,

Murtuza Kharodawala

former_member184948
Active Participant
0 Kudos

Yes Murtuza,

Sorry for late reply.

The problem was in the SAP XI content that we downloded from service market place is not proper.The UDF used in them is little incorrect or needs change.

The standard rule is the foramt of session id should be "JSESSIONID=actual session id ", and this is set in the cookie of the Axis soap adapter.

But the UDF was not giving this properly so we replaces the usf with out manual logic .

Simple concatenate contant "JSESSIONID= " with the session id you are receiving from Successfactor and send.

Still this may or may not work for you , because it depends of the scenario, some places UDFs are correct some places UDFs given by SAP is giving wrong output

Let me know for which report in HCM or whic interface of SF in PI you are getting this error.

Thanks.

former_member194481
Participant
0 Kudos

Hi Dilip,

From your post i understand that you are using the soap channel it seems, but you can use the SFSF adapter directly to connect the Sucessfactors.

Can u please put your issue clearly in the above case.

Thanks,

Vijay

former_member184948
Active Participant
0 Kudos

Hi Vijay,

My issue had been resolved and this reply I had posted to answer Murtuza's question.

As for why not using SFSF adapter.

SAP has given DT,MT ,MM ,OM, POS  all other objects for 3 interfaces.

Basic employee data , Recruiting data and Compensation data.So just by using POS we ca ncreate these scenarios and for using these ready made scenarios we have to use 2 axis soap adapters.Also corresponding abap code and proxy is also given by SAP.

If we are to use SFSF adapter we have to create all the PI objects by our selves and also the proxy at abap side.

Hope I answered your question.

Answers (3)

Answers (3)

0 Kudos

Hello Im having the same issue but the problem is when I use the BOOMI standard successfactors connector. When I try to retrieve the Odata catalog from the SF API.

So i believe that this is a SuccessFactors problem. If this is not the same issue and somebody can help me please I'll be forever greatfull!!

Former Member
0 Kudos

Hello,

I too have the same issue. Instead of the session ID I get $Version=0; . This never happened before. I was able to load Employee records earlier. Could this be a ssf certificate issue?

former_member184948
Active Participant
0 Kudos


Please share two screen shots:

1)Dynamic configuration of the reponse message of the failed message

2)Payload of the reponse of the failed message

Former Member
0 Kudos

Payload response

Former Member
0 Kudos

Hello Syed,

Could you please share you module configuration for login channel. Also have you modified any  standard UDF provided by SAP?

Regards,

Farhan

Former Member
0 Kudos

I have the same setup in Production server working fine.

Former Member
0 Kudos

Hi Syed,

I had the same issue then I approached SAP and they suggested to import all the latest  ".tpz" files from SAP market place and configure the communication channels as per the communication channel templates comes with the ".tpz" package. please see the the below screenshot for module configuration for login channel which is working fine for me.

I believe this is happening due changes from successfactors side, as SF data center sends two cookies now once you sends the login request, so please give a try by importing latest .tpz package and change the module configuration accordingly.

Regards,

Farhan

Former Member
0 Kudos

Should I get the latest Add-on 3.0 for the latest templates of the communication channels?

Former Member
0 Kudos

No, you just download and import the latest ESR content,Add-on 3.0 not required.

Former Member
0 Kudos

Is there any SAP note on this issue that I can refer to?

Former Member
0 Kudos

Hi Syed,

What is your PI versions with SP level? Below are the notes which you can try. However, if the below mentioned note did not solve your problem, try by importing all the latest ESR content (".tpz").

1869807 - SFSFI: PI Content Correction for HTTP Cookie Handling

1838921 - Multiple cookies in HTTP Header

2150199 - 'Invalid SFAPI Session' error message in SAP PI Interface for BizX to SAP HCM Integration

Regards,

Farhan

Former Member
0 Kudos

Hi Farhan, Syed Ali,

Could you please provide me some link or docs which explains end to end configuration steps from HCM to Web Dispatcher(Load Balancer) to HCI to SuccessFactor.

Alim

Muniyappan
Active Contributor
0 Kudos

HI Farhan,

i have changed soap channel to soap axis for login response.

i am not able to get the response. it is failing with below error.

Please suggest if you also faced this error.

Thanks

Muni.

Former Member
0 Kudos

Hi Farhan,

I have done the same. imported all latest ".tpz" files and maintained the same modules as mentioned in CC template in ESR and in your screenshot.

But I am getting same error. Tried with the manual mapping changes also as suggested by the note, but nothing is working.

Can you please help me here.

Gaurav Agarwal

Former Member
0 Kudos

Hi Dilip Mehra,

I am getting the same error  as "Invalid SFAPI session!" while running the employee data scenario in SAP HCM.

As you have suggested to change the standard UDF in message mapping, could  you please point me here the message mapping name and UDF name where we need to apply the above changes?

Any suggestion would be appreciated and will be a great help.

Thanks,

Farhan

former_member184948
Active Participant
0 Kudos


Hi Farhan,

You are working in dual stack or single stack??

What I used to do is :

1) Now remember the flow happens like this 1) Login 2)Actual transaction 3) Logoff.

>Login takes the creds from ECC and delivers it to SF , which creats a session id.

>This session id is stored in the cookie of the SOAP adapter using UDF in the format JSESSIONID=actual session id. {imp :  In some cases , UDF does not attach this "JSESSIONID=" or in some cases it attachs it twice }

> So go inside the message which is failing and go to the pipeline step after message mapping and see what is the format of session id in DynamicConfiguration.

It should be in correct format, if not then you will receive error.If format is not correct just concatenate the constant "JSESSIONID=" in UDF

There was one more reason why we were getting ths error after we resolved this issue.Problem was the system was doing mulitple logins but only one logoff.This was error from SF side and when they fixed it , everythig ran fine.

Please refer the attachment.Let me know if this resolved the issue.

As for the change in which mapping.that depends which one is failing and what session id is it receiving and what it is setting in its cookie.en I made change in the below one;

Former Member
0 Kudos

Hi Dilip,

Thanks a ton for the above comprehensive discretion. I am using dual stack, I followed your above instruction to to edit the message mapping(HCMupsertRequest_to_HCMupsertRequest) to concatenate "JSESSIONID=actual session id" in UDF. However, I just want to know how you are able to feed 3 inputs to UDF node as shown below.

is your node setHeader.. a UDF or something else?

In my case I am not able to feed 3 node input to standard UDF(setHTTPHeaderCookies), have you created new custom UDF, which can accept 3 node input? another thing there is already existing mapping(shown in green nodes) to sessionId using statndard UDF(setHTTPHeaderCookies).

shall we remove the existing standard UDF and node mapping for sessionId? in the below screen I am trying to feed 3 inputs to UDF node as you have done above, but was unsuccessful.

Please let me know what mistake I am doing here?

Thanks,

Farhan

former_member184948
Active Participant
0 Kudos

Hii,

Sorry for the confusion.

Actually I went in history to check what changes I eactly made(long time ago ) and then by mistake pasted the old version snap.

If you see the history of that mapping  you will see:

1st version Aug 2012, in which SAP used UDF :setHeaderParamter, which had 3 input paramters which I pasted.

2nd version Jun 2013 in which SAP used setHTTPHeaderCookie which is now also used, which accepts 1 paramter.

This mapping was incorrect and was sessionid->UDF->UpsertReq

3rd version I made in which i did following changes .Please make both the below changes.

one is for header and another is for field sessionid.try to understand the flow.

But then again first see your moni and see if Jsession= is missing only then add this.

Let me know if you need anymore details.

Former Member
0 Kudos

Hi Dilip,

After making the changes in UDF, session ID is coming with some extra character as well, which is not correct. Please see the below screenshot.

Please let me know if I am doing something wrong here, by seeing the above screen , why this extra characters are coming.

I really appreciate your efforts in helping me here

Thanks,

Farhan

former_member184948
Active Participant
0 Kudos

Sorry for delay in reply.

Hmm..I don't know why is this happening .Because if you have done the change correct then it should just add that constant .Also please note we are not modifying the UDF anytime,but  just input to the UDF.

I think you should raise an ticket to SAP for this.

Also, if possible send the correct you made, please? for both the main header and the field.

Also undo the change and see what  error you are getting and after change what you are getting in dynamic config.

Thanks