How can you make a button accessible only for a specific login ID in a custom Z report in SAP ABAP?

Estimated read time 2 min read

First, go to System → Status and find the program name of the custom transaction code (T-Code).

Go to the code and press Ctrl + F to search for REUSE_ALV_GRID_DISPLAY. Check how many times it is being called. For each occurrence, find the PF-STATUS parameter. If it’s commented out, uncomment it and declare a PF-STATUS for each instance.

 

THEN, we will create a table and declare a field using a Data Element, where only the entries maintained in the TMG will determine access to a specific button.

Go to SE41 and copy the standard PF status for two cases:

One where the button is present.One where the button is not present.

THEN, develop the code using a PERFORM routine, ensuring that the button visibility is dynamically controlled based on the user command’s ID. The button should be visible only if the user command originates from a specific user ID; otherwise, it should remain hidden.

 

Now, only the user with the assigned access can see the button. For all other users, the button will remain hidden

 

​ First, go to System → Status and find the program name of the custom transaction code (T-Code).Go to the code and press Ctrl + F to search for REUSE_ALV_GRID_DISPLAY. Check how many times it is being called. For each occurrence, find the PF-STATUS parameter. If it’s commented out, uncomment it and declare a PF-STATUS for each instance. THEN, we will create a table and declare a field using a Data Element, where only the entries maintained in the TMG will determine access to a specific button.Go to SE41 and copy the standard PF status for two cases:One where the button is present.One where the button is not present.THEN, develop the code using a PERFORM routine, ensuring that the button visibility is dynamically controlled based on the user command’s ID. The button should be visible only if the user command originates from a specific user ID; otherwise, it should remain hidden. Now, only the user with the assigned access can see the button. For all other users, the button will remain hidden   Read More Application Development Blog Posts articles 

#SAP

You May Also Like

More From Author