‎2010 Apr 29 1:47 PM
Hi,
have anyone an idea, how I can transfer a reference of a Object(class) from "Report_1" to "Report_2" ??
In my report_1 i create a Object of a Class and use their Methods to add some data.
In Report_2, i want show the added list with a simple get-Method, but for this i need a reference of this Object which i have in Report_1 created.
Can anyone help me???
With kind regards
ETN
‎2010 Apr 29 1:58 PM
HI,
Create a subroutien with parameters <reference type > in report 2 with whatever the necessary code and call
that subroutien in report 1.
perform <sub-name> in program <report> using <your reference> .
Regards and Best wishes.
‎2010 Apr 29 1:52 PM
1) Accessing an instance attribute attr: oref->attr
2) Calling an instance method meth: [CALL METHOD] oref->meth
3) Accessing a static attribute attr: class=>attr
4) Calling a static method meth: [CALL METHOD] class=>meth
‎2010 Apr 29 2:05 PM
Thanks for your idea,
but I have a complex Class and their Methods are sadly instances and not static.
For example:
REPORT1:_
DATA: oref TYPE REF TO class_example.
CREATE OBJECT oref.
CALL METHOD oref->add
EXPORTING key = 5524
value = 'HELLO SAP'.
SUBMIT report_2 AND RETURN.
REPORT2:_
DATA result TYPE c LENGTH 50.
CALL METHOD oref->get
EXPORTING
key = num_key
IMPORTING
value = result.
MESSAGE result TYPE 'I'.
MY QUESTION IS: How can i give the Reference of the current Object, which i have created in Report_1 ?
Because I must call the get-method in Report_2.
‎2010 Apr 29 1:58 PM
HI,
Create a subroutien with parameters <reference type > in report 2 with whatever the necessary code and call
that subroutien in report 1.
perform <sub-name> in program <report> using <your reference> .
Regards and Best wishes.
‎2010 Apr 29 2:43 PM