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 get program attributes

petr_kobza
Advisor
Advisor
0 Kudos
894

Hello colleagues,

it is possible to get the program attributes in a running program? I'm especially interested in the Selection Screen Number of the logical DB. I found that the Logical Database is in the SY-DBNAM, but I didn't find the selection screen number here 😕

Thank you, Petr

1 ACCEPTED SOLUTION

rajkumarnarasimman
Active Contributor
0 Kudos
420

Hi Petr,

Use table TRDIR, we will get the program attributes by passing NAME = '<Program_name>.


"Data Declarations,

DATA: WA_TRDIR TYPE TRDIR,

            L_CPROG TYPE TRDIR-NAME.

"Assign Program Name

L_CPROG = SY-CPROG.

"Retrieve Code from Database

SELECT SINGLE * FROM TRDIR INTO WA_TRDIR WHERE NAME = L_CPROG.

Regards

Rajkumar Narasimman

1 REPLY 1

rajkumarnarasimman
Active Contributor
0 Kudos
421

Hi Petr,

Use table TRDIR, we will get the program attributes by passing NAME = '<Program_name>.


"Data Declarations,

DATA: WA_TRDIR TYPE TRDIR,

            L_CPROG TYPE TRDIR-NAME.

"Assign Program Name

L_CPROG = SY-CPROG.

"Retrieve Code from Database

SELECT SINGLE * FROM TRDIR INTO WA_TRDIR WHERE NAME = L_CPROG.

Regards

Rajkumar Narasimman