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 Dave Thornburgh on Dec 22 at 1:07 AM
Gkgoh -

Yes, we all (OK, really just I) assumed that was how you did it in VA02. Unfortunately, as you found out, the BAPI call does not process any of the screen handling logic of order entry, since the screens are never displayed.

You'll need to make the same authority-check in your Z program, if the user's desired value for MVGR1 does not match the value already in the database.

Of course, you might not want to make that check if the change to the order involves changing the material on an existing line, or if the change is adding a new line that didn't already exist.

Dave

---------------Original Message---------------
From: gk goh
Sent: Wednesday, December 21, 2011 1:06 AM
Subject: Authorization Checking in BAPI

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.

 
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
Dave Thornburgh  
SAP JOAT
16 achievements
 
Mark as helpful
View this online
Ask a new question
 
In the Spotlight
Have you explored the Toolbox.com Marketplace? Learn more and access a free course now.

_.____.__

0 comments:

Post a Comment

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