Setting messageId in File Adapter
Hi all,
I am trying to set the message Id in the file adapter, does somebody know it is possible?
I tried with DynamicConfigurationBean, but while i'm able to set other header values (like correlationId or interface name), it is not modifying the message ID at all, even when in the adapter log I see
"property message.messageId from key (http://sap.com/xi/XI/System/File)FileName with value EBSP_20090214_090130"
If i test reading from message.messageId I get the id generated by XI, but when I write it is not changed...
I want to use the file name as ID, it is already an unique identifier in the sender system and it would be great to use this ID in XI too...
I am using XI 3.0 SP19.
any ideas?
thanks!!
Hi Nicholas,
Did you place this module before the adapter module for the file adapter.
You might want to have a look at this
[http://help.sap.com/saphelp_nw70/helpdata/en/45/da2239feb22e98e10000000a155369/frameset.htm|http://help.sap.com/saphelp_nw70/helpdata/en/45/da2239feb22e98e10000000a155369/frameset.htm]
Regards,
Akshay
Similar Messages
-
How to set "lastFieldsOptional" in File Adapter
Hy,
somebody could tell me how can set the parameter "lastFieldsOptional" in FilesAdapter. have the problem that my last two fileds in incoming files sometimes are not insert and the "endlines" character also insert.
Thank's
MatiHi Mattia,
Please go thru these links for the step by step procedure to do content conversion:
/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
/people/sap.user72/blog/2005/01/06/how-to-process-csv-data-with-xi-file-adapter
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
http://help.sap.com/saphelp_erp2005/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
While doing content conversion you have to mention the field names in header of data type: fieldNames. Hence if the key field is not present it will throw an error in adapter monitoring, FIELD NOT FOUND.
To make note mapping cannot be performed with a flat file as XI understands only XML. Hence content conversion required.
I hope the links provided will help you set the parameter "lastFieldsOptional" in the File Adapter.
Regards,
Abhy
PS: AWARD POINTS FOR HELPFUL ANSWERS. -
Hi All,
I have a file to ABAP proxy asynchronous scenario.
In the source directory i have 2 xml files. The second XML file should be picked up by the file adapter only after processing the First file by the ABAP proxy.
I know about setting delay in Mapping. But this wont suffice my requirement.
Appreciate your help in this
KeerthiHi,
do'nt thing so wait modification will work...
try it with the help of BPM
file is in Asyn Mode.
So 2 message will be there for 2 file, now it can be handled in BPM, that if proxy return OK acknowledgement for 1st message,
then 2 mapping should executed.
File1 -{BPM receive step -> transformation-> Sync Send -> if proxy respone ok , Block->then 2 transformation else leave the 2nd file message}.
Regards
Ashu -
Same setting for two file adapter but different output
Hi ,
I am having two receiver file adapter for two differrent scenario with same settings but different structure.
I want the output of the file for both the scenario should be displayed line by line but it is working fine for one scenario.File type,file encoding and FCC are same in both the interface except the fieldsnames in FCC.
When i check both the output file i found that the scenario which is working fine having OA OD hexadecimal value at the end of line of each line.and the second scenario which is giving the output in single line is having only OA.
waitng for Valueable inputs!!!
Thanks
SantoshHi Santosh,
Kindly elaborate your question.
it would be helpful if you post the content conversion parameters of the erroneous file channel.
Regards,
Varun -
File adapter-How to set line break in text file-split record into two lines
Dear Guru's,
I have to solve following problem with XML (with mulitiple records) to TEXT file scenario using file adapter. I have to output for ever ONE data record in XML always two identical lines in text file. Second line should have a little bit different mapping in few fields like date,... So I did duplicate fileds in my output structure in mapping and need to know how to set line break in the middle and see half of structure in first line and next structure half in second line
My output structure in mapping is:
CASHFLOW
- INTERFACE
- GESELLSCHAFT
- ANWENDUNG
- PRODUKT
- VERTRAG
- BETRAG
- WAEHRUNG
- DIRECTION
- BEWEGUNGSTYP
- FAELLIGKEIT
- ZINSFESTSTELLUNG
- ZAHLUNGSTAG
- RENDITE
- INTERFACE2
- GESELLSCHAFT2
- ANWENDUNG2
- PRODUKT2
- VERTRAG2
- BETRAG2
- WAEHRUNG2
- DIRECTION2
- BEWEGUNGSTYP2
- FAELLIGKEIT2
- ZINSFESTSTELLUNG2
- ZAHLUNGSTAG2
- RENDITE2
Question is how can I set on receiving file adapter in Content Conversion Parameters that fields from first structure half INTERFACE...RENDITE should be outputed in one line and fields from second half of structure INTERFACE2...RENDITE2 should start on second line in final text file.
I'm getting at the moment one line only and I need to know how can set line break so that second line starting with INTERFACE2(CA)...RENDITE2 will start in new line.
CA,"0100","7","512",20090127010001,-12454762586.6800,"EUR",2,12,2009-01-28,2009-01-27,2009-01-28,"0.0000000",CA,"0100","7","512",20090127010001,-12454762586.6800,"EUR",1,10,2009-01-27,2009-01-27,2009-01-27,"0.0000000"
This should be final output:
CA,"0100","7","512",20090127010001,-12454762586.6800,"EUR",2,12,2009-01-28,2009-01-27,2009-01-28,"0.0000000"
CA,"0100","7","512",20090127010001,-12454762586.6800,"EUR",1,10,2009-01-27,2009-01-27,2009-01-27,"0.0000000"
My file adapter settings:
RecordsetStructure=CASHFLOW
CASHFLOW.fieldNames=INTERFACE,GESELLSCHAFT,ANWENDUNG,PRODUKT,VERTRAG,BETRAG,WAEHRUNG,DIRECTION,BEWEGUNGSTYP,FAELLIGKEIT,ZINSFESTSTELLUNG,ZAHLUNGSTAG,RENDITE
CASHFLOW.fieldSeparator=,
CASHFLOW.endSeparator='nl'
CASHFLOW.fieldNames=INTERFACE2,GESELLSCHAFT2,ANWENDUNG2,PRODUKT2,VERTRAG2,BETRAG2,WAEHRUNG2,DIRECTION2,BEWEGUNGSTYP2,FAELLIGKEIT2,ZINSFESTSTELLUNG2,ZAHLUNGSTAG2,RENDITE2
CASHFLOW.fieldSeparator=,
It wont help if I add two identical structures in mapping because in output i would see for multiple entries section with first lines only and after that section with second lines only. And CASHFLOW is one part of more complex mapping ...
(This is final output structure RecordsetStructure=HEADER,CASHFLOW,CONDITION,REFERENCE,CONTRACT - more sections with different data and all these should have duplicate lines at the end)
Thanks a lot for any help
Cheers
Marian
Edited by: Marian Luscon on Jul 14, 2009 11:44 AMHi Ivan,
right, I did test just for sure.
Putting constant 'nl' into field CASHFLOW-INTERFACE1 didnt help - still getting one line instead two lines.
CA ,"0100" ,"7" ,"512" ,20090127GTP101 ,-12454762586.6800 ,"EUR" ,2 ,12 ,2009-01-28 ,2009-01-27 ,2009-01-28 ,"0.0000000" ,'nl' ,"GTP1" ,"7" ,"512" ,20090127GTP101 ,-12454762586.6800 ,"EUR" ,1 ,10 ,2009-01-27 ,2009-01-27 ,2009-01-27 ,"0.0000000"
So there is still question. Is there any way (mapping,...) how to output always 2 lines in text file for one record in XML. It always does 1 record in mapping structure = 1 line but we need 2 lines ...
Example:
Input: 4 records in XML
Output: 8 lines in final text file ...
Thanks to you all guys
Marian -
Restricting polling in sender file adapter
Hi friends,
I have a requirement where I need to poll a file from an FTP server. But, if the file is being edited (some other application is writing to it) I need to avoid picking that file. Plz tell me how i can achieve this...waiting for ur replies.
Regards,
ShilpaShilpa,
Check out this sap note :
[https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=821267|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=821267]
File Locking / Incomplete Processing
Q: I sometimes observe that files are processed only partially, i.e., only a fragment from the file's start is converted into an XI message. Nevertheless, the file is usually archived completely. Does the File Sender Adapter honor if another process has locked a file for exclusive use?
A: Unfortunately, the J2EE 1.3 technology the File Adapter is built upon does not support file locking. This limitation affects the File Adapter's operation. Depending on whether the JRE implementation for the operating system under which the adapter runs uses mandatory file locking or advisory file locking, opening a file that is currently being written to by another process will fail or not.
If opening the file fails, no problem exists and the adapter will try to open the file each poll interval until it succeeds.
However, if opening the file is not prevented by the operating system, the adapter starts to process the file although it is still being modified. Since XI 3.0 SP11 / PI 7.0 there is a parameter named "Msecs to Wait Before Modification Check" in the advanced settings of the File Sender channel configuration to work around this issue. This setting causes the File Adapter to wait a certain time after reading, but before sending a file to the Adapter Engine. If the file has been modified (which is basically determined by comparing the size of the read data with the current file size of the input file) after the configured interval has elapsed, the adapter aborts the processing of the file and tries to process the file again after the retry interval has elapsed.
If this option is not available for the settings you would like to use, the following algorithm (to be implemented in your application) may be used to ensure that the File Adapter only processes completely written files:
Create the file using an extension, which does not get processed by the File Adapter, e.g., ".tmp"
Write the file content
Rename the file to its final name, so the File Adapter will notice its existence and pick it up
Hope this will help.
Thanks,
Nilesh -
Reciever File Adapter - Temp File Name Scheme using Variable Substitution
How can I create a temporary file that uses variable substitution?
We are having a problem with files merging when we write files using the "Use Temporary File" setting on the FIle Adapter. So two independent files are merging into a single file. We are not using the "Append" setting.
We would like to use a Temp File Name Scheme that would append the message id onto the temporary file name.
Using variable substitution we created a msgid variable. When added to the temporary file name using %msgid% the temporary file name is created with %msgid% in the name instead of the actual message id. We put the variable into the "File Name Scheme" as well and the end completed file used the message id in the name.
Any Ideas?
Thanks,
MattHI Matthew,
Why are you adding the message id into the temporary file??
I understand that you want the output of the filename to contain message id .. and hence you are using variable substitution for the same.
Temporary file name will anyways get overwritten by the actual file name (here the actual filename will be using variable substituion).
So i suggest to achieve your scenario you can add any name in the temporary file and maintain the desired filename you require as output in the variable subsititution.
Temporary File Name option actually acts as a lock - unlock mechanism from PI side while the file is getting written to the file server so that while PI is writting the file no third party application batch program picks it up.
I hope this helps.
Cheers
Dhwani -
I have set up a File Adapter comms channel that should be picking up a file from the XI SAP system directory path F:\usr\sap\temp.
I place a file in that directory and can see it via SAP transx AL11.
However my comms channel is not picking up the file so my process does not start. I had previously been using a FTP File Adapter and that was working fine. So I know my other configuration is correct. I now needed to testing something use just the plain File Adapter.
The RunTime Cache has been refreshed and I can see my CC via SXI_CACHE.
Here is what I have entered into the File Sender Adapter
Transport Protocol : File
Message Protocol : File
Adapter Engine : Integration Server
Source directory : F:\usr\sap\temp
File Name : MYFILE.XML
Processing Options :
QAS : EO
Poll Interval 60s
Processing Mode : Delete
Processing Seq : By Name
File Type : Binary
Adapter Status : ACTIVEHi
check the following things
first select ur message protocol as "NFS". save the changes and activate the channel.
if still not work go to the communication channel monitoring using the path
runtime work bench->compnent monitoring->dispaly->adapter ebngine->communication channel monitoring--->enter ur channel name and click on use filer button.
and check whether the channel is started or stopped.
if stopped start the channel and the try.
if u still face the problem please reply me back.
Thanks
Rinku -
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 -
Can I use the File Adapter to transfer files from/to my own PC
Hello,
Would it be possible to set tu the file adapter to send or receive files from my own PC's file system?
For example I would like to transfer a file from my PC to PI instead of using PI's file system?
Can I do that?
Thanks
MarceloIf your PC has Windows-based system, SAP XI is Unix-based, you have a problem: Unix can't connect to UNC-path - Unix doesn't understand path like this "
mywindowspc\myfilesharefolder\", and Windows can't mount unix-drives. There are has a tool that can mount Windows UNC-file-share on NTFS like dirive UnixFS - but this tool is not freeware and has a problem when you switch off your PC without unmounting your Windows-dirives on Unix system. You can use a SAMBA, but Admins doesn't like to install this to Unix...
So, if you want to use a File Adapter you can set only FTP path, create FTP-site on your own PC, and so on...
Another way to send information from/to your own PC is "Plain J2SE Adapter Engine". This is a standalone part of SAP XI, you install it on your PC, configures URL of XI pipline, sets local folders to transfer from/to your PC, masks and types of your files, time to sending, any rules and DOS-commands for "before/after sending and receiving" and so on...
In case of sending files from PC to XI, files transforms to XI-payload inside this Adapter Engine and then goes like XI-message to pipeline... When you send it back, payloads come to this Adapter Engine and transform to files on your PC.
I used this Plain J2SE AE on my working notebook for checking sending messages to many different XI Systems.
For more info: http://help.sap.com/saphelp_nw04/helpdata/en/6f/246b3de666930fe10000000a114084/content.htm
Regards. -
File adapter read activity.
Hi,
is it possible to make the file adapter to look for specific files and ignore others in the same directory or do you have to write a web service for that? I want the file adapter to poll for certain files only.
Best Regards
JohanHi Johan,
In the Adapter Configuration Wizard its already providing the setting
You can found the setting as following
File Adapter > Operation Type (Read File) > Step 5 of 7 (File Filtering)
This step allows you to specify the file name pattern of both include and exclude files
Notice: I am using JDeveloper 10g
Wish helpful to you
Roy -
File adapter questions (beginner)
Hi everyone,
I two questions on two topics about file adapter.
1. I have set up a File adapter for a CSV file to be the input file of my process. Now I would like to have an XML file as the input file, but the content is always ignored.
here is the XSD :
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Employees" xmlns="urn:Employees">
<xs:element name="Employee" type="EmployeeType"/>
<xs:simpleType name="InitialType">
<xs:restriction base="xs:string">
<xs:maxLength value="1"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AgeType">
<xs:restriction base="xs:integer">
<xs:minInclusive value="18"/>
<xs:maxInclusive value="50"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="EmployeeType">
<xs:sequence>
<xs:element name="EmployeeID" type="xs:string"/>
<xs:element name="FirstName" type="xs:string"/>
<xs:element name="MiddleInitial" type="InitialType"/>
<xs:element name="LastName" type="xs:string"/>
<xs:element name="age" type="AgeType"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
And now the sample XML file :
<?xml version="1.0" standalone="yes"?>
<Employees>
<Employee>
<EmployeeID>1</EmployeeID>
<FirstName>John</FirstName>
<MiddleInitial>N</MiddleInitial>
<LastName>Smith</LastName>
<age>24</age>
</Employee>
<Employees>
How can I do that ? Do I need the Oracle XML Gateway ?
2. In the BPEL console, I can trace the successfull processes. Alright ... But when I put in a file with the wrong format (eg: missing fields), the process does not even appear in the console. How can I trace them ? (completionPersistPolicy is "on").
Thank you :)I'm interested in 2 question (missing fields) too.
Ema -
Logging option on file adapter based JNDI
Hello,
While setting up a file adapter based JNDI, I notice under outbound connection, we have logging option where we have rotate logs based on size/time. Could someone please help me understand what does this refers to and how we can use that.
its under - Deployment -> File adapter -> Outbound connection -->"Select a JNDI created by you" -> Logging.
my JNDI, represent to a location where I am writing few specific log content in a text file. Can we handle(rotate) that based on this.
Pls advice.Hi,
you need to create 40 channels if you have users
as dynamically you can only create:
File Name
Directory
File Type
File Encoding
Temporary Name Scheme for Target File Name
with FTP adapter
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> -
Sender File Adapter Can I set original MessageID like SOAP Adapter??
Hello,PI Experts!!
I want to set original messageID(GUID) to Sender File adapter scenario.
SOAP Adapter can set original messageID with url, about FILE Adapter??
I think Adapter Module maybe can set original messageID.
best Regards,
Yuuki Fujioka.Hello,
Yes, you can get Message ID with any adapter.
All neccessary information about approach you can find in links below:
Use getTransformationParameters().
Accessing Adapter-Specific Attributes
http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm
Container Object
http://help.sap.com/saphelp_nw04/helpdata/en/78/b4ea10263c404599ec6edabf59aa6c/content.htm (String Mapping Runtime Constants: MESSAGE_ID)
Br,
Dzmitry -
Setting dynamic file name in Receiver file adapter - not from payload
Guys I just remember reading a weblog but can't find it now that I need it, on how to set the file name in message mapping dynamically but not using any payload field.
Please let me know if you remember this.
Thanks a lot,
Viktor Vargaalso u can check in
<a href="/people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii file name(XSLT Mapping with Java Enhancement) using XI 3.0 SP12 Part -II</a>
<a href="/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14: The same filename from a sender to a receiver file adapter - SP14</a>
Maybe you are looking for
-
Hi Firstly I cannot get my Linksys RE1000 to work with my network having tried the set up CD on 2 computers (mac and windows) The main router is a BT Home Hub 2.0 any suggestions Secondly this is what I am trying to achieve so help to do that would b
-
XA error: XAER_RMERR on getConnection()
I am using WLS 6.1 SP2 and Oracle 8.0.6, Type 4 Driver. I have a connection pool that works fine from a javabean, servlet, jsp, etc. I am trying to create a BMP EJB, and the call to getConnection returns the following error. JNDI seems to resolve the
-
Calling Lotus Note Application from EP6
Hi All, I am looking to create an iView that can launch or call an exe file extension, Lotus Notes, to open in another window. Any assistance you could provide in how I could launch the application would be much appreciated. Regards, Andrew
-
Bfile functionality with oracle lite for Synchronization
Hi there, In my project requirement, We need to design a standalone version of the applciation which will be used by the marketing people around the globe. Plan is to use oracle Lite database with this application, as it synchronises with the main se
-
Can I put Microsoft Internet explorer on my ipad mini?
Can I put Microsoft Internet explorer on my ipad mini ?