Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
moazzam_ali
Active Contributor

Hi

I am going to explain that how we can implement authorization or any other check on SD documents display transactions.

Business Requirement

You get a requirement to put some authorization check on SD documents display/change transactions based on some field which is not available in standard authorization objects. How would you do that?

Solutions that come to your mind

First thing you get in your mind is to use some userexit for this but that is not gonna help you in display transactions. You can't do that using SD userexits available for sale order, delivery order and billing document. Usually we implement checks in MV45AFZZ for sale order, MV50AFZ1 for delivery order and RV60AFZZ for invoice. There are also many other enhancements available but these are three most commonly used.

Problem with these enhancements and userexits is that these are helpful in VA02,VL02N and VF02 but for display transactions these are not triggered and can't help you out. If you use authority check logic in these exits system doesn't check that in display transactions. So what do we do here?

Proposed Solution

There are certain enhancements which system calls on display transactions. These are not that easy to find but since we have worked on it and found these so I thought I should share here so that anyone else facing such requirement can get benefit of it.

For VA03

  • Go to VA03 > System > Status and copy program name from here and see the screen number. For VA03 program name is SAPMV45A and screen number is 102.
  • Now go to SE80 and enter program name in program and double click on screen 102. Here you'll see following module. Double click on that and add the authority check coding or any other code as per below screen.

Here you can see my message that I have written for testing. You can add authority check code or any other function/BAPI or check that you want to trigger on VA03. For adding this its good that you take help from your ABAPER because it requires an implicit enhancement implementation and if you don't know how to do it ask your ABAPER.

After adding this you'll get this message everytime you open VA03 > give sale order number and press enter.

For VL03N

Go to VL03N transaction code and see the program and screen number like we did in previous step.

Go to SE80 and repeat the same and double click on following module.

Here click on following perform.

Here add your logic in below section by implementing an implicit enhancement.

Following is the message which you'll see everytime you open a delivery order.

For VF03

Repeat the same steps for VF03 and copy program name SAPMV60A and note the screen number 101. Double click on following module.

Here click on following perform.

Add your code in below section after implementing an implicit enhancement.

Following is the message that I have added here and you'll see this every time you open an invoice in VF03.

This is it. Simple and easy way to trigger anything on start transaction of any SD document display transaction code. We did this only for these three transaction codes. If there is requirement for other transactions we can find triggering point for those as well.

Test this in your system and share your negative/positive feedback with me in comment section. If there is some other way to meet this requirement please share that. 

This document is related to authorization control so I'd like to tag Security here and this document includes technical information as well so ABAP Development guys can also use this for future reference. Usually this requirement comes in SAP ERP Sales and Distribution (SAP SD) SAP ERP SD Billing or in SAP ERP SD Sales so I am tagging these spaces as well.

Thank$

18 Comments
Labels in this area