‎2010 Jun 08 9:02 AM
Dear gurus
im having a problem in if statement
problem is that we have SAP ID on which we do multiple logins. i have made an application
and written below code in that application.
IF user-bname EQ 'MLABTPFL'.
IF p_name EQ 'AK' AND p_pass EQ 'AKLAB1'. "Dont want to use hard coded.
IF user-costcenter EQ '0009100001' OR
user-costcenter EQ '0002820106'.
user-costcenter = '0000000000' .
ENDIF.
ELSEIF p_name EQ 'MA' AND p_pass EQ 'MALAB2'.
IF user-costcenter EQ '0009100001' OR
user-costcenter EQ '0001820106'.
user-costcenter = '0000000000' .
ENDIF.
ENDIF.
ENDIF.in this code i have to do the hard coding of userid and password .
i dont want to hard coded the checks. how can it be resolved.
Regards
Saad Nisar
‎2010 Jun 08 9:16 AM
Hi
1) In SE11 => Create a Z-table with fields USERID,PASSWORD, any other fields needed; and maintain the user id's and passwords in that table
2) In program : read Z-table in to LW_usertable and do IF checks on the structure.
Regards
Deepa
‎2010 Jun 08 9:16 AM
Hi
1) In SE11 => Create a Z-table with fields USERID,PASSWORD, any other fields needed; and maintain the user id's and passwords in that table
2) In program : read Z-table in to LW_usertable and do IF checks on the structure.
Regards
Deepa
‎2010 Jun 08 9:24 AM
Use transaction STVARV and maintain the costcenters there based on name (p_name). Then select the values of costcenters from table TVARV based on the value in p_name.