File adapter with modules
Hi all
Why is the File adapter does not work properly with modules.
The source file does not be picked up from the source directory when I use module with the CC , but when I remove the modules it works fine.
Do I have to activate anything or to do any set up.
any help would be apreciated.
thanks.
Hi .
It is getting a little bit complicated than I can manage to understand -)
Those are the modules I am using
1 AF_Modules/RequestResponseBean Local Enterprise Bean 1
2 CallSapAdapter Local Enterprise Bean 2
3 AF_Modules/ResponseOnewayBean Local Enterprise Bean 3
config.
1 passThrough true
3 receiverChannel cc_receive_from_xtl
3 receiverService FileAdapter
This is what I getting from RWB
2008-02-11 10:36:02
Success Channel cc_sender_com_get_details: Send binary file "D:\usr\xifileadapter\test\in\compget.txt". Size 151 with QoS EO
2008-02-11 10:36:02
Error: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of RequestResponseBean
How can I determine the SP of my xi whether is 19 or not.
I hope you can help.
best regards
Camilla
Similar Messages
-
Sender File Adapter with file conversion
Hi guys,
Im using a Sender File adapter with file conversion. The message to be processed has a structure with fixed lengths and in your content are some values that needs to be ignored.
An example:
value1 <b>value2</b> value3
I want to ignore <b>value 2</b> but I cant find a parameter for that! Do I need to define dummy fields on my data type and ignore those fields during mapping? Or there is a specific parameter for that?
Thanks in advance,
Ricardo.hi,
there always is another way:)
you can import the whole line to one field
and cut it inside the adapter module
(then you can define start and stop of the substring that you need to use)
but of course it's not standard even though it's quite easy to achieve in java
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> -
Using File Adapter with Logical Name
I am creating a file adapter with Logical name. Apart from giving the Logical name is there any other configuration that I am suppose to do on the Web Logic before I start using it?
Thanks in Advance.After configuring the file adapter, all you need to do is , give the path as a value for the logical name which you have created earlier. That you can do on the file adapter property inspector. There is no need to do anything on the server level. Lemme know
Thanks,
N -
File Adapter with Content Conversion
Hi -
I am trying to convert a Flat file which has data as
firstnamelastnamecompanyName
Now i have created a message type which has a root name as Contact and its children are FirstName,LastName,Company.
And in the configurator i have created a file adapter with the content conversion, but being very new to XI i have never used a file adapter with content conversion. This is what i have in my Content Conversion Parameters.Please correct my code.
Document Name :: MT_Contact
Document Namespace :: http://venkat
Document Offset :: <i>i did not enter anything here</i>
Recordset Name :: RootNode(i gave this name just like that,,, Should it be something from the IR??
Recordset NameSpace:: <i>i did not enter anything here</i>
Recordset Structure:: Contact (this is the name in my IR
Recordset Sequence :: Ascending
Recordsets per Message :: Contact,* (Can someone explain what should be given here)
Then in the bottom in the name value pairs i have given
Contact.fieldNames = FirstName,LastName,Company
Contact.fieldSeparator = #
When i am using the above configuration the error i am getting in RWB is Error: Conversion initialization failed: Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found:
Format error in 'xml.recordset' argument: incomplete structure (name,number) pairInvalid 'xml.recordsetsPerMessage' value 'Contact,*' found
I am very new to XI and i am unable to understand what exactly each field means in the file adapter when the content coversion is used. Can someone take the pain of explaining them.
Thank you
VenkatHi,
Use the following to create an XML strucutre like this,
<MT_CONTACT>
<CONTACT>
<FirstName> </FirstName>
<LastName> </LastName>
<CompanyName> </CompanyName>
</CONTACT>
<MT_CONTACT>
DocumentName : MT_TEST
DocumentNamespace : Yournamespace
RecordserName : record
RecordsetStructure : CONTACT,1
In the table,
ignoreRecordsetName : true
CONTACT.fieldNames : FirstName,LastName,CompanyName
CONTACT.fieldSeparator : #
Go through the links suggested by moorthy and also these blogs to understand content conversion better,
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
/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/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
/people/sap.user72/blog/2005/01/06/how-to-process-csv-data-with-xi-file-adapter
Regards,
Bhavesh -
File Adapter with Conversion - XML with Hierarchy?
XI 3.0 (SP9)
We are using the inbound file adapter with conversion to convert a flat file that has header and line items. I would have thought that the data type should have been setup something like this:
<data type>
<header>
<item>1</item>
<item>2</item>
</header>
</data type>
Our flat file looks like this:
H12345
I12345
We have only been able to configure the file adapter to bring in the data like this:
<data type>
<header></header>
<item>1</item>
<item>2</item>
</data type>
What is the proper way to inbound data through a file adapter that has structure conversion like this?
Do all of the elements get put under the root node, or is there a way to build structure?
Do we need to build the data type to correspond with the exact way that the data will come in from the file adapter?
Thanks
PeterNot quite sure what you want to get, as the flatfile and xml structure does not contain the same values.
However, I will try to give you an example:
Your flat file looks like this:
H12345
I12345
If the first row is header and the next is a line, then you need to specify the fila adapter with the following:
Document name = datatype
Recordset name = recordset
Recordset structure = header,1,item,*
Recordsets per message = *
Recordset sequence = Ascending (need SP10 for this, but you do not need it for this)
Keyfieldname = id
header.fieldFixedLengths = 1,5
header.fieldNames = id,number
header.keyFieldValue = H
header.lastFieldsOptional = Yes
item.fieldFixedLengths = 1,5
item.fieldNames = id,number
item.keyFieldValue = H
item.lastFieldsOptional = Yes
This will create something like this:
<datatype>
<recordset>
<header>
<id>H</id>
<number>12345</number>
</header>
<item>
<id>I</id>
<number>12345</number>
</item>
</recordset>
</datatype>
Hoever, if both rows are "item" rows , then you need to specify the file adapter with the following:
Document name = datatype
Recordset name = header
Recordset structure = item,*
Recordsets per message = *
Recordset sequence = Ascending (need SP10 for this, but you do not need it for this)
item.fieldFixedLengths = 1,5
item.fieldNames = id,number
item.lastFieldsOptional = Yes
This will create something like this:
<datatype>
<header>
<item>
<id>H</id>
<number>12345</number>
</item>
<item>
<id>I</id>
<number>12345</number>
</item>
</header>
</datatype>
Q: Do we need to build the data type to correspond with the exact way that the data will come in from the file adapter?
A: Yes!
Good luck! -
Debugging JMS adapter with Module Configuration
Hi.
I have a problem debugging my JMS adapter with module configuration.
All I get from the Message Monitor is a status "System Error", and no error category or error message.
I know there's an error in my Module configuration design, since it works fine without.
My configuration looks like this:
PROCESSING SEQUENCE:
1 localejbs/AF_Modules/MessageTransformBean Local Enterprise Bean XML2Plain
2 localejbs/SAP XI JMS Adapter/ConvertMessageToBinary Local Enterprise Bean convert_XI2Bin
3 localejbs/SAP XI JMS Adapter/SendBinarytoXIJMSService Local Enterprise Bean exit
MODULE CONFIGURATION:
XML2Plain Transform.Class com.sap.aii.messaging.adapter.Conversion
XML2Plain Transform.ContentType text/plain;charset=utf-8
XML2Plain xml.conversionType StructXML2Plain
XML2Plain xml.addHeaderLine 0
XML2Plain xml.recordsetStructure STARTRECORD,DATARECORD,SERVICEYDELSERRECORD,SLUTRECORD
XML2Plain xml.STARTRECORD.fieldFixedLengths 2,8,6,7,10,7,3,3
XML2Plain xml.DATARECORD.fieldFixedLengths 2,8,6,4,35,17,7,7,7,5,5,5,18,18,18,18,18,18,18,18,18,9
XML2Plain xml.SERVICEYDELSERRECORD.fieldFixedLengths 2,8,6,4,3,20,18,18,18
XML2Plain xml.SLUTRECORD.fieldFixedLengths 2,8,6,7,10,7
XML2Plain xml.STARTRECORD.fixedLengthTooShortHandling Cut
XML2Plain xml.DATARECORD.fixedLengthTooShortHandling Cut
XML2Plain xml.SERVICEYDELSERRECORD.fixedLengthTooShortHandling Cut
XML2Plain xml.SLUTRECORD.fixedLengthTooShortHandling Cut
The structure of the message looks like this:
<STARTRECORD> (occurence = 1)
<DATARECORD> (occurence = 1..unbounded)
--- <SERVICEYDELSERRECORD> (occurence = 0..unbounded)
<SLUTRECORD> (occurence = 1)
I've crosschecked every field, and it length and all looks like it should!
The worst part is the one not getting the reason why it fails. Any way I can get this information?
I've tried to look in the Adapter Framework log, but I have no clue where to look for anything usefull.
Help
Regards PeterHello,
Below is the module configuration in my JMS sender channel:
Check Message Local Enterprise Bean key
ConvertJMSMessageToBinary Local Enterprise Bean convert_JMS2Bin
ConvertBinaryToXMBMessage Local Enterprise Bean convert_Bin2XI
CallSapAdapter Local Enterprise Bean call_AF_MS
CheckMessage is a custom module which does some check on the incoming message.
Now what I want to know is at which position should I include the DynamicConfiguration Bean? Should it be included at position 1 or at position 2 or someother position?
~Thanks. -
How to use File Adapter with hierarchial Structure?
Hi,
How to use File Adapter with hierarchial Structure like..
Data:
--Header Details:
Line Item Details:
Data
Bcoz I am getting a Flatfile in a hierarchial way as shown below.
Header Details :1
Line Item a
Line Item b
Header Details :2
Line Item c
Line Item d
KishoreHey Kishore,
In order to create a structure you need to use the file with convertion mode on the sending communication channel of the file adapter.
check the link for the needed configuration paramters.
If the structure is more complexed you can use the Contetnt master(CM) from itemfield which allows to ceate XML file from complex flat files and more.
<a href="http://help.sap.com/saphelp_erp2005/helpdata/en/0d/5ab43b274a960de10000000a114084/frameset.htm">File sender adapter</a>
If you have any question i'll be more than happy to assist.
Nimrod Gisis -
Acknowledgement from receiver file Adapter with out BPM
Hi Gurus,
I am trying to get Acknowledgement from Receiver file Adapter with out Using BPM.
Here is the scenario. I am sending files from different Sender Adapters. There is only one target that is File Adapter. After each successfull and failure transaction I need an Acknowledgement that needs to trigger another receiver adapter and send the the file name and timestamp to that file.
Hope this is a complicated scenario. Please help me.
Thanks,
Kevinfrom sap note 821267
6. Acknowledgements
* Q: Does the File Adapter support acknowledgements?
* A: You need to distinguish system acknowledgements (indicating that a message has been received by the target system) and application acknowledgements (indicating that the message has been successfully processed by the application on the receiver side).
The receiver of an XI message will only send an acknowledgement back to the sender if the sender has requested one. However, the File Adapter has no functionality that relies on the receipt of an acknowledgement, so it never requests one.
On the other hand, if a File Adapter Receiver receives a request to send an acknowledgement, it will do so for a system acknowledgement request. Application acknowledgements are not supported at all as the File Receiver has no way to determine if the written file has been correctly processed by the back-end application, which is what a positive application acknowledgement would imply.
this means that your requirement is ideally not possible without a BPM -
Receiver file adapter with attachments.
Hi
I would like to pass a file receiver an attachment from a proxy. I have seen bits and pieces with attachments. I have read that its similar to the mail adapter.
In the module
localejbs/AF_Modules/PayloadSwapBean
module configuration:
Parameter Name: swap.keyName
Parameter Value: payload-name
Has anyone succeeded and would you explain the details?
Thanks in advance
IanHi,
As far as I know, receiver file adapters do not supprt attachments.
You can use the payloadSwapBean to swap the attachment and the actual proxy payload and then send it to the file adapter.
Don't think it will be possible to send both the attachment and the payload to the receiver file adapter though.
Regards
Bhavesh -
File Conversion in Rec File Adapter with subnodes
Hi
My XML Structure is like this -->
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_Test xmlns:ns0="urn:TESTconversion">
<MstName>Hello</MstName>
- <Header>
<TableName>1tst</TableName>
<PayDate>0102</PayDate>
<TotalAmt>24.00</TotalAmt>
<Total>000002</Total>
<PaySource>CHK</PaySource>
- <Subheader>
<TableName>1tst</TableName>
<SelectCatgry>test</SelectCatgry>
<CustID>200</CustID>
<PayAmount>11.00</PayAmount>
</Subheader>
- <Subheader>
<TableName>1tst</TableName>
<SelectCatgry>test</SelectCatgry>
<CustID>400</CustID>
<PayAmount>13.00</PayAmount>
</Subheader>
</Header>
- <Header>
<TableName>1tst</TableName>
<PayDate>0103</PayDate>
<TotalAmt>10.00</TotalAmt>
<Total>000001</Total>
<PaySource>ONE</PaySource>
- <Subheader>
<TableName>1tst</TableName>
<SelectCatgry>test</SelectCatgry>
<CustID>100</CustID>
<PayAmount>10.00</PayAmount>
</Subheader>
</Header>
</ns0:MT_Test>
which means
MT_Test is root 1..1
Header is the sub-node of MT_test as 1...*
Subheader is sub-node of Header which is also 1...*
rest of the fields are elements as 1..1
Now I need to convert this into Flat file using Receiver File Adapter, I gave this in my content conversion logic
recordset Structure -
MstHeader,BFKKZK,BFKKZP
MstName.addHeaderLine 0
MstName.fieldFixedLengths 8
MstName.endSeparator 'nl'
Header.addHeaderLine 0
Header.fieldFixedLengths 30,10,15,6,6
Header.endSeparator 'nl'
Subheader.addHeaderLine 0
Subheader.fieldFixedLengths 34,10,35,16
Subheader.endSeparator 'nl'
But with this I am getting exception as -->
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:MT_Test' found in document', probably configuration error in file adapter (XML parser error)'
I know that http://help.sap.com/saphelp_nwpi711/helpdata/en/44/686e687f2a6d12e10000000a1553f6/content.htm says following -->
The expected XML structure contains the structure as nodes filled with any number of elements without additional subnodes.
But does that mean Structure with sub-nodes cannot be converted in flat format.
Pls. suggest the solution for this.
- lalit -Shab
I resolved the issue & able to convert the hierarchical XML file into flat file with the desired format I wanted.
Rather then FCC, I use MessageTransformBean module and I have to insert more dummy contexts & dummy fields in the target structure in order to achieve the flat file format.
I am getting file ( not actual file below just template is shown below) like this now
Header1 ....details....
SubHeader1.1
SubHeader1.2
SubHeader1.x
Header2 ....details....
SubHeader2.1
SubHeader2.2
SubHeader2.x
Headerx ....details....
SubHeaderx.1
SubHeaderx.2
SubHeaderx.x
Once the total development is over on my side I will create the blog for this. So this following statement is only correct when you use protocol as FCC but not with module.
"The expected XML structure contains the structure as nodes filled with any number of elements without additional subnodes."
Thanks
Lalit -
Sender File Adapter Bespoke Module Development
I have been following the How To ... Create Modules for the J2EE Adapter Engine to create a bespoke module for the Sender File Adapter.
Initially all the module does is write a message to the Augit Log. The module has been deployed to XI successfully. When I add the module to the sender file adapter the adapter is green in the adapter monitor but I get the following message in the message monitor ....
"Attempt to process file failed with Path to object does not exist at com.kk.FileAdapter, the whole lookup name is localejbs/sap.com/com.kk.FileAdapter/WriteToLog."
com.kk.FileAdapter is the package. All of the required files have been built as per the How To pdf.
Does anyone have any ideas??Hi Satish,
Thanks for the quick response.
Using the fully qualified name I get the following error in the adapter monitor.
"Last message processing started 18:32:11 2005-09-19, Error: Module Exception 'com.sap.aii.af.mp.processor.ModuleProcessorException' found, cause: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Path to object does not exist at BANKSenderFileAdapterEAP, the whole lookup name is localejbs/sap.com/BANKSenderFileAdapterEAP/WriteToLog."
If is use the JNDI name I do not get an error in the Adapter Monitor but get the following error in the Message Monitor.
"Attempt to process file failed with Path to object does not exist at BANKSenderFileAdapterEAP, the whole lookup name is localejbs/sap.com/BANKSenderFileAdapterEAP/WriteToLog."
The rest of the message seems to be successful, only the run of the module.
Any ideas??
Many thanks
Gary -
File adapter (sender) module throws exception, but adapter proceeds again
Hello dear reader,
I wrote a module that converts a flat file into XI-XML and tested it within the file adapter. It works fine so far. But if I force the module to throw an exception to handle an erroneous flat file, the file adapter tries to proceed the erroneous file again and again. Not very nice, isn´t it?
Has anybody an idea, how to configure the file adapter to stop the processing of an erroneous file?
Thank you in advance
Yours
Frank WaskowHello Satish,
the weblog doesn´t describe my problem correctly. Let me show you the Audit Log from the Messeage Display Tool of the Adapter Engine:
Audit Log for Message: 06ff54a0-a258-11db-b9e2-003048226013
Time Stamp Status Description
2007-01-12 16:14:49 Success Send text file "Invoice_error_wf.edi" from FTP server "HH-168:/XI_Infotag_Testdaten/EDIX/In", size 27993 bytes with QoS EO
2007-01-12 16:14:50 Error Attempt to process file failed with null
2007-01-12 16:15:00 Success Send text file "Invoice_error_wf.edi" from FTP server "HH-168:/XI_Infotag_Testdaten/EDIX/In", size 27993 bytes with QoS EO
2007-01-12 16:15:00 Error Attempt to process file failed with null
2007-01-12 16:16:00 Success Send text file "Invoice_error_wf.edi" from FTP server "HH-168:/XI_Infotag_Testdaten/EDIX/In", size 27993 bytes with QoS EO
2007-01-12 16:16:00 Error Attempt to process file failed with null
2007-01-12 16:17:00 Success Send text file "Invoice_error_wf.edi" from FTP server "HH-168:/XI_Infotag_Testdaten/EDIX/In", size 27993 bytes with QoS EO
2007-01-12 16:17:00 Error Attempt to process file failed with null
2007-01-12 16:18:00 Success Send text file "Invoice_error_wf.edi" from FTP server "HH-168:/XI_Infotag_Testdaten/EDIX/In", size 27993 bytes with QoS EO
2007-01-12 16:18:00 Error Attempt to process file failed with null
It seems to me that the Adapter gets the error of the module, but it is not handled as an error like shown in the blog <a href="/people/sap.user72/blog/2005/11/29/xi-how-to-re-process-failed-xi-messages-automatically:///people/sap.user72/blog/2005/11/29/xi-how-to-re-process-failed-xi-messages-automatically.
The adapter tries to proceed the same file again and again, till I delete it from the source directory.
Any more idea?
Frank -
Regarding the File Adapter with Code Page problem
Hi All,
I have a scenario where I am processing file at receiver end. The code page of the file is Cp037. When I try with this, I am facing the problem. Is there anyway where I can chage the code page of the file which is to processed by File adapter receiver.
I have one idea but I don't know whether it is possible or not. It is to use XML Anonymizer Module.
Please get back to me with your ideas.
Regards,
AchariHi Achaari,
Cp037 ( EBCDIC ) is not a basic but an extended encoding set which might not be supported by the file encoding parameter at the receiver file adapter.
Either you can try the code page conversion using java code as mentioned in this[ post|Code page conversion;
Please refer Problem with EBCDIC
Michale's reply and the sriram's reply which talks about some work around using .BAT files.
Regards,
Srinivas -
Target Directory & File Name parameters in Receiver File Adapter with ASMA
Hi Experts..
I have the following question....
What am I suppose to inform in the Target Directory & File Name obligatory parameters in Receiver File Adapter if I am using ASMA to fill it? Is it any dummy value?
Also, if you have any step by step guide/blog to forward on how to use ASMA in file adapter I will be greatful.
Thanks in advance,
DanielaYou can give any dummy value in dir and file name... Just go through these blogs
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
/people/madanmohan.agrawal/blog/2009/05/20/combining-three-different-aspects-of-pi-asma-af-module-and-variable-substitution-in-one-shot -
File by File picking with Standard File Adapter with NFS Protocal !!
Hi Folks,
How to pick file by file with little gap in a file directory by Standard File Adapter. One interface, one communication channle.
Ex: XML_XXXXX_XXXX1.xml
XML_XXXXX_XXXX2.xml
XML_XXXXX_XXXX3.xml
First I need to pick one file XM_XXXXX_XXXX1.xml then wait for 2 minutes and pick another one in ascending order.
I have tried with Advance option "File size" and "Msec to wait before modification check" with 1200000 MS, but no use.
Please folks any one can help in this, which is very big help?
Kind Regards
Many Thanks in advance
SanHi
My BPM steps are as follows:
1. Receive step -- Asynch
2. Transformation -- split the message
3. Switch step -- Condition "ID != ' ' from transform message'
4. In side Switch Branch 1 -- Receiver determination - Receive acknowledgment - Application
5. Send 1 -- with Application Transport, Queue Name - 'XXX'
This XXX queue I have configured on ID with EOIO Service
6. block step - Send multiple messages to same receiver on top
I have send 2 different message to one receiver, the first message is only one , second message are multiple. I am splitting with transformation step
7. Sender -2 no acknowledgement active
8. stop
Can you please tell me where I am gonna wrong!!
I will apprecite for your efforts
Regards
San
Maybe you are looking for
-
Regarding proforma invoice and delivery
Hi everyone, I have read online for information on how to prevent multiple proforma invoices. Understand that this can be controlled by using routine 311 in VTFL. Problem now is that my company's process requires the proforma invoice to be created be
-
Extraction:scripts of objects in database to a FILE
Hello .... I m extracting the codes of objects(procedures,packages....) its working fine ...but for some objects its not entirely writing the lines from source say for one objects if there are 1000 lines its writing only 700 lines... declare v_handle
-
In my NWDS "Build EJB Archive" is not actitivated?
Hi all! I created an EJB project and imported some files in to my EJB project. When i try to build my EJB Archive, it is not activated. I tried even a simple EJB project, for that also Build EJB Archive is not activated. Help me Thanks a lot in advan
-
Hey! I have a 2008 macbook, and the screen keeps blacking out whenever I open it. Any suggestions or info on how much it is to get fixed?
-
G4 Quicksilver 733 is not powering on...
G4 quicksilver 733 with scsi card and wireless card...no power when I depress power button...shows a blinking red light on the motherboard and blinking green light on the scsi card, but no response otherwise..HELP!