cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Context token is in the future

former_member704435
Discoverer
0 Likes
4,451

Dear Experts,

I need your help on this issue. When accessing product master page via WUI by clicking that link

This pop up screen will appear but it will keep loading and loading without showing any data.

After checking tcode /IWFND/ERROR_LOG, there is an error says:

Upon checking again, it is related to the parameter which is sap-context-token and it has value like a timestamp(date+time) and its value must not be in the future. This parameter will append automatically when calling product master page. I have checked these 2 SAP Notes:

2674234 - Context token '<tokenValue>' is in the future - SAPUI5
2711769 - Context token is in the future error

but didn't help much. However, There is an SAP Note:

2563934 - ICM caching has to be enabled on SAP Gateway OData $metadata calls

This note has important part which is

ICM Caching

For $metadata requests with a token certain checks are executed by the runtime. An URL parameter for the specific context token is available, called sap-context-token.

If this query parameter is appended the runtime will check if this token is a valid timestamp and is not sent again in the future. If those criteria are applicable, three HTTP request headers are set for the response and this leads to an Internet Communication Manager (ICM) caching which is valid for the next ten days:
  • cache-control => max-age=864000
  • sap-cache-control => +864000
  • sap-cache-agent => 0

Let's say, I want to use this approach, how to add those 3 HTTP request headers? Or Do we have any alternative way to resolve this issue? Maybe remove the sap-context-token as a parameter. Any help on this point will be much appreciate.

FYI, I work on S/4HANA FPS02 and it is S4CRM.

Thank you,

Kind Regards,

Romi

Accepted Solutions (0)

Answers (3)

Answers (3)

lucian_a_patrutu
Explorer

Hi there,

check also this note https://me.sap.com/notes/0003189255

If you run the report /UI5/UPD_ODATA_METADATA_CACHE with 0 it will reset all tokens.

regards,

Lucian

jungho_kim
Newcomer
0 Likes

Is it resolved?

I have the same symptoms, but if I give /UI5/UPD_ODATA_METADATA_CACHE to 0 and run it, it's temporarily resolved for about an hour.

I don't know how to handle it.

gregorw
SAP Mentor
SAP Mentor
0 Likes

Have you checked that the time on your application server but also on your client is correct?

former_member704435
Discoverer
0 Likes

I already checked the time on application server which is correct and my laptop as well. Based on the screenshot above that I highlighted using red bordered box, the error says 'Context token 20200924123617 is in the future' so the timestamp is 24.09.2020 12:36:17 but the server time at that line says 15:16:12 and I can ensure you, the server date is also 24.09.2020 (Because you cannot see the date in the screenshot), so the timestamp of context token is still under the server time.

I forgot to say this to you guys. Sometimes, I can access the product master page without any problem even the sap-context-token exists as a parameter and sometimes, the error occur because of the sap-context-token.

Anyway, thanks for your input Gregor