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

Pointer to table

Former Member
0 Likes
1,000

Hello

I have the next code:

SELECT-OPTIONS so_table FOR DD02L-TABNAME OBLIGATORY.

DATA i_dd02l TYPE DD02L OCCURS 0 WITH HEADER LINE.

DATA p_pointer_table TYPE REF TO DATA.

FIELD-SYMBOLS <fs_table> TYPE TABLE.

SELECT * FROM DD02L

INTO TABLE i_dd02l

WHERE TABNAME IN so_table.

LOOP AT i_dd02l.

CLEAR p_punt_table.

CREATE DATA p_pointer_table TYPE TABLE OF (gt_dd02l-tabname).

ASSING p_pointer_table->* TO <fs_table>.

SELECT * FROM (gt_dd02l-tabname)

INTO TABLE <fs_table>.

ENDLOOP.

But the next error appears when I check it:

"The type specification of TABLE is incomplete"

I have previously used this on SAP 5.0. Now I am on a SAP 4.6C.

How can i solve the problem?

Thanks and regards

8 REPLIES 8
Read only

Former Member
0 Likes
950

Hi,

May be you would have missed out the Table statement before the select-options:

TABLES:DD02L

Rgds.

Hemanth

Read only

Former Member
0 Likes
950

FIELD-SYMBOLS <fs_table> TYPE <i><b>ANY</b></i> TABLE.

Try the change highlighted above.

Regards,

Ravi

Note - Please mark all the helpful answers

Read only

0 Likes
950

FIELD-SYMBOLS <fs_table> TYPE ANY TABLE.

I have changed what you said on definition of field-symbol but error continues. In addition if i make this change, another error occurs. I use function WS_DOWNLOAD with field-symbol <fs_table> as DATA_TAB parameter and when I check the source code, the next error appears:

"<FS-TABLE> is not a STANDARD TABLE. Non-standard tables can only be passed to IMPORTING,EXPORTING or CHANGING parameters"

So is mandatory in definition of <fs_table> to write TYPE TABLE or TYPE STANDARD TABLE. On both cases initial error persists, so has anybody have any other idea?

Thanks and regards

Read only

0 Likes
950

See the following blogs, they do the same

/people/ravikumar.allampallam/blog/2005/05/31/expand-the-list-of-columns-in-a-report-dynamically

/people/subramanian.venkateswaran2/blog/2004/11/19/dynamic-internal-table

Regards,

Ravi

Note - Please mark all the helpful answers

Message was edited by:

Ravikumar Allampallam

Read only

0 Likes
950

Hi Ravikumar

I have checked the blogs you posted, and I have make a test with code of Scenario 2 of second blog (posted by Subramanian Venkateswaran). I have copied the code in a program, I have checked it and the same error appears again. I think the reason could be my SAP version (4.6C), but I'm not sure. In case the problem were SAP version, is there any other way to make that?

Thanks and regards

Read only

0 Likes
950

That ideally should not be a problem with the version, as I remember myself writing similar code in 4.6C.

Regards,

Ravi

Read only

0 Likes
950

Then i am absolutely missed. I'm sure I have copied the code of the blog correctly. Any other way of make that?

Thanks

Read only

0 Likes
950

Having the same error here.

Any news on how you dealt with the issue?


Lauro