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

Security for CREATE_TEXT

Former Member
0 Likes
490

Hello, I'm using the function Create_text to update text on the delivery header.  I have an interactive ALV that allows the user to select a button to add a certain text.  The text is updating even with users that do not have security to VL02n.  How do I verify the user has VL02N before I allow them to change header text?

Thanks

Jayden

1 ACCEPTED SOLUTION
Read only

former_member188827
Active Contributor
0 Likes
447

Use authority-check statement to first check if user has authorization for VL02n before calling "CREATE_TEXT" function in code. Do as follows:

AUTHORITY-CHECK OBJECT 'S_TCODE'

          ID 'TCD' FIELD 'VL02N'.

if sy-subrc = 0.

   *call the create_text fm here.

ENDIF.

Regards

2 REPLIES 2
Read only

former_member188827
Active Contributor
0 Likes
448

Use authority-check statement to first check if user has authorization for VL02n before calling "CREATE_TEXT" function in code. Do as follows:

AUTHORITY-CHECK OBJECT 'S_TCODE'

          ID 'TCD' FIELD 'VL02N'.

if sy-subrc = 0.

   *call the create_text fm here.

ENDIF.

Regards

Read only

0 Likes
447

Thanks.  So I guess that I'll need to add Auth Checks any time I use create_text or save_text