2010 Jul 13 3:37 PM
Hello,
I have to create a internal table like the structur of a DB-Table of a remote system.
Therefore i wanted to something like the following
l_r_descr_ref ?= cl_abap_structdescr=>describe_by_name( p_name = l_active_table_name ).
CREATE DATA l_r_line TYPE HANDLE l_r_descr_ref.
Is there a possibility to call the method from a remote system ?
Thanks for your help.
Dieter
2010 Jul 13 4:50 PM
Hi Dieter,
you can do whatever you want if you put the code inside an RFC callable function module. You will not even need CL_ABAP_STRUCTDESCR because you can CREATE DATA ... LIKE TABLE OF ...
The real question is how to make the database structure of the remote system known. If the other system is SAP system, you can extract detailed information using CL_ABAP_xxxxxDESCR and transfer this via RFC. The the called system may create the required struct description.
Regards,
Clemens
Hello,
I have to create a internal table like the structur of a DB-Table of a remote system.
Therefore i wanted to something like the following
l_r_descr_ref ?= cl_abap_structdescr=>describe_by_name( p_name = l_active_table_name ).
CREATE DATA l_r_line TYPE HANDLE l_r_descr_ref.
Is there a possibility to call the method from a remote system ?
Thanks for your help.
Dieter
2010 Jul 13 3:41 PM
2010 Jul 13 4:50 PM
Hi Dieter,
you can do whatever you want if you put the code inside an RFC callable function module. You will not even need CL_ABAP_STRUCTDESCR because you can CREATE DATA ... LIKE TABLE OF ...
The real question is how to make the database structure of the remote system known. If the other system is SAP system, you can extract detailed information using CL_ABAP_xxxxxDESCR and transfer this via RFC. The the called system may create the required struct description.
Regards,
Clemens
2010 Jul 14 5:49 AM
Hi Clemnes, thanks for your answer. The source system is a SAP system. I already thought of creating an RFC Module, but how do i define the reference to the class in the Exporting, Changing or Tables paramters ?
Thank you
Dieter
2010 Jul 14 5:29 PM
Hi Dieter,
I'm on vacation right now, no SAP system around.
You can never transfer object references from system to system because the object referenced is available only in one system.
I assume you can use a method of CL_ABAP_STRUCTDESCR to GET the components table in the source system. Transfer this table to the RFC function in target system. Use the component table to create a TYPEDESCR object to create the table.
I found this [thread|; that shows you the way - some thinking still required.
Regards,
Clemens
2010 Jul 16 1:17 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |