06-12-2008 3:15 PM
Hello!
How can I share an internal table within a package with other
reports. When excecuting report 3 variables of report 1
must be available with its values. How is that possible ?
Regards
ertas ilhan
06-12-2008 3:21 PM
You can try "begin of common part..." .... "end of common part." keyword for sharing the variables.
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db97c435c111d1829f0000e829fbfe/content.htm
06-12-2008 3:20 PM
Hi Ilhan,
YOu must use the Export and Import to memory ids.
Check the example programs:
DEMO_DATA_EXT_CLUSTER_EXPORT
DEMO_DATA_EXT_CLUSTER_EXPORT_D
and
DEMO_DATA_EXT_CLUSTER_IMPORT Reading Data Objects from Memory
DEMO_DATA_EXT_CLUSTER_IMPORT_2 Creating a Directory of a Data Cluster
DEMO_DATA_EXT_CLUSTER_IMPORT_D Reading Data Objects from Cluster Databases
DEMO_DATA_EXT_CLUSTER_IMPORT2 Program DEMO_DATA_EXT_CLUSTER_IMPORT2
DEMO_DATA_EXT_CLUSTER_IMPORT3 Program DEMO_DATA_EXT_CLUSTER_IMPORT3
Regards,
Ravi Kanth talagana
06-12-2008 3:21 PM
You can try "begin of common part..." .... "end of common part." keyword for sharing the variables.
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db97c435c111d1829f0000e829fbfe/content.htm
06-12-2008 3:23 PM
Hello,
You can use a GET and SET FM. Create an FM that will set the VALUE and then get the Values via GET FM.
Reagrds
Saket Sharma
06-12-2008 3:25 PM
06-12-2008 3:36 PM
Okies.
I will explain for one variable.
Create a FM say ZSETFM. It will have an impotring parameter as IM_FLAG. In the Top include of this FG
declare a variable IG_FLAG. Code in the ZSETFM
IG_FLAG = IM_FLAG.
Create a ZGETFM in the Same FG as ZSETFM. It will have an exporting parameter EX_FLAG.
Code
EX_FLAG = IG_FLAG.
Now call the ZSETFM and Pass the Variable and call the FM ZGETFM to get the value that you had passed.
06-12-2008 3:48 PM
hi,
I can't set any value in may case for FM ZSETFM.
Because the internal table is populated normally
after the report1 is executed. I need a way
to run report1 in order to fill the internal table
and pass it finally to it to report 3
regards
ertas
06-12-2008 3:33 PM
Hi
first of all, internal tables are not contained in a package, the program is.
Now according to your problem, two solutions are possible.
1) If your report1 and report2 are going to run in the same sap session, then you can use export to memory id.
syntax: export var1 to memory id 'VARIABLE1'.
in the second report, use this to get the value:
IMPORT var1 TO var4 FROM MEMORY ID 'VARIABLE1'.
Note that if the sap session changes, the value will be lost.
2) Using this method , you can preserve data across sessions:
EXPORT tab = var1
TO DATABASE indx(xy)
CLIENT sy-mandt
ID 'VARIABLE1'.
IMPORT tab TO var1
FROM DATABASE indx(xy)
CLIENT sy-mandt
ID 'VARIABLE1'.
this will make the data available across sessions.
<REMOVED BY MODERATOR>
Cheers
Ravish
Edited by: Alvaro Tejada Galindo on Jun 12, 2008 11:07 AM
06-12-2008 3:33 PM
I mean
when excecuting report 3 variables of report 1
must be available with its values without
executing report 1.
Is that possible with the above mentioned methods ?
Regards
ertas
06-12-2008 3:49 PM
Use Shared Memory Object..
Here is the link with an example.
G@urav.