10-06-2008 12:25 PM
Hi Gurus...
My requirement is to get the value of a field used in a program which is available in my call stack while debugging.
I am using FM system_callstack but it just gives an internal table comprising of 3 fields programname, event type and event name.
I do not know how to retrieve the value of a variable being used in one of the programs.
My sample code is
CALL FUNCTION 'SYSTEM_CALLSTACK'
IMPORTING
et_callstack = l_cstack_tab. " internal table
READ TABLE l_cstack_tab INTO l_cstack_wa INDEX 4.
IF sy-subrc = 0 AND l_cstack_wa-progname IS NOT INITIAL.
l_evt_class = l_cstack_wa-progname.
then what shud I do.*********************
ENDIF.
Please help.
10-06-2008 1:22 PM
Hi,
Try using an external assign the read the call stack, e.g.
data: lv_name(30) type c,
lv_lgbkz type lvs_lgbkz.
field-symbols: <fs> type any.
lv_name = '(SAPLL03A)I_MLVS-LGBKZ'.
assign (lv_name) to <fs>.
if ( <fs> is assigned ).
...............
endif.
Where the value in lv_name is the program and variable name from the call stack.
Regards,
Darren
10-06-2008 1:22 PM
Hi,
Try using an external assign the read the call stack, e.g.
data: lv_name(30) type c,
lv_lgbkz type lvs_lgbkz.
field-symbols: <fs> type any.
lv_name = '(SAPLL03A)I_MLVS-LGBKZ'.
assign (lv_name) to <fs>.
if ( <fs> is assigned ).
...............
endif.
Where the value in lv_name is the program and variable name from the call stack.
Regards,
Darren
10-06-2008 1:56 PM
Hi Darren,
Thanks for the reply.
I am somehow not able to understand your solution. I will again explain my issue. I alraedy have the name of the program which I need to use at runtime.
The issue is that this program has the structure filled with data and I need this data at run time in another program so I am using the FM System_callstack. Using this I get the name of the program dynamically but how do I read this structure data.
I hope I am clear.
Please help.
Thanks,
Neha
10-07-2008 10:07 AM