on 09-10-2007 6:36 PM
Hi Guys,
I have a one simple file as shown below. Name of the file is "ABC_XYZ_123.txt"
Dear XXXX,
Line1
Line2
Line3
Regards,
YYYY.
I need to write this file to the directory with same file name with out any mapping. If I do mapping, all the empty lines in the file( Ex: line between Dear XXX and Line1)will be removed by File Adapter while generating the XML.
Could anyone help me how to handle this scenario.
Thanx,
Kumar
Kumar,
You can do this by creating dummy interfaces in ID. Here XI acts like File mover. I'll give the reference blog ...
/people/william.li/blog/2006/09/08/how-to-send-any-data-even-binary-through-xi-without-using-the-integration-repository
If you want the same filename then just select checkbox <b>FileName</b> in both Sender /Receiver channel's <b>ASMA</b>. Thats it...
If you have any doubts in achieving the same, kindly let us know.
raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raj,
Thank u very much for ur answer.
one more requirement came that I need to write the file to the target directory with different name.
Assume the Name of the file is "ABC_XYZ_123.txt" and the file content as shown below.
Dear XXXX,
Line1
Line2
Line3
Regards,
YYYY.
Whn writing to the target directory assume file name should be "TPZ_XYZ_123.txt" with out any mapping. If I do mapping, all the empty lines in the file( Ex: line between Dear XXX and Line1)will be removed by File Adapter while generating the XML.
Could u help me again how to handle this scenario.
Thanx,
Kumar
Hi Raj,
file name is dynamic. In Runtime, I need to check the first few chacters of the file name and should be placed with new string.
Definitely I should have a Input file name to do this.
I think this is psb using Dynamic configuration with message mapping, but if i use the mapping empty lines will be removed.
Kumar.
Hi Raj,
As I told u earlier, We have one flat file in source Directory.
Assume file name is "ABC.XYZ_XXX_123.txt" and XXX value will vary in the file.
Requirement is the same file content should be return to the target directory with different file name like "ABC.XYZ_YYY_123.txt" .
Value "YYY" can be assigned only after checking the first 3 charcters "ABC" and value of "XXX" in the Source file name.
Note: Value "YYY" will vary in the Target file Name if value "XXX"changes.
thanx,
kumar
Hi Kumar,
Please use an adapter module to convert your input file to xml format, having tags to represent the emtpy spaces as well..
After this do the dynamic configuration udf to assign file name
refer this blog for file sender adapter module
/people/sap.user72/blog/2005/07/31/xi-read-data-from-pdf-file-in-sender-adapter
And this blog for dynamic file naming
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
Hi varun,
I am able to do Dynamic file change with dynamic configuration mapping code but the problem is sender Adpter is skipping the empty lines when generating the XML.
Source file
-
Dear XXXX,
Line1
Line2
Line3
Regards,
YYYY.
My Output file will be coming to the target directory with the required file name like below.
Dear XXXX,
Line1
Line2
Line3
Regards,
YYYY.
If i am able to capture the empty lines in XML, then my prob will be solved.
Thanx,
Kumar.
Kumar,
did u try this FieldName.fieldContentFormatting = nothing
http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
Hi Kumar ,
<b>There is no need of creating any dummy variable at Repository level.</b>
Just perform Configuration steps ...and at the time of creating Interface ,Receiver Determination etc...you can write anything at interface and namespace place ..but maintain same thing in the whole scenario..
your scenario will work perfectly smoothly..
))))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raj,
Thank u very much for ur answer.
one more requirement came that I need to write the file to the target directory with different name.
Assume the Name of the file is "ABC_XYZ_123.txt" and the file content as shown below.
Dear XXXX,
Line1
Line2
Line3
Regards,
YYYY.
Whn writing to the target directory assume file name should be "TPZ_XYZ_123.txt" with out any mapping. If I do mapping, all the empty lines in the file( Ex: line between Dear XXX and Line1)will be removed by File Adapter while generating the XML.
Could u help me again how to handle this scenario.
Thanx,
Kumar
Message was edited by:
ms kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use the same blog -
/people/william.li/blog/2006/09/08/how-to-send-any-data-even-binary-through-xi-without-using-the-integration-repository
but in this second case dont use Adapter specific properties. Directly configure your receiver/ target file adapter and provide the file name there as TPZ_XYZ_123.txt
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.