Application Development 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: 

Authorization object creation problem for VA01

former_member187748
Active Contributor
0 Kudos

Hi All,

i wants to provide authorization in VA01 to restrict user based on userid and plant. And for this i have created fieldname,

data element, object and object class in transaction SU21 and SU20, but i am not getting how could i write my program

so that it will provide restrictions based  on user id, although i know that i have to use the ABAP authority check syntax.

AUTHORITY-CHECK OBJECT '<object>

If anyone has written his own authorization object based on userid, please tell me what code should i write.

My data which i have created in SU21 and SU20 are

Fieldname : ZPLANT.   Data element : WERKS_D,  Object class : ZSCP,  Object : Z_PLANT.

6 REPLIES 6

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

Please, see  SAP Note 105621 - Authorization check for the condition screen as a template. It is an older note to hide conditions in SO (in conditions screen).

I hope this helps you

Regards

Eduardo

arindam_m
Active Contributor
0 Kudos

Hi,

How about the user exit approach via MV45AFZZ. Should work.

Cheers,

Arindam

0 Kudos

Hi Arindam,

I am using MV45AFZZ and the exit is move_field_to_vbak but the problem is when i am putting condition to check plant

like

if vbap-werks eq 'some value'.

end if.

vbap-werks have no value.

I am not able to get the plant which is entered by user.

Please help me out.

Regards

Sanjeev

FredericGirod
Active Contributor
0 Kudos

Hi,

don't forget to create the link between your new object & the trans. VA01, into the trans SU24

regards

Fred

0 Kudos

Hi Frederic,

i just want to check the value of plant(given by user in va01), while debugging VA01

i didn't get the value of WERKS............

If i will get the value of WERKS then i will apply my object.......this time i am just suffering of not getting the value of plant which is entered by the user.

So please tell me , how to get plant which is entered by user and what is the variable?

0 Kudos

Hi,

plant is present in the transaction VA01, but at item level. (table VBAP)

regards

Fred