‎2007 Oct 10 1:20 PM
Hi Sap gurus,
Can someone tell me please how I can find suitable authority check object for purchasing? I created report for purchase orders history and now i would like to implement also authority check. I would like to check authorizations for purchasing groups, cost centers, orders types...
Do you have any example? Where to put this authority check into the program?
Thanks in advance, points granted,
BR
Saso
‎2007 Oct 10 1:31 PM
hi,
for purchasing grp object is: M_BEST_EKG
put authority check after selection screen
write
at selection-screen.
perform authority_check.
form authority_check
AUTHORITY-CHECK OBJECT 'M_BEST_EKG'
ID 'ACTVT' FIELD '03'
ID 'EKGRP' FIELD pr_ekgrp.
if sy-subrc <> 0.
error msg.
endif.
endform.
‎2007 Oct 10 1:25 PM
Hi Saso,
How about
M_BEST_EKG
M_BEST_EKO
M_BEST_WRK ?
Regards, Joerg
‎2007 Oct 10 1:28 PM
Hi
goto SU21 Tcode
and search for Purchasing Objects(authorization)
regards
Anji
‎2007 Oct 10 1:28 PM
Hi Saso,
You can list the authorisation objects, grouped by application area in transaction SU21.
Generally put the checks as early in the processing as possible, you don't want a report to run for five minutes, extracting data for the user to then be told they don't have authorisation to see it.
Regards,
Nick
‎2007 Oct 10 1:31 PM
hi,
for purchasing grp object is: M_BEST_EKG
put authority check after selection screen
write
at selection-screen.
perform authority_check.
form authority_check
AUTHORITY-CHECK OBJECT 'M_BEST_EKG'
ID 'ACTVT' FIELD '03'
ID 'EKGRP' FIELD pr_ekgrp.
if sy-subrc <> 0.
error msg.
endif.
endform.