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

Masking a variant

Former Member
0 Likes
927

Hello,

I am trying to mask a password field saved as a variant.

I have been unable to find any post showing how to prevent a user from viewing the password stored within the variant.

Other posts suggest hiding the field. I tried that but it still appears in SM37 > "maintain variant" > "display".

Other posts refer to this type of coding, but it does not affect the variant.

parameters: p_user type sy-uname,
            p_passwd(10).
 
 
    at selection-screen output.
 
    loop at screen.
    if screen-name = 'P_PASSWD'.
    screen-invisible = 1.
    modify screen.
    endif.
    endloop.

Is there a way to mask the variant?

Thanks,

Matt

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
862

Why dont you use an RFC destination. That way the password is natively stored in the SecureStore? You cannot even see it from ABAP transactions and the call stack is protected.

If it is not an SAP system you are connecting to and https connections is not an option, you can also use the Secure Store and Forward or message signing / encryption?

Do these not cover you requirement?

Saving a pwd in a variant is a bit ugly... and SM37 etc are certainly not the only means to gain access to the pwd.

Cheers,

Julius

Hello,

I am trying to mask a password field saved as a variant.

I have been unable to find any post showing how to prevent a user from viewing the password stored within the variant.

Other posts suggest hiding the field. I tried that but it still appears in SM37 > "maintain variant" > "display".

Other posts refer to this type of coding, but it does not affect the variant.

parameters: p_user type sy-uname,
            p_passwd(10).
 
 
    at selection-screen output.
 
    loop at screen.
    if screen-name = 'P_PASSWD'.
    screen-invisible = 1.
    modify screen.
    endif.
    endloop.

Is there a way to mask the variant?

Thanks,

Matt

5 REPLIES 5
Read only

former_member189420
Active Participant
0 Likes
862

Hi,

As you have used sy-uname for the user name. Make use of system data element for password. It should work.

Let me know if you solved it.

Regards,

Anand Patil

Read only

Former Member
0 Likes
863

Why dont you use an RFC destination. That way the password is natively stored in the SecureStore? You cannot even see it from ABAP transactions and the call stack is protected.

If it is not an SAP system you are connecting to and https connections is not an option, you can also use the Secure Store and Forward or message signing / encryption?

Do these not cover you requirement?

Saving a pwd in a variant is a bit ugly... and SM37 etc are certainly not the only means to gain access to the pwd.

Cheers,

Julius

Read only

Former Member
0 Likes
862

That is a valid point, Julius. I will look into the options you described to replace my variant.

I'll update this post when I've tested those methods.

Thanks,

Matt

Read only

Former Member
0 Likes
862

This program has been widely used in our company and so this task has been assigned to another developer but it appears he is looking at using the SSF option to do this. I will update the final result when the developer has finished his task.

Thanks for the advice.

Matt

Read only

0 Likes
862

Yep, that sounds like a more secure option...

Note: The SSF* programs are also usefull demos to base your own coding on - if you are starting from scratch. Reading the documentation and SSF developer's guide helps as well.

Cheers,

Julius