Pooja
Pooja

Reputation: 11

OData service password validation in ABAP

How do I validate password using function module which is stored in Z*** table against the sy-uname in ABAP?

I am using function module to create OData service for Fiori app where in the moment user hits on enter button it should display successful else unsuccessful based on sy-uname?

Upvotes: 1

Views: 576

Answers (1)

Suncatcher
Suncatcher

Reputation: 10621

First,

you never ever shouldn't store passwords for your application in plain text.

It is so obvious that never should be mentioned, but nevertheless. Only hash functions from your passwords should be stored.

Second, following function module should be used for generating hash and validation against it:

CALL FUNCTION 'MD5_CALCULATE_HASH_FOR_CHAR'
 EXPORTING
   DATA                 = LV_PASSWORD
 IMPORTING
   HASH                 = STRU-PASSHS.

Also, you can check SECH function group and modules contained there, but consider that some of them are deprecated.

Upvotes: 1

Related Questions