Application Development 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: 

Getting values from a table without any type

Former Member
0 Kudos

Hi,

I am having problem accessing the values of a table which does not have a type. When we go and check the type of the table, it is not mentioned.

While debugging we found that the type of this particular table is deep structure. I tried using ASSIGN COMPONENT using field symbols, but reference is not getting assigned. The sy-subrc becomes 4.

Is there any way to access the data in this table?

Regards,

Rishav

8 REPLIES 8

Sandeep_Kumar
Advisor
Advisor
0 Kudos

Is this a standard structure or custom one?

Edited by: I039643 on Apr 17, 2009 6:17 PM

0 Kudos

It is a table with no structure.

I will tell you how.

type specification and Associated type for this is empty.

0 Kudos

It is actually a function module which is having this table in the TABLE declaration.

Table Name : T_OUTTAB

Long text :

Interne Tabelle beliebiger Struktur, die die in Listenform auszugebenden Daten enthält.

Diese Tabelle kann mehr Felder beinhalten als letztlich für die Listausgabe (Anzeigefelder u. Feldvorrat) relevant sind.

Nur die im Feldkatalog und ggbf. in der Layoutstruktur genannten Felder werden für die Listausgabe herangezogen. Weitere Felder der internen Tabelle werden ignoriert.

Im Feldkatalog kann dann über die Ausprägung des Feldes FIELDCAT-NO_OUT entschieden werden, ob ein Feld direkt auf der Liste ausgegeben wird oder ob dieses Feld zunächst in den Feldvorrat gestellt wird.

Aus diesem Feldvorrat kann der Benutzer interaktiv die Anzeigefelder der Liste erweitern (und umgekehrt Anzeigefelder ausblenden).

Wird die interne Tabelle im aufrufenden Programm ohne Kopfzeile definiert, so ist auf dem Listenkörper keine F1-Unterstützung möglich.

0 Kudos

Try this:

cl_alv_table_create=>create_dynamic_table to create dynamic table.

0 Kudos

I found the solution. We can actually use move-corresponding to some other internal structure or table if we know the fields of the tbale.

Former Member
0 Kudos

Declare your type as Any and try to get data from that.

hope it helps .

0 Kudos

No it is not working. I am trying using 'any' but it still remains the same.

Former Member
0 Kudos

The problem was to access the data of a structure with no type. As in the type can be anything, a data element, a table or a structure. To access the data, all we need to do is to use MOVE-CORRESPONDING if we know the fields of the structure(This case we are using a structure) to another structure with known type created by us.