‎2010 Feb 12 10:06 AM
Hi guys,
Let's say that program A calls program B then FM C is called... I want to retrieve in FM C a value from the still running program A. I think I have read that it is possible with field symbols. I would say that I have seen it somewhere but now that I need it I am not able to find it.
I think it is somehting like the following, but... it does not work. I dont know, maybe it is just not possible.
field-symbols: <rseg> type any table.
data name(20) value '(PROGRAM)T_DRSEG'.
assign (name) to <rseg>.
I have ckecked the demo programs DEMO_FIELD_SYMBOLS*, but it is not exactly what I am looking for.
Is it possible to do that? or am I just making up all this story ???
many thanks in advance!!!
‎2010 Feb 12 10:52 AM
Hi Aaron,
Instead of using field symbols, you could do this EXPORT or IMPORT table values to SAP memory and call in another FM.
Hope it helps
Regards
Sarav
‎2010 Feb 12 12:24 PM
Hi,
Yes, indeed. But the original program ( the one that contains the info i need ) is standard. If I use export-import I need to modify ( enhancement point?) the standard program to export the data.
Thanks anyways!
‎2010 Feb 12 12:38 PM
Hi,
Here is the code you are looking for...
FIELD-SYMBOLS:<lfs_xlips> TYPE ANY.
ASSIGN: ('(SAPMV50A)XLIPS[]') TO <lfs_xlips>.
Here SAPMV50A is your standard program where you have the data.(Give the main program name, not the include program)
Thanks,
Vinod.
‎2010 Feb 15 8:10 AM
Hi Vinod,
Indeed this is what I wanted. Thanks a lot.
It is a pity because it does not work in my case. Probably the program with the data I need is "too far" in the process flow...
I have tried defining the FS as type any and as type any table. I have tried with the program control, the include and the program control of the program control...
Well, I will use export/import in this case. But it is good to know this technique!
Many thanks!
Aaron
‎2010 Feb 15 8:37 AM
Hi,
Just to add one more point....
Above logic works only if the program is available in the CALL STACK. You can check the stack by placing the break point in yourprogram and click on CALLS button duting debugging.
Thanks,
Vinod.
‎2010 Feb 15 9:31 AM
Hi Vinod.
I can see the program in the CALL STACK, but it does not work....
thanks anyways, with export/import is working already.