We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

RE:[sap-abap] Authorization Checking in BAPI

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Reply from gkgoh on Dec 21 at 1:05 AM
Hi Dave, thanks for your guidance.

Yes, I added the authorization checking in 'USEREXIT_FIELD_MODIFICATION' in MV45AFZZ but it won't work in BAPI call. Below is my codes :-

WHEN 'VBAP-MVGR1'.
* Proceed further if user is changing the SO
IF sy-tcode = 'VA02'.
* Verify if the user has authorization to change 'MVGR1 - Material group 1' field
AUTHORITY-CHECK OBJECT 'Z_MVGR1'
ID 'ACTVT' FIELD '02' "Change access
ID 'ZMVGR1' DUMMY.
* If the user has authorization, open the field for editing
IF sy-subrc = 0.
screen-input = '1'.
* If the user does not have authorization, grey off the field and disallow for editing
ELSE.
screen-input = '0'.
ENDIF.
MODIFY SCREEN.
ENDIF.

---------------Original Message---------------
From: gk goh
Sent: Tuesday, December 20, 2011 11:04 PM
Subject: Authorization Checking in BAPI

Hi,

I put in authorization checking for the 'Material group 1' field of a SD document. With this, only authorized users are allowed to change this field while other users without the authorization will not be allowed to change it. When i tested the authorization in VA02, it works fine. I was able to change it as i has been assigned with the required role/profile. On ther other hand, the other user without the role/profile was not able to change the field using VA02. I did another test using a Z program that calls 'BAPI_SALESORDER_CHANGE'. The Z program will change the 'Material group 1' field using 'BAPI_SALESORDER_CHANGE'. My initial thought was me with the required role/profile when running the Z program, will be able to change the field while the other user without the required role/profile will not be able to change it when running the Z program. However, the result shows that both users (with/without the role/profile) was also able to change the field using the Z program. Is there anyway to control the BAPI so that it works the same as in VA02? Thanks much for your advice.

 
Reply to this email to post your response.
 
__.____._
Manage Settings | Unsubscribe | Create FAQ | Send Feedback
  
Copyright © 2011 Toolbox.com and message author.
Toolbox.com 4343 N. Scottsdale Road Suite 280, Scottsdale, AZ 85251
gkgoh  
 
Mark as helpful
View this online
Ask a new question
 
In the Spotlight
SAP BusinessObjects: Dashboards and Analytics. Learn more about this Toobox.com Marketplace online course.

_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language