Error in File content conversion in the target
hi
I'm doing a content conversion at target.
my target structure while sending is like:
<MT>
<Header>
<a>
</Header>
<BODY>
<b>
</BODY>
<filename_output>
<filename>
</MT>
however in the target i have to ignore the last 2 fields: <filename_output> and <filename>.
I'm able to do it.
The problem is coming that in the target structure,when we open in Textpad, 2 trailing empty lines are there at the end.
we need to remove these lines.
Any idea how to do it?
Hi Alok,
Try with parameters given in this blog:
/people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12
If didnot work try: FileName.endSeperator = '0' as given in this thread: Re: Blank Lines While writing files
else give .endSeparator as two backspaces (if you have two new lines). The ascii code is '0xBS'. see this code:
http://www.december.com/html/spec/ascii.html
---Satish
Similar Messages
-
Adapter error in file content conversion
Hi Friends,
I am using FILE receiver adapter, transport protocol- NFS, msg protocol-File content conversion.
Sending msg is an idoc. File is being sent to application server of the XI system (for test purpose)
The message is shown as successful in SXMB_MONI but no file is created .
In message monitoring for adapter engine an error is shown -
"<b></b>file adapter receiver channel <comm channel name> is not initialized. Unable to proceed MP: eception caught with cause com.sap.aii.af.ra.ms.api.Recoverable Exception. Channle has not been correctly initialized & cannot process messages "<b></b>
However if i change the message protocol to FILE then it works correclt & a xml file is saved in system.
It seems the problem is with using file content conversion in the adapter farmework.
Can someone please help.Hi
I have configured in a similar manner
Below is the XML Message
<?xml version="1.0" encoding="UTF-8"?>
<ns0:FileMatFlat_MT xmlns:ns0="http://ztest.com/test/idoc2file">
<RecordSet>
<Row>
<Author>SivaSakthi</Author>
<Transfered_By>SIVASAKTHI</Transfered_By>
<Long_Mat_Num>0000056090</Long_Mat_Num>
<Material_Number>0000056</Material_Number>
<Material_Desc>TESTING132123KLOSDFJ</Material_Desc>
</Row>
</RecordSet>
</ns0:FileMatFlat_MT>
My FCC parameter;
RecordStructure : Row
Row.addHeaderLine 1
Row.fieldSeparator #
Row.endSeparator 'nl'
My Output looks like
Row
SivaSakthi
Can some one please tell me why the others are not coming. -
File Content Conversion -All the input content was not shown in output file
Hi Experts,
In my scenario, I need to send data from .XML file to .txt file, using File Content Conversion at Receiver communication channel. This is File to File scenario.
This is my Input xml file.
<ns:FILEINPUT_MT xmlns:ns="http://File2FileTest">
<RECORD>
<Row>
<FirstName>Susie</FirstName>
<LastName>Tony</LastName>
<City>London</City>
<Country>UK</Country>
</Row>
</RECORD>
</ns:FILEINPUT_MT>
<b>Processing Parameters</b>
Target Directory = C:/Test
File Name Scheme = xi_output.txt
File Construction Mode = Add Time Stamp
File Type = Binary
<b>Content Conversion Parameters</b>
Recordset Structure : RECORD
RECORD.endSeparator = nl
RECORD.fieldSeparator = ;
After Activate and providing the input xml file, xi_output.txt file was generated. But the file content was shown only with Susie i.e. with First Name only. I need xi_output.txt file should have all the four fields (FirstName, LastName, City, Country)
Could some one help me to resolve the issue?
Thanks in advance
SreeCheck these blogs...Might help you.
/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
/people/sap.user72/blog/2005/01/06/how-to-process-csv-data-with-xi-file-adapter
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
Link for SAP Help
http://help.sap.com/saphelp_nw2004s/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm -
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 -
File Content Conversion on the Receiving side
Is there a way in which if I want a Pipe Delimited File as a result, after the last field also I get a pipe with next record starting in the next line.
Hi,
For | (Pipe), use corresponding hex code as fieldSeparator i.e. 0x7C as fieldSeparator.
For FCC on receiver side refer -
[Simple FCC|http://www.riyaz.net/blog/index.php/2008/02/19/xipi-file-content-conversion-for-simple-structure/], [Complex FCC|http://www.riyaz.net/blog/index.php/2008/02/20/xipi-file-content-conversion-for-complex-structures/]
For separotor at the end of line you can try using a dummy field or use combination of pipe and newline i.e. '0x7C' and '0x0D' (stands for carriage return) or 'nl' as endSeparator
Edit: You might consider using 'nl' as beginSeparator parameter and 0x7C as endSeparator. This will do the trick. However, this would add a blank line in the beginning of the file.
Hope this helps.
Regards,
Riyaz
Edited by: Riyaz Sayyad on Aug 21, 2008 3:00 PM -
File content conversion using the Meaasge Transform bean
Hi
I have a scenario file with pipe delimited file.
What are content conversion parameters required
venkatSedamkar,
In file content conversion you give these parameters;
Header.fieldSeparator:|
Header.endSeparator:'nl'
DetailRecord.fieldSeparator:|
DetailRecord.endSeparator:'nl'
TrailerRecord.fieldSeparator:|
TrailerRecord.endSeparator:'nl'
In recordset structure you give as:Header,1,DetailRecord,*,TrailerRecord,1
Regards,
---Satish -
Error sender file content conversion
HI all,
when an error occurs during the conversion of the file content in sender adapter the others files put in dicrectory is not processed.
I know that exists one parameter in Sender File Adapter that is possible to specify the directory to archive the file with error, but in what SP it is possible?
I have the XI SP15 and this feature is not present.
How I do to instruct the XI to process the nexts files?
thanks.From the Support Package Stack 10 of XI 70
http://help.sap.com/saphelp_nw2004s/helpdata/en/44/f565854b7341e6e10000000a1553f6/frameset.htm
From the Support Package Stack 19 of XI 30
http://help.sap.com/saphelp_nw04/helpdata/en/44/f565854b7341e6e10000000a1553f6/frameset.htm
Good reason to upgrade.
Hope this help,
Regards
Sandro -
File Content Conversion on the Sender Adapter in PI 7.1
Hi Experts
I am working on a file to Proxy scenario where my file is fixed format length which will have only one Structures (Details Records) that would be coming from the text file but in the message type I have delcared Header, Detail , Trailer,
However I would be receiving the only Detail part (No header and Trailer) in some instances what value should I give for the header and trailer in the Content conversion part,
Thanks
PRSince you are going to get values only some instances for header and trailer node, you can create
Header structure & Trailer structure - make the occurence 0 to 1
Note: if your Header and Trailer values are empty for some instances then no worries. You declare FCC fields for header and trailer similar to Details.
Refer SAP FCC help link. -
File Content Conversion at the receiver side
Hello All,
I have a field which has to be truncated at 50th character. What content conversion parameters do I need to add ...?!?!?
Thanks,
SmitaHi Smita,
As understood by your question you want a target field to be of 50 character,
either you can apply substring function in your mapping to that target node.
It would be much more clear if you mention hows your source file structure is it fixed length or delimiter separated, if it fixedlength file you can apply this parameter in Content conversion <b>fixedLengthTooShortHandling</b> with value <b>Cut</b> nad mention your required length.
Rewards point if it is helpful,
Thanks
Anu Singhal -
Error in File content Conversion
HI All,
I am gettng
"Consistency error: field(s) missing - specify 'lastFieldsOptional' parameter to allow this"
What this error means?The problem...
Field Max Length
X 3
Y 4
ideal structure of file.. should be
XXX YYYY
or
(ii) XX YYYY
But in my situation it is coming like...
(ii) XXYYYY if the X field is of two value instead of 3 .
so if use my logic adapter will pickup XXY in one field and YYY as second...
If field lenght is smaller the maximum then file should have spaces to file upto max lenth ..
but this is not the case with my situation..
i guess we cannot read such kind of file where we are not sure of the file structure.. -
File Content conversion at the sender adapter without Key field
Hi All,
I have a requirement ....We are using Message Transform Bean at the sender adapter (we are not going for FCC as we are tranforming a decryption) ..its is a flat file...
we dnot have a key field for one of the node .....we have total 5 nodes under parent node and one of the node does not have key field ....
NOTE: I guess we have to do either Java mapping or XSLT ..but not getting proper weblogs with program...
and not well versed with coding...i got few codes which were either not fulfilling requiremment or they use stream tranformation where it is decaprecated in NWDS and does not allow to compile it properly .
Can somebody get me a code for Java which uses Abstract tranformation ...which can full fill below requirement
parent node
Node1
node 1a
node 1b
Node 2
Node 3
Input Flat file is in below format
example:
Employee Headre Flat files
Employee Detail Flat Files(this repeates numerous times as much as number of employees)
Employee Trailer Flat Files
Loan Headre Flat files
Load Detaisl Flat Files (this repeates numerous times as much as number of employees)
Loan Trailer Flat files
Assitance much appreciated thanks .
Regards
KiranHi Stefan,
I will rephrase the question i guess its communication gap...
1) we have an existing interface in 3.0..we are not copying the same interface to 7.1 as it was not according to standards and they are phasing out that system.
2) In 3.0 they are reading the Flat files under one record .. the structure is as follows:
Parent Node
Node
Row
They are reading all the flat files row by row.
and even in receiver they are reading in the similar fashion
3) In the current structure according to the FS we have to create a structure defined by them which is as below
Employee
Header
Details node 1
Details node 1a
Details node 1b
Trailer
Loan Header
Loan Detail
Loan Trailer
Receiver structure is
Employee
Node (this will have the receiver fields which is about 30 fields)
4) We have pulled a sample file from 3.0 for the existing interface as we din get the sample file for existing one in FS and Iam not sure whn are they gonna send it.
5) In the existing interface payload we have everything matching even the field lengths and postions and even key fields and key fields we got from the FS
6) problem is we donot have key fields for the Details node 1a and 1b even in FS or the existing payload and we got an update from the FS consultant that we will be receiving these fields but without keyfields...
see i donot have any problem taking out the details 1a and 1b out of the details header and create the structure ,,,,but the main issue is without key field we will not be able to generate the 1a and 1b nodes or read it in the FCC or MTB (i have to use MTB as we are decryting the file from the sender).
Or is there any other method apart from java mapping or module development to handle these files -
File Content Conversion - Error in keyfield Value
Hello experts,
I am doing file content conversion for a file to file scenario. The input file is a csv file which is converted to xml using the file content conversion. The key field of input file is used for implementing conversion.
While testing the FCC, I noticed that if the keyfield value is wrong for a record in the file, the record is ignored altogether without throwing any errors or warnings. Is there any way to notify if any records have been ignored as a result of incorrect keyfield value??
Thanks in advance!
RRThere seems to be NO way to handle it in FCC.
File Content Conversion - Key Field Value
u can think of work arounds by handling it in mapping....
-santosh. -
Can't get File content conversion to produce CSV file
Hi Guys
Have no problem at all getting XML file created via an RFC
Structure is something like this
From MONI message monitor inbound message payload
<?xml version="1.0" encoding="UTF-8" ?>
- <rfc:Z_XI_005_RFC xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
- <IP_CUSTOMER_HEADER>
<CUSTOMERID>100853</CUSTOMERID>
<COMPANY>Bram Van Tuyl Coldstore</COMPANY>
<SHORT_NAME>VAN TUYL</SHORT_NAME>
<STREET>Middelkampseweg 1</STREET>
etc
</IP_CUSTOMER_HEADER>
</rfc:Z_XI_005_RFC>
Receiver Grouping payload
<?xml version="1.0" encoding="UTF-8" ?>
- <rfc:Z_XI_005_RFC xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
- <IP_CUSTOMER_HEADER>
<CUSTOMERID>100853</CUSTOMERID>
<COMPANY>Bram Van Tuyl Coldstore</COMPANY>
<SHORT_NAME>VAN TUYL</SHORT_NAME>
etc.
With no conversion xml file is created on output directory
<?xml version="1.0" encoding="UTF-8"?>
<ns1:MT_customer_header xmlns:ns1="http://avenue.com/xi/test"><customerid>100853</customerid><company>Bram Van Tuyl Coldstore</company>
etc
Now trying to use File content conversion with the simplest possible conversion -- just insert a colon after all the fields in the structure.
Following parameters
Adapter type FILE
receiver box checked
Message protocol File Content conversion
File access etc as before
Content conversion parameters
Recordset : IP_CUSTOMER_HEADER
(have also tried Z_XI 005_RFC)
Name
CUSTOMERID.fieldSeparator : (colon)
MONI shows message received by XI and processed correctly but NO outfile gets written to the target directory.
what am I doing wrong --it's probably something stupid.
The data into XI is a ONE RECORD structure -- not a table etc.
Cheers
jimboHi guys -- both solutions STILL not working
all I'm now getting is just a file with garbage in it
Payload is fine on XI system
Here's the payload
<?xml version="1.0" encoding="UTF-8" ?>
- <rfc:Z_XI_005_RFC xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
- <IP_CUSTOMER_HEADER>
- <item>
<CUSTOMERID>65013</CUSTOMERID>
<COMPANY>OY PANDA AB</COMPANY>
<SHORT_NAME>PANDA</SHORT_NAME>
<STREET>P.O.Box 3</STREET>
<STREET2 />
<STREET3 />
<STREET4 />
<POSTCODE>3331 GT</POSTCODE>
etc etc until end of customer mmaster details
</item>
</IP_CUSTOMER_HEADER>
</rfc:Z_XI_005_RFC>
Without conversion file is generated on target directory
Here's the XML output file sent to the directory
(for testing I only usec the ist 3 fields)
Not sure why <item> disappeared - maybe that has something to do with it ?
<?xml version="1.0" encoding="UTF-8" ?>
- <ns1:MT_customer_header xmlns:ns1="http://avenue.com/xi/test">
<CustomerId>65013</CustomerId>
<company>OY PANDA AB</company>
<shortname>PANDA</shortname>
</ns1:MT_customer_header>
RFC call from R3 system is fine (otherwise I wouldn't get the message into XI. Transaction SM58 as well on R3 shows no RFC errors
Converted file is just a blank with nl character at the end ??????
cheers
jimbo -
File Sender adapter with File content conversion
Hi
I'm having problems picking up a flat file that has some junk characters in the file.
I'm usign a file sender adapter with file content conversion. The adapters shows the following error-
Conversion of complete file content of to XML format failed around position 0: sun.io.MalformedInputException
this is the sample data with junk char's -
A20099201009999009999060815160505051700130008151vÿÿÿÿ³ r 0OK0476 31N016227241915840IV 00840 ÿÿÿ ÿ ÿÿÿÿÿÿÿÿ ÿ ÿÿÿ
There is not much in the file content conversion. This is a fixed length file, I'm just pickign it up & passing it to an inbound proxy. All my processing is in the proxy.
I'd appreciate any suggestions.
Thanks
RachanaHi Rachana,
Do you use a specific "encoding" like UTF-8 or ISO-8859-1 in your Sender CC?
To be simple, Encoding is linked to country, you can find all "iso-nnnn" via google or some of them in sap help.
http://help.sap.com/saphelp_nw2004s/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
Moreover, with your source file opened thanks to Notepad (for instance), use option "save UNDER", you will the encoding use by your file
Mickael -
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
Maybe you are looking for
-
Patterns in analysis authorization
Dear experts, We are on SAP BW 7.31 SP 8 using analysis authorization (AA). First of all: I know of the limitations using patterns like * and + (Note 1053989). Before we went to AA we used complex patterns of * in an authorization infobject that was
-
Updates failing...
I keep getting the below errors when trying to update my older version software on my new Mac - any ideas? Adobe Photoshop Elements 9.0.3 Update There was an error downloading this update. Please quit and try again later. Photoshop Camera Raw 6
-
Hi All, When sending an email to a user of Outlook with a picture as an attachment, the recipient has to double click the attchment and then click 'open' to see the image in a viewer program. What a pain!!! How can I attach an image in my 'Mail' app
-
Find duplicate with sum=0
I need to find duplicates (ID) but the sum of column VALUES has tu be zero. can anyone help me please ? I HAVE TABLE ID VALUE 100 -100 100 100 100 100 200 50 --------------- THE DESIRED RESULT IS ID VALUE 100 -100 100 100 ------------
-
Problem in CKEDITOR url fetching
Hi Gurues, I am using the ckeditor in my project in which i insert the image using that insert image button when i select the image i found the following image url http://MyDomain:81/pls/apex/apex_util.get_blob_file?a=162&s=1394272106476846&p=44&d=48