cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate X-CSRF-Token programmatically

Former Member
0 Kudos

Hi Experts,

I am creating a custom OData service to validate the user name and password using function module SUSR_CHECK_LOGON_DATA. Please let me know if there is any function module or class/method to generate the x-csrf-token and pass the same as part of a exporting fields.

also please let me know if I use a function module or class/method to get the x-csrf-token and generate one x-scrf-token, then will the sap generated x-csrf token and the FM/class-method x-csrf-token will be same?

Thanks,

Madhu M V

Accepted Solutions (0)

Answers (1)

Answers (1)

mike_reader3
Active Participant
0 Kudos

I don't think you can generate one programmatically, however, your GET request that you are using to check the credentials should return one for you to use.

Reference:

https://help.sap.com/saphelp_nw74/helpdata/en/b3/5c22518bc72214e10000000a44176d/content.htm