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

reg: authorisation for radiobutton on custom modulepool screen

Former Member
0 Likes
1,089

hello everyone,

I have a request to develop a custom modulepool program, in which it contains 4 screens.

on the first screen i have only 3 radiobuttons

ex.

       1. rad1

       2. rad2

       3. rad3  ( 3 radiobuttons on screen 100)

whenever i select any of those radiobuttons and press enter the corresponding screen will be displayed(200,300,400), here my requirement is

when user selects any of the above radio buttons , i have to check weather the  user has authorisation for the corresponding screen to be displayed.

how can i check the authorisation for radiobuttons on custom screen

i have searched for solutions but i couldnot find it.

anybody pls help me.

Regards

Mahesh.P

Moderator message : Requirement dumping not allowed, search for available information.  Discussion locked.

Message was edited by: Vinod Kumar

hello everyone,

I have a request to develop a custom modulepool program, in which it contains 4 screens.

on the first screen i have only 3 radiobuttons

ex.

       1. rad1

       2. rad2

       3. rad3  ( 3 radiobuttons on screen 100)

whenever i select any of those radiobuttons and press enter the corresponding screen will be displayed(200,300,400), here my requirement is

when user selects any of the above radio buttons , i have to check weather the  user has authorisation for the corresponding screen to be displayed.

how can i check the authorisation for radiobuttons on custom screen

i have searched for solutions but i couldnot find it.

anybody pls help me.

Regards

Mahesh.P

Moderator message : Requirement dumping not allowed, search for available information.  Discussion locked.

Message was edited by: Vinod Kumar

4 REPLIES 4
Read only

Former Member
0 Likes
842

Hi Mahesh.

You could look at using your Radio buttons with user command.

Then do an IF check and within that place your Auth check.

Regards

Vic

Read only

Former Member
0 Likes
842

Hi Mahesh,

          For this you need to create an authorization object and you have to check for authorizations for the current user in event "INITIALIZATION" .

1. To work with an authorization object see the link..  http://www.google.co.in/url?sa=t&rct=j&q=create%20authorization%20object%20in%20sap&source=web&cd=1&...

Read only

Venkat_Sesha
Product and Topic Expert
Product and Topic Expert
0 Likes
842

Please check the below code.

Selection-Screen : Begin Of Block B1 with Frame Title Text-001.
 
Parameters     : P_RB1   Radiobutton Group RG1 User-Command SEL
                                                 
Default 'X'
                                                  Modif
ID B1,
                 P_RB2
Radiobutton Group RG1 Modif ID B1,
                 P_RB3
Radiobutton Group RG1 Modif ID B1.
Selection-
Screen : End Of Block B1.

Now in the Event At Selection-Screen output you can write the code for modifying the screen options and also you can check the Authorization before doing any modification.

For example it is done as follows.

Loop At Screen.
  
If P_RB1 <> ' ' and
      P_RB2
Is Initial and
      P_RB3
Is Initial.

       If Screen-group1 = 'B1'.
     
Screen-group1 = 'B1'.
     
Screen-active = 0.

*-----------Check Auth here----

*If Success then only MODIFY
     
Modify SCREEN.    

*Else.

*   CONTINUE

* Endif
   
Elseif Screen-group1 = 'B2'.
     
Screen-group1 = 'B2'.
     
Screen-active = 0.
     
Modify SCREEN.
   
Endif.

   EndIf.

EndLoop.

Hope this helps.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
842

You could either execute the AUTHORITY-CHECK statement

  • in PAI in the user-command module,  if allowed call new screen else send an error message (assign a USER-COMMAND to the first button of the group)
  • in PBO after assigning different MODIF ID to each button in a LOOP AT SCREEN disable SCREEN-INPUT if not allowed

What did you try ?

Regards,

Raymond