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: 

import data from cluster table to internal table ?

Former Member
0 Kudos

Hi

My Cluster table is Zcar_00 .

I have 2 tables for zcar_00 . Name is zcar_01 and zcar_02 .

zcar_01 values :


VARKEY  PAGENO MAKE
  V1         1  OPEL
  V2         2  BMW
  V3         3  AUDI  

zcar_02 values :


VARKEY PAGENO MARKA MODEL

 V1        1  OPEL  ASTRA
 V1        1  OPEL  CORSA
 V1        1  OPEL  VCTRA
 V2        2  BMW   116
 V2        2  BMW   316
 V3        3  AUDI  A6  

I want to read data in this cluster table (zcar_01 , z_car02 ) .

My code is :



IMPORT ITAB TO JTAB FROM DATABASE  zaraba_00 (*error* ) ID 'MARKA'. 

How can I do ?

thanks for reply ..

serkann

6 REPLIES 6

Former Member
0 Kudos

Hi Serkan,

Try and see the following code to import the data from Clustard table. the Following statement is working for me.

IMPORT TAB = IT_CONTENTS FROM DATABASE ZINDX(PX) TO WA_INDX ID LV_SRTFD1.

Regards,

Xavier.P

0 Kudos

Don't work for me .

ZINDX(PX) How Can Call CLUSTR ??

What is clustr ? Your clustr value is PX .. well I donr call this px ?

Thanks Reply.

Serkann ...

0 Kudos

Hi,

Could you plz give me the fileds in your table?

do you have the field called RELID in your cluster table?

Regards,

Xavier.P

0 Kudos

Hi,

Go through the following code.

TYPES:

BEGIN OF tab,

col1 TYPE i,

col2 TYPE i,

END OF tab.

DATA:

wa_indx TYPE indx,

wa_itab TYPE tab,

cl TYPE mandt VALUE '100',

itab TYPE STANDARD TABLE OF tab.

IMPORT tab = itab FROM DATABASE indx(xy) TO wa_indx CLIENT cl ID 'TABLE'.

WRITE: wa_indx-aedat, wa_indx-usera, wa_indx-pgmid.

ULINE.

LOOP AT itab INTO wa_itab.

WRITE: / wa_itab-col1, wa_itab-col2.

ENDLOOP.

0 Kudos

My cluster table field is

 zcar_00 
Field name   DTyp  Length
MANDT          CLNT       3
VARKEY         CHAR     110
PAGENO         INT2       5
TIMESTMP       CHAR      46
PAGELG         INT2       5
VARDATA        RAW     3800

Look at other table in pageup name is zcar_01 and zcar_02 . How I can Call Marka and Model field in my cluster table ?

EDIT : zcar_01-make = zcar_02-marka KEY field ...

Former Member
0 Kudos

Hi Serkan

Not sure..but the following sap document may be useful to you.

http://help.sap.com/abapdocu/en/ABAPIMPORT_MEDIUM.htm

Regards

Sachin