2014 Jul 29 8:49 AM
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
2014 Jul 29 8:58 AM
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
2014 Jul 29 8:58 AM
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