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

Authorization - SE93

antonio_bruno
Participant
0 Likes
3,274

Hi,

I've created a custom transaction (referred to a query) to extract the standard price (MBEW).

I have the problem that users who can not see the standard price of particular plant (correct in relation to the authorization), however, if executed the transaction can show the standard price of all valuation areas.

How can i set the SE93 to align the authorization of the transaction with the authorization of the user?

Thanks.

Best regards.

Antonio

Hi,

I've created a custom transaction (referred to a query) to extract the standard price (MBEW).

I have the problem that users who can not see the standard price of particular plant (correct in relation to the authorization), however, if executed the transaction can show the standard price of all valuation areas.

How can i set the SE93 to align the authorization of the transaction with the authorization of the user?

Thanks.

Best regards.

Antonio

16 REPLIES 16
Read only

praveen_reddy2
Active Participant
0 Likes
2,701

Hi,

Maintain a Authorizarion Group for this tranasction.

In your program you have to call the authority object.( which is assigned in in Tcode )

To check the user has a authoorization or not.

Regards,

PraVeen.

Read only

0 Likes
2,701

Hi,

which object should I use in the field Authorization object? is M_MATE_MZP ok? My transaction is related to MBEW-BWKEY and not to WERKS.

Thanks.

Best regards.

Antonio

Read only

Former Member
0 Likes
2,701

Hi,

Please check this link.

<removed by moderator>

Moderator message: please don't post just link(s) without explaining the relevance.

Edited by: Thomas Zloch on Feb 21, 2012

Read only

vijaymanikandan
Contributor
0 Likes
2,701

Hi

You can create an authorisation object called as ZPRICE and inside that you can have 3 fields TCODE, WERKS and ACTVT.

Then you can create a role including this authorisation obejct.

Regards,

Vijay V

Read only

0 Likes
2,701

Hi,

i've add M_MATE_MZP (fields WERKS and ACTVT) to SE93, but didn't work. My doubt is that my query is based on BWKEY not on WERKS.

Maybe, should i use BWKEY instead WERKS?

Thanks.

Best regards.

Antonio

Read only

0 Likes
2,701

Hi

Kindly use BWKEY since its is Valuation area. Most cases valuation key and plant will be the same. Make sure that the user who is using the transaction has these values assigned.

Regards

Vijay V

Read only

0 Likes
2,701

Hi,

i've tried both the solutions, but without results.

It seems that the authorization didn't work at the query level (if i click F1, BWKEY is associated with the table /1BCDWB/IQ000000000137).

So, i've tried with:

- SE93: Authorization object: M_MATE_MZP

- SQ02: Code the Authority-check in section 6 - END-OF-SELECTION:

AUTHORITY-CHECK OBJECT 'M_MATE_MZP'

ID 'ACTVT' FIELD '03'

ID 'WERKS' FIELD MBEW-BWKEY.

if sy-subrc = 0.

MESSAGE 'Insufficient Authorization.Some data is truncated.' TYPE 'I'.

endif.

Thanks.

Antonio

Read only

0 Likes
2,701

Hi

Can you explain the entire process that you are doing? If it is question that you have created a new transaction for a ABAP query then its straight forward. Have you tried to run a SU53 after you get the failure or run a ST01 authorisation trace for the entire process.

Regards,

Vijay V

Read only

0 Likes
2,701

Hi,

the process that i have done is:

- create an infoset (with the code related to the authorization object) and a query.

- create a transaction linked to the query and to the authorization object.

- update the role in relation to the specific Valuation Area.

But when i execute the Z transaction the specific user can see the datas of all the valuation areas.

Thanks.

Antonio

Read only

0 Likes
2,701

Hi Antonio,

OK. Then the problem is in the data that is being selected and displayed.

You have to check the code in the Infoset that you are writing. If your user belongs to plant X and on the selection screen you give an input as plant for Y do you see all that belongs to Y for which he is not authorised to see?

What are the tables that you have linked in your infoset?

BR

Vijay V

Read only

0 Likes
2,701

Hi Vijay,

in the infoset i've linked the VBRP with the MBEW by MATNR (left outer join).

Exactly. I want that the user belongs to plant X can see only the records of the MBEW related to the Valuation Area (MBEW-BWKEY) X, regardless of the valuation area inserted in the selection value of the report.

I've tried to work directly on the field BWKEY, so i've used the authorization object ZPRICE. I've modified the SE93, PFCG and the SQ02 with the following code:

AUTHORITY-CHECK OBJECT 'ZPRICE'

ID 'ACTVT' FIELD '03'

ID 'BWKEY' FIELD MBEW-BWKEY.

if sy-subrc = 0.

MESSAGE 'Insufficient Authorization.Some data is truncated.' TYPE 'I'.

endif.

But with the same results.

Thanks and regards.

Antonio

Read only

0 Likes
2,701

HI

In which event have you written this code?

I think you can write the code in Code section AT SELECTION SCREEN in the infotype. In this code section you can check the authorisation and then delete the other valuation keys which are not belonging to the user's valuation area.

Hope this will help.

Regards

Vijay V

Read only

0 Likes
2,701

Hi Vijay,

SAP didn't allow me to insert the following code in the section 9 - AT SELECTION-SCREEN.

AUTHORITY-CHECK OBJECT 'ZPRICE'

ID 'ACTVT' FIELD '03'

ID 'BWKEY' FIELD MBEW-BWKEY.

if sy-subrc = 0.

MESSAGE 'Insufficient Authorization.Some data is truncated.' TYPE 'I'.

endif.

So i've tried to insert the code in the section 13 - AT SELECTION-SCREEN OUTPUT, but the results is the same the

Best regards.

Antonio

Read only

0 Likes
2,701

Hi Vijay,

i've modified the following code:

AUTHORITY-CHECK OBJECT 'ZPRICE'

ID 'ACTVT' FIELD '03'

ID 'BWKEY' FIELD MBEW-BWKEY.

if sy-subrc <> 0.

MESSAGE 'Insufficient Authorization.' TYPE 'E'.

endif.

and inserted it in the section 5.

Now the trasaction works properly.

Thanks.

Antonio

Read only

0 Likes
2,701

Hi

Great. Kindly close the thread and mark it answered and reward points to helpful posts.

Regards

Vijay V

Read only

0 Likes
2,701

Closed.

Regards.

Antonio