Problem in Overwriting the file in Receiver File adapter
Hi all,
I configured my scenario Proxy to File. Every day the back ground job runs in SAP and send all Employee Details to XI, XI then write it into File in XI server, in Receiver File adapter i enable overwrite existing file.
But some times its over writing the file some times came up with error like "Access Denied".
Can any one tell me what could be the problem.
Kind Regards,
Kiran
> But some times its over writing the file some times
> came up with error like "Access Denied".
This can be a Authorization problem...may be at that time you are unable to write any file in that directory..or some other application is using it and it make a lock at that time.
Thanks
Farooq.
Similar Messages
-
Problem in reading the JDK1.4Logger configuration file from java prog
I have written a java program and want to log the messages in a log file , I'm using commons logging with JDK1.4logger as logging subsystem .
I am facing the problem in reading the JDK1.4Logger configuration file which is commons-logging .properties file from my java program as a result my log messages are appearing directly on the screen while I try to run program , during compilation no error is shown . I have tried to set java.util.logging.config.file ="Path of my commons-logging .properties file " by setting system properties also.
Please suggest the appropriate solution for this .Some webservers won't recognise the resource bundle provided in message-resources
In that case, you need to specify that resource bundle information in web.xml at the time of specifying the action servlet like this. Check for the init-param application.
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>application</param-name>
<param-value>resource.ApplicationResource</param-value>
</init-param>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>validate</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>In this, the drawback is, you can not specify the key for your resource bundle. In the JSP, you have to access the property like this.
<bean:message key="label.fName"/> -
Having Some unknown characters in my file of Receiver Mail Adapter
Hi All,
I have a unique problem, I am having special characters( #S@u201D E" E$ u201Däu201Där 4TåE$R D0u201CC3 u0192 c@u201DÔôETÄPu201Du201Eu20220u201D 3@u201C ó ró# u20ACu201C ó# ó# u2019 ) in text file of Receiver Mail Adapter.I am providing you a part my input text file
1747021 000070 0001 Production Baseline ZTAN 100A 0039 2204229-1 50 PLANT3002 Honeywell Aerospace Bournemouth - R 3212774 NOZZLE HIS M22 12/31/2008 01/05/2009 1.000 1.000 1.000 01/05/2009
1745558 000100 0001 Production Baseline ZTAN 100A 0039 801137-1 80 304030 LUFTHANSA TECHNIK AG 45111378001 WHEEL HIS M22 12/30/2008 01/12/2009 3.000 3.000 3.000 01/12/2009 COOP Legacy Notes - Note Type: 07N UPDATE AS OF 11/8 SH AVS Legacy Notes - Note Type: AB 1. A QTY OF 53 NEW PARTS WERE PURGED ON 3-5-99 PER KAREN MOSS' REQUEST. PARTS ARE SUSPECT OF BEING DAMAGED DUE TO BEING STORED IN ASRS IN A METAL TO METAL SITUATION.
1740335 000100 0002 Production Baseline ZTAN 100A 0039 3176647-4 80 341734 SAUDI ARABIAN AIRLINES CORP 8233950 VALVE, CONTROL Jaroslav Kral M18 12/24/2008 12/31/2008 1.000 1.000 1.000 01/23/2009 COOP Legacy Notes - Note Type: 07N D PARTS NEED TO CHEC WITH LUPE WIN ISSUIN COOP Legacy Notes - Note Type: POG REPLCS 3176647-3 AS A MANDATORY CHANGE. 3399100-11 V17138 (TAKES -4 TO -11) 3399100-11 V17139 (TAKES -9 TO -11) 3399100-10 V17140 (TAK
1734808 000100 0002 Production Baseline ZTAN 100A 0039 3883240-6 80 300168 IBERIA LAE 48017888601 CONTROL FUEL HIS M13 12/20/2008 01/10/2009 1.000
1.000 1.000 04/29/2009 AVS Legacy No
Can any one help me out?Hi Stefan,
I am Using Transport Protocol as IMAP4
Message Protocol as XIPayload
Connection Parameters to Mail Server
URL -
.mycompany.com
Mail Attributes
Use Mail Package
content Encoding base64
Keep attachments
I have Used the following Modules
Processing Sequence
Module Name Module Type Module Key
localejbs/AF_Modules/PayloadSwapBean Local Enterprise Bean Payload
localejbs/AF_Modules/MessageTransformBean Local Enterprise Bean Transform
sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local Enterprise Bean mail
Module Configuration
Module Parametername Parameter Value
Payload swap.KeyName content-type
Payload swap.KeyValue text/xml
Transform Transform.ContentDescription MyReport.txt
Transform Transform.ContentDisposition attachment
Transform Transform.Contenttype text/xml -
How to avoid the split problem when uploading the data from csv file
Dear Friends,
I have to upload data from the .csv file to my custom table , i have found a problem when uploading the data .
i am using the code as below , please suggest me what i have to do in this regard
SPLIT wa_raw_csv AT ',' INTO
wa_empdata_csv-status
wa_empdata_csv-userid
wa_empdata_csv-username
wa_empdata_csv-Title
wa_empdata_csv-department.
APPEND wa_empdata_csv TO itab.
in the flat file i can see for one of the record for the field Title as
Director, Finance - NAR............there by through my code the wa_empdata_csv-Title is getting splited data as "Director, and Department field is getting Finance - NAR" , i can see that even though " Director, Finance - NAR" is one word it is getting split .
.......which is the problem iam facing.Please could any body let me know how in this case i should handle in my code that this word
"Director,Finance - NAR" wil not be split into two words.
Thanks & Records
MadhuriHi Madhuri,
Best way to avoid such problem is to use TAB delimited file instead of comma separated data. Generally TAB does not appear in data.
If you are generating the file, use tab instead of comma.
If you cannot modify the format of file and data length in file is fixed character, you will need to define the structure and then move data in fixed length structure.
Regards,
Mohaiyuddin -
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 -
How to handle the whitespace in receiver file content converion
Hi Experts,
In Receiver file content conversion we are facing issue with white space charecters- lets example value -999, but in receiver field fixed lengh we have defined as 20 lengh as per the requirement. But, in the output file we are getting [negative sign taking as first char and value filling last] - ********* 999. ****** are white space charecters.
Is there any content conversion paramter for avoiding this type of white space charecters in receiver file content conversion ?
Best Regards.
Krushi.hi All,
I presume that there is something missing UDF coding as per the below.
please advise on this.
input to conversion of 437.72- to -437.72 is mapping is executing correclty. but, receiver file content conversion we have defined as amout value as 20.
so -ve sign taking first place char and remaining moving to last charecters, and whitespaces are filling in the middle.
Now i need to do the trailing of white space charecters. I have tried all above suggested options but nothing works.
for(int count=0;count<input.length; count++)
if(input[count].endsWith("-"))
result.addValue("-"+input[count].substring(0,input[count].length()-1));
else
result.addValue(input[count]);
Thanks and Regards,
Krushi. -
To Generate file with whitespaces for the last fields -Receiver file FCC
Hi Experts,
We need to create a file at receiver side having last field of 50 length.If value of last field is less than 50 length than we need to keep whitespaces on the right side.When we create file the whitespaces get trimmed and files are created without whitespaces.I am using fixed field length FCC.Please help me resolve this issue.
Thanks & Regards
Deepak JaiswalIf you like to have UDF ... here it is ..
public String appendWhiteSpaces(String var1, Container container) throws StreamTransformationException{
if(var1.length()< 50){
for(int count=0;var1.length()<50;count++){
var1 = var1 + " ";
return var1; -
Using Group Policy Objects to hide specified
drives
http://support.microsoft.com/kb/231289
i was about to hide few set of drives in my pc from other standard user's by using group policy object. but there are only few set of drives available by default. so by few surf in the official windows sites i found the above link that guide one to create
custom set of drives along the existing one in gpo, by creating a new .adm file and importing the same into it.
but my query is, in the given guide they have said that
"Microsoft does not recommend to change the System.adm file, but instead to create a new .adm file and import this .adm into the GPO. The reason is that if you apply changes to the system.adm file, these changes might get overwritten if Microsoft
releases a new version of the system.adm file in a Service Pack."
so weather the new .adm (with different name) file that i am going to import into it will replace/overwrite the already existing template (that is "Hide these specified drives in My Computer" in the GPO) or create a new one under "Configuration
--> Policies --> Administrative Template --> Classic Administrative Templates. "
please suggest....
thanks in advance....Hi,
Not really, the new .adm file won't replace/overwrite the already existing template. While, in my opinion, it would be better to make a backup for this default file in case there was any damage of your later operation.
Roger Lu
TechNet Community Support -
Problem in seeing the .xls and .pps file content
hi all
i have uploaded files to my server using jsp and i am giving the link to see the uploaded files to user
it is working fine for .doc,.jpg ,.html ,.txt ,.ppt files
but not for .xls and .pps files
thought when on save traget as.... (on user's computer )it is working
but on simple left click on the link (of .xls file)
the bytecode data is opened in the browser window
plz helpcheck that your 0fiscper in cube is mapped to 0fiscper from communication structure in update rules.
Please give me the details of mappings you have
Cheers
SB -
0 byte txt file using receiver File Adapter
HI,
My scenario is Flat File to Fixed Length File.
Mapping : Based on the condition Reciever node need to generated , In some cases it wont generate any node ( No data )
Receiver Communication channel : I used FCC for Fixed length Format.
Problem : When i am generatingf the receiver file with some data it executes. But when i am generating the file with no data , it fails in the receiver comminication channel.
Could not process due to 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:Message1' found in document', probably configuration error in file adapter (XML parser error)'
I need the receiver file to generate with 0 bytes when there is empty data.
can any one help on this.
ThanksHi,
>>Problem : When i am generatingf the receiver file with some data it executes. But when i am generating the file with no data , it fails in the receiver comminication channel.
What happens in this case is, when you send a blank file to PI it processes but once it went to Receiver Adapter, it looks out for some fields because of the FCC settings. So it throws an error/exception because some fields are expected and it is not coming. Because of that you getting below exception.
Secondly, Once you send data with few values or fields it will process in Receiver file adapter FCC and if there is some error it throws error. this is why you getting exception in moni, and other places.
Regards
Aashish Sinha -
File conversion and append file in receiver file adapter
Hi
I have a batch IDoc -> XI(3.0) -> file scenario with file conversion to create a flat CSV-like file. The problem is that because of the amount of data sent from R/3 (~20000 employees), the idoc is split into several idocs. In my receiver file adapter I want to append all the idocs contained in this data transfer to one flat file, before transmitting to FTP server.
For the next batch transfer (the next day) XI should start all over and create a new file and append all idocs contained in that transfer before transmitting the flat file to FTP server.
Can this be done using the 'Use Temporary File' and 'Append' options in the FTP connection Parameters in the comm-channel?
It is not an option to append the file in the FTP-server, because the files in the destination folder are moved immediately after arrival, so the file will be moved before file adapter can append all the files.
Does anyone have any suggestions to how to solve this?
Br
KennethHi Kenneth
Did you ever get a solution to this problem?
Regards
Russel Irvine
[email protected] -
Archive processed files at receiver file adapter
Hi Experts,
I need to archive(copy) processed messages from the target folder to another folder.
I tried using the Run OS Command after processing and not sure with the exact command.
Can anyone please provide the exact command (syntax) for copying file from the target file folder to another folder.
Do we need any authorization from BASIS team to perform this command in run OS Commandline please.
Note: the original file should not be deleted.
Thanks in advance!
Regards,
Mahakrishnan T.hi Mahakrishnan Thangam,
I used the OS command feature where FTP is not used and it worked in the way I already posted. When it comes to FTP in receiver file adapter you need a batch file and a script both on PI server. The script will function as follows
1. Login to FTP server.
2. change to target folder you specified in target directory in cc.
command: cd foldername
3.Read the file created by receiver file adapter in remote FTP location. File will be copied to local directory of PI server.
command: get filename
4. Now again change remote directory to archive directory.
5. Copy the file back to FTP server again from local directory to archive directory you want to copy to.
Now from batch file call this script.
Would suggest to read these links carefully
http://wiki.sdn.sap.com/wiki/display/XI/SAPXIFileAdapterOSCommandLine+Feature
http://www.cs.colostate.edu/helpdocs/ftp.html
Alter algorithms to meet your requirement.
Hope this solves your problem.
Regards
Anupam -
How to create multiple files with Receiver File Adapter in SAP PI 7.31 Java Stack
Dear Friends,
I am using Sender JDBC Adapter and Receiver File Adapter in Integration Flow in SAP PI 7.3 EHP 1 SP08 Java Stack environment. The requirement is that we need to create multiple files based on the row count in jdbc resultset. If there are 5 rows in resultset, we need to create 5 XML files with one row elements in one file. Similarly if there are 10 rows, we need to create 10 XML files.
So how can we create multiple files in this scenario. I tried placing a for loop in the Java Mapping as below in the transform method:
DynamicConfiguration conf = arg0.getDynamicConfiguration();
StringBuffer sbFileData = new StringBuffer();
for (int i =0; i < record.size(); i++ {
. // Create XML for each row and Marshal the object into to the String Buffer
String strFileName = "DC_" + new SimpleDateFormat("ddMMyyyyHHmm").format(new java.util.Date())+"_"+i+".xml";
conf.put(KEY_FILENAME, strFileName);
arg1.getOutputPayload().getOutputStream().write(sbFileData.toString().getBytes("UTF-8"));
arg1.getOutputPayload().getOutputStream().flush();
So here I'm flushing the OutputStream for each record. But it's not creating the multiple file, instead it creates only one file will all record XMLs appended to each other.
Please let me know if I missing something or need to do some thing else.
Regards,
Shreyansh ShahHi
You can easily achieve this using graphical mapping. Create your target message type like below
MT_Target
Details 0 to 1
Data 0 to 1
Source sample structure
<resultset>
<row>
<column-name>column-value</ column-name>
</row>
Then do the message mapping like below
map <row> with MT_Target
contant ----> Deatils
column-name ------>Data
In the signature tab of message mapping, choose the occurrence of your target message type as
0 to unbounded.
This will generate multiple files from multiple rows.
Let me know if you have any doubt. -
'Use Temporary File' in Receiver File channel
hi all,
I am facing a strange issue with receiver file channel which I am not sure if somene had already faced. I couldnt find any help from blogs..!
I have configured the Receiver File channel with Write mode as 'Use Temporary File' with a temporary file name(say tmp.xml) scheme and Empty-Message Handling set to 'Write Empty File'
When the scenario is executed, its so happening that the temporary file of 0 bytes(empty file) is being created as tmp<msgID>.xml before the actual file is being completely written. It is expected that once the Actual file is completely written, the tmp file should be deleted, but here is not the case.Thus causing both the files being present in the target location. This is not happening often though.
As the receiving application is processing all files from the target direcotry, the file is getting errored out in the target application.
I think the 'Write Empty File' has nothing to do with this as the option 'Write Empty File' is for empty payloads resulting from the message mapping.
Please correct me if am wrong and also provide me the inputs on my issue. Am on PI7.0
thanks in advance,Hi Tilak,
this is real time interface
real time by using a file... that's a non-sens according to me. You should use a non physical solution (web service, JMS, JDBC, etc...) but a not a file. well... Anyway, you can image that the receiver application schedule the folder every 30s or every 1min, that's almost a real time. Real time is mainly a conceptual view (only synchronous exchange needs really real time). Morevoer, if you really wanted a real time, you should not add a tool like PI (or other) between your source and your target system, the more we have systems, the less it's efficient (in term of delay and response time!).
Even if we propose that the receiver application should have a condition to its script to avoid picking the tmp*.xml files, after a period of time there would be a chance that the *tmp files may increase in number..
No ! coz if my theory is good, if your receiver application does not pick-up tmp.xml, that means this file is not currently treated and so PI is authorized to delete it. So no increase of tmp.xml files in this folder.
Another solution: to create the target file without option "temporary", but to create it in another folder than this one scheduled by your receiver application, and use an OS command AFTER processing, in your receiver CC, which move the created file from the "temp" folder to the target folder.
[http://wiki.sdn.sap.com/wiki/display/XI/SAPXIFileAdapterOSCommandLine+Feature]
regards.
Mickael -
When to use "Use Temporary File" in receiver FTP adapter
Hi Experts,
I have nerver used "Use Temprary File" as the "Write Mode" in receiver ftp adapter.
I want to knwo under what kind of requirment we should use this option?
Thanks in advance.
Best Regards,Hi Aditya
Usually it's advisable to use "use temporary file" as write mode when you want to avoid your file to be picked up by receiver while PI channel is still writing it.
Obviously larger the file, more chances you have that this issue could occur.
If you select the "use temporary file", XI will write the content to a temporary file with another name of your choice and only once writing has finished it will rename it to the actual name setup in the "file name scheme".
Regards,
Giuseppe
Maybe you are looking for
-
Indesign Post Script name changing to back up file name
Hi all I am in a pre press workflow that requires that I write a post-script file to a hot folder. So saving as a post-script is the only option for our entire workflow to take place. When saving the post script file from indesign , the name defaults
-
Get if local variable exist with teststand API
Hi, attach you'll find a sequence file and a VI. This VI should open the Expression Browser and after selection a variable (in this case I select Locals.test) the property object exists should tell me if this local variable exists. This is part of a
-
Failed to resolve JCO destination name 'WD_RFC_METADATA_DEST' in the SLD
Hi!!! I am facing a problem, when I run any application, I get the following error, *com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Failed to resolve JCO destination name 'WD_RFC_METADATA_DEST' in the SLD. No such JCO destination
-
Please help
-
Access violation, tescas.dll, T400 ?
Hi, Every time I turn on my laptop (T400 2767, Windows Vista 32bit Business), it displays: "Access violation at address 01AD6B18 in module 'tescas.dll'. Read of address 00000004". Why this? What is "tescas.dll"? How to fix this problem? Thanks.