Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

password validation

Former Member
0 Likes
1,217

hi all,

i have the following requirement regarding password given by the user .

i have to check the following things on the password entered by user at the time of registeration and also while resetting the password , this is a ecommerce scenario and i will get that password in abap throgh a bapi

1.the password should contains alpha numeric characters

2.password length should be greater than 6.

Is there any std function module on ABAP to achieve this or is there any configuration setting to achieve this

please help me..

Thanks and Regards

shanto aloor

3 REPLIES 3
Read only

Former Member
0 Likes
623

use the below FM's ..

BAPI_EMPLOYEE_CHANGEPASSWORD

BAPI_EMPLOYEE_CHECKPASSWORD

Read only

0 Likes
623

hi srini,

we are using CRM6.0 and this FM's are not available.

i will explain once again my requirement.

user will enter a password in webshop and the java people will send the information to bapi inside that bapi i have to check whether the password string contains a combination of characters,special characters and numbers.

please suggest a suitable solution for this in abap coding.

Thanks and Regards

shanto aloor

Read only

dev_parbutteea
Active Contributor
0 Likes
623

Hi,

You can try the following:

data: password1 TYPE c LENGTH 10 VALUE 'gfertw1',

password2 TYPE c LENGTH 10 VALUE 'G001',

password3 TYPE c LENGTH 10 VALUE 'gfer=w1',

lv_char TYPE c LENGTH 37,

lv_len TYPE n.

CONCATENATE sy-abcde '0123456789' INTO lv_char SEPARATED BY ' '.

TRANSLATE password1 TO UPPER CASE.

CONDENSE password2.

if password1 CO lv_char .

write:/ 'success1'.

else.

write:/ 'error1'.

endif.

if password2 CO lv_char.

write:/ 'success2'.

else.

write:/ 'error2'.

endif.

if password3 CO lv_char.

write:/ 'success3'.

else.

write:/ 'error3'.

endif.

2.password length should be greater than 6.

lv_len = strlen( password1 ).

if lv_len <= 6.

"error

endif.

Regards