Hello welcome again
Hope you have gone through the below link to know about
Now, let us look at the process of creating a Web Dynpro ABAP application for handling authorization checks
Go to t-code SE80 and create WDA component as below
Provide the assistance class name as shown below
Create a view V_TEACHER for teacher's login and create the page header as shown below
Create an inbound plug for navigation as below
Similarly, create a view V_STUDENT for student's login and create the page header as shown below
Create an inbound plug for navation as below
Create a view V_ADMIN for administrator's roles and create the page header as below
Create a tabstrip with 2 tabs ( i.e. 1 for Teacher's data, 2: for Student's data ) as shown below
Create view containers inside each tab to embed the views V_TEACHER & V_STUDENT as below
Create an inbound plug for navigation as below
Open view V_MAIN and create OUTbound plugs as shown below
Add the below code in WDDOINIT( ) method of view V_MAIN
WDDOINIT( ) |
---|
" Data declarations CLEAR: ls_result. "============================= "============================== "Check user role "============================== WHEN wd_assist->gc_role_admin.
WHEN wd_assist->gc_role_teacher.
WHEN wd_assist->gc_role_student.
CALL METHOD lo_api_controller->get_message_manager lv_message =
" Show empty view ENDCASE. |
Go to window W_MAIN and embed the views using drag & drop technique as shown below
Now, the view have been embedded into window as shown below
Embed the views V_TEACHER & V_STUDENT inside the view containers of tabstrip of admin view by using drag & drop technique as shown below
Now, the views are embedded successfully inside the view containers of admin view as below
Create the navigation links by using technique drag & drop of outbound plugs onto inbound plugs as shown below
Now, the navigation links are created as below
Create an outbound plug TO_EMPTY_VIEW in window as below
We need to embed an empty view, to show blank screen if user is not authorized.
Right click on window W_MAIN and choose "Embed Empty View" as shown below
Now, empty view has been embedded successfully as below
Crete navigation link from empty view inbound plug "SHOWEMPTYVIEW" to outbound plug "TO_EMPTY_VIEW" as below
Admin can see both teacher's data adn students data
Hope this document is helpful for those looking for handling custom authorization check in Webdynpro ABAP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
9 | |
7 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |