Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

User validation for the BSP application

I wanted a user to access the bsp application.

I already have the user names maintained in the database who will be using the application.

i am using the application class for my application.

where should i do the user validation and how.

i know tst if i would had used the model class then i can do it in the request method of the model class.

but where to do it when using the application class.


Former Member
Former Member replied

Hi Din,

I assume that the usernames that are present in your Database also exists in the WAS Server.

i.e. The database has a part of users that are present in the WAS Server.

Your need is to allow only those users in the database to access your bsp application and not others correct!

If your first BSP Page is a ...


1.In the DO_INIT method of the Corresponding Controller Class populate the internal table that is present in the Application Class with the usernames that are present in the database.

2. In the DO_REQUEST method of the Corresponding Controller Class check for the username who runs your BSP Application is present in the Database.

You can get the username who run the bsp application using the system field...

data: username type string.
username = sy-uname.

So if the <i>username</i> is in the database show your bsp page else show an error page.

<b>You can directly check for the sy-uname is present in the database.</b>

<b>Page with Flow Logic</b>

It is same as MVC only thing is that method name changes...

Place the code in the DO_INIT of MVC in onCreate of Page with Flow logic.(Populate the internal table of the application class with the usernames from the database)

Place the code in the DO_REQUEST of MVC in onRequest of Page with Flow logic.(Check whether the sy-uname is present in the itab or directly in the database).

Hope it solves your problem



0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question