2013 Dec 19 11:27 AM
Can we pass reference of an object from on e program to other using submit or call transaction??
2013 Dec 20 3:06 PM
Hello Nikita,
there are the following possibilities:
Info from SAP:
Shared Objects are objects in the shared memory. Instances of classes and anonymous data objects can be stored. Named data objects can be stored as attributes of classes.
If you want, I give you more info for one of the possibilities.
Greets
Stefan
2013 Dec 19 11:41 AM
Check the demo program and get the idea of using SPA/GPA parameters....
DEMO_PROGRAM_CALL_TRANSACTION
2013 Dec 19 11:50 AM
Hi Nikita ,
ABAP programs have access to two cross-program memory areas that can be used for passing data :-
Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters).
ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this memory area remains throughout a sequence of program calls, with the exception of LEAVE TO TRANSACTION.
Regards,
Praveen Srivastava
2013 Dec 19 12:03 PM
2013 Dec 19 12:01 PM
Yes we can ,
sample is here :
SUBMIT rfumsv00
USING SELECTION-SCREEN '1000'
WITH br_bukrs EQ p_bukrs
WITH br_belnr IN s_belnr
WITH br_gjahr IN s_fyear
WITH br_budat IN s_pdate
WITH br_xblnr IN s_xblnr
AND RETURN.
2013 Dec 19 12:10 PM
Hello Nikita,
You can use SET/GET parameters or Shared Memory Area.
2013 Dec 19 12:23 PM
You can also use Class with static attributes store/retreive the data.
1) in the 1st program you would call the class=>staticattribue and set the value. Use a set method to set the value.
2. in the 2nd program you would use a get method to return the value from the static variable in the class.
Thanks
Kumaran
2013 Dec 19 3:02 PM
Hi,
We cannot pass object reference with set,get parameters and export import statements.If you want use object reference define that class as singleton and get instance in other internal session(submit or call transaction).Singleton gives same object reference for all internal sessions in given external session.
Regards,
Sreenivas.
2013 Dec 20 3:06 PM
Hello Nikita,
there are the following possibilities:
Info from SAP:
Shared Objects are objects in the shared memory. Instances of classes and anonymous data objects can be stored. Named data objects can be stored as attributes of classes.
If you want, I give you more info for one of the possibilities.
Greets
Stefan
2013 Dec 26 1:02 PM
Yes Stefan is right
check this link
Thats SAPs latest answer to this issue.
what i have done for myself
i have serialized the object into a table like indx and then reseraaşize it back
and i had the exact object
thats what i have done to save the object.
if you need more info i can let you know more
but stefans solution is better