cancel
Showing results for 
Search instead for 
Did you mean: 

"Invalid SFAPI session!" in HCM and Successfactors Integration

Former Member
0 Kudos

Dear All,

I am facing the error as "Invalid SFAPI session!" while running Employee data scenario program(RH_SFI_SYNCHRONIZE_EMPL_DATA) in HCM system.

As per my investigation the SF Session ID is not being retrieved from PI to back-end HCM system after the Pipeline step " XML validation Inbound Channel Response", instead its sending the below message.

<result>

  <sessionId>$Version=0;</sessionId>

  <msUntilPwdExpiration>2248719920</msUntilPwdExpiration>

  </result>

After searching this error on SCN I found the below discussion for the same error, where its been advised to modify the standard UDF, but its not been mentioned as which UDF and in which Message mapping exactly needs to modify.

Kindly advice, as its the standard content provided by SAP. Anyone has faced this issue, please let me know which UDF and message mapping needs to be corrected.

Thanks and regards,

Farhan Khan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Dear All,

I have found a SAP note and attached pdf guide in the note((Manual_changes_for_note_1869807) for the above issue, where some manual changes needs to apply in messages mapping, delete the existing UDF and write a new UDF as shown below.  

However, when I am trying to apply this manual changes, I am not able to make the UDF  accept multiple input as shown in the guide,

setHTTPHeaderCookies is the UDF which is taking input from fields( concat, constant[Cookie] and constant[http://sap.com/xi/System/HTTP]).


I have written the UDF as per the guide(Manual_changes_for_note_1869807) . However, I am not able to feed 3 inputs rather its accepting only one.


SAP Note link https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui_entry/entry.htm?param=69765F6D6F6465...


Could you please let me know how to make this UDF to accept 3 inputs?

Thanks,

Farhan

engswee
Active Contributor
0 Kudos

Farhan

Under Functions tab of the Mapping object, click the Add button at the Signature Variables

Rgds

Eng Swee

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Farhan,


I have written the UDF as per the guide(Manual_changes_for_note_1869807) . However, I am not able to feed 3 inputs rather its accepting only one.


SAP Note link https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui_entry/entry.htm?param=69765F6D6F6465...


Could you please let me know how to make this UDF to accept 3 inputs?

Well in the screenshot it shows three inputs indeed. But as you can see, the inputs for two and three are constants and when they get converted to a UDF with a single value return type, the inputs two and three disappear because they are already declared inside the UDF


Copy the following coding into the function and save it.

String namespace = "http://sap.com/xi/System/HTTP"; -> inside UDF

String dynConfKeyString = "Cookie";  -> inside UDF

In short, there is no need to make the UDF input to three

Regards,

Mark

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Thanks  a lot Mark, as usual, I got it after seeing the UDF, I was bit confused. could you please help me for the above issue related to SessionId, if you have any experience integration.

Regards,

Farhan

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Farhan,

I do not have SF content though, but you should be able to trace this by looking into integration directory - interface determination. Once you have see the operation mapping in ID, tracing the message mapping in ESR should be easy

Regards,

Mark

Former Member
0 Kudos

Hi Mark,

Thanks again, actually the issue is related to the sessionId  coming from SF(Successfactors) while sending login request to SF. Please see the below description.


I have opened the incident with SAP for this issue, and working with them to resolve this issue. Initially SAP suggested applying the note #1869807, but later they said that  this note is not applicable for you, so no manual correction or UDF modification is required, I removed all the manual modification as per note 1869807, imported the ESR content again. However, it didn't solve the issue.

So far with my investigation after sending the login request to SF , SF is sending back the  2 sessionId, and its visible in the DynamicConfiguration of the login response SOAP header as shown below.

<!--  Virus Scan Inbound Channel Response

  -->

- <SAP:DynamicConfiguration SOAP:mustUnderstand="1" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">

  <SAP:Record namespace="http://sap.com/xi/XI/System/HTTP" name="SetCookie">pm5.sf.eu=!OGCoceGl5w43EZzehJNTD7EYqYeaC8k3mttPaaMA54vlHty6qSoq604sF4/2BQUFeJDo1Zj/qbRM66o=; path=/; HttpOnly, JSESSIONID=ADCB56C7B093693E4A8D7DDC9F263E92.DC12BIZXSFAPI02; Path=/sfapi</SAP:Record>

</SAP:DynamicConfiguration>

However, when I am checking in the payload after "Response Message Mapping", its showing as follows. Thus its failing when its trying to send the employee info in userUpsertRequest_Out interface for  next subsequent call, as its not able to handle and carry forward the session IDs to SF to authenticate itself to SF.

<ns1:loginResponse xmlns:ns1="http://sap.com/xi/SFIHCM01">

- <result>

<sessionId>$Version=0;</sessionId>

<msUntilPwdExpiration>917341481</msUntilPwdExpiration>

  </result>

</ns1:loginResponse>

 

Please help me if anyone has faced and resolved this issue.


Thanks,

Farhan

Former Member
0 Kudos

Hi,

I had a same issue when I noticed mapping was not being called from ID and after associating the mapping issue got resolved for us...

so worth checking from ID whether the mapping is being called from ID

HTH

Rajesh

Former Member
0 Kudos

Hi Rajesh and Mark,

I have tested  ID->Interface Determination , and tested all 3 Interface determination(LogingRequest, LogoutRequest and UpsertRequest). Mapping is being called in all 3 Interface determination. However, still I am facing the issue with session handling when UpsertRequest is being called. Please see the below description.


After sending the login request to SF , SF is sending back the  2 sessionId, and its visible in the DynamicConfiguration of the login response SOAP header as shown below.

<!--  Virus Scan Inbound Channel Response

  -->

- <SAP:DynamicConfiguration SOAP:mustUnderstand="1" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">

  <SAP:Record namespace="http://sap.com/xi/XI/System/HTTP" name="SetCookie">pm5.sf.eu=!OGCoceGl5w43EZzehJNTD7EYqYeaC8k3mttPaaMA54vlHty6qSoq604sF4/2BQUFeJDo1Zj/qbRM66o=; path=/; HttpOnly, JSESSIONID=ADCB56C7B093693E4A8D7DDC9F263E92.DC12BIZXSFAPI02; Path=/sfapi</SAP:Record>

</SAP:DynamicConfiguration>

However, when I am checking in the payload after "Response Message Mapping", its showing as follows. Thus its failing when its trying to send the employee info in userUpsertRequest_Out interface for  next subsequent call, as its not able to handle and carry forward the session IDs to SF to authenticate itself to SF.

<ns1:loginResponse xmlns:ns1="http://sap.com/xi/SFIHCM01">

- <result>

<sessionId>$Version=0;</sessionId>

<msUntilPwdExpiration>917341481</msUntilPwdExpiration>

  </result>

</ns1:loginResponse>


Thanks,

Farhan

Former Member
0 Kudos

Hi Rajesh and Mark,

I have tested  ID->Interface Determination , and tested all 3 Interface determination(LogingRequest, LogoutRequest and UpsertRequest). Mapping is being called in all 3 Interface determination. However, still I am facing the issue with session handling when UpsertRequest is being called, please see the below screen-shot.


Thanks,

Farhan

Former Member
0 Kudos

Dear All,

This issue has been resolved with the help of SAP. there was a bug in Login module communication channel for the below module parameter.

dcres  key.a  read http://sap.com/xi/System/HTTP SetCookie

dcres2  key.a  read http://sap.com/xi/System/HTTP SetCookie2

there was an extra XI after xi.

Thank you every one for your help.

Thanks,

Farhan

Former Member
0 Kudos

Hi Farhan,

I have exactly the same issue here, but I checked the module configuration for the login channel based on the note 1869807 (manual steps pdf...), and it looks fine. One weird thing is that, after importing the two TPZ files described on that note, I didn't had to modify the mapping as described there, as all of them were already following the final format described there on the PDF, like for the HCMupsertRequest_to_HCMupsertRequest (root node) below:

sessionId >> setHTTPHeaderCookies >> ns0:upsertRequest

Could you please send me a screenshot of both your channel modules, so I can double check with mine here?

Thanks a lot,

Regards,

Douglas

Former Member
0 Kudos

Hi Doughlas,

Unfortunately, I don't have those channel screenshot with me, as I am not working on that project. However, I will guide you how to fix this issue in the below steps.

  1. First of all you don't need any manual correction as mentioned in the  SAP note 1869807, as its not applicable anymore if you have imported all the TPZ files from SAP market place.
  2. Please download all TPZ(SF ESR content ) files from SAP market place, and import it again in your PI system.
  3. After importing these ESR content you will see the two "Communication channel templates" one for login , and one for upsert in ESR, once you will expand the namespaces.
  4. Just utilize these CC template in your ID, and configure other ID configuration part(Receiver determination, Interface determination and Receiver agreement).
  5. Hopefully this should fix this issues.

Thanks,

Farhan

Former Member
0 Kudos

Hi Farhan. Thanks.

In our case, after a recent upgrade from 7.31 (AS Java) SP08 to 7.31 SP16, something contained in the note 2174163 (included in that SP) has caused the issue. Our configuration was correct (even because it was working in the way it was for more than a year without any changes...).

According to SAP: "The issue is a side effect from the SAP Note 2174163", even though we're not using the 'context' entry discussed in that note.

SAP has provided us a fixed SDA file (com.sap.aii.af.axis.lib.sda) as a temporary fix, which has resolved the problem, and according to them they're working on a permanent fix that will be available soon.

Thanks a lot for your help. Just leaving it here to help others with the same issue.

Doug

Former Member
0 Kudos

According to SAP, this is the fix for our case: "SAP Note 2233772 - Axis XI30DynamicConfigurationHandler does not handle composite values correctly".

Just as a reminder, in our case everything was working for more than one year without any recent channel adjusment, so it wasn't because of any channel configuration change.

As I mentioned before, we recently applied the SP16 to our PI 7.31 Java SP08, and one of the notes contained in that SP (2174163) had a side effect, fixed by the recent 2233772 above.

Regards,

Douglas

Answers (2)

Answers (2)

manikandan_shanmugam3
Active Participant
0 Kudos

Hi Farhan,

Can you please share the ID configuration screenshot with module as i m facing same issue.

Regards,

Mani

manikandan_shanmugam3
Active Participant
0 Kudos

Hi,

Can you please let me know ID configuration as I am facing same issue.

I am using ico with one soap axis receiver channel.

Please help me to solve this issue.

Regards,

Mani

Former Member
0 Kudos

Hi Mani,

Please check my last update above. SAP recently came up with a note to fix.

For the channel parameters you need, please check the note 1869807 and its attachment ("Manual_changes_for_note_1869807.pdf"). You'll find the channel configuration there.

Regards,

Doug