2012 Feb 21 10:33 AM
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
2012 Feb 21 10:39 AM
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.
2012 Feb 21 2:24 PM
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
2012 Feb 21 11:33 AM
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
2012 Feb 21 3:02 PM
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
2012 Feb 21 3:21 PM
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
2012 Feb 21 3:27 PM
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
2012 Feb 22 8:32 AM
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
2012 Feb 22 10:51 AM
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
2012 Feb 22 12:07 PM
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
2012 Feb 22 1:08 PM
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
2012 Feb 22 1:51 PM
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
2012 Feb 22 4:17 PM
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
2012 Feb 23 8:05 AM
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
2012 Feb 23 2:24 PM
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
2012 Feb 23 2:33 PM
Hi
Great. Kindly close the thread and mark it answered and reward points to helpful posts.
Regards
Vijay V
2012 Feb 23 2:54 PM
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |