Application Development and Automation Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
Gauravvashishtha7
Discoverer
0 Kudos
1,171

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.

 

Screenshot 2025-02-25 164751.pngScreenshot 2025-02-25 164956.png

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.

Screenshot 2025-02-25 174839.png

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

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

Screenshot 2025-02-25 173835.pngScreenshot 2025-02-25 173911.pngScreenshot 2025-02-25 173835.pngScreenshot 2025-02-25 173937.png

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.

Screenshot 2025-02-25 164647.png

 

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

3 Comments