File name in the Receiver Adapter
Hi,
I need to create a file with the name as ZZZCCYYMMDDHHMMSS.txt
where ZZZ is the constant
CCYYMM is the date of file creation
DDHHMMSS is the time of file creation.
There MUST NOT be any spaces in the file name
Eg ZZZ20110314152530.txt
I am using the Receiver File Adapter with Cntent Conversion. I tried using Add Time stamp option. But that does not sattisfy the required Naming conventions for file name.
Any help would be appreciated.
Regards
Harry
Hi Harish,
Your requirement is to generate a dynamic file name @ target side right??
If so best option is go for UDF. (I hope you heard about UDF already)
There is something called ASMA... (check it out)
Have a look @ following. So that you can get some Idea about ASMA
In Google Type : dynamic file name in Pi
Select 1st link- sap technical
After this try to write own UDF to get desired file name @ target side..
Thanks,
Saravanan
Similar Messages
-
How to find the File name using the FTP Adapter
hi all,
how to find the File name using the FTP Adapter with BPEL.
RegardsFound the solution for this.
First In the mediator's routing rule use assign property $in.property.jca.file.FileName to $out.property.jca.file.FileName
In the BPEL's receive activity go to the properties tab and get the property to a BPEL variable. That should do it.
Thanks for the posts -
How can I convert my specific file content in the Receiver Adapter(XI 7.0)?
Hi all,
I have a document structure as below:
<MT_MATERIAL>
<MATERIAL>
<WERKS>1000</WERKS>
<MATNR>HAD_00001</MATNR>
<MAKTX>CHEMICAL MATERIAL</MAKTX>
</MATERIAL>
</MT_MATERIAL>
This document structure is the file content in the Receiver Adapter (File Adapter). In the 'Content Conversion' tab of File Adapter of Communication Channel 'CC_OUT_MATERIAL_FILE', I have configured the parameters as below:
Recordset Structure: MATERIAL
MT_MATERIAL.fieldSeparator: '
MT_MATERIAL.endSeparator: 'nl'
MATERIAL.fieldSeparator: '
MATERIAL.endSeparator: 'nl'
*.fieldSeparator: ,
But, this Communication Channel 'CC_OUT_MATERIAL_FILE' (in the Runtime WorkBench/Component Monitoring/Adapter Engine/Communication Channel Monitoring) is error with the error message as below:
Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter '.fieldFixedLengths' or '.fieldSeparator' is missing
Could anyone please help me to correct this error, how should i configure the parameters in the 'Content Conversion' tab?
Thanks a lot in advance,
Vinh VoHi Vinho,
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)
Have a look at the this blog by Arpit Seth ... its all about FCC at receiver side...
File Receiver with Content Conversion
Also have a look at this thread.. might be helps you....
RECEIVER file CONTENT CONVERSION
Above links be helpful.
Regards,
Jayasimha Jangam -
File name in FCC receiver adapter
How to do this ?
The filename will have the following format:
AAAAAA_BBBB_CCCCCCCC_DDDDDD
Where: AAAAAA First 6 digits of first field
BBBB 4 digit Company Code second field
CCCCCCCC Current system date in YYYYMMDD format
DDDDDD Current system time in HHMMSS format.If you go with Variable substitution, certain things are not possible such as "AAAAAA First 6 digits of first field".
However below wiki covers all the possibilities.. please check..
Dynamic file name and directory in Receiver File Adapter - summary of possibilities - Process Integration - SCN Wiki -
Part of sender File name at the receiver side?
Hello All,
My requirement is like this.
iam picking the file from FTP server and place the file in another FTP server with out mapping.
I need to use part of sender file name to create the receiver side along with current date.
for example.
sender side file name : LM01000008.txt
recevier side file name need to generate : LM01dd/mm/yyyy
Please let me know how to achive this.
i tried with the blog given below, but partial file name is not possible with that blog.
http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417100)ID0229698450DB11989196758750510369End?blog=/pub/wlg/6400
Thanks and Regards,
chinnaHi Chinna,
Use this code
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
SimpleDateFormat dateformat = new SimpleDateFormat("yyyyMMdd");
String timestamp = dateformat.format(new Date());
String newfilename=fileName+timestamp+".txt";
// change to new file name
conf.put(key, newfilename);
return "";
Regards
Suraj -
Dynamic file name of the attachment in receiver mail adapter
Hi
I have configured a receiver mail adapter which receives the payload as an xml attachment.
Right now the file name of the attachment is hardcoded to "invoice.xml".
I want to set it to dynamic ie. instead of "invoice.xml"... i want it as "invoice<invoicenumber>.xml".
Invoice number is present in the payload.
please suggest a solution w/o the need to develop a custom adapter module.
Thanks!
Regards,
Faria MithaniHi,
Go through this thread..
Dynamic File Name for Receiver File Adapter
Regards,
Sarvesh -
Dynamic file name of the attachment in sender mail adapter
Hi
I have configured a sender mail adapter which receives some attachments.
Right now the file name of the attachment is hardcoded to "MailAttachment-1" "MailAttachment-2" using the content-description from "AF_Modules/PayloadSwapBean" module.
I want to set it to dynamic ie. instead of "MailAttachment-1"... i want it with real name of the attach.
please suggest a solution w/o the need to develop a custom adapter module.
Thanks!
Regards,
Mariano.Thanks Prateek,
Now, i can see that the name of the original file is into the content type named as text/xml; name"name of the file.xml" when i send the email from outlook.
If i send it from hotmail, this is not happend.
Do you know why happend this?
If i always would have the original name inside the content type, my problem will be solved.
Edited by: Mariano Vidal on Feb 13, 2009 2:26 PM -
Retrieving the file name in the adapter module in the sender file adapter
hi,
i need to retrieve the file name, in the adapter module. This module is placed in the sender file channel.
After the file adapter has picked up the file from the file directory, the file is placed in the archived directory.Custom adapter mofule is place in the file shanel. i need to retrieve the file name of the file in the adapter module. Is it possible to retrieve the file name?
Also is it possible to retrieve the archive directory path in module?
Regards,
MeenkashiHi Meenakshi,
I guess you are looking for this
/people/daniel.graversen/blog/2006/10/05/dynamic-configuration-in-adapter-modules
Regards
Suraj -
Garbage name of the Archive File while using the FTP adapter
Hello All
I am using Oralcle FTP adapter to poll a file ,after polling I am deleting the file from the current directory and
archiving it into another directory.
Problem is after archiving the file into the another dirctory name of the is fine changed as follows :
d2wXEgGZrfypNsGa15uzOA==_20081015_082233_0015
I want same name for the archived file as orginal file with timestamp
Please help to solve this problem.
Thanks
Satendra PareYou cannot change the file name in the save dialog, it always uses the originally file name of the form.
But you can use scripting to save a form under another name.
Sample.
http://thelivecycle.blogspot.com/search/label/Save -
Temp File Name Schema in Receiver File adapter
Hi,
I have a scenario where i have to write the file in the temperaory location before writing it to the FTP loacation, I have selected the Processing Parameter as "Use Temperory File" but when the file gets created it is padded with the Message Id, is thr any option to get the file name as the temp file name without the Message Id or timestamp.
Please let me know if any one has come across such scenario.
thankx,
shreeHi,
Under Write Mode, specify whether the target file is to be written directly in the specified directory. If an additional step is to be added using a temporary file, choose Use Temporary File.
You can specify a naming scheme for the temporary file under Temporary File Name Scheme.
This schema is used to determine the prefix and extension of the temporary file; to ensure a unique file name, a time stamp is also added to the name during processing.
The schema xitemp.tmp, for example, results in the file name xitemp<timestamp>.tmp
So you have to customise the file name in schema.
see below link
http://help.sap.com/saphelp_nw2004s/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
Regards
Chilla -
Hadeling multiple files in sender and receiver adapter
Hi ,
In my sender FTP server multiple files gets created at a same time i want to send this same files to the target FTP server am not doing any file content conversion. Just pick this multiple files at a single poll and drop it in the target FTP system.
I gave . in the as file name parameter in the sender file adapter..PI system picks all the files as separate message but if i give . in the receiver adapter itu2019s not creating the file and its giving Java exception..
Is there any other method to do this without having File content conversion... ?
Regards
ShakfieI gave *.* in the as file name parameter in the sender file adapter..PI system picks all the files as separate message but if i give *.* in the receiver adapter itu2019s not creating the file and its giving Java exception..
For receiver adapter you have to give some file name, '.' will not work for receiver adapter. So give any temporary name just to satisfy the mandatory field. And when you selet the ASMA settings in both SENDER & RECEIVER adapter then your Receiver File adapter will write the same file name which it has picked up and NOT the one which you have written in your receiver adapter.
Note: Set ASMA setting in both else you will not get the same file name at receiver. You can see the same in blog given by Siva. You need not to create any UDF since you are not using any mapping. Just use the ASMA settings.. that's it.
> Is there any other method to do this without having File content conversion... ?
You can go through this blog for the same...
/people/william.li/blog/2006/09/08/how-to-send-any-data-even-binary-through-xi-without-using-the-integration-repository
Regards,
Sarvesh -
File Content Conversion in Receiver Adapter Help
Hi,
I need to have a flat file at receiver side with the following structure.
Product
LineItem
Notes
Product
LineItem
Notes
But i am getting as
Product
Product
LineItem
Notes
Notes
Please suggest me the changes to be made in File Content Conversion Parameter
Your Help will be appreciated.
Thanks in advance,
AshokSingh,
I think we wont give field names in the receiver file adapter. Please find the details below:
RecordSet Structure: Product,LineItem,Notes.....
Parameters:
Product.fieldFixedLengths:30,10...
Product.endSeparator:'nl'
LineItem.fieldFixedLengths:30,10..
LineItem.endSeparator:'nl'
Notes.fieldFixedLengths:30,10...
Notes.endSeparator: 'nl'
Thanks
Ashok -
Add file name to the element in target message
Hi all!
I try to configure scenario:
Get all files from directory (it will not be the same number of file every time) and mapping this file to the ERP system. I use File adapter to do this. But what Is necessary I need to mapp the file name to the element in target message.
I mean: When I have got the RFC structure imprted from ERP and there I have got the element "filename". I would like to put the file name of file which I mapping to this element. Next put the all file contents with file name to the ERP table.
It is possible to do that??
I found in sap help that I can keep file name in the message header to get the same target file name, but I wont to put file contents (with file name) to the ERP table not to another file.
THX for all your opinions.The DynamicConfiguration fin inbound message:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Inbound Message
-->
- <SAP:DynamicConfiguration xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Record namespace="http://sap.com/xi/XI/System/File" name="Directory">/usr/sap/PXD/put/archive</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileEncoding">ISO646-US</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/File" name="SourceFileTimestamp">20061212T121622Z</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileType">txt</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">200610.TXT</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/File" name="SourceFileSize">124</SAP:Record>
</SAP:DynamicConfiguration>
and for Response:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Response
-->
- <SAP:DynamicConfiguration xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Record namespace="http://sap.com/xi/XI/System/File" name="SourceFileSize">124</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileType">txt</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/File" name="SourceFileTimestamp">20061212T121622Z</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileEncoding">ISO646-US</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">200610.TXT</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/File" name="Directory">/usr/sap/PXD/put/archive</SAP:Record>
</SAP:DynamicConfiguration> -
Get File name of the inbound file during mapping
Scenario: to read the file name of the inbound file (which has date required for the mapping) during runtime.
The requirement is to read the date of the inbound file (passed to the XI pipline by the file adapter) and populate the same in the outbound mapping structure.
Any idea about how to do this?
(I went through few options of using java.util.map. not successful yet)Hi Anand,
I posted the same question a time ago, without any help....
Can I find out the full filename of input file in message mapping?
Posted: Nov 23, 2004 1:00 PM
I have in XI 2.0 the following scenario :
In the inbound fileadapter I read my input file. The filename of the input file is part fixed, part variable (Like INDATA01.txt, INDATA03.txt, etc).
So in my Adapterconfiguration, I specify the filename with a wildcard (INDATA*.txt).
What I now want to do, is in my Message Mapping use the full filename , so I can do something different for every filenumber. Is there a way where I can get the full filename available in my message mapping (I did not find the filename in the XML in the message trace). -
Missing file name in the sequence
Hi All,
I have struck with the problem which is finding the missing file name in the file_name column. This column also have sequence.
FAX_NAME RECEIVED SENDER FAX_SIZE
fax000000433.tif 01-JAN-07 redro 10k
fax000000434.tif 01-JAN-07 redro 10k
fax000000435.tif 01-JAN-07 redro 10k
fax000000436.tif 01-JAN-07 redro 10k
fax000000437.tif 01-JAN-07 redro 10k
One file name missing
fax000000439.tif 01-JAN-07 redro 10k
fax000000440.tif 02-JAN-07 redro 10k
fax000000441.tif 02-JAN-07 redro 10k
fax000000442.tif 02-JAN-07 redro 10k
fax000000443.tif 02-JAN-07 redro 10k
fax000000444.tif 02-JAN-07 redro 10k
fax000000445.tif 02-JAN-07 redro 10k
fax000000446.tif 02-JAN-07 redro 10k
fax000000447.tif 02-JAN-07 redro 10k
fax000000448.tif 02-JAN-07 redro 10k
fax000000449.tif 02-JAN-07 redro 10k
fax000000450.tif 02-JAN-07 redro 10k
Here i want to retrive the Faxname(fax000000438) which is missing
The output like..
I've Designed one BIRT rptdesign for this this in the bellow formate..
FAX_NAME RECEIVED SENDER FAX_SIZE Missing_Faxes
I've tried with bellow query but i did't get.
select Fax_Name digits from(select min(digits) MN from (select translate(s, '0' || translate(s, '1234567890', ' '), '0') digits 7 from (select filename s from received_faxes))) connect by level8 minus select distinct digits from (select translate(s, '0' || translate(s, '1234567890', ' '), '0') digits 10 from (select filename s from received_faxes))
Could you pls help me..This?
SQL> with t1 as
2 (select 'fax000000433.tif' nam from dual union
3 select 'fax000000434.tif' from dual union
4 select 'fax000000435.tif' from dual union
5 select 'fax000000436.tif' from dual union
6 select 'fax000000437.tif' from dual union
7 select 'fax000000439.tif' from dual union
8 select 'fax000000440.tif' from dual union
9 select 'fax000000441.tif' from dual),
10 t2 as
11 (select to_number(mid(nam,4,9)) faxno from t1),
12 t3 as
13 (select max(faxno) ma, min(faxno) mi from t2)
14 select (mi+level - 1) faxno from t3 connect by level <= ma - mi + 1
15 minus
16 select faxno from t2
17 ;
FAXNO
438
SQL>
Maybe you are looking for
-
Hi, While I try to insert into an MLS entity created in the Fusion Development Environment I am getting the following error: (oracle.jbo.RowCreateException) JBO-25017: Error while creating a new entity row for PERJOBSEO. ----- Level 1: Detail 0 -----
-
Problem in using chipscope in ISE design suite
Hi But I have already installed 30 days evaluation license for ISE design suite. So do I need to have a separate license for using Chipscope.... Thanks & regards Madhur
-
HP Photosmart Prem C410 Series Driver Class Driver Printer Still In Word Drop Down
I have a printer that I no longer wish to use that will not remove itself completely from my system. I've done all the necessary steps of removing it from the control panel. I went to printers and devices and right clicked to remove the printer. T
-
Is there a way to dismiss the alarm clock without having to unlock the phone?
This has been annoying and, quite honestly, I don't remember it being a problem before the iOS 5 update. When an alarm goes off using the default clock / alarm app and the phone is locked, all I get is the option to Snooze. The only way to actually d
-
Finder's Nasty Inherited ACL Bug (aka Error -41)
CNET, MacFixit, and a few other technical blogs recently reported on an apparent ACL issue which seems to have existed in OS X Snow Leopard since OS X 10.6.0, but has gotten particularly bad in OS X 10.6.5, 10.6.6, and 10.6.7 (both client and server