ODI 10g Load table havfing XMLTYPE as one of the data type
I'm trying load data from source to target(Both Oracle) same table. The table has XMLTYPE as one of the data type. I can load the data, if I exclude that one particular column.
Is there any way to load the data from that XMLTYPE column as well? Please provide your input.
Source and traget has the same table structure.
Version: ODI 10G
below is the sample table structure.
CREATE TABLE APPLICATION
APPLID VARCHAR2(20 BYTE) NOT NULL,
JOBTYPE VARCHAR2(20 BYTE),
USRID VARCHAR2(20 BYTE) NOT NULL,
APPDOC SYS.XMLTYPE,
APPLSTATUS VARCHAR2(30 BYTE),
APPLDATE DATE
Thanks
Hi Pankaj,
Remember that 1 character is not equal to 1 byte anymore while numbers/hexadecimals are still.
So, if you have structures that are a mixture of characters and integers/hexadecimals etc, you can not move data from structure to structure as easily as before.
In code you mentioned:
LOOP AT L_TAB INTO L_REC.
APPEND L_REC TO LIST_TAB.
ENDLOOP.
Avoid moving directly from L_REC to LIST_TAB. You can try to define a work area (WA_TAB) for LIST_TAB and use a MOVE-CORRESPONDING from L_REC to the WA_TAB. Then append WA_TAB.
If the field names from L_REC do not match the field names in LIST_TAB, you can manually move each field value to the correct field in the work area.
Reward points if this solves your issue
Similar Messages
-
How to change the data type in the table ESLL for the field USERF2_NUM ?
Hello Friends,
I have a requirement in which one of the change is to convert the data type of the field 'USERF2_NUM' in the table 'ESLL' from 'QUAN' to 'CHAR'.
How do i do it if i have an access to change it..........i think i should also check the impact of the change if done.
Kindly tell me as my requirement starts with this small change.
Regards,
Rajesh KumarThanks for the reply Sowmya.
I would like to know 2 things.
1. Is it ok to change the data type of the field 'USERF2_NUM ' which is in the table ESLL. from quan to char.
2. The table ESLL already has entries. if we change the data type from QUAN to CHAR what is the effect on the existing entries of the table .
Kindly reply me back.
Thanks & Regards,
Rajesh Kumar -
Activation error while changing the data type of a field of a table
hi friends,
i am facing one problem while changing a data type of a field of a table.
i just created one table(Yqm32) .i have assigned charcter data type to one field(ztotal_count) .now i want to change this charcter data type to numeric data type.
while changing to NUMC data type activation error is comming as below.
Table is not yet classified
Field ZTOTAL_COUNT: Type change
ALTER TABLE is not possible
Structure change at field level (convert table YQM32)
Check on table YQM32 resulted in errors
Table YQM32 could not be activated
(E- Structure change at field level (convert table YQM32)
plz suggest.i need to change the data type from char to numc.
Thanks & RegardsHi Pabitra......
From the SE11 change the table as u wanted and then from menubar select
UTILITIES--> DATABASE UTILITY
It will open database utility
there u select the Activate and adjust database button.
then the database table will get adjusted.
just try it once.........
Suresh...... -
Query regarding the data type for fetcing records from multiple ODS tables
hey guys;
i have a query regarding the data type for fetcing records from multiple ODS tables.
if i have 2 table with a same column name then in the datatype under parent row node i cant add 2 nodes with the same name.
can any one help with some suggestion.Hi Mudit,
One option would be to go as mentioned by Padamja , prefxing the table name to the column name or another would be to use the AS keyoword in your SQL statement.
AS is used to rename the column name when data is being selected from your DB.
So, the query Select ename as empname from emptable will return the data with column name as empname.
Regards,
Bhavesh -
How to retrieve the data type of a column of a table?
Hi,
I want to retrieve the data type of a column of a table. At the moment I am querying "OCI_ATTR_DATA_TYPE" attribute but it is returning SQLT_CHR for both varchar2 and nvarchar2 data type columns. I need to distinguish between these two data types columns separately. Is there any API through which I could get the exact data type of a column i.e. "nvarchar2"?
Thanks in advance.
HashimHi,
This is the Oracle C++ Call Interface (OCCI) forum - I'm not sure if you are using OCCI or OCI (Oracle Call Interface - the C interface) since you reference "OCI_ATTR_DATA_TYPE" which is more of an OCI focus than OCCI.
In any case, you might take a look at "OCI_ATTR_CHARSET_FORM" which takes the following values:
#define SQLCS_IMPLICIT 1 /* for CHAR, VARCHAR2, CLOB w/o a specified set */
#define SQLCS_NCHAR 2 /* for NCHAR, NCHAR VARYING, NCLOB */So, if you have a datatype of SQLT_CHR and OCI_ATTR_CHARSET_FORM is SQLCS_IMPLICIT then you have a varchar2 if it is SQLCS_NCHAR then you have an nvarchar2.
If you are using OCCI and not OCI then take a look at MetaData::ATTR_DATA_TYPE and MetaData::ATTR_CHARSET_FORM which expose OCI_ATTR_DATA_TYPE and OCI_ATTR_CHARSET_FORM respectively.
Perhaps that will get you what you want.
Regards,
Mark -
How to get the Data type of the Internal Table.
How can i get the data types used to create an internal table
TYPES : BEGIN OF t_makt,
matnr TYPE matnr,
maktx TYPE maktx,
END OF t_makt.
Like this some function will give me which data types i have used for the internal table at run time.Use the FM ..
data : int_fcat type SLIS_T_FIELDCAT_ALV.
REUSE_ALV_FIELDCATALOG_MERGE ..
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = sy-repid
I_INTERNAL_TABNAME = 'IMAT' <-- this is your internal table
I_INCLNAME = sy-repid
CHANGING
CT_FIELDCAT = int_fcat <--- this contains all the fields along with their characteristics ...
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3. -
In the attached VI why does one loop coerce the data type while the other doesn't?
In the attached VI why does one loop coerce the data type while the other doesn't?
Solved!
Go to Solution.
Attachments:
AAA.vi 8 KBI'm guessing you created the Enum on the front panel. If you right-click it and create an indicator, it will match the type, and be an enum. LabVIEW represents enums as U16, but because the types aren't identical (for example, your enum has 3 values, but a U16 has 65,536 values), LabVIEW automatically coerces (or converts) the smaller (enum) representation into the larger (U16) value.
-
How to Find the Data Type of the Field In a Database Table
Hi Experts,
I'm currently working on a program which needs to find out the data type of the given field in a database table. In addition to accessing DD03L directly, is there any other workaround such as function module to help me achieve this? It would be helpful if a demo example could be provided.
Thanks a lot.Hi,
Use this..
DESCRIBE FIELD dobj TYPE typ.
write typ.
type will contain the data type of the object.
and check this thread also....
Re: How to get datatype of fields in dynamic structures
Cheers,
Simha.
Reward all the helpful answers.. -
Let me describe you the program I have to write:
I have to send 102 bit serialy using one of the data line of the LPT port to a device and be able to read back data sent from a device register throug one one of the input port pin for instance pin 10 of a DB25, and synchronize the transmission by the PC clock(for write and read). If fact I am using 5 output control(D0...D4) signal from the LPT port, RST, TXD, CLK, CE,TEST, one input data RXD (pin10)
So the program should work in normal mode (write data, read data), and test mode (use the write p
rocedure). Since I am quite new in Labview I am little lost and I need some support or exemple that use a way to send more than 32 bit via one data line(in my case 102bit= 8 bit COMMAD(MSB)+88 bit SPI DATA+6 bits CRC(LSB)) and be able to read them back, place them in the register and be able either to monitor or modify them.
I know that there are plenty of exemple but if I can gain time by being helped it would be great.
Can you please advise?Hi Beni,
find attached a SPI.vi - minor changed from one of
my typical SPI's (LabVIEW 7.1). With some simple changes it will fit to your application.
The only thing you need to do - prepare
the bits for the input-array.
If you need some more comments - find one of my email
adresses in documentation of this vi.
Regards
Werner
Attachments:
102bit_SPI.zip 90 KB -
Querying the data type of a table/view
Is there a sql statement that will 'return' the data type of a specified table/view?
For instance column x of table y has data type int, is there a statement such as:
SELECT data_type FROM y WHERE column_name = 'x'
I know the above won't work but it gives the gist of what I am looking for.SQL> select table_name, column_name, data_type, data_length, data_precision, data_scale
2 from user_tab_columns
3 where table_name = 'EMP';
TABLE_NA COLUMN_N DATA_TYP DATA_LENGTH DATA_PRECISION DATA_SCALE
EMP EMPNO NUMBER 22 4 0
EMP ENAME VARCHAR2 10
EMP JOB VARCHAR2 9
EMP MGR NUMBER 22 4 0
EMP HIREDATE DATE 7
EMP SAL NUMBER 22 7 2
EMP COMM NUMBER 22 7 2
EMP DEPTNO NUMBER 22 2 0
8 rows selected.
SQL> desc emp
Name Null? Type
EMPNO NOT NULL NUMBER(4)
ENAME VARCHAR2(10)
JOB VARCHAR2(9)
MGR NUMBER(4)
HIREDATE DATE
SAL NUMBER(7,2)
COMM NUMBER(7,2)
DEPTNO NUMBER(2)
SQL>Message was edited by:
Jens Petersen -
A new version of the data type is present than one required
Hi Experts,
I am getting a short dump saying "A new version of the data type is present than one required".
The data type in my case is the Transfer structure for 2LIS_02_SCL. I am getting this short dump whenever i try to change the transfer rules.
I tried activating and deactivating the transfer and update rules but to no avail. Kindly advice.
Thanks in advance.SAP Note 1157796 resolved the issue.
-
i am doing one Labview project. so my project is about design a interface in labview which one collect the data from keithley 2400 via GPIB connection. any suggestion please
Your first task should be to just be able to send commands to the instrument. Do as Dennis suggested and download the drivers for the instrument and get familiar with them. Build up small VIs that do little tasks with those drivers so you can get used to them. Then worry about your main interface.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines -
Deleting a row from a table containing CLOB as one of the columns
When i delete a row from a table which contains a CLOB (internal clob) i.e. CLOB or BLOB column, Will the CLOB data will also be deleted ? I understand that what exactly stored in the CLOB column is the clob locator which points to the actual data.
So, when I delete this row, the clob locator will be deleted, but will the actual data what this locator is pointing to is also deleted ??? if not what is the process to delete the data the locator is pointing to when the row containing the locator is deleted ? If this is not happening then the actual data might become an orphan data which nobody has access to, will automatic garbage cleaning occurs on a frequent intravels to delete unaddressed data residing on the database server ?
Thanks in advance for the help, can email me at [email protected] alternatively.
Regards,
Srinivasa C.Michael,
Thanks very much for your inputs, here are the results i got when i tried the way you explained in your answer, the TRUNCATE command made the actual size back to normal, but the delete is not the same, so, how can i delete the data that a particular clob locator may point to ?
truncate would delete all the rows of the table, which might not serve my purpose, i would like to delete a row and also it's associated clob data from the database! is there anyway to do this ?
is there any limitation on the ool_sample size? i am basically a c++ programmer, i am looking for some function like FREE which would free the allocated memory to the clob once the locator is deleted.
your help is greatly appreciated - Thanks!
:-) Srini.
==========================
My Results:
==========================
SQL> create table sample (
2 id integer primary key,
3 the_data CLOB default empty_clob() )
4 lob (the_data) store as ool_sample;
Table created.
SQL> select segment_name, round(sum(bytes)/1024, 2) || 'K' as sotrage_consumed
2 from user_segments
3 where segment_name in ('SAMPLE', 'OOL_SAMPLE')
4 group by segment_name;
SEGMENT_NAME
SOTRAGE_CONSUMED
OOL_SAMPLE
20K
SAMPLE
10K
SQL> select count(*) from sample;
COUNT(*)
0
SQL> begin
2 for i in 1..1000
3 loop
4 insert into sample values (i, RPAD('some data', 4000) );
5 end loop;
6 end;
7 /
PL/SQL procedure successfully completed.
SQL> select segment_name, round(sum(bytes)/1024, 2) || 'K' as sotrage_consumed
2 from user_segments
3 where segment_name in ('SAMPLE', 'OOL_SAMPLE')
4 group by segment_name;
SEGMENT_NAME
SOTRAGE_CONSUMED
OOL_SAMPLE
6420K
SAMPLE
70K
SQL> delete sample;
1000 rows deleted.
SQL> select segment_name, round(sum(bytes)/1024, 2) || 'K' as sotrage_consumed
2 from user_segments
3 where segment_name in ('SAMPLE', 'OOL_SAMPLE')
4 group by segment_name;
SEGMENT_NAME
SOTRAGE_CONSUMED
OOL_SAMPLE
6420K
SAMPLE
70K
SQL> commit;
Commit complete.
SQL> select segment_name, round(sum(bytes)/1024, 2) || 'K' as sotrage_consumed
2 from user_segments
3 where segment_name in ('SAMPLE', 'OOL_SAMPLE')
4 group by segment_name;
SEGMENT_NAME
SOTRAGE_CONSUMED
OOL_SAMPLE
6420K
SAMPLE
70K
SQL> begin
2 for i in 1..1000
3 loop
4 insert into sample values (i, rpad('some data', 4000));
5 end loop;
6 end;
7 /
PL/SQL procedure successfully completed.
SQL> select segment_name, round(sum(bytes)/1024, 2) || 'K' as sotrage_consumed
2 from user_segments
3 where segment_name in ('SAMPLE', 'OOL_SAMPLE')
4 group by segment_name;
SEGMENT_NAME
SOTRAGE_CONSUMED
OOL_SAMPLE
9616K
SAMPLE
70K
SQL> truncate table sample;
Table truncated.
SQL> select segment_name, round(sum(bytes)/1024, 2) || 'K' as sotrage_consumed
2 from user_segments
3 where segment_name in ('SAMPLE', 'OOL_SAMPLE')
4 group by segment_name;
SEGMENT_NAME
SOTRAGE_CONSUMED
OOL_SAMPLE
20K
SAMPLE
10K -
Hi all,
I am new to ABAP Development. I need to upload a .DAT file (the file doesn#t have any proper structure-- Please find the .DAT file in the attachment). After uploading the DATA (.DAT) fiel I need to split in into different columns. Refering the attached .DAT fiel the fields in bracets like:
[Arbeitstag], [Pecunia], [Mita], [Kunde], [Auftrag] and [Position] are different fields that need to be arranged in columns in an internal table. this .DAT fiel which I want to upload and then SPLIT it into various fields will will treated as MASTER DATA table for further programming. The program that I had written is as below. Also please refer the attached .DAT table.
Please if any one could help me. i searched a lot in different forums but couldn't find me a solution. Also note that the attached fiel is in text (.txt) format here but in real situation the same fiel is in DATA (.DAT) format.
*& Report ZDEMO_ZEITERFASSUNG9
REPORT ZDEMO_ZEITERFASSUNG9.
Types: Begin of ttab,
Rec(1000) type c,
End of ttab.
DATA: itab type table of ttab.
DATA: wa_tab type ttab.
DATA: file_str type string.
Parameters: p_file type localfile.
At selection-screen on value-request for p_file.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
* PROGRAM_NAME = SYST-REPID
* DYNPRO_NUMBER = SYST-DYNNR
* FIELD_NAME = ' '
STATIC = 'X'
* MASK = ' '
CHANGING
file_name = p_file.
* EXCEPTIONS
* MASK_TOO_LONG = 1
* OTHERS = 2
Start-of-Selection.
file_str = P_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = '\\10.10.1.92\Volume_1\_projekte\Zeiterfassung-SAP\BUP_ZEIT.DAT' " This the file source address
FILETYPE = 'DAT'
HAS_FIELD_SEPARATOR = ';'
* HEADER_LENGTH = 0
* READ_BY_LINE = 'X'
* DAT_MODE = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* CHECK_BOM = ' '
* VIRUS_SCAN_PROFILE =
* NO_AUTH_CHECK = ' '
* IMPORTING
* FILELENGTH =
* HEADER =
tables
data_tab = itab
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP at itab into wa_tab.
WRITE: / wa_tab.
ENDLOOP.
I will be grateful to all you experts for ur inputs
regards
Chandan SinghFor every Auftrag, there are multiple Position entries.
Rest of the blocks don't seems to have any relation.
So you can check this code to see how internal table lt_str is built whose first 3 fields have data contained in Auftrag, and next 3 fields have Position data. The structure is flat, assuming that every Position record is related to preceding Auftrag.
Try out this snippet.
DATA lt_data TYPE TABLE OF string.
DATA lv_data TYPE string.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = 'C:\temp\test.txt'
CHANGING
data_tab = lt_data
EXCEPTIONS
OTHERS = 19.
CHECK sy-subrc EQ 0.
TYPES:
BEGIN OF ty_str,
a1 TYPE string,
a2 TYPE string,
a3 TYPE string,
p1 TYPE string,
p2 TYPE string,
p3 TYPE string,
END OF ty_str.
DATA: lt_str TYPE TABLE OF ty_str,
ls_str TYPE ty_str,
lv_block TYPE string,
lv_flag TYPE boolean.
LOOP AT lt_data INTO lv_data.
CASE lv_data.
WHEN '[Version]' OR '[StdSatz]' OR '[Arbeitstag]' OR '[Pecunia]'
OR '[Mita]' OR '[Kunde]' OR '[Auftrag]' OR '[Position]'.
lv_block = lv_data.
lv_flag = abap_false.
WHEN OTHERS.
lv_flag = abap_true.
ENDCASE.
CHECK lv_flag EQ abap_true.
CASE lv_block.
WHEN '[Auftrag]'.
SPLIT lv_data AT ';' INTO ls_str-a1 ls_str-a2 ls_str-a3.
WHEN '[Position]'.
SPLIT lv_data AT ';' INTO ls_str-p1 ls_str-p2 ls_str-p3.
APPEND ls_str TO lt_str.
ENDCASE.
ENDLOOP. -
In table rows , i need to check the date validation of perivous ent'd rows
Hi All,
I'm using adf 11g.
I have a table with add and delete button in jsff. In jsff page , i mean table row have one lov column and date column and enterable inputtext fields .
Conditions 1.lov value , date column and inputext value should be unique . this can be handled by alternate key.
2. if user enters value like
lov value date inputtext
v1 01/02/2011 ipt1
v2 01/02/2011 ipt2
v1 01/01/2011 ipt3 here , lov selected v1 is already selected in first row, i want to validate dat second occurance of v1 with combination date and inputtext should be
unique --- it makes unique with compare to first row .but i have to check second v1 date should be always greater than the first v1's date .
User can add n number of records of keeping date variance , but the same lov value having record , the date should be always less than the perivouse entered row date (same lov value ).
how can i handle this date check . business rules / validation .
thanks in advance .
Edited by: user9010551 on Jun 16, 2011 9:23 PM
Edited by: user9010551 on Jun 16, 2011 11:25 PMyou have to make use of this technique - in memeory filtering
http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcadvvo.htm#CEGBEICF
Maybe you are looking for
-
How can I close out the page I am working on in safari when error boxes keep popping up?
How can I close out the page I am working on in safari when error boxes keep popping up?
-
Read timed out error while executing a web service
hi, i have a remote funtion module which takes around 31 seconds in AAD (developing enviroment) server which has around 4 select queries,the same RFC is taking around 25 mins in AAT (testing environment) due to more data. Now when i am releasing the
-
There are a couple songs I've been unsure of purchasing on iTunes. a couple feature an A side and B side. These songs/tracks will have something of a 4 minute song, with something of a 3+ minute gap of pure silence continuing on with something of a 2
-
ATV limited to 720p, 24 fps?
There are many H.264 camcorders nowadays like the Flip MinoHD, VadoHD, Sanyo Xacti and the Kodak Zi6 among others. By default, recording is usually at 720p at 30 fps. The ATV cannot play back these recordings without having to downgrade the format to
-
Itunes - we had difficulty download episodes from your feed
I know I'm not the only person who has encountered this but I tried to create a podcast from our new website http://www.churchatfour.com/talks.html I used the RSS feed http://www.churchatfour.com/2/feed and submitted it to feedburner but got the mess