‎2010 Mar 23 10:45 AM
I have a requirement where i need to fetch value of a field from one of the function pool so i have written a sample progam to check the logic but its doest seems to work its giving dump.
Basically i want to know how to use <programname><fieldname> with fieldsymbol.
REPORT ztest1.
DATA test(25) VALUE 'ggg'.
submit ztest.
report ztest.
constants: lv_memory(25) type c value '(ZTEST1)TEST'.
field-symbols: <fs2> type char25 .
assign (lv_memory) to <fs2>.
write : <fs2>.
I am getting same field symbol assignment dump
‎2010 Mar 23 11:00 AM
This is not possible to access data of other program like this.
The reason is that both programs run in different internal sessions which are exclusive for each of them.
You can try this trick to some function modules you call, as this one is called within same internall session where the program runs, but for two separate programs you will need to use ABAP memory to exchange data.
Regards
Marcin
‎2010 Mar 23 11:23 AM
Check the below piece for ZTEST
CONSTANTS: lv_memory(25) TYPE c VALUE '(ZTEST1)TEST'.
FIELD-SYMBOLS: <fs2> TYPE char25 .
ASSIGN lv_memory TO <fs2>.
WRITE : <fs2>.Close the thread if answered
‎2010 Mar 23 11:47 AM
Hi Rahul,
You can use this concept in between the FUNCTION MODULES where both are
under same FUNCTION GROUP ( as both the FM's have same global memory area ).
And also if you are calling an FM or method from your program ,you can have the data of the calling program in that called FM or METHOD.
Hope this may help you.
Regards,
Smart Varghese
‎2010 Mar 23 11:48 AM
‎2010 Mar 23 12:15 PM
Nice explanation. BTW are you a proof reader for SAP online documentation.
I find the same wording here: [http://help.sap.com/abapdocu_70/en/ABAPASSIGN_MEM_AREA_DYNAMIC_DOBJ.htm#!ABAP_ALTERNATIVE_1@1@|http://help.sap.com/abapdocu_70/en/ABAPASSIGN_MEM_AREA_DYNAMIC_DOBJ.htm#!ABAP_ALTERNATIVE_1@1@]
Cheers,
Suhas
‎2010 Mar 23 12:35 PM
Abaper13 has been informed that copy and paste of other people's work is not permitted