2014 Jun 26 12:19 PM
Hi ABAP Gurus,
I have a requirement where i need to read Screen Stack.
The stack in debug mode is -
Debug 1.jpg
I need to get the highlighted value (transaction).
I tried FM 'SYSTEM_CALLSTACK' and it only gives ABAP stack details.
Debug 2.jpg
I need a way to read Screen Stack only.
Any guidance would be highly appreciated.
BR,
Ankit Maskara.
2014 Jun 26 2:39 PM
2014 Jun 27 7:57 AM
Hi Raymond,
Thanks for bringing a viewpoint.
I have used below code -
DATA: zob1 TYPE REF TO cl_tpda_control.
CREATE OBJECT: zob1.
*DATA INCL_EM_STACK TYPE FLAG.
DATA stacktab TYPE tpda_sys_dy_stacktab.
TRY.
CALL METHOD zob1->get_dynpro_stack
EXPORTING
incl_em_stack = ' '
IMPORTING
stacktab = stacktab.
CATCH cx_tpda_sys_dyn_spa .
CATCH cx_tpda_sys_dyn_notyet .
CATCH cx_tpda_sys_dyn_notcons .
CATCH cx_tpda_sys_dyn_nody .
CATCH cx_tpda_sys_dyn_nodata .
CATCH cx_tpda_sys_comm .
CATCH cx_tpda_sys_version .
CATCH cx_tpda_sys_internal .
ENDTRY.
But,
An exception (CX_TPDA_SYS_COMM_SLAVENOTCONN) occurred and stacktab[] is coming empty.
BR,
Ankit Maskara.
2014 Jul 07 8:50 AM
Hello Guys,
I could not find any working solution for this problem so i had to change the design.
BR,
Ankit Maskara.
2016 Feb 14 4:32 PM
Hi Ankit,
I think you tried to read the original transaction in which SM30 was called.
You can achieve the same with below:
DATA: sy_tcode TYPE sy-tcode.
CALL 'GET_PARAM_TCOD' ID 'PTCOD' FIELD sy_tcode.
SY_TCODE is your YTV023(SM30)