File content conversion example
If the first line in the FCC file is having some company Info. from the next lin onwards it is having the data. i have to avoid that info & transfer the data only Hoew can proceed?
Hi
if you have text file at the sender side use the folloeing parameters in the sender communication channel
RECORD.fieldSeparator :,
RECORD.fieldNames :KEY,FNAME,LNAME,AGE
RECORD.keyFieldValue :1
DETAIL.fieldSeparatr :,
DETAIL.fieldNames :KEY,SALARY,EMPID
DETAIL.fieldNames :2
Note:these parameters are accoding to the structure given below.
suppose you have a structure like as below
data (0..unbounded)
record (0..unbounded)
key (1..1)
fname (1..1)
lname (1..1)
age (1..1)
detail (0..unbounded)
key (1..1)
salary (1..1)
empid (1..1)
and the input file will look like as below
1,aaa,bbb,23
2,12000,10838
1,ccc,ddd,23
2,13000,10830
n if you have text file at the receiver side then use the following parameters at the receiver side.
childnodename.fieldFixedLength:10,10
childnodename.endSeparator:'nl'
parentnodename.endSeparator:'nl'
if you still face the problem please reply me back
thanks
Rinku
Similar Messages
-
Error regarding File content conversion
Hello all,
I am getting the below mentioned error,
com.sap.aii.af.ra.ms.api.MessagingException: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'java.lang.Exception: Consistency error: more fields found in XML structure than specified in conversion parameters! (Value '')', probably configuration error in file adapter (XML parser error)': java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'java.lang.Exception: Consistency error: more fields found in XML structure than specified in conversion parameters! (Value '')', probably configuration error in file adapter (XML parser error)'
My scenario is rfc -> file.In receiving adaptor it is giving me this error. I am not able to understand whats going wrong with it.I have checked the parameters specified for file content conversion i think they are fine.
Please can anyone help me to get out of this..
ZZSP.addHeaderLine 0
ZZSP.fieldFixedLengths 6,8,2,6,8,2,148
ZZSP.fixedLengthTooShortHandling Cut
ZZSP.endSeparator 'nl'
ZZRP.addHeaderLine 0
ZZRP.fieldFixedLengths 3,1,2,4,2,6,1,2,2,7,9,2,7,8,5,5,6,12,8,4,6,6,3,2,67
ZZRP.fixedLengthTooShortHandling Cut
ZZRP.endSeparator 'nl'
ZZTOT.addHeaderLine 0
ZZTOT.fieldFixedLengths 3,1,2,2,2,10,35,2,2,10,35,12,12,12,12,12,12,1,14
ZZTOT.fixedLengthTooShortHandling Cut
ZZTOT.endSeparator 'nl'
ZZSUB.addHeaderLine 0
ZZSUB.fieldFixedLengths 3,1,2,10,3,2,2,3,3,6,3,25,25,6,1,12,12,12,12,12,25
ZZSUB.fixedLengthTooShortHandling Cut
ZZSUB.endSeparator 'nl'
ZZLIN.addHeaderLine 0
ZZLIN.fieldFixedLengths 3,1,2,5,2,12,23,2,8,3,6,2,9,3,5,3,3,4,4,1,9,12,12,10,10,12,3,10,1
ZZLIN.fixedLengthTooShortHandling Cut
Edited by: Siddhesh Pathak on Nov 3, 2008 2:19 PM
Edited by: Siddhesh Pathak on Nov 3, 2008 2:19 PM
Edited by: Siddhesh Pathak on Nov 3, 2008 2:20 PMur FCC is not configured correctly, I can not see fieldNames in the FCC.
wat is the strucutre of ur file?
r u having any key field in ur file?
refer sample example:
Content Conversion (Pattern/Random content in input file)
How to send a flat file with various field lengths and variable substructures to XI 3.0
chirag
Edited by: Chirag Gohil on Nov 3, 2008 7:34 PM -
Regarding file content conversion
Re: regarding file content conversion
Posted: Sep 25, 2008 11:30 AM in response to: kummari Edit E-mail this message Reply
i tried.but m getting this error
Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'ns1:MT_HyperionReport' found in document', probably configuration error in file adapter (XML parser error)': java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'ns1:MT_HyperionReport' found in document', probably configuration error in file adapter (XML parser error)'
Actually my input structure is:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_ECCReport xmlns:ns0="urn:syngenta.com:i_ecc_erp:se:global:fi_reports:common">
<ACTFiscalyear>siva</ACTFiscalyear>
<StartPeriod>44</StartPeriod>
<EndPeriod>55</EndPeriod>
<LineItems>
<ReportingUnit>rama</ReportingUnit>
<ProfitCentre>844</ProfitCentre>
<Amount>855</Amount>
</LineItems>
</ns0:MT_ECCReport>
and in FCC i wrote below these three lines:
LineItems.fieldSeparator 'nl'
MT_HyperionReport.fieldSeparator 'nl'
LineItems.fieldSeparator 'nl'
So please tell me what is wrong in thisMT_HyperionReport is your message type and this represents the top level node of your message. Below this you have your records. You have MT_HyperionReport as a record type which is clearly not going to work.
In the content conversion parameters section the following fields should be filled, you dont need to specify Recordset if your XML structure does not include this node see SAPhelp example:
Document Name: MT_HyperionReport
Document Namespace: <look at your message type in the designer>
Recordset Structure: Record_type1,<occurrence 1..>, Record_type2,<occurrence 1..>
In the parameter box:
Record_type1.fieldSeparator
Record_type1.fieldNames
ignoreRecordsetName value true
Record_type2...
The SAP help on this is pretty clear and comprehensive...
http://help.sap.com/saphelp_nw04/helpdata/en/0f/80243b4a66ae0ce10000000a11402f/frameset.htm -
File content conversion sender adapter
Hi Friends,
I am doing File to IDoc scenario.
I am using File Content Conversion for File Adapter.
My structure look like this
MT_File
HEADER1 1..1
--header1
-- header2
HEADER2 1..1
--header3
DETAILS 1..unbounded
--details1
--details2
--details3
TRAILER1 1..1
-- trailer1
TRAILER2 1..1
-- trailer2
----trailer3
In File Content conversion parameeters..
Document Name :MT_File
Document Namespace :urn:test:FileFcctoIdoc
RecordSet name :
RecordsetStructure :HEADER1,1,HEADER2,1,DETAILS,*,TRAILER1,1,TRAILER2,1
RecordSet Structure: Ascending
RecordSet Per message : *
Key Field Name :header1,header3,details1,trailer1,trailer3
ignoreRecordsetName : true
HEADER1.fieldNames :header1,header2
HEADER1.keyFieldValue : H1
HEADER1.fieldFixedLengths :5,10
HEADER1.endSeparator :'nl'
HEADER2.fieldNames :header3
HEADER2.keyFieldValue : *D
HEADER2.fieldFixedLengths :5
HEADER2.endSeparator :'nl'
DETAILS.fieldNames :details1,details2,details3
DETAILS.keyFieldValue : 3
DETAILS.fieldFixedLengths :5,5,5
DETAILS.endSeparator :'nl'
TRAILER1.fieldNames :trailer1
TRAILER1.keyFieldValue : *S
TRAILER1.fieldFixedLengths :5
TRAILER1.endSeparator :'nl'
TRAILER2.fieldNames :trailer2,trailer3
TRAILER2.keyFieldValue :SE TRAILER2.fieldFixedLengths :5,5
TRAILER2.endSeparator :'nl'
File is :
H1hh1hhhhhhhhh2
*Ddd*
Xddd1dddd2dddd3
Xddd4dddd5dddd6
Xddd7dddd8dddd9
*Sss*
SEKss2
in RWB, Channel CC_FILE_Sender_FccDemo: Empty document found. Proceed without sending message
I think the problem is in FCC paramters..
Could please have a look and correct me
Regards
RamRam,
The problem which i can see is your key field values in your test file. Remember you should have the key field value in each new line at the same place.
For example you have given your text file as shown below...
File Given By You is :
>H1hh1hhhhhhhhh2
>*Ddd *
>Xddd1dddd2dddd3
>Xddd4dddd5dddd6
>Xddd7dddd8dddd9
>*Sss *
>SEKss2
Compair the above file with the below one..
>H1hh1hhhhhhhhh2
>*Ddd *
>Xddd1dddd2dddd3
>Xddd4dddd5dddd3
>Xddd7dddd8dddd3
> *Sss *
>SEKss2
If you notice, for details I have given key field value 3 in each line & at same place.
One more thing just use the KeyFieldName only one ( just follow the same blog which I have given, to understand how to use the KeyFieldName )
e.g.
Document Name :MT_File
Document Namespace :urn:test:FileFcctoIdoc
RecordSet name :
RecordsetStructure :HEADER1,1,HEADER2,1,DETAILS,*,TRAILER1,1,TRAILER2,1
RecordSet Structure: Ascending
RecordSet Per message : *
Key Field Name : KF
Regards,
Sarvesh -
File content conversion in receiver
Hi,
My receiver Message type structure is
Heading1
subheading 1
FieldValue1
FieldValue 2
Fieldvalue3
I want to create file content conversion in receiver side.
plz help me to create what could be my recordset structure, name, value.
my scenario is Idoc to file.Ruban:
Your FCC goes like this
subheading1.fieldSeparator = ',' /* if comma is the separator you want, if u need any other replace it*/
subheading1.endSeparator = 'nl'
Did you check my previous post in your other thread, I posted similar example there. -
File Content Conversion Removes Leading Blank/Space
I'm having a problem where file content conversion is trimming leading blanks/space/whitespace from fields when reading in the inbound file. I've seen where people have posted that you need to use fieldContentFormatting to prevent content conversion from stripping the leading/trailing whitespace. I added that parameter to my list (see below example) but it still appears to be trimming the leading whitespace. Look forward to hearing your thoughts. Here are the details:
I'm using fixed length file content conversion for Sender File Adapter (SP15). I have the following parameters set:
Document Name = MaterialData
Recordset name = item
Recordset Structure = MaterialLine, 1
I have:
MaterialLine.fieldNames = matno_external, mat_description
MaterialLine.fieldFixedLengths = 40, 40
MaterialLine.fieldContentFormatting = nothing, nothing
The following is the input file (notice spaces prior to second occurrence of material numbers)
ZED00000001 AIMS LIGHT A
ZED00000001 AIMS LIGHT B
ZED00000002 AIMS SWITCH A
ZED00000002 AIMS SWITCH B
ZED00000003 AIMS SEMICONDUCTOR A
ZED00000003 AIMS SEMICONDUCTOR B
The following is the source XML after file content conversion from SXMB_MONI (note spaces no longer exist in matno_external tag).
<?xml version="1.0" encoding="utf-8" ?>
- <ns:MaterialData xmlns:ns="http://xxxxxxx.com/yyy/test">
- <item>
- <MaterialLine>
<matno_external>ZED00000001</matno_external>
<mat_description>AIMS LIGHT A</mat_description>
</MaterialLine>
</item>
- <item>
- <MaterialLine>
<matno_external>ZED00000001</matno_external>
<create_date>10/09/06</create_date>
<mat_description>AIMS LIGHT B</mat_description>
</MaterialLine>
</item>
- <item>
- <MaterialLine>
<matno_external>ZED00000002</matno_external>
<mat_description>AIMS SWITCH A</mat_description>
</MaterialLine>
</item>
- <item>
- <MaterialLine>
<matno_external>ZED00000002</matno_external>
<mat_description>AIMS SWITCH B</mat_description>
</MaterialLine>
</item>
- <item>
- <MaterialLine>
<matno_external>ZED00000003</matno_external>
<mat_description>AIMS SEMICONDUCTOR A</mat_description>
</MaterialLine>
</item>
- <item>
- <MaterialLine>
<matno_external>ZED00000003</matno_external>
<mat_description>AIMS SEMICONDUCTOR B</mat_description>
</MaterialLine>
</item>
</ns:MaterialData>Thanks all for your attempts but I figured it out and wasn't this the biggest case of irony.
Here I was trying to prevent leading spaces from being trimmed in the loading of my file and my problem was that when I typed:
MaterialLine.fieldContentFormatting
I actually left a "blank" at the end of the "g" in Formatting. Apparently XI didn't like that and neither gave me a runtime or compile error. Anyway I found this and though I'd share in case anyone else encounters it. I removed the blank and all is working now. -
Java Mapping Or Adapter Module for MultiLevel File Content Conversion ??
Hi Experts,
Hi All,
As we all know file content conversion cannot parse more than three level even if we use FCC paramenters or MessageTransform Bean /StrictXmlToPlain Bean.
Currently i am facing an scenario where i can expect an content coversion with four or five levels.
for ex.
Target Message Looks like
Header(0..1)
|_____X
|_____Y
|_____Detail(0.n)
|____A
|____B
|____SubDetail(0.n)
|_____Trailer(0.n)
|______rec1
|______rec2
|______rec3(0..n)
|______Subrec1
|______Subrec2
So my question how can i do the FixedLength/CSV in the target system ???
Shall i do java mapping ? if yes then any code example relevant to this type of scenario
Shall i do adapter module development ?if yes then any code example relevant to this type of scenario
Thanks In Advance
Ronit MishraTarget Message Looks like
Header(0..1)----
Level 1
|_____X
|_____Y
|_____Detail(0.n)----
Level 2
|____A
|____B
|____SubDetail(0.n)----
Level 3
|_____Trailer(0.n)----
Level 4
|______rec1
|______rec2
|______rec3(0..n)----
Level 5
|______Subrec1
|______Subrec2 -
File Content Conversion. Default Value of beginSeparator
HI All
I have a scenario where i am using file Content Conversion to create a text file.
my structure is as following
MessageTypeName
FirstElement 1..1
SecondElement 1..1
Data 1..Unbounded
In the text file i just need the Content of Data to appear in each row.
So i gave the following CCP
SecondElement.fieldSeparator = 'nl'
SecondElement.endSeparator = 'nl'
But i am getting the first line as a blank line .
I do not need the first line as a blank line. Can someone suggest how to avoid the default blank first line.
regards
Nilesh.Hi,
Just check the below parameter's defined in the below example.
Below is the example when you have HEADER & ITEM structure.
FCC is case sensitive, give all the names in FCC same as your Data Type.
In <b>Recordset Structure</b> = Header,1,Item,*
Header.fieldFixedLengths = (field lengths) e.g. 1, 4, 7
Header.fixedLengthTooShortHandling=ignore
Header.endSeperator='nl'
Item.fieldFixedLengths = give the item field length as shown above
Item.endSeparator = 'nl'
Item.lastFieldsOptional = YES
Regards,
Sarvesh
****Reward points, if found helpfull. -
File Adapter - File Content Conversion to XML last element missing
I'm using the SAP File Adapter with File Content Conversion to convert | (pipe) delimited records into XML.
When the last field is blank, I would expect that an empty node gets created, however, the node doesn't get created at all.
For example given these settings...
Record.fieldSeparator = |
Record.endSeparator = 'nl'
Record.fieldNames = FIELD1,FIELD2,FIELD3
Using this three record file as my data...
|123|XYZ
ABC||XYZ
ABC|123|
When converted to XML, this is what the recordset XML structure looks like...
<Recordset>
<Record>
<FIELD1 />
<FIELD2>123</FIELD2>
<FIELD3>XYZ</FIELD3>
</Record>
<Record>
<FIELD1>ABC</FIELD1>
<FIELD2 />
<FIELD3>XYZ</FIELD3>
</Record>
<Record>
<FIELD1>ABC</FIELD1>
<FIELD2>123</FIELD2>
</Record>
</Recordset>
Notice that the last record is missing the "FIELD3" element.
Edited by: William Krick on Jun 17, 2011 4:49 PMGiuseppe Agnello wrote:
> Sorry, there was a typo in the parameter name.
> Word fields should start with capital F.
> Try with Record.missingLastFields, with value "add"
>
> http://help.sap.com/saphelp_nw70/helpdata/en/ae/d03341771b4c0de10000000a1550b0/frameset.htm
>
> Similar issue was resolved with same parameter in this thread:
> Sender file adapter with FCC not creating last field
That did the trick. It was a typo. Thanks Giuseppe.
I'm willing to bet that this parameter was added to fix the parsing bug without breaking existing users that had already worked around the original bug. You shouldn't really have to special case the last field. -
File content conversion using SOAP adapter
Hi,
I'm using a receiver SOAP adapter in my IDOC to file scenario and need to do file content conversion in the receiver side.
Are any standard modules available for file content conversion in the SOAP adapter or do I need to write custom EJB modules for this.
Please note that I have to use a SOAP adapter, can't use any other adapter.
Thanks in advance
ShiladityaHi,
XML Document Conversion Type
● Enter recordTypes as the parameter name.
Under Parameter Value, enter the complete, comma-separated list of all names of recordset types that occur in the document to be converted.
If you decide to use this method, you can define a different conversion type for each recordset type that occurs in the XML document.
For example, you could name the recordset types as follows: RecordType1,RecordType2,RecordType3.
● Enter singleRecordType as the parameter name.
Under Parameter Value, enter the name of a recordset type that is to be used to convert all elements that occur in the XML document.
If you decide to use this method, define the same conversion type for each recordset type that occurs in the XML document.
You must enter exactly one parameter only. Whichever parameter you choose, you automatically exclude the second parameter.
You define further parameters for each recordset type.
In the remainder of this documentation the parameters are specified by the prefix <RecordType>. In your configuration, replace this name with the name of the recordset type.
Conversion Type List with Separators
● <RecordType>.fieldSeparator
Enter the field separator that is written between the individual fields of a record.
This specification is mandatory.
Conversion Type List with Fixed Field Length
● <RecordType>.fieldLengths
Specify a character string that contains a list of fixed field lengths that are separated by commas and which determines the number and the length of fields generated in the text file.
For example, you want to write a recordset with three elements that have field widths of five, ten, and fifteen characters. Enter:
<RecordType>.fieldLengths = 5,10,15
This specification is mandatory.
● <RecordType>.fieldLengthExceeded
Specify how you want to handle fields that exceed the configured field length. Permitted values for the parameter value are:
○ error (default)
Interrupts processing of message with error
○ cut
Cuts off superfluous characters
○ ignore
Ignores the field length restriction
Further Entries
● <RecordType>.beginSeparator
Enter a string. The string is placed in front of the first field of a recordset.
● <RecordType>.endSeparator
Enter a string. The string is appended to the last field of a recordset as a concluding character. The default is \r\n.
● contentType
Enter the MIME type of the converted payload. The default value is text/plain.
● addHeaderLine
Only define this parameter if you have already defined singleRecordType.
Define whether a header line is to be added to the result of the conversion.
○ none (default)
Does not insert a header line
○ fromXML
The header line is generated from the element name of the first recordset of the XML document
○ fromConfiguration
The header line is determined by the configuration parameter headerLine.
● headerLine
Only define this parameter if you have already set addHeaderLine=fromConfiguration.
The value that you define is placed in front of the result of the conversion as a header line.
● fixedLineWidth
Enter the maximum line length n (in characters) that can be written to the resulting document. The separator specified by lineSeparator is inserted in the resulting document every n characters.
● lineSeparator
Only define this parameter if you have already defined fixedLineWidth.
Specify the string that is written to the resulting document at the end of each line that is written with fixedLineWidth. The default is \r\n.
Use of Special Characters
You can use special characters in the following parameters: <RecordType>.fieldSeparator, <RecordType>.beginSeparator, <RecordType>.endSeparator, headerLine, and lineSeparator.
● Tabulator: \t
● Carriage Return (CR): \r
● Line Feed (LF): \n
● Arbitrary character: \x<code>
<code>indicates the hexadecimal character code of the character to be displayed.
Regards,
Phani -
Using File Content Conversion converting XML format to text format
Hi All,
I am able to convert to Text format using file content conversion, But the requirement is to convert the same for the structure with additional subnodes as in the example (also complex nested structures)
<ns0:SendXSDEmployeeDetails xmlns:ns0="http://ehro.eds.com/FRAMEWORK/FileToFile/FileCConverion">
<Employee>
<Employee_ID>2</Employee_ID>
<Employee_Name>KannanKumar</Employee_Name>
<Address>
<Street>13th Cross Reddy</Street>
<City>Bangalore</City>
<Pincode>641026</Pincode>
<Phone_No>
<t1>9901934934</t1>
<t2>9901934934</t2>
</Phone_No>
</Address>
</Employee>
</ns0:SendXSDEmployeeDetails>
can any one help on this please
I have already seen the blogs :
/people/krishnakumar.ramamoorthy3/blog/2007/01/27/generic-mapping-to-convert-nested-xml-to-flat--receiver-file-adatper
/people/ravikumar.allampallam/blog/2005/06/24/convert-any-flat-file-to-any-idoc-java-mapping
<b>Can any one help to do this in simple way</b><br>Hi,
Like correctly pointed by JaiShankar, the Sender File Adapter currently does not supoort such stracutures.
the strcuture supported is described in this link,
http://help.sap.com/saphelp_nw2004s/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
Regards
Bhavesh -
File Content Conversion doesn't pull file
Hi all,
I have a Comm Channel using File Content Conversion - it does not pick up the file (no message in msg monitor). If I copy the Comm Channel, turn off File Content Conversion, and change the Sender Agreement to use the copied Comm Channel, the file is picked up and a message appears in the message monitor.
Any ideas? Does File Content Conversion expect certain file names/types/etc...?
Also, side question - when I change the sender agreement (or anything else in the CD), SXI_CACHE shows "Unable to refresh cache contents" with various errors, one of them being "LCR_GET_OWN_BUSINESS_SYSTEM - NO_BUSINESS_SYSTEM"; another said something about IF_HTTP_.. HTTP Communication error or something.
I'll do more searching on this on and post a new topic if necessary...
Thanks,
BrianI'll try setting those logging settings (don't have access).
In the meantime, here is my content conversion:
Content Conversion info - converting a 3 line type flat file to XML
Example of file layout:
H060412
IC11030416 Example yada yada EA 110137
IC11030417 Example yada yada EA 131206
T000002
>First letter is key field RecType (H=header, I=detail, T=trailer)
Doc name: Material <--msg type
Doc ns: urn:......
Doc offset: <blank>
RS name: Material <--data type
RS ns: <blank>
RS struc: Hdr,1,Dtl,*,Trl,1
RS seq: ascending
RS/msg: 1
Key field: RecType
Key type: String case-sensitive
Hdr.fieldFixedLengths 1,6
Hdr.endSeparator 'nl'
Hdr.fieldNames RecType,GteamsDate
Hdr.keyFieldValue H
Dtl.fieldFixedLengths 1,1,18,20,4,6
Dtl.endSeparator 'nl'
Dtl.fieldNames RecType,ActivityInd,CatalogNum,Description,UOM,ProductClass
Dtl.keyFieldValue I
Trl.fieldFixedLengths 1,6
Trl.endSeparator 'nl'
Trl.fieldNames RecType,RecCount
Trl.keyFieldValue T
Brian -
File Content Conversion for ignoring the entire line
Hi,
I'm getting a CSV file from that i want to skip some records based on some validation.. for example:
I'm getting the following data :
EmpNo EmpName EmpDept
E101 ABC ABAP
E102 XYZ BW
E103 GFC XI
E104 BVM ABAP
E105 ASD BW
E106 YFC XI
SO, here where ever i'm getting EmpDept = XI .. i want to skip those all the records( that entire line i want to skip).. .. this can be possible through Message Mapping.. but i wnat to do this in the File Content Conversion.. how can we do this..
any helpful answers will appriciated..
Thanks
babuHi,
FCC is used to generate the XML structure so that XI can understood properly. You can not do any kind of validations or Skip the records based on Element value condition in FCC.
There are scenarios where you want to skip the lines that time you can use the below option in FCC but this is again not based on condition.
Under Document Offset, specify the number of lines that are to be ignored at the beginning of the document.
This enables you to skip comment lines or column names during processing. If you do not make an entry, the default value is zero lines.
The best way to do is use the UDF:
Write an UDF on target root node.
take input in one context:
input a= Emp Dept:
for(i=o,i<a.length;i++)
if(a{i}.equals("X"))
result.addValue(SUPPRESS); this will supress the target root node if condition is equal to X
else
result.addValue("Constant"); this will generate the target root node.
Thnx
Chirag -
Hi ,
My Scenario is File to FIle having Sender .CVS using File Content Conversion
The sender file is coming below as an example,
a,b,"c,d,e",f
Here I need to consider Double code value "c,d,e" as a single field value using File separator as COMMA(,)
Please guide me how to achieve this type of file using FCC with file separator COMMA.Hi Dilip,
We had a similar problem where the name for eg: "John,Smith" when written into a .csv file were considered as "John","Smith" as two different entities instead of one. The solution was we used the character quotes " before and after the name field message mapping before it is sent to channel for .csv conversion as shown in the screenshot. Now it is treated as one single filed instead of two.
Hope this helps!
Thanks,
Divya. -
Hello, I have a litte problem with the File-Adapter and the File Content Conversion.
We get csv-files in which are 2 structures
the first row contents headerinformations like invoicenumber and sumfields.
The following rows contents item-informations.
I want to convert the file in a xml-format like this:
<invoice>
<invoiceheader>
.... (information from the first row)
</invoiceheader>
<itemlist>
<item>
... (information from 2. row )
</item>
<item>
... (information from 3. row )
</item>
<item>
... (information from last row )
</item>
</itemlist>
</invoice>
The csv-file looks like this:
In the csv-file i have no keys which determine the kind of row. I only know that the first row contains the headerinformation and the following rows (2. until last) contains the item informations.
Any idea ?
Kindly regards
Detlef BreitwieserHello anybody !
I want the conversion is done by the file-adapter -
and i have no keyvalues - that's the problem.
I only know - the 1. row contains the headerstructure and the following rows contains the itemstructure.
I configured the Fileadapter with this paramters (for an example)
xml.recordsetStructure=HeaderSum,1,Item,60000
xml.recordsetName=AvisRechnung
xml.recordsetsPerMessage=*
xml.documentName=Avis
xml.HeaderSum.fieldSeparator=;
xml.HeaderSum.structureTitle=head
xml.HeaderSum.fieldNames=head1,head2,head3,head4,head5,head6,head7,head8
xml.Item.fieldSeparator=;
xml.Item.structureTitle=item
xml.Item.fieldNames=item1,item2,item3,item4,item5,item6,item7,item8,item9
The Csv-File is this:
79;1616243;0;20050706;200401;RWE_DEBIT_AVIS_200401.txt;200401;978;
;R0921018;KM;IT;PROAUTO S.A.S.;DI S PRODAN & C;VIA AQUILEIA C/O APT GIULIANO;RONCHI DEI LEGIONARI (GO);IT00503570319
8,72325E+11;R0921013;KM;DE;AVIS AUTOVERMIETUNG GMBH&CO.KG;ZIMMERSMUEHLENWEG 21;61437 OBERURSEL, GERMANY;ST.NR.003/225/14000;DE-1650-38-067
8,72325E+11;R0921041;KM;DE;AVIS AUTOVERMIETUNG GMBH&CO.KG;ZIMMERSMUEHLENWEG 21;61437 OBERURSEL, GERMANY;ST.NR.003/225/14000;DE-1650-38-067
And the converted xml-file is :
<?xml version="1.0" encoding="utf-8"?>
<Avis>
<AvisRechnung>
<head>
<head1>79</head1>
<head2>1616243</head2>
<head3>0</head3>
<head4>20050706</head4>
<head5>200401</head5>
<head6>RWE_DEBIT_AVIS_200401.txt</head6>
<head7>200401</head7>
<head8>978</head8>
</head>
<item>
<item1></item1>
<item2>R0921018</item2>
<item3>KM</item3>
<item4>IT</item4>
<item5>PROAUTO S.A.S.</item5>
<item6>DI S PRODAN & C</item6>
<item7>VIA AQUILEIA C/O APT GIULIANO</item7>
<item8>RONCHI DEI LEGIONARI (GO)</item8>
<item9>IT00503570319</item9>
</item>
<item>
<item1>8,72325E+11</item1>
<item2>R0921013</item2>
<item3>KM</item3>
<item4>DE</item4>
<item5>AVIS AUTOVERMIETUNG GMBH&CO.KG</item5>
<item6>ZIMMERSMUEHLENWEG 21</item6>
<item7>61437 OBERURSEL, GERMANY</item7>
<item8>ST.NR.003/225/14000</item8>
<item9>DE-1650-38-067</item9>
</item>
<item>
<item1>8,72325E+11</item1>
<item2>R0921041</item2>
<item3>KM</item3>
<item4>DE</item4>
<item5>AVIS AUTOVERMIETUNG GMBH&CO.KG</item5>
<item6>ZIMMERSMUEHLENWEG 21</item6>
<item7>61437 OBERURSEL, GERMANY</item7>
<item8>ST.NR.003/225/14000</item8>
<item9>DE-1650-38-067</item9>
</item>
</AvisRechnung>
</Avis>
But i want to group the items in an item with name <itemlist>. In this case the items appears under the node <AvisRechnung>
Maybe you are looking for
-
I just downloaded an app to my desktop but it will not sync to my iPad
I have done this many times before and it worked fine. But today two apps I downloaded to my mac desktop and they show up in my list of apps on the desktop. But after I sync the iPad to my desktop it just goes throught he procedure of backing up and
-
Adobe Acrobat X Unattended Install not working
I created and Windows bundle to install Acrobat X via a custom msi and I removed the "qn" switch. I used the Acrobat customizer to customize the install, to include unattended install but show progress bar and prompt for reboot. If I run the file on
-
Can dynamic ip in windows cause connection failure?
Recently I had cable internet installed, and the only change I know the techs did to my XP windows was change the ip from static to dynamic. Since then, I've been unable to connect via sqlplus. The listener doesn't register the database anymore. The
-
Anyone else with a basic phone getting bad service?
I bought the Casio G'Zone Rock a long time ago because I was very happy with the Boulder (I even passed the Boulder on to my son's number and it STILL works great). I have had no reason to upgrade my phone or my plan for a number of years (in fact, t
-
Bridge Contact Sheet Doesn't Support JPEGs?
I have a group of JPEGs that I would like to output to a contact sheet. In CS3 this was not a problem, now in CS4, some of the images will work, others don't. I'm wondered if this a color profile conflict, I've been messing around with that lately. H