Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CL_ABAP_STRUCTDESCR

dieterzenger
Participant
0 Likes
1,216

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

1 ACCEPTED SOLUTION
Read only

Clemenss
Active Contributor
0 Likes
1,119

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

5 REPLIES 5
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,119

Ignore

Edited by: Keshav.T on Jul 13, 2010 8:13 PM

Read only

Clemenss
Active Contributor
0 Likes
1,120

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

Read only

0 Likes
1,119

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

Read only

Clemenss
Active Contributor
0 Likes
1,119

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

Read only

Former Member
0 Likes
1,119

Hi Clemens

thanks for your help.

Dieter