cancel
Showing results for 
Search instead for 
Did you mean: 

Authority check on-load of page.

Former Member
0 Kudos

Hi

I need an authorization on the load of my webdynpro screen.

If the user do not have the right authorization, I want the user to be navigated to a blank page, only with a message "you don't have authorization to see this page".

My problem is, that I can't get it function. It can show the same page, as if you have the right authorization, but with an error mesaage - that you don't have the right authorization.

But as described; I want a blank page, only with a message.

My WebDynpro has:

MAIN view and

NO_AUTHORITY view.

MAIN view has an outbound plug "O_MAIN_EXIT" and paramter TEXT type STRING.

NO_AUTHORITY view has an inbound plug "I_ERROR_EXIT".

There is only one Window, called YY_CPIT_WIN.

Here I have embedded the inbound plug and the outbound plug.

The Window-Struktur looks like this:

MAIN

O_MAIN_EXIT (outbound plug)

I_ERROR_EXIT (Navigation Link)

NO_AUTHORITY

I_ERROR_EXIT (inbound plug)

DEFAULT

I_COCKPIT_EXIT

O_COCKPIT_EXIT

The authority check is placed here:

Method WDDOBEFOREACTION of the MAIN view, and I have also tried to copy the authority check into the method WDDOMODIFYVIEW (MAIN view).

Any ideas?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

Instead of putting the authority check in WDDOBEFOREACTION, keep it in WDDOINIT of MAIN view and if the authority check fails fire the plug to NO_AUTHORITY view.

BTW you didnt put the code snippet which you are using to do the authorization check. If you still face the problem, please post the code also.

Hope this helps!

Regards,

Srilatha M

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Have you considered placing the authorization object into the SICF node of the WD Application (via transaction SICF) instead. This way the system performs the check for you before the WD framework even has to startup.

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/78/9852b7c06b11d4ad310000e83539c3/frameset.htm

Former Member
0 Kudos

Can I use any authorization object, or is it only S_ICF

We would use this authority object:

AUTHORITY-CHECK OBJECT 'ZWDPIT'

ID 'Z_YES1' FIELD 'X'.

Thanks,

Former Member
0 Kudos

yes you can use any authorisation object

Thanks

Bala Duvvuri