File adapter and line feeds
Hi,
we need to produce a flat file using the content conversion of the file adapter without any line feed (the target structure is a complex one with several record types).
Example
What we get now:
*AAheaderA
*ABheaderB
*BAItem1
*CAsubitem1
*BAItem2
What we need:
AAheaderAABheaderBBAItem1CAsubitem1*BAItem2
It seems that with NameA.endSeparator parameter you can only add a new character, but I need to delete the line feed.
Is it possible with standard file adapter or do we need do create our own module with java?
Thank you.
Hi Stefano,
So you Basically want to do content conversion at the receiver end and that is basically to get the entire data in one line.For that please go through these links below.It clearly explains your requirement.
<a href="/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion Receiver with Content Conversion</a>
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/frameset.htm">Converting File Content in the Receiver Adapter</a>
carefully make a note of the "The endSeparator parameter.
Regards,
abhy
Similar Messages
-
How to find a carriage return and Line feed?
I need to detect if a crriage retunr and line feed present on each row in my text file before allowing user to upload the text file
I know how to remove them from each line but what I need is to detect them no removing them from file.
Our concern is when the a row does not have carriage return and line feed.
Is there a way to find this using CF? Please help
thanksThat is exactly the problem Dave, if some rows do not have line feed, they're not being inserted into DB, it skips other steps and go right to finish. It looks
like the file is done processing.
So I need to do early rejection to this kind of file.
I used cfloop to catch anything else that do not follow the formatting rules.
Here is what I already done:
Right after the file got uploaded, I have these codes:
<cfloop index="x" file="#MyFile#" >
<CFSETMyLine = Replace(x,chr(9),"|", "ALL")>
I'm using a few functions, such as, Left(), Mid(), Right(), etc to make sure certain rules are followed.
Up till here, it's done and tested, everything is working.
The only problem is when 1 or more rows don't end up with line feed and or carriage return.
I plan to add some codes to check the end of each row for chr(10) since it is looping for every row anyway.
If detected, process file normally otherwise stop processing.
</cfloop>
So this can't be done in CF? -
I am having a sender file adapter and is using NFS as the Transport Protocol. This channel is throwing an error that " directory does not exist". What can be the possible solutions for this problem?
When I had previously checked this , it was working fine but now its throwing this errorr.Hi Neelansha,
If you select the transport protocol for NFS, Mention the Directory name for where we can get data.
and check the communication channel monitor for file sender, it will shows the clear error.
Regards,
Sateesh -
How to generate .pdx file using File Adapter and FTP Adapter
Hi,
is it possible to genearate .pdx file using oracle ESB Adapters(File Adapter and FTP adapter).
Can you anyone guide me.
Thanks,
Raj.hi,
regarding report, there is a dedicated report forum. you should post there.
but answer for your question is form is nothing to do with the pdf generation. you can call the report from the as usual.
In the report you should set the properties like
destype to 'file'
desname to 'path with file name'
desformat to 'pdf' -
Difference between File adapter and FTP adapter
hi,
I would like to know what is the difference between File adapter and FTP adapter
thanks
YatanBoth file and ftp adapters are non-concurrent jca adaps, however we go for file adapters mostly when you have files on your local environment and do not need to wait for someone to FTP the files on a timely basis. In case of FTP Adapter, we would need an FTP Server, a remote location with access where in files pitch in for polling.
Also, File adapter is dependent on the local folder and OS, however FTP adapter is dependent on the local as well as the remote file system/OS/folder permissions/user access. -
Text mode opened file and line feed
Good morning:
I have open a file in text mode and i need to send an OD0A hexadecimal characters to another system in each line, if i try to put 0D0A it makes a double line feed and if i only put 0D it doesn´t interpretate 0D like hexadecimal characters, i know that if i open the file with binary mode it would be very easy, but it is a code shared with another programs, so i rather not to change. Does anybody has made that in text mode in any occasion?.
Thanks in advance
Regardsi have open the file in binary mode
-
Performance problems with File Adapter and XI freeze
Hi NetWeaver XI geeks,
We are deploying a XI based product and encounter some huge performance problems. Here after the scenario and the issues:
- NetWeaver XI 2004
- SAP 4.6c
- Outbound Channel
- No mapping used and only the iDocs Adapter is involved in the pipeline processing
- File Adapter
- message file size < 2Ko
We have zeroed down the problem to Idoc adapters performance.
We are using a file channel and every 15 seconds a file in a valid Idoc format is placed in a folder, Idoc adapter picks up the file from this folder and sends it to the SAP R/3 instance.
For few minutes (approx 5 mins) it works (the CPU usage is less then 20% even if processing time seems huge : <b>5sec/msg</b>) but after this time the application gets blocked and the CPU gets overloaded at 100% (2 processes disp_worker.exe at 50% each).
If we inject several files in the source folder at the same time or if we decrease the time gap (from 15 seconds to 10 seconds) between creation of 2 Idoc files , the process blocks after posting 2-3 docs to SAP R/3.
Could you point us some reasons that could provoke that behavior?
Basically looking for some help in improving performance of the Idoc adapter.
Thanks in advance for your help and regards,
AdalbertHi Bhavesh,
Thanks for your suggestions. We will test...
We wonder if the hardware is not the problem of this extremely poor performance.
Our XI server is:
Windows 2003 Server
Processors: 2x3GHZ
RAM: 4GB (the memory do not soak)
The messages are well formed iDocs = single line INVOICES.
Some posts are talking 2000 messages processed in some seconds... whereas we got 5 sec per message.
Tnanks for your help.
Adalbert -
File Adapter: Different lines in one file
Hi,
I receive a flat file where I have to do content conversion.
In this file, I have different structures which could appear unsteady.
Means, every could structure appear in a non continuous way:
File:
struc1
struc2
struc3
struc3
struc3
struc1
struc1
struc2
struc3
How to handle this in file adapter?
Regards
ChrisHi,
do you mean like this:
/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
How to identify the different structures? Every structure got different fields and different
amount of fields.
Every struc1 to struc3 should be a single message.
And how to specifiy line break in file adapter?
thanks
chris -
Receiver file adapter command line
hi,
i am just wondering how to use command line on receiver file adapter.
i am not clear how to use this.
please modify on the following command!
anyway, i have to call java application after put some files by receiver file adapter.
cmd.exe %Fjava ./javacalltest
it did not work..
please guide me.
Command Line
An operating system command specified here is executed before or after a file has been successfully processed. The default value is an empty character string (no command).
When the operating system command is called, the file name currently being processed can be specified with the following placeholders:
%f (file name)
%F (absolute file name including path)Hi Ogawa and Laurence,
Have look at :: /people/michal.krawczyk2/blog/2007/02/08/xipi-command-line-sample-functions
1)Windows batch Commands::
http://labmice.techtarget.com/articles/batchcmds.htm
2)Linux:
/people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching
Note:: First try using the comands on O.S if they work then only use them in Adapters.
Hope it will help.
regards
Piyush
Pl:reward some points if it is usefull. -
Sender File Adapter and content conversion
Hi,
How can we remove the last line from the file using content conversion?
The last line should not be read from the input file.
Like for the first line we can use Document Offset .......similarly do we have any option for the last line?>
neelansha singh wrote:
> date Empno Empname
> 19.03.2009 12345 Neel
> 20.03.2009 34566 Neelkanth
> EmpDes Japan 100
>
>
> The file is like this first row i have removed using document offset.......from 2nd row till nth row the structure is as shown above and the last row has no. of fields 1 less than all other rows and also its root node is different like shown above its rootnode is EmpDes..........How to use File content conversion for this?
do you want to avoid the last line i.e
EmpDes Japan 100
in that case the 3 options are
1. use a adapter module and remove the last line - this is the ideal option
2. use a OS script - will work but only if you are using the NFS option in the file adapter instead of FTP
3. read that also using content conversion (treat it as a trailer) and ignore it during the mapping -
Receiver mail with text file attached without line feeds
Hi, friends
I have a text file to mail scenario, where file must be attached to receiver mail.
Receiver CC mail is protocol XIPAYLOAD and use mail package and keep attachment.
In tab module, i have:
Module name --> SAP XI Sample/ConvertCRLFfromToLF
Module configuration --> mode LFtoCRLF
The plain text file is attached to mail but there are no line feeds after the plain text lines.
Thanks, in advanceStefan,
This is not a Java mapping, it's an ABAP mapping.
I've tryed also to insert this characters, but without success.
In my abap class i have:
data: l_newline type c value cl_abap_char_utilities=>newline.
data: l_linefeed type c value cl_abap_char_utilities=>CR_LF.
clear wa_string.
incode = idocument->get_elements_by_tag_name( 'linea' ).
length = incode->GET_LENGTH( ).
do length times.
outcode = incode->get_item( index = d_lines ).
wa_linea = outcode->get_value( ).
if wa_string is initial.
wa_string = wa_linea.
else.
concatenate wa_string l_newline l_linefeed crlf wa_linea into wa_string.
endif.
add 1 to d_lines.
enddo.
l_element_dummy = l_document->create_simple_element(
name = 'Content'
VALUE = wa_string
parent = l_element_root ).
so...it's similar to your suggestion..
Any other input, please?
Regards,
Carme. -
Sender File adapter and duplicate file processing
If I set the sender file adapter to delete or archive and when a file gets picked up and processed, this file will not get deleted/archived unless it was successfully processed. However, if it errors out during processing, the file remains but it's message will get persisted in the integration engine or adapter engine. Since there's automatic retry, we have the potential for duplicate processing as in addition to the retry, the file is still continously polling for this file. In other words, how do we stop this duplicate file processing?
Thanks.Hi Bevan,
However, if it errors out during processing, the file remains but it's message will get persisted in the integration engine or adapter engine.
your file wont get deleted unless adapter engine sucesfull pickups. if does not picked up at adapter engine then is not stored in adapter engine . if it reached Intergation Server and failed their then file would be deleted.
please let me know if you haveany questions
please reward points
Regards
Sreeram.G.Reddy -
Reset file name and line number in preprocessor
We are using Sun Studio 12u1 on Solaris x86 10u9.
For one of our large projects our make file copies many C++ source files into one large allsource.cpp file. This results in significantly faster compilation and better inter-procedural optimizations.
Unfortunately, when the compiler generates warning or error messages they refer to allsource.cpp. Also when it comes time to debug, dbx is looking for debugging information for the original source file instead of looking for allsource.o.
On Windows (MSVC), we use the #line directive to reset the line number and filename so that the error messages point to the correct line and number, and so that the debugger knows that the debugging information for myfile.cpp is actually in allsource.o.
Does the Sun compiler have anything similar to the #line directive?To reset the preprocessor to the start of a new file:
#1 "filename"
where filename is the name or complete path name of the file.
To change the line number within the current file:
#N
or
#line N
where N is an integer
Example:
% cat z.cc
struct S { X x; };
#1 "/foo/bar.h"
Int I;
#500
Float F;
#line 1000
Double D;
88% CC -c z.cc
"z.cc", line 1: Error: Type name expected instead of "X".
"/foo/bar.h", line 1: Error: Int is not defined.
"/foo/bar.h", line 500: Error: Float is not defined.
"/foo/bar.h", line 1000: Error: Double is not defined.
4 Error(s) detected.BTW, you might get a similar improvement in compile time by using precompiled headers.
The -xipo option provide inter-procedural optimization across compilation units. Refer to the C++ Users Guide for details.
We seem to have a bug in the Forum software. My original source code and the compiler output have double quotes ("...") but they show as single quotes in the code brackets.
Edited by: clamage45 on Apr 13, 2010 1:13 PM -
File Adapter and Third party system
Hi,
I am new to XI and implementing a simple scenario.
In SLD- I have 3rd paty software component and product.
3rd party technical system: using my pc - For host name I am using my machine name.
Scenario: Using file adapter transform csv file to xml.
File resides on my machine. I have configured file adapter inbound and outbound. Integration Dir & Rep objects are all activated.
But nothing happens, cannot see any message in Messgae monitoring..
Any help would be great.. Is my technical system setup wrong?
thankschk whether the folder in your m/c where the CSV file resides is shared and has appropriate access. Also you need to specify your m/c IP with fwd slashes, e.g) //<Ipaddress>/foldername
configuring your m/c as a Third Party system in SLD is fine.
If you think ur SLD settings are not correct, you can define your file adapter commn. channel in a Business Service(which does not require an SLD entry) and check whether it works.
Thanks
Saravana -
Testcase problem using two file adapter and a transformation
We've got an input which looks like this :
<?xml version="1.0" encoding="UTF-8"?>
<rows>
<row>
<id>10</id>
<naam>A</naam>
</row>
<row>
<id>20</id>
<naam>B</naam>
</row>
</rows>
I've created an XSD for this message which looks like this ( straightforward ) :
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.test.nl/testschema" xmlns:test="http://www.test.nl/testschema" elementFormDefault="unqualified">
<element name="row">
<complexType>
<sequence>
<element ref="test:id"/>
<element ref="test:naam"/>
</sequence>
</complexType>
</element>
<element name="rows">
<complexType>
<sequence>
<element ref="test:row" maxOccurs="unbounded"/>
</sequence>
</complexType>
</element>
<element name="naam">
<simpleType>
<restriction base="string">
</restriction>
</simpleType>
</element>
<element name="id">
<simpleType>
<restriction base="byte">
</restriction>
</simpleType>
</element>
</schema>
I've imported this XSD in my ESB project and created a file adapter which reads this type op files.
I've created another file adapter to write the files 1:1 to an output dir.
In the routingservice I've created a very straightforward XSL mapping which maps everything 1:1.
Now the problem
When I use this input :
<?xml version="1.0" encoding="UTF-8"?>
<rows>
<row>
<id>10</id>
<naam>Martin</naam>
</row>
<row>
<id>20</id>
<naam>Edward</naam>
</row>
</rows>
my output result is:
<?xml version="1.0" ?><imp1:rows xmlns:imp1="http://www.test.nl/testschema"/>
I know this is a namespace issue. When I add the namespace
<?xml version="1.0" encoding="UTF-8"?>
<rows xmlns="http://www.test.nl/testschema">
<row>
<id>10</id>
<naam>Martin</naam>
</row>
<row>
<id>20</id>
<naam>Edward</naam>
</row>
</rows>
I get the correct ( and 1:1 output ).
The problem is. In the scenario I'm about to build the input xml messages do not have an namespace. How can I alter my xsd file or anything within my ESB project that all files will be picked up correctly and processed without having an default namespace?
Any help is appreciated!True,
But its the other way around what is causing my problem.
Because the input xml files contain no namespace at all the xml messages are transformed but result in an almost empty xml message. ( e.g. the root element is there and thats it ).
This is because the XML transformation mapper in ESB ( as well as BPEL ) excplicitly needs a namespace.
I solved it by editing the XSL by hand, removing the :imp1 namespace prefixes in the select="" tags. e.g.
<xsl:for-each select="/imp1:rows/imp1:row"> is updated in
<xsl:for-each select="/rows/row">
As far as I know this is the only workaround at the moment that I could find.
Maybe you are looking for
-
I wanted to know how to clean b570 fan
Hey guys i wanted to know how do i clean my laptop b570's fan and how often should i clean fan. Thank you for your help. Solved! Go to Solution.
-
Produced a podcast in garageband, post it in iWeb, but when i submit it to iTunes, I keep getting a message of an error in iTunes #11111, try again later. Never works. What's up?
-
Is there a "passbook" app available for Ipad Air ?
I' trying to organize a trip and really like the passbook feature on my Iphone. Can't find it on my new Ipad Air, nor can I find a Passbook app in the app store. thanks
-
Why is the manufacturer of RAM 'important'?
I'm browsing the RAM upgrade threads and there are many saying things like 'this manufacturer is better than that', or 'you get what you pay for' etc. etc. In what way does the philosophy 'you get what you pay for' map to RAM? If all the RAM chips (c
-
I recently upgraded my 27" iMac from Mac OS 10.6.8 to Mavericks 10.0.1. Now my finder freezes all the time, usually when transfering a file from one folder to another. Most recently I simply double clicked on my Macintosh HD icon and got the spinning