Error while selecting date from external table
Hello all,
I am getting the follwing error while selecting data from external table. Any idea why?
SQL> CREATE TABLE SE2_EXT (SE_REF_NO VARCHAR2(255),
2 SE_CUST_ID NUMBER(38),
3 SE_TRAN_AMT_LCY FLOAT(126),
4 SE_REVERSAL_MARKER VARCHAR2(255))
5 ORGANIZATION EXTERNAL (
6 TYPE ORACLE_LOADER
7 DEFAULT DIRECTORY ext_tables
8 ACCESS PARAMETERS (
9 RECORDS DELIMITED BY NEWLINE
10 FIELDS TERMINATED BY ','
11 MISSING FIELD VALUES ARE NULL
12 (
13 country_code CHAR(5),
14 country_name CHAR(50),
15 country_language CHAR(50)
16 )
17 )
18 LOCATION ('SE2.csv')
19 )
20 PARALLEL 5
21 REJECT LIMIT UNLIMITED;
Table created.
SQL> select * from se2_ext;
SQL> select count(*) from se2_ext;
select count(*) from se2_ext
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04043: table column not found in external source: SE_REF_NO
ORA-06512: at "SYS.ORACLE_LOADER", line 19
It would appear that you external table definition and the external data file data do not match up. Post a few input records so someone can duplicate the problem and determine the fix.
HTH -- Mark D Powell --
Similar Messages
-
Problem while selecting data from external tables
Hi All,
I am facing a problem with external tabels. I have created an external table
create table ext_org_table
( id varchar2(10)
, name varchar2(100)
,id_parent varchar2(10)
,name_parent varchar2(100))
organization external
( type oracle_loader
default directory MYDIR
access parameters
records delimited by newline
nologfile
nobadfile
fields terminated by ','
missing field values are null
location ('Orgdata.csv')
reject limit unlimited;
The problem is that when i give select * from ext_org_table , i get following error
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04040: file Orgdata.csv in MYDIR not found
ORA-06512: at "SYS.ORACLE_LOADER", line 19
ORA-06512: at line 1
Now , i have file Orgdata.csv in the specified directory.
I have created directory in oracle using create directory command.
I have granted read,write permission on the directory to user.
I have given all read,write and execute permissions to folder where my files resides.My file resides in /appl/home/kk
Now i don't understand why it is giving error file in Mydir not found.
Kindly suggest.
Regards
KrishHi,
You are obviously doing someting wrong.
May be the direcotry is not present or may be the file is not rpesent in the directory.
I just tried ths
Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
Connected as SYS
create directory mydir as 'c:\csv';
grant read,write on directory mydir to scott;From Scott
create table ext_org_table
( id varchar2(10)
, name varchar2(100)
,id_parent varchar2(10)
,name_parent varchar2(100))
organization external
( type oracle_loader
default directory MYDIR
access parameters
records delimited by newline
nologfile
nobadfile
fields terminated by ','
missing field values are null
location ('Orgdata.csv')
reject limit unlimited;
select * from ext_org_table;Ofcourse i made up some dummy data to test and its all OK.
again,
You may want to check if
1) If the directory exists (select * from all_directories where directory_name='MYDIR');
2) If the user has the read/write permissions on that directory
3) If the file orgdata exists in that directory.
Regards,
Bhushan -
Error while activating data from new table of DSO to active table
HI,
while activating data from new table of DSO to active table i am getting
error message as "Error occurred while deciding partition number".
Plz any idea hoe to resolve this one.
thanks & regards
KPS MOORTHYHi
You are trying to update/upload the Records which are already been there in the DSO Active Data Table which has the partition.
Try to see the Record Nos already been activated and update/upload with selective, if possible.
You can trace the changes at Change log table for the same.
Hope it helps
Edited by: Aduri on Jan 21, 2009 10:38 AM -
Error while selecting data for mara table from KOTG516 table
Hello all,
I am trying to select the data from mara table with respect to KOTG516 table . but i am not getting the value into t_mara table as t_kotg516-matnr is empty . but the t_kotg516 conatins the matnr value . here is the code . i am not getting where i went wrong . please help .
TYPES: BEGIN OF Y_KOTG516,
KAPPL TYPE KAPPL,
KSCHL TYPE KSCHG,
VKORG TYPE VKORG,
VTWEG TYPE VTWEG,
KUNAG TYPE KUNAG,
MATNR TYPE MATNR,
DATBI TYPE KODATBI,
END OF Y_KOTG516.
DATA: T_KOTG516 TYPE STANDARD TABLE OF Y_KOTG516,
E_KOTG516 TYPE Y_KOTG516.
TYPES: BEGIN OF Y_MARA,
MATNR TYPE MATNR,
MEINS TYPE MEINS,
END OF Y_MARA.
DATA: T_MARA TYPE STANDARD TABLE OF Y_MARA,
E_MARA TYPE Y_MARA.
SELECT KAPPL
KSCHL
VKORG
VTWEG
KUNAG
MATNR
DATBI
FROM KOTG516
INTO TABLE T_KOTG516
WHERE VKORG IN S_VKOR
AND VTWEG IN S_VTWE
AND KUNAG IN S_KUNAG.
IF NOT T_KOTG516[] IS NOT INITIAL
and SY-SUBRC EQ 0.
SELECT MATNR
MEINS
FROM MARA
INTO TABLE T_MARA
FOR ALL ENTRIES IN T_KOTG516
WHERE MATNR EQ T_KOTG516-MATNR
AND MEINS EQ 'CS'
OR MEINS EQ 'IT'.
ENDIF.
FOR T_KOTG516 I HAVE VALUE but matnr is not getting selected from mara table as i cheked t_kotg516-mara is empty . i cant use with header line . please advise .
Regardshi,
SELECT KAPPL
KSCHL
VKORG
VTWEG
KUNAG
MATNR
DATBI
FROM KOTG516
INTO TABLE T_KOTG516
WHERE VKORG IN S_VKOR
AND VTWEG IN S_VTWE
AND KUNAG IN S_KUNAG.
if sy-subrc = 0 .
SELECT MATNR
MEINS
FROM MARA
INTO TABLE T_MARA
FOR ALL ENTRIES IN T_KOTG516
WHERE MATNR EQ T_KOTG516-MATNR
AND MEINS EQ 'CS'
OR MEINS EQ 'IT'.
ENDIF.
regards
deepak . -
Selecting data from external table
Hi there
I was wondering if somebody could assist me. When I try to select data from an external table, no data is displayed, and in my log file I receive the following error:
KUP-04026: field too long for datatype. Please find attached my external table script.
CREATE TABLE DEMO_FILE_EXT
MACODE NUMBER(7),
MANO NUMBER(7),
DEPNO VARCHAR2(2 BYTE),
DEPTYPE NUMBER(5),
STARTDATE NUMBER(8),
ENDDATE NUMBER(8),
OPTIONSTART NUMBER(8),
BENEFITSTART NUMBER(8),
STARTSUSPEND NUMBER(8),
ENDSUSPEND NUMBER(8),
INITIALS VARCHAR2(5 BYTE),
FIRSTNAME VARCHAR2(20 BYTE),
SURNAME VARCHAR2(25 BYTE),
STR1 VARCHAR2(30 BYTE),
STR2 VARCHAR2(30 BYTE),
STR3 VARCHAR2(30 BYTE),
STR4 VARCHAR2(30 BYTE),
SCODE VARCHAR2(6 BYTE),
POS1 VARCHAR2(30 BYTE),
POS2 VARCHAR2(30 BYTE),
POS3 VARCHAR2(30 BYTE),
POS4 VARCHAR2(30 BYTE),
PCODE VARCHAR2(6 BYTE),
TELH VARCHAR2(10 BYTE),
TELW VARCHAR2(10 BYTE),
TELC VARCHAR2(10 BYTE),
IDNUMBER VARCHAR2(13 BYTE),
DOB NUMBER(8),
GENDER VARCHAR2(1 BYTE),
EMPLOYER_CODE VARCHAR2(10 BYTE),
EMPLOYER_NAME VARCHAR2(900 BYTE)
ORGANIZATION EXTERNAL
( TYPE ORACLE_LOADER
DEFAULT DIRECTORY DEMO_FILES
ACCESS PARAMETERS
( RECORDS DELIMITED BY newline
BADFILE 'Tinusb.txt'
DISCARDFILE 'Tinusd.txt'
LOGFILE 'Tinusl.txt'
SKIP 1
FIELDS TERMINATED BY '|'
MISSING FIELD VALUES ARE NULL
(MACODE,
MANO,
DEPNO,
DEPTYPE,
STARTDATE,
ENDDATE,
OPTIONSTART,
BENEFITSTART,
STARTSUSPEND,
ENDSUSPEND,
INITIALS,
FIRSTNAME,
SURNAME,
STR1,
STR2,
STR3,
STR4,
SCODE,
POS1,
POS2,
POS3,
POS4,
PCODE,
TELH,
TELW,
TELC,
IDNUMBER,
DOB,
GENDER,
EMPLOYER_CODE,
EMPLOYER_NAME
LOCATION (DEMO_FILES:'Test1.txt')
REJECT LIMIT UNLIMITED
LOGGING
NOCACHE
NOPARALLEL;
I have the correct privileges on the directory, but the error seems to be on the EMPLOYER_NAME field. The file I try to upload is in pipe-delimited format. The last field in the file does not have a pipe-delimiter at the end. Can this be the problem? Must I go and look for any trailing spaces? Can I specify in the external table script how many characters I need for the employer_name field? We receive this file from an external company
Thank you very much for the help
Ferdiecommon mistake, you gave the field sizes in the
column listing of the table, but not in the file
definition. oracle does not apply one to the other.
in the file defintion section, give explict field
sizes.Hi shoblock
Sorry for only coming back to you now, thank you for your help, I had to give the explicit field size for the last column (employer name).
Thank you once again!!
Ferdie -
Error while reading data through External Table!!!
CREATE TABLE "COGNOS"."EXT_COGNOS_TBS9_TEST"
( "ITEM_DESC" VARCHAR2(200 BYTE),
"EXT_CODE" VARCHAR2(20 BYTE),
"RC_DATE" DATE,
"RES_KD_AMNT" NUMBER(18,3),
"RES_FC_AMNT" NUMBER(18,3),
"NRES_KD_AMNT" NUMBER(18,3),
"NRES_FC_AMNT" NUMBER(18,3),
"TOTAL" NUMBER(18,3),
"OF_WHICH_OVR1" NUMBER(18,3)
ORGANIZATION EXTERNAL
( TYPE ORACLE_LOADER
DEFAULT DIRECTORY "EXTDATADIR"
ACCESS PARAMETERS
( RECORDS
DELIMITED BY NEWLINE LOAD WHEN *({color:#ff0000}EXT_CODE LIKE 'TBS9%'{color})* FIELDS TERMINATED BY ','
MISSING FIELD VALUES ARE NULL )
LOCATION
( 'TBS9_TEST.CSV'
External table creation went through successfully but am getting error while reading data. Am quite sure error is because of above line in red color. Could you please help me in transforming logic.
Thanks in Advance,
APLet's start with the basics...
1) You state that you are getting an error. What error do you get? Is this an Oracle error (i.e. ORA-xxxxx)? If so, please include the error number and the error message as well as the triggering statement. Or is the problem that rows are getting written to the reject file and errors are being written to the log file? If so, what record(s) are being rejected and what are the reasons given in the log file? Or perhaps the problem is something else?
2) You state that you are quite sure that the problem relates to the hilighted code. What makes you quite sure of this?
Justin -
Error While Viewing Data from MARA Table
Hi All,
After Importing SAP Tables, ex MARA and viewing Data Getting "Error Calling RFC function to get table data: <DATA_BUFFER_EXCEEDED "r . After decreasing or applying filters on fields , still not able to get data.
Able to extract data from T001 table.
Need to pull data in volumes right, so how to tackle this problem.
Thanks,
RavindraHi Ravindra ,
You can check the OSS note - 1186277 for the resolution of this issue .
Note- 1186277 is a SAP knowledge article .
You can access it from here - [Note - 1186277|https://css.wdf.sap.corp/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui_entry/entry.htm?param=69765F6D6F64653D3030312669765F7361706E6F7465735F6E756D6265723D3131383632373726]
Regards,
Lokesh -
Error while loading data into External table from the flat files
HI ,
We have a data load in our project which feeds the oracle external tables with the data from the Flat Files(.bcp files) in unix.
While loading the data, we are encountering the following error.
Error occured (Error Code : -29913 and Error Message : ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04063: un) while loading data into table_ext
Please let us know what needs to be done in this case to solve this problem.
Thanks,
KartheekKartheek,
I used Google (mine still works).... please check those links:
http://oraclequirks.blogspot.com/2008/07/ora-29400-data-cartridge-error.html
http://jonathanlewis.wordpress.com/2011/02/15/ora-29913/
HTH,
Thierry -
Error while downloading data from internal table into XML file
hi all,
i developed a program to download data from into internal table to xml file like this.
tables: mara.
parameters: p_matnr like mara-matnr.
data: begin of itab_mara occurs 0,
matnr like mara-matnr,
ernam like mara-ernam,
aenam like mara-aenam,
vpsta like mara-vpsta,
end of itab_mara.
data: lv_field_seperator type c, " value 'X',
lv_xml_doc_name(30) type c, " string value my xml file,
lv_result type i.
lv_field_seperator = 'x'.
lv_xml_doc_name = 'my xml file'.
types: begin of truxs_xml_line,
data(256) type x,
end of truxs_xml_line.
types:truxs_xml_table type table of truxs_xml_line.
data:lv_tab_converted_data type truxs_xml_line,
lt_tab_converted_data type truxs_xml_table.
data: lv_xml_file type rlgrap-filename value 'c:\simp.xml'.
select matnr ernam aenam vpsta from mara into table itab_mara up to 5
rows where matnr = p_matnr.
CALL FUNCTION 'SAP_CONVERT_TO_XML_FORMAT'
EXPORTING
I_FIELD_SEPERATOR = lv_field_seperator
I_LINE_HEADER =
I_FILENAME =
I_APPL_KEEP = ' '
I_XML_DOC_NAME = lv_xml_doc_name
IMPORTING
PE_BIN_FILESIZE = lv_result
TABLES
I_TAB_SAP_DATA = itab_mara
CHANGING
I_TAB_CONVERTED_DATA = lt_tab_converted_data
EXCEPTIONS
CONVERSION_FAILED = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
open dataset lv_xml_file for output in binary mode.
loop at lt_tab_converted_data into lv_tab_converted_data.
transfer lv_tab_converted_data to lv_xml_file.
endloop.
close dataset lv_xml_file.
this program is syntactically correct and getting executed, but when i open the target xml file it is showing the following error.
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
XML document must have a top level element. Error processing resource 'file:///C:/simp.xml'.
will anyone show me the possible solution to rectify this error
thanks and regards,
anil.Hi,
Here is a small sample program to convert data in an internal table into XML format and display it.
DATA: itab TYPE TABLE OF spfli,
l_xml TYPE REF TO cl_xml_document.
* Read data into a ITAB
SELECT * FROM spfli INTO TABLE itab.
* Create the XML Object
CREATE OBJECT l_xml.
* Convert data in ITAB to XML
CALL METHOD l_xml->create_with_data( name = 'Test1'
dataobject = t_goal[] ).
* Display XML Document
CALL METHOD l_xml->display.
Here are some other sample SAP programs to handle XML in ABAP:
BCCIIXMLT1, BCCIIXMLT2, and BCCIIXMLT3.
Hope this helps,
Sumant. -
Error while Extracting data from generic Table
Hi Gurus,
while trying to get the Data from table in R/3 , we have created a DS.
but while checking the data in RSA3 , i am getting the Following error.
Error 6 in function module RSS_PROGRAM_GENERATE
what could be the Problem , Please help me in this Regard.
Regards
Srinivashi srinivas,
Check whether the fields you added in Generic DS are with correct data type and becoz string data type sometimes gives the same error.
check the field data types that might be the reason for getting this error.
thanks and regards
Neel -
How to insert decimal point while selecting data from a table
Hi All ,
My select requirement says , If the value received with no decimal then insert decimal before last 2 bytes. I need to retrieve data with this condition.
May you people help how i can achieve this?
Thanks in advance,
SachetanIs the data a number in string format?
with q as (select '12345' myNum from dual
union all select '45.78' from dual)
select case when instr(myNum, '.') > 0 then to_number(myNum) else
to_number(substr(myNum, 1, length(myNum) - 2) || '.' ||
substr(myNum, length(myNum) - 1)) end newNum from q
NEWNUM
123.45
45.78If not just use
with q as (select 12345 myNum from dual
union all select 45.78 from dual)
select case
when instr(myNum,'.')>0 then myNum
else myNum/100
end myNum
from q
MYNUM
123.45
45.78 -
DB Connect Load - "Unknow error while uploading data from the DB Table"
Hi Experts,
We have our BI7 system connected to Oracle DB based third party tool. The loads are performing quite well in DEV environment.
I would like to know, how we transport DB Connect datasources to Quality systems? Any different process to be followed for DB Connect datasources?
At present the connections between BI Quality and the third party quality systems are established. We transported the DataSource from BI DEV system to BI quality system, but on trigerring an infopackage we are not able to perform loads. It prompts - "Unknow error while uploading data from the DB Table".
Also on comparing the DataSources in DEV system and Quality system there are no fields in "Proposal" tab of datasource in Quality system. Also I cannot change or activate Datasource in Quality system as we dont have change access in quality.
Please advice.
Thanks,
AbhijitHi,
Sorry for bumping an old thread ....
Did this issue get ever get resolved?
I am facing the same one. The loads work successfully in Dev. The transport for DBConnect DS also moved in successfully.
One strange this is that DB User for dev did not automatically change to db user from quality when I transported the DBConnect datasource. DBCon DS still shows me the DB User from Dev in Quality system
I get "Unknown Error" whenever I trigger the data package.
Advait -
Error in accessing data through external table
Hi,
I am getting the following error while trying to view data through external table,
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04062: no data source specified
ORA-06512: at "SYS.ORACLE_LOADER", line 19
according to this error "KUP-04062: no data source specified", location should be specified and i have specified the location as
LOCATION (<diectory_name>:' '),
then also it is giving the same error.
Please Help!I am also got the same error when retrieving the data from external table.
I resolve this problem, like this:
1. I imported the flat file(.csv) into repository.
2. Map that flat file fields to database table cols.
3. Deployed the mapping using controlcenter, and run the mapping.
4. if it fails there, i loaded the flatfile data through the command prompt using "sqlldr" statement and control file is our mapping control file.
5 Then it loaded data into database table sucessfully.
Thanks. -
How to use for all entires clause while fetching data from archived tables
How to use for all entires clause while fetching data from archived tables using the FM
/PBS/SELECT_INTO_TABLE' .
I need to fetch data from an Archived table for all the entries in an internal table.
Kindly provide some inputs for the same.
thanks n Regards
RameshHi Ramesh,
I have a query regarding accessing archived data through PBS.
I have archived SAP FI data ( Object FI_DOCUMNT) using SAP standard process through TCODE : SARA.
Now please tell me can I acees this archived data through the PBS add on FM : '/PBS/SELECT_INTO_TABLE'.
Do I need to do something else to access data archived through SAP standard process ot not ? If yes, then please tell me as I am not able to get the data using the above FM.
The call to the above FM is as follows :
CALL FUNCTION '/PBS/SELECT_INTO_TABLE'
EXPORTING
archiv = 'CFI'
OPTION = ''
tabname = 'BKPF'
SCHL1_NAME = 'BELNR'
SCHL1_VON = belnr-low
SCHL1_BIS = belnr-low
SCHL2_NAME = 'GJAHR'
SCHL2_VON = GJAHR-LOW
SCHL2_BIS = GJAHR-LOW
SCHL3_NAME = 'BUKRS'
SCHL3_VON = bukrs-low
SCHL3_BIS = bukrs-low
SCHL4_NAME =
SCHL4_VON =
SCHL4_BIS =
CLR_ITAB = 'X'
MAX_ZAHL =
tables
i_tabelle = t_bkpf
SCHL1_IN =
SCHL2_IN =
SCHL3_IN =
SCHL4_IN =
EXCEPTIONS
EOF = 1
OTHERS = 2
OTHERS = 3
It gives me the following error :
Index for table not supported ! BKPF BELNR.
Please help ASAP.
Thnaks and Regards
Gurpreet Singh -
How can we improve the performance while fetching data from RESB table.
Hi All,
Can any bosy suggest me the right way to improve the performance while fetching data from RESB table. Below is the select statement.
SELECT aufnr posnr roms1 roanz
INTO (itab-aufnr, itab-pposnr, itab-roms1, itab-roanz)
FROM resb
WHERE kdauf = p_vbeln
AND ablad = itab-sposnr+2.
Here I am using 'KDAUF' & 'ABLAD' in condition. Can we use secondary index for improving the performance in this case.
Regards,
HimanshuHi ,
Declare intenal table with only those four fields.
and try the beloe code....
SELECT aufnr posnr roms1 roanz
INTO table itab
FROM resb
WHERE kdauf = p_vbeln
AND ablad = itab-sposnr+2.
yes, you can also use secondary index for improving the performance in this case.
Regards,
Anand .
Reward if it is useful....
Maybe you are looking for
-
How to enlarge a video in Premiere Pro without making it blur?
I have this video which I want to enlarge in Premier Pro..but if I enlarge it using the scale method it is very blur when I export the video! hw can i prevent the video from losing it quality and enlarge it!
-
Import COM.dll in java source?
Is there a way to import a DLL from a COM-object into java source code? And if so, how does it work?
-
Contextual Event Automatically refreshing child regions
Hello, Here's my dilemma. We have an ADF page fragment that contains three regions(which point to 3 different bounded task flows). Lets call the bounded taskflows btf1, btf2, and btf3. What currently happens is we use contextual events to create comm
-
Send Form Info. To Email?
How do I send my information inside my form to my email?
-
Ghosts appear on prints from jpeg files which were converted from psd version sets
PSE 10 with Windows 7. I saved some photo files in version sets when editing them for later printing into a book. When I was ready to print, I converted them into jpegs for arranging them on the page with LightRoom and then later printing at a loca