File adapter fixed lenght with justify
Hi Developers ,
I'm developing an interface JDBC - File , the file have a special format because is a flat file with fixed length and some of the fields have to a justified to left , it's possible do that with the file content conversion ????,
the example of the file is :
lenght fields :3,3,3
xx , xx,xxx
xx , xx,xxx
xx , xx,xxx
Regards
Hi,
Please see the below links
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1 - File to File Part 1
/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2 - File to File Part 2
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC
/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns - FCC
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file - FCC
/people/harrison.holland5/blog/2006/12/20/xi-configuration-for-mdm-integration--sample-scenario - FCC - MDM
/people/shabarish.vijayakumar/blog/2006/04/03/xi-in-the-role-of-a-ftp - FCC
/people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy - FCC
/people/mickael.huchet/blog/2006/09/18/xipi-how-to-exclude-files-in-a-sender-file-adapter - EOIO - File
Regards
Chilla...
Similar Messages
-
Sender File Adapter - Fixed Length
We have a Fixed File(Sender). With 3 fields. NO Header. Space is the separator for each fields
VendorNumber 10 bytes
VendorName 10 bytes
City 5 bytes
In the File we can have multiple records.
The Root Node is Vendor.
I am trying to define the SENDER FILE ADAPTER in the following way (I have referred mostly all the blogs) but my file is not picking up for some reason.
File looks like this
V123456789 A123456789 Bosto
V234567890 B123456789 Atlan
V334587900 C123456789 Austi
Note : I have been asked to give the Transport Protocol as "NFS" (Whether this is the problem???) I have summarised the complete details below. Please help me
Adapter Type : File Sender
Transport Protocol : NFS
Message Protocol : File Content Convervsion
Adapter Engine : Integration Server
FILE ACCESS PARAMETERS
Source Directory : /business
file Name : vendor.txt
Content Conversion Parameters
Document Name : Vendor
Document NameSpace: http://sap.com/xi/XI/SplitAndMerge
Recordsetname : Message1
Record Structure : File_MT,*
Recordset Sequence: Ascending
Key Field type : String(Case Sensitive)
Additional Parameters
File_MT.fieldFixedLengths 10,10,5
File_MT.fieldNames VendorNumber,VendorName,City
File_MT.fieldSeparator
File_MT..processFieldNames fromConfiguration.Hi Naveen,
Do check the following things,
>>Note : I have been asked to give the Transport Protocol as "NFS" (Whether this is the problem???) I have summarized the complete details below. Please help me
1.If your file resides on your local network/local computer give NFS(Network file system). if your file resides on a FTP location give FTP and also give the FTP log on parameters.
Additional Parameters
File_MT.fieldFixedLengths 10,10,5
File_MT.fieldNames VendorNumber,VendorName,City
File_MT.fieldSeparator
File_MT..processFieldNames fromConfiguration
2.If this structure does not match with the input file structure the file adapter wont pick up the file. So check for the help document provided by SAP in the following path.
help.sap.com --> Documentation --> SAPNetWeaver --> SAPNetWeaver '04 --> English --> process integration --> SAP Exchange Infrastructure --> connectivity --> Adapters --> File Adapter
Your file contains three records
V123456789 A123456789 Bosto
V234567890 B123456789 Atlan
V334587900 C123456789 Austi
You have mentioned the fieldSeperator as space but there is no File_MT.endSeparator '/n' which differentiates between each and every row (record).
Parameters for Record set Structures mentioned in the sender adapter configuration does not match with the actual file structure .
Try giving exact structures in the configuration of sender file adapter.
regards,
Aravindh. -
File Adapter: Fixed length file read fails when all data not present
Hi
We have a BPEL process that reads fixed length data files. It works fine when all the data elements are available in the file but fails with 'rejected:10002' when even a single data is missing.
How to handle this situation in BPEL file adapter?
Are we doing something wrong or is this a normal functionality.
If yes, then is there any work around for this as this is a very usual business condition which may occur, where all data elements are not mandetory.
fixedLength
==========
2,3,3,2
Data - Successful
============
1234567890
2345678901
3456789012
Data - Failed
===========
1234567890
2345678901
345678901
Thanks in advance
BuddhadevHi Naveen,
Do check the following things,
>>Note : I have been asked to give the Transport Protocol as "NFS" (Whether this is the problem???) I have summarized the complete details below. Please help me
1.If your file resides on your local network/local computer give NFS(Network file system). if your file resides on a FTP location give FTP and also give the FTP log on parameters.
Additional Parameters
File_MT.fieldFixedLengths 10,10,5
File_MT.fieldNames VendorNumber,VendorName,City
File_MT.fieldSeparator
File_MT..processFieldNames fromConfiguration
2.If this structure does not match with the input file structure the file adapter wont pick up the file. So check for the help document provided by SAP in the following path.
help.sap.com --> Documentation --> SAPNetWeaver --> SAPNetWeaver '04 --> English --> process integration --> SAP Exchange Infrastructure --> connectivity --> Adapters --> File Adapter
Your file contains three records
V123456789 A123456789 Bosto
V234567890 B123456789 Atlan
V334587900 C123456789 Austi
You have mentioned the fieldSeperator as space but there is no File_MT.endSeparator '/n' which differentiates between each and every row (record).
Parameters for Record set Structures mentioned in the sender adapter configuration does not match with the actual file structure .
Try giving exact structures in the configuration of sender file adapter.
regards,
Aravindh. -
File Adapter Fixed Field Length
Hello,
I have the following problem. The file that is being generated is fixed length. However, there is no "\n" end line character in the end of each record. It is one big row of data. Is there any way to separate such file into records of information using File Adapter, since it seems with no "\n", File Adapter always has just ONE record.
Thank you for your help,
Dmitriy MindichWe're running J2EE.
Specifying 'nl' is newline - I don't have newline, just one gigantic stream...
Example -
Row contains Header(1), Line(n)
All records are fixed-width
Header has 3 fields
===================
RecordType 3 chars (this is the key - indicated by 450)
OrderNum 5 chars
Order Type 2 chars
Line has 3 fields
===================
RecordType 3 chars (this is the key - indicated by 475)
LineNum 4 chars
PartNo 5 chars
So the data would look like this
450Ord01ZS4750001PartA4750002PartB
This would be an order w/ 2 lines. If I send this stream in, only the header is read, the lines are dropped, and my mapping fails b/c the lines need to be there. -
File Adapter fixed length Native format Builder schema not reading the data as expected
Hi
We are using a File Adapter for reading a fixed length data. Using the schema we are able to read the file but the places are incorrect. Following is the schema that we used and the payload.
At the last you can find our expected read of data how it should be.
With out the record type code we are not even reading the file. Hope there should be a correction in the schema. Please suggest
Schema that we are using:
<?xml version= '1.0' encoding= 'UTF-8' ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
xmlns:tns="http://xmlns.energy.com/CreateReturnedItemGENVNDRPReqABCSImplFileAdapterReadReturnedItem"
targetNamespace="http://xmlns.energy.com/CreateReturnedItemGENVNDRPReqABCSImplFileAdapterReadReturnedItem"
elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:version="NXSD" nxsd:stream="chars"
nxsd:encoding="US-ASCII">
<xsd:element name="GENVNDRReturnedItem">
<xsd:complexType>
<xsd:sequence minOccurs="1" maxOccurs="unbounded" nxsd:choiceCondition="fixedLength" nxsd:length="1">
<xsd:element name="HeaderRec" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:startsWith="1">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="RecordTypeCode" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="1" nxsd:padStyle="tail"/>
<xsd:element name="PriorityCode" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="2" nxsd:padStyle="tail"/>
<xsd:element name="ImmediateDstn" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="10" nxsd:padStyle="tail"/>
<xsd:element name="ImmediateOrgin" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="10" nxsd:padStyle="tail"/>
<xsd:element name="FileCrDt" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="6" nxsd:padStyle="tail"/>
<xsd:element name="FileCrTm" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="4" nxsd:padStyle="tail"/>
<xsd:element name="FileIdMdfr" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="1" nxsd:padStyle="tail"/>
<xsd:element name="RecSize" type="xsd:string" nxsd:style="fixedLength" nxsd:length="3"
nxsd:padStyle="tail"/>
<xsd:element name="BlockingFctr" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="2" nxsd:padStyle="tail"/>
<xsd:element name="FormatCd" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="1" nxsd:padStyle="tail"/>
<xsd:element name="ImmediateDstnNm" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="23" nxsd:padStyle="tail"/>
<xsd:element name="ImmediateOrginNm" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="23" nxsd:padStyle="tail"/>
<xsd:element name="RefCd" type="xsd:string" nxsd:style="fixedLength" nxsd:length="8"
nxsd:padStyle="tail"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="BatchHdrRec" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:startsWith="5">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="RecordTypeCode" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="1" nxsd:padStyle="tail"/>
<xsd:element name="ServClsCode" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="3" nxsd:padStyle="tail"/>
<xsd:element name="CmpnyName" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="16" nxsd:padStyle="tail"/>
<xsd:element name="CmpnyDiscretionaryData" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="20" nxsd:padStyle="tail"/>
<xsd:element name="CmpnyIdfn" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="10" nxsd:padStyle="tail"/>
<xsd:element name="StdClsCode" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="3" nxsd:padStyle="tail"/>
<xsd:element name="CmpnyEntryDesc" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="10" nxsd:padStyle="tail"/>
<xsd:element name="CmpnyDescDate" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="6" nxsd:padStyle="tail"/>
<xsd:element name="EffEntryDate" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="6" nxsd:padStyle="tail"/>
<xsd:element name="SettlementDate" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="3" nxsd:padStyle="tail"/>
<xsd:element name="OrgntrStatusCode" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="1" nxsd:padStyle="tail"/>
<xsd:element name="OrgntrBatchCode" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="15" nxsd:padStyle="tail"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="FileControlRec" nxsd:style="terminated" nxsd:terminatedBy="${eol}"
nxsd:startsWith="9">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="RecordTypeCode" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="1" nxsd:padStyle="tail"/>
<xsd:element name="BatchCnt" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="6" nxsd:padStyle="tail"/>
<xsd:element name="BlockCnt" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="6" nxsd:padStyle="tail"/>
<xsd:element name="EntryAddendaCnt" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="8" nxsd:padStyle="tail"/>
<xsd:element name="EntryHash" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="10" nxsd:padStyle="tail"/>
<xsd:element name="TtlDbtEntryDlrAmt" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="12" nxsd:padStyle="tail"/>
<xsd:element name="TtlCrdtEntryDlrAmt" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="12" nxsd:padStyle="tail"/>
<xsd:element name="Reserved" type="xsd:string" nxsd:style="fixedLength"
nxsd:length="39" nxsd:padStyle="tail"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Sample data:
1011390714890 0910000191406110449A094101MCSCLDA_TESTIN
XPLLS KNRGO CNNK
5200MCSCLDA_TESTIN e-Bill
2390714890TELe-Bill
1406100001091000017000001
6262759774891010000074743
0000033793102651-013 U HOLBACH KARLA & JAMES 1091000013925011
799R01091000013925011
27597748
091000010000001
820000000200275977480000000337930000000000002390714890
091000010000001
9000060000025000001200995048661000001265867000000000000
Read File receive Activity:
<GENVNDRReturnedItem>
<HeaderRec>
<RecordTypeCode>0</RecordTypeCode>
<PriorityCode>11</PriorityCode>
<ImmediateDstn>390714890</ImmediateDstn>
<ImmediateOrgin>0910000191</ImmediateOrgin>
<FileCrDt>406110</FileCrDt>
<FileCrTm>449A</FileCrTm>
<FileIdMdfr>0</FileIdMdfr>
<RecSize>941</RecSize>
<BlockingFctr>01</BlockingFctr>
<FormatCd>M</FormatCd>
<ImmediateDstnNm>CSCLDA_TESTIN X</ImmediateDstnNm>
<ImmediateOrginNm>PLLS KNRGO CNNK</ImmediateOrginNm>
<RefCd></RefCd>
</HeaderRec>
<BatchHdrRec>
<RecordTypeCode>2</RecordTypeCode>
<ServClsCode>00M</ServClsCode>
<CmpnyName>CSCLDA_TESTIN e</CmpnyName>
<CmpnyDiscretionaryData>-Bill 2</CmpnyDiscretionaryData>
<CmpnyIdfn>390714890T</CmpnyIdfn>
<StdClsCode>ELe</StdClsCode>
<CmpnyEntryDesc>-Bill</CmpnyEntryDesc>
<CmpnyDescDate>1</CmpnyDescDate>
<EffEntryDate>406100</EffEntryDate>
<SettlementDate>001</SettlementDate>
<OrgntrStatusCode>0</OrgntrStatusCode>
<OrgntrBatchCode>91000017000001</OrgntrBatchCode>
</BatchHdrRec>
<FileControlRec>
<RecordTypeCode>0</RecordTypeCode>
<BatchCnt>000600</BatchCnt>
<BlockCnt>000250</BlockCnt>
<EntryAddendaCnt>00001200</EntryAddendaCnt>
<EntryHash>9950486610</EntryHash>
<TtlDbtEntryDlrAmt>000012658670</TtlDbtEntryDlrAmt>
<TtlCrdtEntryDlrAmt>00000000000</TtlCrdtEntryDlrAmt>
<Reserved></Reserved>
</FileControlRec>
</GENVNDRReturnedItem>
Expected Read data how we are looking:
<GENVNDRReturnedItem>
<HeaderRec>
<RecordTypeCode>0</RecordTypeCode>
<PriorityCode>11</PriorityCode>
<ImmediateDstn>39071489</ImmediateDstn>
<ImmediateOrgin>0091000019</ImmediateOrgin>
<FileCrDt>140611</FileCrDt>
<FileCrTm>0449</FileCrTm>
<FileIdMdfr>A</FileIdMdfr>
<RecSize>094</RecSize>
<BlockingFctr>10</BlockingFctr>
<FormatCd>1</FormatCd>
<ImmediateDstnNm>MCSCLDA_TESTIN</ImmediateDstnNm>
<ImmediateOrginNm>XPLLS KNRGO CNNK</ImmediateOrginNm>
<RefCd/>
</HeaderRec>
<BatchHdrRec>
<RecordTypeCode>2</RecordTypeCode>
<ServClsCode>200</ServClsCode>
<CmpnyName>MCSCLDA_TESTIN</CmpnyName>
<CmpnyDiscretionaryData>e-Bill</CmpnyDiscretionaryData>
<CmpnyIdfn>2390714890</CmpnyIdfn>
<StdClsCode>TEL</StdClsCode>
<CmpnyEntryDesc>e-Bill</CmpnyEntryDesc>
<CmpnyDescDate/>
<EffEntryDate>140610</EffEntryDate>
<SettlementDate>000</SettlementDate>
<OrgntrStatusCode>1</OrgntrStatusCode>
<OrgntrBatchCode>091000017000001</OrgntrBatchCode>
</BatchHdrRec>
<FileControlRec>
<RecordTypeCode>0</RecordTypeCode>
<BatchCnt>000060</BatchCnt>
<BlockCnt>000025</BlockCnt>
<EntryAddendaCnt>00000120</EntryAddendaCnt>
<EntryHash>0995048661</EntryHash>
<TtlDbtEntryDlrAmt>000001265867</TtlDbtEntryDlrAmt>
<TtlCrdtEntryDlrAmt>000000000000</TtlCrdtEntryDlrAmt>
<Reserved/>
</FileControlRec>
</GENVNDRReturnedItem>at step 8 of 9 of the file adapter wizard, the icon appears as a cog, on the right, with caption "define schema for native format".
I have JDev 11..1.1.3.0
The problem might be with the version of the SOA extensions you have installed.... -
Problem in Sender File Adapter using FCC with Variable structure
Hi Experts,
Hi Experts,
I have facing an issues while using FCC in Sender File adapter. Below are the configs for the same:-
Recordset structure required is ==HEADER,1,DATA,*,TRAILER,1
Recordset per message == *
Key Field Name == Key
(Sorry i dont know how to insert screen shot here..pls tell me how can i insert screen shots here on sdn)
HEADER.fieldSeparator ,
HEADER.endSeparator u2018nlu2019
HEADER.fieldNames Key,x,y,zu2026
HEADER.keyFieldValue 1
HEADER.keyFieldInStructure ignore
HEADER.fieldContentFormatting trim
HEADER.additionalLastFields ignore
HEADER.missingLastFields ignore
DATA.fieldSeparator
DATA.endSeparator
DATA.fieldNames
DATA.keyFieldValue
DATA.keyFieldInStructure
DATA.fieldContentFormatting
DATA.additionalLastFields
DATA.missingLastFields
Using same variables for Trailer record as well.
Source CSV file which i am picking:-
ADSE ,RASD,replan Contact ,2 0080509 0 8:43:25 ,
EMPL ,0011111, S Top Up ,20080401 ,20080430 ,sdf , 00000000431250 ,2007 , , , , , ,20080414 18:07:35,
EMPL ,0222222, r Cash Award ,20070701 ,20070703 ,ded , 00000000023509 ,2007 , , , , , ,20080414 18:09:31,
EMPL ,0233333, Cash Award ,20070801 ,20070831 ,df , 00000000044057 ,2007 , , , , , ,20080414 18:10:56,
EMPL ,0244444, Cash Award ,20080101 ,20080111 ,sf , 00000000026717 ,2007 , , , , , ,20080414 18:08:29,
BTRL , 5140,
When i tested the scenario and monitored it using MDT in CC monitoring tool its giving me below mentioned 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 'http://myurlname/mdt/me...
However if i change the occurence of DATA as some specific value for eg 4 instead of * it works fine.
Kindly help me in solving this problem.
Thanks,
Aditya VermaHi Madan,
Thanks a lot for giving me the way to this. But when i tested this with the below file its giving me the same error. Please let me know if i need to do any changes to the parameters mentioned above:-
ADSE ,ASDA,Sha replan Fr ont Feed Contact ,2 0080509 0 8:43:25 ,
EMPL ,0011111, Cash Top Up ,20080401 ,20080430 ,TPV , 00000000431250 ,2007 , , , , , ,20080414 18:07:35,
EMPL ,0222222, r Cash Award ,20070701 ,20070703 ,TPV , 00000000023509 ,2007 , , , , , ,20080414 18:09:31,
EMPL ,0233333, r Cash Award ,20070801 ,20070831 ,TPV , 00000000044057 ,2007 , , , , , ,20080414 18:10:56,
EMPL ,0244444, Cash Award ,20080101 ,20080111 ,TPV , 00000000026717 ,2007 , , , , , ,20080414 18:08:29,
EMPL ,0255555, Cash Award ,20080301 ,20080320 ,TPV , 00000000027870 ,2007 , , , , , ,20080414 18:08:25,
EMPL ,0266666, Cash Award ,20071001 ,20071020 ,TPV , 00000000020681 ,2007 , , , , , ,20080414 18:09:31,
EMPL ,0877777, Cash Top Up ,20080401 ,20080430 ,TPV , 00000000036000 ,2007 , , , , , ,20080414 18:07:05,
EMPL ,0888888, Leaver Cash Award ,20071201 ,20071231 ,TPV , 00000000157200 ,2007 , , , , , ,20080414 18:11:29,
EMPL ,0899999, S Leaver Cash Award ,20080301 ,20080331 ,TPV , 00000000153530 ,2007 , , , , , ,20080414 18:07:42,
EMPL ,0800000, S Leaver Cash Award ,20070701 ,20070731 ,TPV , 00000000012234 ,2007 , , , , , ,20080414 18:08:34,
BTRL , 5140,
This the original csv file which i'll get in live. Kindly suggest as ur solution worked with other file but not working with this scv file.
Thanks a lot,
Aditya. -
Problem in file-Adapter during polling with u00E4,u00F6 etc.
Hallo,
i have the problem described above. Is there any help?
Thanks,
FrankHi,
Please change the File Encoding in the sender file adapter to <b>ISO-8859-1</b>.
Please look into this link,.
http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
--> File Type.
<i>File Type
Specify the document data type.
○ Binary
○ Text
Under File Encoding, specify a code page.
The default setting is to use the system code page that is specific to the configuration of the installed operating system. The file content is converted to the UTF-8 code page before it is sent.
Permitted values for the code page are the existing Charsets of the Java runtime. According to the SUN specification for the Java runtime, at least the following standard character sets must be supported:
■ US-ASCII
Seven-bit ASCII, also known as ISO646-US, or Basic Latin block of the Unicode character set
■ <b>ISO-8859-1
ISO character set for Western European languages (Latin Alphabet No. 1), also known as ISO-LATIN-1</b>
■ UTF-8
8-bit Unicode character format
■ UTF-16BE
16-bit Unicode character format, big-endian byte order
■ UTF-16LE
16-bit Unicode character format, little-endian byte order</i>
Regards
Bhavesh -
File Adapter Fixed Length File issue
Hi,
I have a fixed length flat file with each row 13 characters long. First character of each row represents a record type i.e. 0,1,2,3,4,5,6,7,8,9 here is my sample file:
0123456
960373
A602710542583
7602710542583
1602750499275
4602750499275
1602750529800
7602750529800
1603030507732
7603030507732
1603030509055
7603030509055
1603030509229
7603030509229
2603600556240
0603600566095
2603600567460
3603310536370
5603310525810
3603310531092
3603310521842
0603310521842
3603310521842
3603310521842
860201450SA A
560201451SA A
560201452SA A
560201453SAN
1603630565355
7603630565355
1603630565500
7603630565500
9603460539390
2603460535260
3603790509870
560200401ABIL
660372TX066
660373TX01531
660373TX01532
860373TX066
660373TX068
360373TX09465
660373TX09471Here is the schema
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://xmlns.oracle.com/pcbpel/tstSchema/SMP" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" targetNamespace="http://xmlns.oracle.com/pcbpel/tstSchema/SMP" elementFormDefault="qualified" attributeFormDefault="qualified" nxsd:version="NXSD" nxsd:stream="chars">
<element name="SMP">
<complexType>
<choice maxOccurs="unbounded" nxsd:choiceCondition="fixedLength" nxsd:length="1">
<element ref="tns:smpRecords" nxsd:conditionValue="0" minOccurs="0" maxOccurs="unbounded"/>
<element ref="tns:smpRecords" nxsd:conditionValue="1" minOccurs="0" maxOccurs="unbounded"/>
<element ref="tns:smpRecords" nxsd:conditionValue="2" minOccurs="0" maxOccurs="unbounded"/>
<element ref="tns:smpRecords" nxsd:conditionValue="3" minOccurs="0" maxOccurs="unbounded"/>
<element ref="tns:smpRecords" nxsd:conditionValue="4" minOccurs="0" maxOccurs="unbounded"/>
<element ref="tns:smpRecords" nxsd:conditionValue="5" minOccurs="0" maxOccurs="unbounded"/>
<element ref="tns:smpRecords" nxsd:conditionValue="6" minOccurs="0" maxOccurs="unbounded"/>
<element ref="tns:smpRecords" nxsd:conditionValue="7" minOccurs="0" maxOccurs="unbounded"/>
<element ref="tns:smpRecords" nxsd:conditionValue="8" minOccurs="0" maxOccurs="unbounded"/>
<element ref="tns:smpRecords" nxsd:conditionValue="9" minOccurs="0" maxOccurs="unbounded"/>
</choice>
</complexType>
</element>
<element name="smpRecords" type="tns:smpRecordsType"/>
<complexType name="smpRecordsType">
<sequence>
<element name="data1" type="string" nxsd:style="fixedLength" nxsd:length="2" nxsd:padStyle="tail" nxsd:paddedBy=" "/>
<element name="data2" type="string" nxsd:style="fixedLength" nxsd:length="3" nxsd:padStyle="tail" nxsd:paddedBy=" "/>
<element name="emp" type="string" nxsd:style="terminated" nxsd:terminatedBy="${eol}"/>
</sequence>
</complexType>
</schema>When I run the process I get the following output and that is not correct as the first character is also being shown in the output as opposed to be skipped as it is the record type and the output should start from second character.
output
<SMP>
<smpRecords>
<data1>12</data1>
<data2>345</data2>
<emp>6 </emp>
</smpRecords>
<smpRecords>
<data1>96</data1>
<data2>037</data2>
<emp>3 </emp>
</smpRecords>
<smpRecords>
<data1>A16</data1>
<data2>027</data2>
<emp>10542583</emp>
</smpRecords>
<smpRecords>
<data1>76</data1>
<data2>027</data2>
<emp>10542583</emp>
</smpRecords>
<smpRecords>
<data1>16</data1>
<data2>027</data2>
<emp>50499275</emp>
</smpRecords>
<smpRecords>
<data1>46</data1>
<data2>027</data2>
<emp>50499275</emp>
</smpRecords>
<smpRecords>
<data1>16</data1>
<data2>027</data2>
<emp>50529800</emp>
</smpRecords>
<smpRecords>
<data1>76</data1>
<data2>027</data2>
<emp>50529800</emp>
</smpRecords>
<smpRecords>
<data1>16</data1>
<data2>030</data2>
<emp>30507732</emp>
</smpRecords>
<smpRecords>
<data1>76</data1>
<data2>030</data2>
<emp>30507732</emp>
</smpRecords>
<smpRecords>
<data1>16</data1>
<data2>030</data2>
<emp>30509055</emp>
</smpRecords>
<smpRecords>
<data1>76</data1>
<data2>030</data2>
<emp>30509055</emp>
</smpRecords>
<smpRecords>
<data1>16</data1>
<data2>030</data2>
<emp>30509229</emp>
</smpRecords>
<smpRecords>
<data1>76</data1>
<data2>030</data2>
<emp>30509229</emp>
</smpRecords>
<smpRecords>
<data1>26</data1>
<data2>036</data2>
<emp>00556240</emp>
</smpRecords>
<smpRecords>
<data1>06</data1>
<data2>036</data2>
<emp>00566095</emp>
</smpRecords>
<smpRecords>
<data1>26</data1>
<data2>036</data2>
<emp>00567460</emp>
</smpRecords>
<smpRecords>
<data1>36</data1>
<data2>033</data2>
<emp>10536370</emp>
</smpRecords>
<smpRecords>
<data1>56</data1>
<data2>033</data2>
<emp>10525810</emp>
</smpRecords>
<smpRecords>
<data1>36</data1>
<data2>033</data2>
<emp>10531092</emp>
</smpRecords>
<smpRecords>
<data1>36</data1>
<data2>033</data2>
<emp>10521842</emp>
</smpRecords>
<smpRecords>
<data1>06</data1>
<data2>033</data2>
<emp>10521842</emp>
</smpRecords>
<smpRecords>
<data1>36</data1>
<data2>033</data2>
<emp>10521842</emp>
</smpRecords>
<smpRecords>
<data1>36</data1>
<data2>033</data2>
<emp>10521842</emp>
</smpRecords>
<smpRecords>
<data1>86</data1>
<data2>020</data2>
<emp>1450SA A</emp>
</smpRecords>
<smpRecords>
<data1>56</data1>
<data2>020</data2>
<emp>1451SA A</emp>
</smpRecords>
<smpRecords>
<data1>56</data1>
<data2>020</data2>
<emp>1452SA A</emp>
</smpRecords>
<smpRecords>
<data1>56</data1>
<data2>020</data2>
<emp>1453SAN </emp>
</smpRecords>
<smpRecords>
<data1>16</data1>
<data2>036</data2>
<emp>30565355</emp>
</smpRecords>
<smpRecords>
<data1>76</data1>
<data2>036</data2>
<emp>30565355</emp>
</smpRecords>
<smpRecords>
<data1>16</data1>
<data2>036</data2>
<emp>30565500</emp>
</smpRecords>
<smpRecords>
<data1>76</data1>
<data2>036</data2>
<emp>30565500</emp>
</smpRecords>
<smpRecords>
<data1>96</data1>
<data2>034</data2>
<emp>60539390</emp>
</smpRecords>
<smpRecords>
<data1>26</data1>
<data2>034</data2>
<emp>60535260</emp>
</smpRecords>
<smpRecords>
<data1>36</data1>
<data2>037</data2>
<emp>90509870</emp>
</smpRecords>
<smpRecords>
<data1>56</data1>
<data2>020</data2>
<emp>0401ABIL</emp>
</smpRecords>
<smpRecords>
<data1>66</data1>
<data2>037</data2>
<emp>2TX066 </emp>
</smpRecords>
<smpRecords>
<data1>66</data1>
<data2>037</data2>
<emp>3TX015 </emp>
</smpRecords>
<smpRecords>
<data1>66</data1>
<data2>037</data2>
<emp>3TX01531</emp>
</smpRecords>
<smpRecords>
<data1>66</data1>
<data2>037</data2>
<emp>3TX01532</emp>
</smpRecords>
<smpRecords>
<data1>86</data1>
<data2>037</data2>
<emp>3TX066 </emp>
</smpRecords>
<smpRecords>
<data1>66</data1>
<data2>037</data2>
<emp>3TX068 </emp>
</smpRecords>
<smpRecords>
<data1>36</data1>
<data2>037</data2>
<emp>3TX09465</emp>
</smpRecords>
<smpRecords>
<data1>66</data1>
<data2>037</data2>
<emp>3TX09471</emp>
</smpRecords>
</SMP>As the output for the very first row comes up fine i.e. 0123456
for this the output is
<smpRecords>
<data1>12</data1>
<data2>345</data2>
<emp>6 </emp>
</smpRecords>But for all the rest it keeps adding the first character too i.e. 960373
for this the output is wrong
<smpRecords>
<data1>96</data1>
<data2>037</data2>
<emp>3 </emp>
</smpRecords>as the correct output should be:
<smpRecords>
<data1>60</data1>
<data2>373</data2>
<emp/>
</smpRecords>Any idea what I am doing wrong or how I can fix the schema. Also if I add any character other than 0....9 for the first character it still picks up the record i.e. A602710542583
as it should only process records starting with 0....9
ThanksI tried using transformation to check if the starting 2 chars are 56 then output else continue but the ourput is blank even though I have multiple records that start with 56. Here is the xsl I have
<?xml version="1.0" encoding="UTF-8" ?>
<?oracle-xsl-mapper
<!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
<mapSources>
<source type="XSD">
<schema location="test2.xsd"/>
<rootElement name="SMP" namespace="http://xmlns.oracle.com/pcbpel/tstSchema/SMP"/>
</source>
</mapSources>
<mapTargets>
<target type="XSD">
<schema location="test2.xsd"/>
<rootElement name="SMP" namespace="http://xmlns.oracle.com/pcbpel/tstSchema/SMP"/>
</target>
</mapTargets>
<!-- GENERATED BY ORACLE XSL MAPPER 10.1.2.0.2(build 060111.0746) AT [TUE OCT 31 08:47:08 CST 2006]. -->
?>
<xsl:stylesheet version="1.0" xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap" xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:tns="http://xmlns.oracle.com/pcbpel/tstSchema/SMP" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:ns0="http://www.w3.org/2001/XMLSchema" xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" exclude-result-prefixes="xsl tns ns0 nxsd ldap xp20 bpws ora orcl">
<xsl:template match="/">
<tns:SMP>
<xsl:for-each select="/tns:SMP/tns:smpRecords">
<xsl:if test="tns:data1 = '56'">
<tns:smpRecords>
<tns:data1>
<xsl:value-of select="tns:data1"/>
</tns:data1>
<tns:data2>
<xsl:value-of select="tns:data2"/>
</tns:data2>
<tns:emp>
<xsl:value-of select="tns:emp"/>
</tns:emp>
</tns:smpRecords>
</xsl:if>
</xsl:for-each>
</tns:SMP>
</xsl:template>
</xsl:stylesheet>and here is the out I get
<part name="SMP" >
<SMP/>
</part>Any ideas what might be wrong in the xsl itself.
Thanks -
File adapter - Archive issue with adapter module
Hi All,
I have 2 issues here. We are currently using PI 7.11 EHp1 SP02.
1. Arhival with "add time stamp" wont work. It just gives us an error message saying simpledate format exception.
I have gone through the OSS note 1265534 and thought this will resolve the issue. But our BASIS team believes this note is only applicable for PI 7.1 SP01. Can you one using PI 7.11 SP02 comment on this?
Note: Archive option with out add time stamp works fine.
2. When I use adapter module in my sender file configuration, the archive option itself does not work. Read the official SAP help which says "To archive source files where a permanent error occurred during processing, set the indicator.
A permanent error occurs either during the conversion of the file content, or in a module in the module processor."
So the question here is, how do we make the error permanent? The only way to throw error from adapter module is using the ModuleException. It has 4 different constructors. I have used both
ModuleException me = new ModuleException ("My error Msg"); and
Module Exception me1 = new ModuleException ("Error String", new Throwable("My error Msg");
In both the cases, the archival wont happen.
Any ideas welcome.
Thanks
JaiHi,
I am using NFS protocol here not FTP. Sorry I dint mention that earlier.
Thanks
Jai
Edited by: Jaishankar on Apr 1, 2010 9:55 AM
Edited by: Jaishankar on Apr 6, 2010 11:10 AM -
Importing text file (delimited, fixed width) with MDM Import Manager?
Hello all,
According to the overview section of the import manager reference guide, it is possible to import from delimited text files (e.g. CSV).
But when it comes to the details, text files are not mentioned anymore. I also found no option in the Import Manager.
Could you tell me whether this is possible and - if it is - how?
Thanks in advance!
Kind regards,
DennisHi Dennis,
In order to import flat files into MDM do the following. This solution is specific to MS Windows:
I. Set up ODBC for *.txt or *.csv files
1. Open Data Sources (ODBC) interface:
Start> Settings> Control Panel--> Administrative Tools -->Data Sources (ODBC).
2. Select System DSN Tab in Data Sources (ODBC) interface.
3. Click on [Add]. Select the Microsoft Text Driver. Click Finish.
4. Write a Data Source Name
5. Uncheck Use Current Directory to enable the [Select Directory ] button.
6. Click on [Select directory ] to determine the source directory.
7. Select the source file.
8. Click [OK] and return to the ODBC Text Setup screen.
9. Click [OK].
10. Return to the ODBC Data Source Administrator dialog and click [OK].
II. Importing from Flat file
1. Run MDM Import Manager.
2. Select ODBC from the Type drop-down field of the Connect To Source dialog.
3. Enter the DSN name from the Setup ODBC Connection dialog above.
4. Select the file name with extension (.csv or .txt) in the Tables panel of MDM Import Manager and the file content in the Records panel.
Hope this solved your problem.Please mark helpful answers
Regards,
Santosh. -
File Adapter NFS: Doubt with th Data Type corresponding to the XML
Hi All!!
On my scenario, a file is caught from the server and its information is passed to a proxy.
My doubt is how must be the XML format and the Data Type to the data be correctly retrieved?
The XML I have designed is the next:
Is correct? If yes, How must be defined its Data Type?
Thanks and regards,
Manuel Míguez.Hi!
I will try to elaborate my question.
I have the next XML Data on the Server:
<?xml version='1.0' encoding='UTF-8'?>
<DT_File_Req>
<NumeroDocumento>2/0211/M015010010N</NumeroDocumento>
<Tipo>ZEP</Tipo>
<Version>000</Version>
<Parcial>00</Parcial>
<Descripciones>
<Item>
<Idioma>ES</Idioma>
<DescripcionCorta>Prueba descripcion corta</DescripcionCorta>
<DescripcionLarga>Prueba descripcion larga swfiwjeflijwelifjlwejlkfdsjfelsdjflkjdslkfjsjdoifjposdjfojsdkjfslkdjfwehjfjdslfkjsdlfhswfsdfl</DescripcionLarga>
</Item>
<Item>
<Idioma>FR</Idioma>
<DescripcionCorta>Prueba descripcion corta en frances</DescripcionCorta>
<DescripcionLarga>Prueba descripcion larga en frances ejlkfdsjfelsdjflkjdslkfjsjdoifjposdjfojsdkjfslkdjfwehjfjdslfkjsdlfhswfsdfl</DescripcionLarga>
</Item>
</Descripciones>
<Caracteristicas>
<Item>
<Nombre>Fecha Inicio Plano</Nombre>
<Valor>12032008</Valor>
</Item>
<Item>
<Nombre>Fecha Fin Plano</Nombre>
<Valor>20032008</Valor>
</Item>
</Caracteristicas>
</DT_File_Req>
This XML is polled by XI.
I have created the next Data Dype corresponding with structure of the XML (I hope will be understable):
DT_File_Req
Numero Documento STRING
Tipo STRING
Parcial STRING
Descripciones
Item 1..n
Idioma STRING
DescripcionCorta STRING
DescripcionLarga STRING
Caracteristicas
Item 1..n
Nombre STRING
Valor STRING
My question is if this XML structure and this Data Type are compatible. I get on SXMB_MONI an error on the Mapping and I guess that the error is produced because the XML Format is not correct.
Thanks and regards,
Manuel. -
File adapter PUT operation with header row.
i have schema generated in the below format.
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
xmlns:tns="http://TargetNamespace.com/InboundService"
targetNamespace="http://TargetNamespace.com/InboundService"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
nxsd:version="NXSD"
nxsd:stream="chars"
nxsd:encoding="US-ASCII"
nxsd:hasHeader="true"
nxsd:headerLines="1"
nxsd:headerLinesTerminatedBy="${eol}"
>
<xsd:element name="Root-Element">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Record" minOccurs="1" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="typdoc" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="~" />
<xsd:element name="datdoc" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="~" />
<xsd:element name="nomdoc" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="~" />
but the above schema do not write the header line in the FTP file.
Each of the element name should work as header row.
Below is the JCA configuration of the FTP
<adapter-config name="Payment_Details_FTP" adapter="FTP Adapter" wsdlLocation="Payment_Details_FTP.wsdl" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
<connection-factory location="outbound/ftp/test1"/>
<endpoint-interaction portType="Put_ptt" operation="Put">
<interaction-spec className="oracle.tip.adapter.ftp.outbound.FTPInteractionSpec">
<property name="PhysicalDirectory" value="Test"/>
<property name="FileType" value="ascii"/>
<property name="Append" value="false"/>
<property name="FileNamingConvention" value="1C_Extract.out%yyMMddHHmmss%"/>
</interaction-spec>
</endpoint-interaction>
</adapter-config>
Please let me know if i'm missing some configuration here.
Regards
sujanRemove "header" related attributes from the "schema" tag.
===================================
nxsd:hasHeader="true"
nxsd:headerLines="1"
nxsd:headerLinesTerminatedBy="${eol}"
===================================
And then, define another element like "Record" to read the header data.
http://docs.oracle.com/cd/E15523_01/integration.1111/e10231/nfb.htm#CHDBECJI -
Problem in sender file adapter
Hi all,
I have a sender file adapter using ftp with processing mode delete. But my input file is not getting deleted. In RWB, the adapter satus is green with msg processed sucessfully. I tried with a file name that is not available in the ftp folder, but still the adapter status is green with msg processed succesfully.
Help me debug this error.
Regards,
Jai Shankar.Are you using Content conversion ?
If adapter monitoring is green, and shows processed successfully, then if you have any errors , you can see in the RWB->Message Monitoring->Audit Log (Message display Tool).
If there is no error, then try to do the cache refresh as I told. Ask Admin help for that. Restarting a Adapter engine may help you here/
Regards,
moorthy -
Hi ,
I am trying to use file adapter in OSB. My intention is the OSB should write a file in a specified location in my sytem. I have configured the Business Service with Messagin service in (general tab), request msg as text and response msg as none in(messagin tab), protocol as file in (transport tab), prefix as AddUser suffix as *.txt* in (file transport tab).
whenever i give input in proxy service it writing the file at the specified location, but the issue is,it writes the file name as AddUser3225734920456246193--12c3763f.132dd1769a3.-7f5b.txt . i dont need this part(AddUser3225734920456246193--12c3763f.132dd1769a3.-7f5b) in file name which is written. can anyone tell me how i can solve this?
Any help is appreciated.
thanksHi,
We can go with transport JCA FILE for file writing into the specified location.
Create a file adapter in jdeveloper with all specified things like (file name,physical path location and schema).This creates the jca and wsdl file in jdevloper copy this to eclipse(OEPE) and later u can create business service based on jca file in eclipse.Or else in osb sbconsole copy import related jca and wsdl files and create business service based on this.This process wil create file in particular location with name specified in the jca file in particular location..... -
Can someone tell me why my message is not processed by XI. I use a File Adapter. The File Adapter is "active" with the following configuration.
Adapter type = File
transport protocal = Filesystem
message protocol = File
adapter engine = integration server
Source directory = "e:/XIprocessFiles"
File name = *.xml
File type = textEdward,
What do you exactly meant with not processed? Is the file adapter not processing/sending your xml file to the XI system? Or
is your interface defined in XI not doing anything with the input message?
Assuming your situation is the first one; Then you should start by checking the source file name, source directory name, contentType (you have text, this should be text/xml), ContentKind (this should be T) and PollingInterval...
In the second situation you should then look at adapter config settings like: namespace, sender interface name, sender business name etc...
Cheers,
Rob
Maybe you are looking for
-
ITunes ID3 tags handling for artwork
I have created MP3 versions of my band's artwork for inclusion in an online radio. I am running into some issues with ID3 tags. The MP3s show the artwork and everything just fine on my Mac. However the artwork doesn't show up in the radio softwa
-
I have a macbook and when I power it on and then select myself as a user...It won't power up. It stays in the white screen with the apple logo. I am online currently under 'guest user'. Is there anything I can do from the keyboard to fix this??? Help
-
Using or for the same attribute?
/web:window[@index='0']/web:document[(@name='body' or @name='finderBody')]/web:form[@name='search']Is this valid? I can't seem to make it work. The app under test has different names in the two supported versions. Using the right name attribute works
-
Photoshop Album Edition Découverte 3.2
Bonjour, Dans mon " Adobe Photoshop Album Edition Découverte 3.2 " je voudrais créer des collections pour classer mes Photos. Dans les menus déroulants je trouve " créer une collection " mais rien ne se passe sinon dans l'extension une zone bleue et
-
Cannot see my previous purchases
I purchased a new Mac book pro and was trying to use tethering from my iphone 3gs. The thethering worked but while I was doing it the Mac Book updated the software on the Iphone. resulting all my photos and contacts on the Iphone are now lost. Intere