Table Authorization control
Through table event
Table Maintenance events allow us to change the generated table maintenance dialog at predefined positions or event mentioned. The user routines written for that particular event are called dynamically. For this reason, the routines must be in a user including in the table/view maintenance dialog function group. Using Table maintenance event we can restrict a person from accessing the table or changing deleting etc the records. The biggest plus point of this is that we don’t need to create new report to restrict user.
To explain functionality of Table event in better way let’s take an example.
Suppose customer came up with a requirement to make a table and provide authorization to particular user to access the table or to display specific data based on value entered on particular field, this can be taken care using table event. Steps are mention below
Field Name | Data element | Data type | length | Primary key | Description |
MANDT | MANDT | CLNT | 3 | X | Client |
KTOPL | KTOPL | CHAR | 4 | X | Chart of Accounts |
SCOA5 | CHAR | 5 | X | Account number on SCOA level 3 | |
BLART | BLART | CHAR | 2 | X | Document Type |
SHKZG | SHKZG | CHAR | 1 | X | Debit/Credit Indicator |
BEWAR | BEWAR | CHAR | 3 | Transaction Type |
Now we create a maintenance view for the same table.
We are doing it because in maintenance view we have a column P who’s value when made S a pop up screen appear before maintenance done from SM30
Then in view field tab , For field KTOPL make the column P value equal to S
Generate a two step TMG or 1 Step TMG depending upon your requirement.
Note: The authorization group used here &NC& is just for Demonstration only .. please use other authorization group for authorization purpose.
Here make a new entry with event 19 and write the code mention in text file a for authorization check (We have taken event 19 because event 19 is called when initialization of global variable take place).
Either you create a T-code for view or you maintain through SM30.
Execution Step.
Even if you click on new entries button, you can only create entry for ES00.
In this way we can use Table event for our purpose. There are lots of other events which you can use as per your requirement. Mention below is snap shot of event present in table event.
Mention below are event that can also be used to auto fill the table fields contents etc.
The
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
4 | |
3 | |
2 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 |