05-14-2009 1:33 PM
hi,
The below is my program to export data to a cluster table. A record is
successfully entered into the table by the below code.
TYPES : BEGIN OF ty_itab,
kunnr TYPE kna1-kunnr,
name1 TYPE kna1-name1,
ort01 TYPE kna1-ort01,
land1 TYPE kna1-land1,
END OF ty_itab.
DATA : it_itab TYPE TABLE OF ty_itab,
it_jtab TYPE TABLE OF ty_itab,
wa_idx TYPE indx.
SELECT kunnr
name1
ort01
land1 FROM kna1 INTO TABLE it_itab UP TO 10 ROWS.
EXPORT it_itab TO DATABASE indx(xy) ID '20090514-thrusday'.
My problem is ,i'm unable to fetch the same data by IMPORT statements.
IMPORT tab TO it_itab FROM DATABASE indx(xy) TO ID '20090514-thrusday'.
May i know what i'm missing in the above syntax.
Thanks & Regards
05-14-2009 1:35 PM
Hello,
the IMPORT statement should not contain "To" .
IMPORT obj1 ... objn FROM DATABASE dbtab(ar) ID key.
Remove the word "To" while importing values from data base.
Even if "To" is removed, if the import is not fetching, check if the entry is correctly exported to data base table or not
05-14-2009 1:35 PM
Hello,
the IMPORT statement should not contain "To" .
IMPORT obj1 ... objn FROM DATABASE dbtab(ar) ID key.
Remove the word "To" while importing values from data base.
Even if "To" is removed, if the import is not fetching, check if the entry is correctly exported to data base table or not
05-14-2009 1:37 PM
Hi Soumya,
Thanks for your earliest reply.
Actually i made a mistake while copy-pasting my code.
yep i removed that, but still facing the same problem.
Thanks
- Always Learner
05-14-2009 2:13 PM
Hi,
use this statement...
IMPORT it_tab TO it_itab FROM DATABASE indx(xy) TO ID '20090514-thrusday'.
" OR
IMPORT it_tab TO tab FROM DATABASE indx(xy) TO ID '20090514-thrusday'.
" OR
IMPORT it_tab FROM DATABASE indx(xy) TO ID '20090514-thrusday'.
check these three options... for sure one of them will resolve your issue based on the internal table you have declared in your program...
Regards,
Siddarth
05-14-2009 2:19 PM
Thanks ,
This one did the trick
IMPORT it_itab FROM DATABASE indx(XY) ID '20090514-thrusday'.
- Always Learner