2010 Jul 26 4:38 PM
for eg, one RFC named A,inside A,a funtion B is called.when the processing is at B now,how can i get the main RFC name(A)?
any help will be much appricated.
2010 Jul 26 6:55 PM
Run the report in SE30, you will see the program flow. From there you can find out which FM is calling another.
Another way is using new Debugger, put a break-point in the FM and go to 'Standard' tab of debugger, here you will get the event log of the program.
Thanks,
2010 Jul 26 8:57 PM
To know it programmatically, you can use SYSTEM_CALLSTACK function module (search SDN for more information)
2010 Jul 27 6:04 AM
thanks to all.
in self program the FM 'SYSTEM_CALLSTACK' works.but i have another question:I need to get the main program id of the system process in my program,so i use FM 'TH_WPINFO' to get these process data,just like SM50 shows.
but the program id of the process that FM ''TH_WPINFO' gives to me is the current processing one, not the beginning one(the main program).so how can i get these main program id?
2010 Jul 27 6:09 AM
probably you need to call Th_WPINFO in main program and store the value in memory and retrieve from memory in sub program
Thanks
Bala Duvvuri
2010 Jul 27 9:26 AM
> I need to get the main program id of the system process in my program
Do you mean the frame program of the internal session = the one which is called by SUBMIT AND RETURN, or CALL TRANSACTION (etc.)?
It should be the first program in the call stack.
2010 Jul 27 11:57 AM
just see SM50,there is a column called 'Report',it shows the program id the proess is now processing.but i don't know its main program or say it 'the process's first excuting program',how can i get it programmatically?
2010 Jul 27 12:52 PM
> just see SM50,there is a column called 'Report',it shows the program id the proess is now processing.but i don't know its main program or say it 'the process's first excuting program',how can i get it programmatically?
I'm still not sure to understand. The program in SM50 is the current main program (not the first). It is stored in SY-REPID system variable. Or use this code:
DATA lt_callstack_long TYPE abap_callstack.
DATA ls_callstack_long TYPE LINE OF abap_callstack.
CALL FUNCTION 'SYSTEM_CALLSTACK'
IMPORTING
callstack = lt_callstack_long.
READ TABLE lt_callstack_long INDEX 1 INTO ls_callstack_long.
WRITE : / 'current main program is:', ls_callstack_long-mainprogram.
If you want to know the frame program (the first called), use SY-CPROG, or use this code:
DATA lt_callstack_long TYPE abap_callstack.
DATA ls_callstack_long TYPE LINE OF abap_callstack.
CALL FUNCTION 'SYSTEM_CALLSTACK'
IMPORTING
callstack = lt_callstack_long.
" read last line = first called program
DESCRIBE TABLE lt_callstack_long. "to make sy-tfill = number of lines
READ TABLE lt_callstack_long INDEX sy-tfill INTO ls_callstack_long.
WRITE : / 'First main program is:', ls_callstack_long-mainprogram.
2010 Aug 23 7:56 PM
Hi Sandra,
Maybe you have an idea on how I can access the portal sessiona and the correpsonding stack and or memory? I am in need of including a custom popup before displaying the area group page. I don't want to have to put a mo into the JAVA stack of th ecurrent ESS solution.I am hooking into the Fm hrxss_ser_getmenudata. and that works if I have a server session with a popup. But I would need a WD server that is hosted by the ESS server. Any idea how I can start this? The problem is that the RFC doe not allow any GUI or WD components to start. I wa sreading that could have to do with some basis settings. Any ideas?
Thx,
Andreas
2010 Aug 30 5:18 PM
I don't know. Could you ask the question in the Web Dynpro forum, I think that Thomas Jung could help you more on that topic...