File receiver: Dynamic Filenames error
Hi
I get an error in my File receiver adapter..
Receiver Adapter v1730 for Party '', Service 'SenderSystem':
Configured at 19:32:43 2005-08-01
Last message processing started 19:33:26 2005-08-01, Error: Message processing failed with java.text.ParseException: Variable 'test' not found in variable substitution table
We are currently on XI Sp12 patch level3.I have enabled the Variable substitution option and have defined a variable "test" used in defining the file name scheme.The reference points to a node value in the payload.
I have checked the config xml for the channel which does contain this value test in the variable table..Am I missing anything???
the config xml is as below:
[code]2005-08-01 19:32:43 : ToFile
Raw configuration data ***
Transport protocol: File, version
Message protocol: File, version 3.0.0527
ftp.user|anonymous
file.varSubstitution|true
file.adapterStatus|active
file.addParameterParams|*** TABLE , 0 ROWS DEFINED ***
file.execute|
file.targetFileName|%test%.xml
ftp.overwrite|false
file.counterMode|immediately
file.encoding|
file.overwrite|true
ftp.transferMode|bin
ftp.anonymous|false
ftp.port|21
file.advanced|false
file.varSubstitutionDisableSecurity|true
ftp.targetDir|null
ftp.host|null
file.counterSeparator|
file.counterFormat|00000
file.varSubstitutionParams|*** TABLE , 1 ROWS DEFINED ***
file.varSubstitutionParams|file.varSubstitutionParams$0$file.varSubstitutionParamName$test
file.varSubstitutionParams|file.varSubstitutionParams$0$file.varSubstitutionParamValue$payload:input,1,filenode,1,filename,1
file.type|bin
file.targetDir|//10.201.103.253/download
ftp.password|***
ftp.putSafe|YES
file.writeMode|addTimeStamp
ftp.writeMode|addTimeStamp
file.recordsetStructure|null
file.conversionParameters|*** TABLE , 0 ROWS DEFINED ***
ftp.connection|permanently
file.counterStep|1
Used configuration data ***
'MessageProtocol': 'File'
'TransportProtocol': 'File'
'file.adapterStatus': 'active'
'file.advanced': 'false'
'file.encoding': ''
'file.execute': ''
'file.overwrite': 'true'
'file.targetDir': '//10.201.103.253/download'
'file.targetFileName': '%test%.xml'
'file.type': 'bin'
'file.varSubstitution': 'true'
'file.varSubstitutionDisableSecurity': 'true'
'file.waitForExecute': '0'
'file.writeMode': 'addTimeStamp'
OK - initialized
[/code]
Sri,
You have specified payload:input,1..... in ur variable substitution configuration. Is "input" the name of ur Message Type object in repository. If not, specify the name of the Message Type referred to in ur inbound interface.
We tried this option and generated an additional field in the XML data given as input to the file receiver adapter, to be used for substitution purpose only. We avoided specifying this field in our content conversion , however it still gets written to the file!! if u able to crack it let us know
-Saravana
Similar Messages
-
File Receiver - Dynamically create filename from data in payload
Hi there.
Can anyone tell me the approach I need to take to be able to use the data in one field to determine the filename in the file receiver adaptor.
I have a requirement that requires that I save a file with the following mask:
xxxx_xxx<b><date extracted from field in payload></b>.csv
I would appreciate any help on this.
Thanks in advance.
Mick.Hi Mick,
you just need to use adapter specific parameters
and you will be able to set the name in your mapping
(from your payload)
/people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping
Regards,
michal
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a> -
Hi all,
I have the requirement of getting same file name with timestamp on the receiver side (EX.Filename_timestamp) by modifying the Adapterspecific messageattributes refering the following blog
Re: Regarding Target File name
and wrote the code as specifeid in the blog as follows mapped to some
dummy variable on the target side
//write your code here
String FileName = "";
String TimeStamp = "";
DynamicConfiguration conf1 = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key1 = DynamicConfigurationKey.create ("http:/"+"/sap.com/xi/XI/System/File","FileName");
FileName = conf1.get(key1);
TimeStamp = container.getTransformationParameters().get
(StreamTransformationConstants.TIME_SENT).toString();
FileName = FileName.replaceAll( ".txt" ,"_" );
FileName = FileName;
conf1.put(key1,FileName);
return FileName;
but iam getting an error as follows in the receiver side communication channel moniroting.
Message processing failed. Cause:com.sap.aii.af.ra.ms.api.RecoverableException: Rename failed.:
com.sap.aii.adapter.file.ftp.FTPEx: 550 Rename failed.
An error occurred while connecting to the FTP server '10.6.161.65:21'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 550 Rename failed.'. For details, contact your FTP server vendor.
Can anybody give me an idea of how to reslove the error.
Thanks,
Ram.I dont think it is a permission issue...it seems to be due to the way the UDF is defined....are you successful in giving the fileName (without TImeStamp)....
also can you change the String FileName = ""; to String fileName = ""; .....may be it is conflicting with the
DynamicConfigurationKey key1 = DynamicConfigurationKey.create ("http://sap.com/xi/XI/System/File","FileName");
Also when you do Dynamic Configuration the return statement is not needed....the value gets populated into the ASMA attribute directly....
Edited by: abhishek salvi on Jun 12, 2009 12:59 PM -
Sender File Adapter - Dynamic Filename?
Dear All,
I have a simple requirement to retrieve a file named "XXX_ddmmyy" from an FTP site. The FTP site administrator will place a new file everyday. The date is part of the filename.
I can find a lot of information on how to set the Filename for a "Receiver File Adapter", but none about dynamically setting of the filename for a "Sender File Adapter".
Can you help please?
Kind Regards
FarshadHi,
You have mentioned over here that the requirement is to get the file "XXX_ddmmyy" from an FTP site.
Is that site strictly for keeping files related to your requirement only or lot of other files are also being placed???
If its strictly related to your requirement then you can use the filename "*.extension" and set the processing mode as "delete" so that once the File Adapter picks the file it will be automatically deleted.
But here disadvantage is that the file wont be no longer present in FTP site once it is picked by File adapter.
Thanks,
Lekshmi. -
Export query results to flat file with dynamic filename
Hi
Can anybody can point me how to dynamic export query serults set to for example txt file using process flows in OWB.
Let say I have simple select query
select * from table1 where daterange >= sysdate -1 and daterange < sysdate
so query results will be different every day because daterange will be different. Also I would like to name txt file dynamicly as well
eg. results_20090601.txt, results_20090602.txt, results_20090603.txt
I cant see any activity in process editor to enter custom sql statment, like it is in MSSQL 2000 or 2005
thanks in advanceYou can call existing procedures from a process flow the procedure can create the filename with whatever name you desire. OWB maps with file as target can also create a file with a dynamic name defined by an expression (see here ).
Cheers
David -
Spool an output file to dynamic filename
Hi.
Let say I have an Oracle Script as following:
spool c:\hms_report\HMS.xls
SELECT
field1||chr(9)||field2
from table1;
spool off
exit
Question:
Currently the output file will be HMS.xls
If I run the script thrice a day, the HMS.xls will be overwrite.
Is there any way to name the output file to be HMS+sysdate ie: If I run the script on 05-Nov-2002 09:00,
the output file name will be HMS051120020900.xls
where 05 = dd
11 = mm
2002 = yyyy
0900 = hhmi
Thanks.Have you actually tried what you proposed below? I think not. And I don't see that working. Still, if you do succed like
you have proposed, please tell me.This works, see this SQL*Plus session:
SQL> column file_name new_value fname noprint
SQL> select 'HMS'||TO_CHAR(SYSDATE, 'DDMONYYYYHH24MI')||'.xls' file_name from dual ;
1 row selected.
SQL> prompt &&fname
HMS05NOV20020908.xls
SQL> spool &&fname
SQL> select sysdate from dual ;
SYSDATE
05-NOV-2002
1 row selected.
SQL> spool off
SQL> exit
Disconnected from Oracle8i Enterprise Edition Release 8.1.7.4.1 - Production
With the Partitioning option
JServer Release 8.1.7.4.1 - Production
C:\TEMP\Test>dir
Volume in drive C is Windows NT 4.0
Volume Serial Number is F8F6-BE0C
Directory of C:\TEMP\Test
05-11-02 09:19a <DIR> .
05-11-02 09:19a <DIR> ..
05-11-02 09:19a 378 HMS05NOV20020908.xls
05-11-02 09:18a 139 script.sql
4 File(s) 517 bytes
628,746,240 bytes free
C:\TEMP\Test>type HMS05NOV20020908.xls
SQL> select sysdate from dual ;
SYSDATE
05-NOV-2002
1 row selected.
SQL> spool off
C:\TEMP\Test> -
Adapter Module Filename in File Receiver Channel
Hi All,
is it possible to set the Filename in File Receiver Adapter from Adapter Module?
I know that it is possible to read the data
Channel ch = new Channel(moduleContext.getChannelID());
path = ch.getValueAsString("file.targetDir");
I Need to set the filename in Adapter Module, using of Payload is not possible because Payload is not xml.
Dynamic Parameters in Message Header is not possible because it is an multi mapping process an i need dynamic Filename for each Part
payload after mapping is like
MainDocument
SubMainDocument
MainDocument
SubMainDocument
i need special Name for each SubMainDocument in FileReceiverAdapter
regards
ralfHello Stefan,
interface mapping is an mapping like this:
outbound_interface => Inbound_Interface1
=> Inbound_Interface2
=> Inbound_Interface3
in sxmb_moni this looks like this
Soap_Header
Soap_Body
Payloads
=>MainDocument ( application/xml )
=> SubMainDocument ( text/xml )
=>MainDocument ( application/xml )
=> SubMainDocument ( text/xml )
First SubMainElement is routing to FileReceiverAdapeter A where Filename has to be like "NameA%nr%"
second SubMainElement is routing to FileReceiverAdapeter B where Filename has to be like "NameB%nr%"
%nr% is som value from the Payload.
Payload is not xml because using of Conversion Argent!!
I Think there is only one Dynamic in Header for all subelements, i have test it!
ralf -
Dynamic filename in receiver AS2 adapter in B2B Add-on
Hello Experts,
Can you please let me know how we can put dynamic filename in the receiver AS2 adapter for B2B Addon on SAP 7.4.
Thanks
SaurabhHi Ryan / Experts,
Let me explain you in more detail.
In the receiver AS2 Communication channel, if I keep the Filename field as blank as shown below, then in the Mendelson inbox folder, a file is generated with the name "ASJAVA_DX5" which is my business component name.
If I fill the filname field for example with "CONTRL", then in the Mendelson inbox folder, a file is generated with the name "CONTRL".
This is my requirement because, suppose i trigger this interface "first time", a file with static name (ASJAVA_DX5/CONTRL ) would be generated in the inbox folder. If I trigger this interface "second time", since the file already exists with same name, it is not overwritten and I cannot check the output of 2nd trigger . Contents are not overwritten.
To solve this problem + as a general requirement, I wish to have this name to be dynamic, atleast with date+timestamp.
Can you please help. -
Dynamic File name for File receiver adapter
Hello,
I am doing Proxy sender to File receiver scenario.
Filename is generated in SAP R/3 program and I want to create the file with this same name
on target location.
please suggest me how to use this file name in Receiver file adapter?.
Thanks & Regards
JageshHi,
you have to enable the adapter specific parameter --> file name in both the sender and the receiver CC to get the input file name as output file name.
Refer this blog:
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
Also you need to use this udf
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String ourSourceFileName = conf.get(key);
return ourSourceFileName;
Also refer this blog:
/people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping
Regards,
Nithiyanandam -
Xml file in dynamic file name in file receiver adapter
Hi,
I'm doing the dynamic file name in file receiver adapter. I have done as per instructed in /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i
All turned out okay. I have got the file name I require. Except that the file format is XML and I need to suppress the filename node occupied by the dynamic file name.
The content conversion mentioned in /people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12, does not seem to solve my problem. As it is only for file format other than the XML one, because we only do the content conversion if we want to "convert" the format of the content from XML to the other format.
Does anybody have the solution to my problem? thanks in advanceThank you Raj for the direction
The way to do it is :
1. In ID, advanced tab, put a check on the adapter-specific message attributes - file name.
2. Put a "*" on the file name scheme
3. In IR, create a UDF to set up target file name :
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
// set up file name for receiver adapter
String SourceFileName = conf.get(key);
conf.put(key, TargetFileName);
return " ";
4. Map the above UDF to the header level of the target structure.
Regards,
Idi -
How to pass dynamic filename to Receiver JMS channel
Hi experts,
I want to pass the dynamic filename to receiver JMS message Properties.
for example
I am passing directory name via adapter module AF_Modules/DynamicConfigurationBean with key and value combination like below. How to pass dynamic filename value to a dynamic property ( say DCJMSMessageProperty1)
eg.
key.0 - >insert http://sap.com/xi/XI/System/JMS DCJMSMessageProperty0
value.0 - > testdirectory ( which is static value)
Note: Im have not created any ESR object . i just have to bypass the file to a jms queue. I have used AAE integrated configuration scenario ( file to jms )
Regards,
Balaji
Edited by: Balaji Pichaimuthu on Jan 27, 2011 4:45 PM
Edited by: Balaji Pichaimuthu on Jan 27, 2011 4:46 PMAlready given link for the dynamic configuration code snippet in the earlier reply... Below is the code snippet
Note: Use Adapter Specific Message Attributes for the target Communication Channel(CC).Check the indicator for filename in the advanced tab of CC
//UDF code
String filename="";
String NameSpace = "http:/"+"/sap.com/xi/XI/System/JMS";
try{
DynamicConfiguration conf = (DynamicConfiguration) param.get(
StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File", "FileName");
// read filename value
filename = conf.get(key);
// So far we extracted filename value .. now do your logic something like this...
DynamicConfigurationKey key2 = DynamicConfigurationKey.create(NameSpace,"yourjmsvalue goes here");
conf.put(key2,filename);
} catch(Exception e){ -
Error in reciever file adapter , where i am getting file name dynamically
hi all,
error in reciever file adapter , where i am getting file name dynamically, please help me in this isssue , i am trying for a long time
MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'ns0:MT_eINVOICE_RECV' found in document', 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: 'Conversion configuration error: Unknown structure 'ns0:MT_eINVOICE_RECV' found in document', probably configuration error in file adapter (XML parser error)'i am getting new error
MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Channel has not been correctly initialized and cannot process messages
this is my strcuture
and i have changed my structure
<HEADER>
<ADDRESS1/>
<ADDRESS2/>
<ADDRESS3/>
<ADDRESS4/>
</HEADER>
<HEADER_GST>
<TAX1/>
<TAX2/>
<TAX3/>
</HEADER_GST>
<LINE>
<QTY/>
<UOM/>
<UNIT_AMT/>
<CHARGE_TO_DT/>
</LINE>
<FILENAME>
<FILENAME/>
</FILENAME>
i have given the recordset structure as
HEADER,HEADER_GST,LINE,FILE -
Dynamic Configuration - Set Directory Path for File Receiver Adapter
Hi Experts,
I have a question regarding the dynamic configuration for the file adapter. Is it possible to set a directory path without a message mapping for the file receiver adapter? the problem is that I want to import a pdf document. this pdf document I want to store in a dynamic directory (depending on the filename). so I have to read the filename out of the dynamic configuration and generate (depending on the filename) a directory for this file. Is that possible without a message mapping? I cannot make a message mapping because the file has the pdf format and should not get changed.
best regards
Christopher KühnHi Gaurav,
I use the ASMA (respectively the filename) for the sender adapter. After the pdf was imported into XI this filename is in the ASMA.
But what then??? How can I get this filename with the help of the variable substitution? and if I have this filename I have to change this filename a bit to generate the name / path of the directory.
Please explain it to me detailled
Thanks and regards
christopher -
I am using Adobe Acrobat 9 Standard version in Windows 8.1 and when I try to create a .pdf file, I receive the following error message "Acrobat could not open "file name.log" because it is either not a supported file type or because the file has been damaged. To create a PDF document, go to the source application then print the document to .pdf" I am going to the source application and printing the document to .pdf yet it's saving the file as a .log file. After reinstalling the software, I initially didn't encounter this problem but on my second and third attempts to convert files to .pdf format, this error message reappeared. How do I resolve this problem?
I have a similar problem which i did not have before...and it exists only in some powerpoint files which i want to print as a pdf file...and i get the same message as above.
the log says the bellow details...what's the problem and how can i resolve it? thanks.
%%[ ProductName: Distiller ]%%
%%[Page: 1]%%
%%[Page: 2]%%
Cambria not found, using Courier.
%%[ Error: invalidfont; OffendingCommand: show ]%%
Stack:
%%[ Flushing: rest of job (to end-of-file) will be ignored ]%% -
I receive the follwing error message when trying to open my ipod touch/itunes "the itunes libary.itlfile is lockedon a lockdisk or you do not have write permission on this file. How do I resolve this problem?
Repair iTunes Security Permissions
Right-click on your main iTunes folder and click Properties, then go to the Securitytab and click Advanced. Use the Change Permissions... button grant to your account (or the Users group) and SYSTEM full control of this folder, subfolders and files, then tick the option to Replace permissions entries... which will repair permissions throughout the library. When complete switch to the General tab, click in the Read-only check box to clear it, then click Apply.
If you don't have the option to change the permissions then use the Owner tab and Edit... button to take ownership from an account with administrator privileges. Tick the option to Replace owner on subcontainers and objects.
Repeat with the media folder if it isn't stored inside the main iTunes folder.
If you've brought over the library from another computer you may also want to remove any "mystery" identities (S<string of dashes & digts>) that have come over from the old computer...
The images above are from Windows 7. Hopefully the system isn't too different in Windows 8.
tt2
Maybe you are looking for
-
Iphone 4s earphone voice problem
i have iphone 4s it has problem with earphone. the earphone voice of of other caller is very less. i can hardly head the other person but the speakers are working perfectly alrights. someone told me that the earphone speakers are burst. but some othe
-
Doubt about AL11 Transaction.
Good Morning Experts. I have a problem: The SAP system of my company work with other system (not sap). We have a Z program that send data of sap tables to AL11 Transaction. The program of other system is ATLYS and he go to AL11 and get the data of S
-
Buttons not appearing in iMovie
I am having a problem with iMovie 3.0.3. When I open the application, everything appears except the buttons for iphoto, clips, music, etc. I am not sure what the problem is but any help would be much appreciated.
-
Hi , I am working with miro t-code, presently i am using one Badi:: MRM_HEADER_CHECK. in method :: HEADERDATA_CHECK. my requirement is like after giving PO No based on this po no i am fetching purchase order history data from ekbe table , if GR is do
-
Hi, I've been teaching myself how to convert for streaming media for about six months. I have found the only program that is halfway decent for this is quicktime because it hints the media file, but now my only problem is I first have to use another