Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to add specific validation

uzair_1234
Explorer
0 Kudos

Hi all,

I have a validation requirement. I have created a Z Table. The IDs maintained in the Z Table should not have the authorization to make changes in the "Requirement Quantity" and also should not be able to delete any line item and if they do they should get the error message "You are not authorized to make any changes" Else those IDs can do other changes. Please guide me on this.

5 REPLIES 5

yogananda
Product and Topic Expert
Product and Topic Expert
0 Kudos

uzair_1234

You can create an authorization object with the fields that you want to restrict access to 1. Then you can assign this authorization object to the Z table in customizing 2.

You can also use table events to check if the user has the required authorization before allowing them to make changes. You can use the authorization group in the table maintenance generator to restrict access 3.

I hope this helps. Let me know if you have any other questions.

raymond_giuseppi
Active Contributor

Can you clarify the following points

  • The customer z-table is basically a list of users, I suppose maintained by SM30.
  • In which kind of program do you want to check this authorization, a standard one, a customer one or another generated maintenance dialog on another table or cluster of tables?

NB: You should use the authorization concept to handle this kind of requirement (create an authorization object, use AUTHORITY-CHECK statement in the program, manage the user authorization roles. Not create another customer table?

uzair_1234
Explorer
0 Kudos

It is an enhancement COR1 where i want to make the changes

uzair_1234
Explorer
0 Kudos

Actually it's an enhancement COR1 where i want to add the code for the above requirement. Please guide for the same.

raymond_giuseppi
Active Contributor

AFAIK, COR1 is a transaction not an Enhancement?

For this transaction, you could look at

  • Enhancements (SMOD/CMOD) starting with PPCO00* or CONFPP*
  • BAdIs such as WORKORDER_UPDATE, CONFIRM and the like

Nevertheless you should use the authorization concept and not a customer table, this is IMHO bad design.