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

Problem With a INDX Table

Former Member
0 Likes
518

Hi Friends,

I have Created a ztable ZINDX along with Fileds of table INDX and added two more fileds in the table, Description( string ), and Global(char01).After filling these fileds in the program,I am trying to Export the Whole internal table into the ZINDX table using EXPORT Statement.

Following is the code.

CLEAR W_VARIANT_REC_KEY.

W_VARIANT_REC_KEY-RELID = 'PX'.

W_VARIANT_REC_KEY-SRTFD = LV_SRTFD1.

W_VARIANT_REC_KEY-SRTF2 = SY-DBCNT.

W_VARIANT_REC_KEY-PGMID = LS_VARIANT_STRUCTURE-variant.

W_VARIANT_REC_KEY-description = LS_VARIANT_STRUCTURE-desription.

W_VARIANT_REC_KEY-global1 = LS_VARIANT_STRUCTURE-global.

MOVE-CORRESPONDING W_VARIANT_REC_KEY TO L_INDX.

L_INDX-USERA = SY-UNAME.

L_INDX-BEGDT = SY-DATUM.

EXPORT TAB = IT_CONTENTS TO DATABASE ZINDX(PX) FROM L_INDX ID L_INDX-SRTFD.

But at Export Statement it gives me an error as :

"ZINDX" must be a flat structure. You cannot use internal tables,strings, references, or structures as components.

Kindly,Help me regarding this issue.

Regards,

Xavier.P

Edited by: Xavier on Mar 5, 2009 6:15 AM

1 REPLY 1
Read only

keerthy_k
Product and Topic Expert
Product and Topic Expert
0 Likes
415

Hi,

This is because u are having a string field in the ZINDEX table. So it is better to change the data element of that field to char value. Even u can create a custom data element which is suitable for ur requirement.

Keerthi.