File Content Conversion Sender. Enclosured info
Hi experts,
I have to read a plain file like this:
x
x
x
x
x
<START-OF-FILE>
a;b;c;d;
a;b;c;d;
a;b;c;d;
<END-OF-FILE>
x
x
x
x
x
Where 'x' means unuseful and unformatted lines, and 'a','b','c','d' are the fields to be parsed to xml.
I wonder whether there is a way, using FCC in the file sender adapter, to gather only the lines enclosured between '<START-OF-FILE>' and '<END-OF-FILE>'. There is no key field I can use.
Many thanks in advance,
Paco
Hi Francisco,
I think u need to write a UDF to achieve the requirement.
And, I think there is a possibility to do it using content conversion.
Use set NameA.fieldFixedLengths for the unused data in the file.
use NameA.fieldContentFormatting - Enter trim to remove all the leading and subsequent blanks for a value found. This is the default.
If there is any field length restriction use NameA.fieldFixedLengths.
NameA.fieldSeparator & NameA.endSeparator shoulf be used.
NameA.additionalLastFields
If the inbound structure has more fields than specified in the configuration then the XML outbound structure is created as follows:
○ ignore
Outbound structure only contains the fields in the inbound structure
○ error
Conversion is terminated due to the incomplete inbound structure. An error message is displayed.
The default value is ignore. If you have defined the NameA.fieldFixedLengths parameter, the default value is error.
I hope this info will help you.
Refer the below link:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
Regards,
Similar Messages
-
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 - sender adapter for Header and detail records
Hi Experts,
I am receiving a field of fixed length content format.(Header)The first line of the file will follow the structure X having some fields and (DetailRecord)subsequent lines in the file will follow structure Y having somes fields.There is no record identifier for Header and Detail records.In one file first line is Header records and remaining subsequent line is DetailRecord.What are the parameters we have to set for sender file content conversion parameters as i donot have any key field and key field value.And in one file we have only one header records ( first line) and n number of detail records from 2nd line onwards.
Thanks
DeepakHi
Refer the below fourm link,
Flat file whitout id
Regards
Ramg. -
File Content Conversion : Sender Channel
Hi
I am trying to do content conversion in the Sender Channel from a flat file to a XML.
My Target XML(message structure) looks like
<H1>
<H2>
<D>Detail Record</D>
<L1>line</L1>
<L1>line</L1>
</H2>
<H2>
<D>Detail Record</D>
<L1>line</L1>
<L1>line</L1>
</H2>
</H1>
Here the element <H2> is only needed to group <D> and the following <L1> elements of each new occurrence of <D>.
Now my problem is that the element <H2> is not getting created.
and the message after content conversion is looking as follows
<H1>
<D>Detail Record</D>
<L1>line</L1>
<L1>line</L1>
<D>Detail Record</D>
<L1>line</L1>
<L1>line</L1>
</H1>
What should I do to get the desired result.@Yes Bhavesh you are right.
Hi Jai,
I am trying the other way round.i.e from flat file to a XML message.As I said I was trying to do it for Sender Channel where is the after content conversion I want a XML file.The example is a what I framed out of my actual problem.
if flat file is as follows ,
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
DetailRecord1
Line1
Line2
Line3
DetailRecord2
Line4
Line5
then the XML must look like
<H1>
<H2>
<D>DetailRecord1</D>
<L1>Line1</L1>
<L1>Line2</L1>
<L1>Line3</L1>
</H2>
<H2>
<D>DetailRecord2</D>
<L1>Line4</L1>
<L1>Line5</L1>
</H2>
</H1>
I identify the different types records in the flat file
as follows,
Record starting with "Detail" is considered as <D> element
Record starting with "Line" is considered as <L> element.
Hope I did clarify. -
Strange Problem with File Content Conversion (Sender)
Hi,
I have a strange problem. I have a sender file adapter with content conversion (csv -> xml). The adapter produces the following error during the processing...
- 2006-02-06 16:34:00 CET: Error: Conversion of part of file content of 'OE_Extractor_47_ISW112_SC-Ireland.csv' to XML format failed around position 1202: IOException: Stream closed
After the 4th or 5th try the adapter processes the file correctly.
Why does it works after several tries and not at the first time? (The file is not changed during the adapter is trying to convert it)
Thanks
ThomasI found the problem, something was wrong with the ftp server
-
.csv file Vs .txt file Content conversion sender file channel
Hi Experts,
I have a file with filename say input.csv.I want to do content conversion for these .CSV file.Is it same like we have to do for .txt file say input.txt.
when i open my .csv file in notepad, i get multiple rows with each field separated by ';'.what are the content conversion parameters we have to define for .csv file and can we mention input.csv as the file name as a source file name.
Thanks
DeepakHi,
Use the following parameters for Sender file channel in case of reading .csv file
Recordset Structure.fieldSeparator -
Recordset Structure.endSeparator -
'nl'
Recordset Structure.fieldNames -
provide field names separated with ,
Regards
Seshagiri -
File Content Conversion (Sender) endSeparator Problem
Hi
i have a flat file like this:
fieldA;fieldB;fieldC;fieldA;fieldB;fieldC;fieldA ...
recordset structure: FIELDS,1
recordset per msg: *
parameters:
FIELDS.fieldNames = fieldA,fieldB,fieldC
FIELDS.fieldSeparator = ;
FIELDS.endSeparator = ;
if i change the endSeparator to 'nl' and then changeing the input file to this:
fieldA;fieldB;fieldC
fieldA;fieldB;fieldC
fieldA ...
it works. i already tried to use another endSeparator like this:
fieldA;fieldB;fieldC:fieldA;fieldB;fieldC:fieldA ...
but it doesn't work. it seems like the adapter is only using 'nl' endSeparator, no matter whats the parameters say.
the error in adapter monitoring:
Error: Conversion of complete file content to XML format failed around position 0 with java.lang.Exception: ERROR converting document line no. 1 according to structure 'FIELDS':java.lang.Exception: ERROR in configuration: more elements in file csv structure than field names specified!
i already tried to use hex separators and found the following thread (best matching tread):
anyone has an idea? Thanks a lot.
Regards
J.
Message was edited by: Jörg Pieper
Message was edited by: Jörg PieperHi
this doesn't work
Regards
J. -
File Content Conversion: Sender Problem
Hi,
I'm getting a very typical error in my Sender Communciation channel.
Channel CC_FILE_SENDER_2: Empty document found. Proceed without sending message
I've gone through a few threads and I know that the problem is with the Key Field and using * in the Recordset Structure but I cannot solve it. If I use * in the Recordset structure it fails,when I use a specific number it works. Any ideas
Here is my Communication Channel details
Document Name: MT_SENDER
Document namespace: http:\\sender
Recordset Structure: FileHeaderRecord1,1,FileHeaderRecord2,1,FileHeaderRecord3,1,FileDetailRecord,*,FileTrailerRecord1,1
Recordset Sequence: Ascending
Key Field Name: RType
And the configuration:
FileHeaderRecord1.fieldNames: RType,Filler,Code,Filler2
FileHeaderRecord1.fieldFixedLengths: 10,31,6,69
FileHeaderRecord1.keyFieldValue: V
FileHeaderRecord2.fieldNames: RType,Filler
FileHeaderRecord2.fieldFixedLengths: 3,113
FileHeaderRecord2.keyFieldValue: HDR1
FileHeaderRecord2.fieldNames: RType,Filler,Date,File,Filler2,Num,Filler3
FileHeaderRecord3.fieldFixedLengths: 3,2,5,6,21,3,76
FileHeaderRecord3.keyFieldValue: UH1
FileDetailRecord.fieldNames: RType,Filler,TCode,Filler1,Amount,Filler2,ZGC,Filler3,Date,Filler4
FileDetailRecord.fieldFixedLengths: 14,1,2,18,11,18,9,28,5,10
FileDetailRecord.keyFieldValue: 9
FileTrailerRecord1.fieldNames: RType,Filler,TCode,Filler1,Date
FileTrailerRecord1.fieldFixedLengths: 14,1,2,12,5
FileTrailerRecord1.keyFieldValue: UT1
ignoreRecordsetName: true
This is a copy of my file....
VPR456SCL1 852086
HDR1 SED456RD 345344500428 F 04 094520428 BS 09452
UHL1 09452ESBCL1 00000000 004
85208681123787085 000000000000500FREW RTYU POSWS123704375 09452
85208681123787085 000000000000600FREW RTYU POSWS123705307 09452
85208681123787085 000000000000600FREW RTYU POSWS123705671 09452Hi,
problem is in your keyfield value,
FileHeaderRecord1.fieldNames: RType,Filler,Code,Filler2
FileHeaderRecord1.fieldFixedLengths: 10,31,6,69
FileHeaderRecord1.keyFieldValue: V
keyfield name is RType and it is given a fixedlength of 10 characters, but your keyfieldvalue is "V
" which is not 10 char long that is the reason your adapter is failing to pick it.
same for all the other recordsets, the fieldvalue shd match the fixed length given.
Eg:- give keyfieldvalue like this "V ". it will work. -
File Content Conversion - Sender File Adapter - Record Delimeter ~
The inbound file has file has ~ as record delimeter. I am using the FCC at sender file adapter to covert this file into XML. Somehow, the file adapter is not able to interpret "~" as my record delimeter even thoough I specified "record.endSeparator = ~" in FCC.
Would someone help me with a solution?Raju,
You can also try to use the '0x7E' as endSeperator condition.
I am not sure if the HTML tag will work but this should do the trick. This should be the HEX corresponding entry
char description hex char code html
" ~ " "Tilde" "0x7e" "~" &!tilde; (without !)
greets.
in adition to this see SAP help
http://help.sap.com/saphelp_nwpi71/helpdata/en/44/655453b48a4ddfe10000000a1553f7/frameset.htm
Special Characters in Strings for Separators
In all strings for separators (NameA.fieldSeparator, NameA.beginSeparator, NameA.endSeparator), you can specify non-printable ASCII characters. These characters can each be inserted individually in the strings in the form ´0xHH´ (including the quotation marks), where HH represents the character encoded as a hexadecimal value.
Please also ensure that the "recordSet Structure" also need to be configured Correctly
for example:
Header,1,Detail,*
Header.fieldSeperator --> %parameter%
Detail.fieldSeperator --> %parameter%
Detail.endSeparator --> '0x7e'
Greets -
File content conversion:move files to a new directory
hi all,
I have a file content conversion sender and receiver scenario.Now my doubt is: XI is running on sap27 server.Input file is being created by an ABAP program in r/3 and file being put in sap29 server.
In source directory if i am giving the sap29 path it is not working.Is there any way that i can write a OS command to move files from 29 to 27 before message processing ??
Any other option available??
thanks,
Nisheetahi,
Yes the basis people have shared the folder and they have mapped the sap29 folder into sap27 using I:\ drive
But the files are not getting picked....am i giving the source directory wrong??
I am giving I:\Folder_Name
suggestions needed
thanks,
Nisheeta -
File Content Conversion in Sender File
how to convert a fixed length flat file without end seperator sent to XI to a xml form?
Pleasegive me the idea of Sender Adapter configuration details (esp endSeperator)Hi,
For file content convertion if there are fixed lenth then no need to give the feildseperator,just give the fixed lenths for all the feild in FCC.
check below links for FCC
/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/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
/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/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/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
Regards,
Phani.
Reward Points If Helpful -
Problem with Sender Adapter File Content Conversion
Hi all!
I have a question about file content conversion in sender file adapter.
I have file like:
{field1
field2
field3
field4
$
{field5
field6
field7
field8
And i need to get file like:
<dealings>
<deal>
<field1>{field1</field1>
<field2>field2</field2>
<field3>field3</field3>
<field4>field4</field4>
<field5>-}*</field5>
</deal>
<deal>
<field1>{field5</field1>
<field2>field6</field2>
<field3>field7</field3>
<field4>field8</field4>
<field5>-}*</field5>
</deal>
</dealings>
I put content conversion parameters:
deal.fieldSeparator = $
deal.fieldNames = field1,field2,field3,field4,field5
And i get a file like:
<ns:mt_swift_file>
<dealings>
<deal>
<field1>{field1</field1>
</deal>
<deal>
<field1>field2</field1>
</deal>
<deal>
<field1>field3</field1>
</deal>
<deal>
<field1>field4</field1>
</deal>
<deal>
<field1>-}*</field1>
</deal>
<deal>
<field1/>
</deal>
<deal>
<field1>{field5</field1>
</deal>
<deal>
<field1>field6</field1>
</deal>
<deal>
<field1>field7</field1>
</deal>
<deal>
<field1>field8</field1>
</deal>
<deal>
<field1>-}*</field1>
</deal>
</dealings>
</ns:mt_swift_file>
What i do wrong?
As i understand, XI put string to a separate tag after symbol 'nl', but how can i get structure without unnecessary tags?Hi,
Check some links for FCC
Introduction to simple(File-XI-File)scenario and complete walk through for starters(Part1)
Introduction to simple (File-XI-File)scenario and complete walk through for starters(Part2)
File Receiver with Content Conversion
Content Conversion (Pattern/Random content in input file)
NAB the TAB (File Adapter)
Introduction to simple(File-XI-File)scenario and complete walk through for starters(Part1)
Introduction to simple (File-XI-File)scenario and complete walk through for starters(Part2)
How to send a flat file with various field lengths and variable substructures to XI 3.0
Content Conversion (Pattern/Random content in input file)
NAB the TAB (File Adapter)
File Content Conversion for Unequal Number of Columns
Content Conversion ( The Key Field Problem )
The specified item was not found.
File Receiver with Content Conversion
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
Regards,
Phani -
Sender File Content Conversion
I am using the file content conversion in sender file adapter with fieldFixedLengths parameter in recordset structure. This work fine when the columns in row is exactly with the length set in the parameter recordset. But in same cases, the row in the file has less columns, which occurs errors. If I use the parameter fixedLengthTooShortHandling usage by the receiver file adapter, will it work for the file sender?
Hi Elton,
The parameter fixedLengthTooShortHandling is not a part of the Sender File Adapter's content conversion paramteters, So i guess it will not work for the sender file adapter.
I would suggest that you try it anyways, and if it does work, then it means that this field has been forgotten in the help documentation
http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
Regards,
Bhavesh -
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 -
Doubt regarding Sender adapter file content conversion to RFC
Hi Experts,
Below is the my Source and Target XML structure ( i have creaated source structure same as target RFC structure), This scenario is working fine when i give XML file as input. File -> XI -> RFC , xml file is able to update the information in R3.
How should i configure sender file adapter for file content conversion for above structure(in this case input is fixed lenth text), and i could able to change source structure according to our req, without changing target RFC strucuture.
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_HSA_IDNumber xmlns:ns0="urn:passhe.com/UpdateIdNumberISA32">
<COMMIT_I>X</COMMIT_I>
<IDENTIFICATION>
<STUDENT>6500001191</STUDENT>
<ID_TYPE>FS0030</ID_TYPE>
<ID_NUMBER>testxml</ID_NUMBER>
<VALID_FROM>20070421</VALID_FROM>
<VALID_TO>20091231</VALID_TO>
</IDENTIFICATION>
</ns0:MT_HSA_IDNumber>
I have configured sender file adapter with FCC like :
Document name as: MT_HSA_IDNumber
Document name space as: urn:passhe.com/UpdateIdNumberISA32
Record structure as: COMMIT_I,1,IDENTIFICATION,1
COMMIT_I.fieldNames : COMMIT_I
COMMIT_I.fieldFixedlengths: 1
IDENTIFICATION.fieldNames: STUDENT,ID_TYPE,ID_NUMBER,VALID_FROM,VALID_TO
IDENTIFICATION.fieldFixedlengths: 12,6,60,8,8
i am getting error like this: even when i change source structure like below metioned:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_HSA_IDNumber xmlns:ns0="urn:passhe.com/UpdateIdNumberISA32">
<COMMIT>
<COMMIT_I>X</COMMIT_I>
</COMMIT>
<IDENTIFICATION>
<STUDENT>6500001191</STUDENT>
<ID_TYPE>FS0030</ID_TYPE>
<ID_NUMBER>idnumber1</ID_NUMBER>
<VALID_FROM>20070421</VALID_FROM>
<VALID_TO>20091231</VALID_TO>
</IDENTIFICATION>
</ns0:MT_HSA_IDNumber>
Conversion initialization failed: java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter 'COMMIT_I.fieldFixedLengths' or 'COMMIT_I.fieldSeparator' is missing Consistency check: no. of arguments in 'COMMIT_I.fieldFixedLength' does not match 'COMMIT_I.fieldNames' (0 <> 1)
Please help me out
thanks
dhanushHi Dhanush,
Try giving the Sender FCC this way for the source structure you have mentioned above.
Record structure as: COMMIT,1,IDENTIFICATION,1
COMMIT.fieldNames : COMMIT_I
COMMIT.fieldFixedlengths: 1
Hope this helps.
Thanks and Regards,
Induja
Maybe you are looking for
-
Keynote Bug: Object colors changing when opened on different machines
I'm collaborating on a series of presentations with two other people all using Keynote 3.0.1 and we have discovered that the colors of imported graphics are changing (slightly) when we send files to each other. The same files remain normal on the mac
-
New Photos Never Show Up in iPod
I've searched and found references for old photos in iPod being deleted when uploading, but I have the opposite problem: When I add new photos to the same folder and upload, only the old photos seen in the ipod, the new ones are not. I check the box
-
Batch inputs sessions got deleted
Dear All, We have a major issue on our SAP Production server. We have executed the report RSBDCTL2 as a background job RSBDCTL2_300 on 29th May 2010 with delete option. This has deleted all the batch input sessions that were existing in SAP Productio
-
I tried to load a few websites on my Firefox browser, but it said it was "Unable to connect." I then tried to load the same websites on my Internet Explorer website and it connected fine. I'm not sure why this is happening.
-
I am trying to generate my help files through the commanline utitlity via a bat file. Here is my bat file... rem Generates the System output files :START "c:\Program Files\Adobe\Adobe RoboHelp 8\RoboHTML\RHCL.exe" "c:\Projects\myProj\1.0.0\Developmen