File adapter module enhancement error
Hello All,
We have a EDI scenario where data for 110 is to be transfered to SAP. Here customer is not able to ahead with seeburger hence decided to develope a adapter module. We have done that and started testing . While testing we are getting a error, in which ":" is field separator which is getting converted to "[]" . This we found when we debugged module process method. Pl can you suggest why this conversion is happening and how to resolve.
If you see , When I use only standared sap module file is getting read as it is. There is no such conversion happening.
Pl can you suggest at the earliest possible.
thanks,
Sharada
Hi,
I think you have done a typo error. is it not
localejbs/SeeClassifier classifier*
To find the correct JNDI lookup name, log in to Visual Administrator of the J2EE Engine and in server node look for the JNDI Registry Service.Spot your desired bean and fetch the whole JNDI name form there.
Regards,
Sudharshan N A
Similar Messages
-
Dynamic configuration required in sender file - Adapter Module
Hi Everybody,
I am developing an Adapter Module in the file adapter (sender) using Adapter Specific Message Attributes.
I am using Dynamic configuration inside the Module Process method in the adapter module.
We are getting an error saying Dynamic Configuration cannot be resolved.
Can anybody tell me the package to be used.
Thanks,
ZabiullaYou can access the dynamic configuration in adapter module like this:
Message msg = (Message) inputModuleData.getPrincipalData();
String fileName = msg.getMessageProperty("http://sap.com/xi/XI/System/File", "FileName");
You do not need any addition library besides the adapter module API.
Hope that helps
Stefan -
Receiver File Adapter Module processor issue
Hello all,
I have deployed (using SDM) a specific module for one of my file communication channel.
In MDT, I have the following error :
Exceptions survenues pour Adapter Framework : Object not found in lookup of Module0001
La diffusion du message vers l'application via File_http://sap.com/xi/XI/System a échoué en raison de : com.sap.aii.af.ra.ms.api.RecoverableException: Object not found in lookup of Module0001.: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of Module0001.
Where can be the source of this problem ?
Thanks a lotJean
Also check if the "JNDI" name that you have specified in the Receiver Adapter module
excluding localejbs matches the deployed name in the "J2ee Aministartor Deploy service.
for example if you have
localejbs/sap.com/BeanName
you should have
the service deployed under
/sap.com/BeanName
regards
krishna -
File Adapter-Module configuration
Hi All,
I have the following requiremnt.
"Duplicate files should not process"
Following are the File Access Parameters.
Source Directory: ABC (ex: contains aa1,aa2,aa3,aa4 files)
Filename: *
File name mask: aa*
My doubt is if they place aa1 file again in ftp , i should not process.
For this I'm thinking to write module configuration.
Can any one suggests , whether this is the correct approach? If it is could u explain how to write this module and where to write this module and how to import in xI, do i need to pass any parameter name in module configuration.
Regards,
venu.Hi Venu,
You can go with Module in the Sender File Adapter.
First you need to check the file name and you need to store this file name in the Database.( you can use Java Database).
If there is an entry in the database for that file, then reject the whole file as per the business requirement. So that you can avoid , overhead of Mapping. Because if there is an error set the flag in the message and check this flag in your Receiver Determination, if it is an error send into error directory.
Another way is outside the XI, i.e using shell scripts.
Regards,
Moorthy -
Adapter modules: messageTransformBean : error in recordset validation
Hi all,
I am using adapter modules in PI. I have written my own module that checks for a valid key field name on each line of an incoming file, then the messageTransformBean module is called. I took this approach because 'standard' file content conversion ignores lines that don't begin with a valid key field name, and I need to be able to error in this situation.
My module is working just fine, but the messageTransformBean one is not. I'm using the 'structPlain2XML' conversion type, and have two line types (apart from the header and trailer) so the xml.recordsetStructure parameter is Header , 1 , Detail, * , MeterRegisterDetail , * , Trailer, 1 along with the appropriate key field definitions etc. The recordsetSequence is set to variable.
The problem is that files like this:
Header
Detail
MeterRegisterDetail
Detail
MeterRegisterDetail
Trailer
fail for some reason ! It seems to be the repeating Detail that is the problem. The error message in the audit log is:
'Error converting Message: 'java.lang.Exception: ERROR consistency check in recordset structure validation (line no. 4: missing structure(s) before type 'Detail''
A similar setup with say Header,1,Detail, *, Trailer,1 as the resordsetStructure is fine with repeating Details, and if I put in a Trailer record before the second Detail it goes in fine as well !
Any ideas ? I'm pulling my hair out with this one !
Cheers,
NickThanks for the reply, but that's only the case if you don't set a variable record set sequence. I've found the problem though - looking through some old XI documentation it seems the naming convention is not quite the same as standard content conversion, the parameter should be xml.recordsetStructure = var, not recordsetSequence = variable !!!
Anyway, fixed now, so I'm happy. Thanks again. -
FileName in Sender File Adapter Module
Hi Folks,
In my sender file adapter have written a module to read the picked file name. The protocol used is NFS.
Notice that the file name read in the module has the absolute path, including the directory path. E.g The file name xyz has to be picked from source directory
XIServer\Outbound. In the module when I retrieve the file name, it comes up as
XIServer\Outbound\xyz. Is this expected behaviour?
I was expecting just the file name<xyz> to be retrieved.
Thanks,
AnandHI,
Create an UDF and write this code.
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;
in Adapter u will have Adapter specific parameters check the file name check box.
Using this UDF u will get the file name at target side.
Regards,
Phani. -
Is Sender File Adapter always throws error when there is no file?
Hi,
I have a simple question but can't find a straight answer to it. I have a Sender File adapter that configured to pick up file XXX* from FTP server every 1 hour. But a file can come every 2, 3, or 7 hours- no certain time.When there is no file I got "File not found " error. As we use alerts, this behaviour is not acceptable.
Does this error comes always if there is no file? Any possible way to avoid this error ?
Thanks for help.
NataliyaHi Ravi,
I can see the error in Runtime Workbench under CC monitoring. To be precise it says:
An error occurred while connecting to the FTP server '1X.1XX.XX.XX:21'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 552 RMS-E-FNF, file not found, ES4_SAP*'. For details, contact your FTP server vendor.
My ftp server has the following set up:
Server: xx.xxx.xx.xx
Port:21
Dataconnection:Active
Timeout:120
Connection secuirity: None
User name .... etc set up.
Connect mode: Per file transfer
Transfer mode:Text
QoS:EO
Pollinterval: 120 (for test purposes)
Processing Mode: delete
Can it be that its a ftp server generates error and sends back to XI?
Thanks,
Nataliya -
Hi
For a file adapter I had enabled the option <b>Archieve File</b> in my communication channel. So the system will put the file in the archieve folder after it is read. My requirement is to check if the file already exits in the archieve folder or not. Any means of checking it? or shud i make use of adapter modules? If yes kindly point some helpful tips on the same.
Kindly fwd any useful doc to [email protected]
regds
prabhuPrabhu,
The os command in the file adapter should exists in the XI server only.
Whatever command you provide in the Adapter will result in the SID+"ADM" user id exectuing this command at the oS level of your XI server.
So this script should exist on the XI server.
Now, if the archive directory is on the FTP server you will have to connect to the FTP server from the script and check if the file exists and then do the needful.
Check this blog out for executing Scripts on file adapters,
/people/sameer.shadab/blog/2005/09/21/executing-unix-shell-script-using-operating-system-command-in-xi
Regards
Bhavesh -
Adapter Module deployment error in PI 7.1
Hi Experts,
I have successfully deployed a adapter module on PI 7.1 thru NWDS, I see the ejb in NWA as well...
when i try to use it tit throws this error in comm channel monitoring
Error: javax.ejb.TransactionRolledbackLocalException: (Failed in component: sap.com/UserModule_EAR) Exception raised from invocation of public com.sap.aii.af.lib.mp.module.ModuleData com.sap.adaptermodule.GetHostNameBean.process(com.sap.aii.af.lib.mp.module.ModuleContext,com.sap.aii.af.lib.mp.module.ModuleData) throws com.sap.aii.af.lib.mp.module.ModuleException method on bean instance com.sap.adaptermodule.GetHostNameBean@299c92f0 for bean sap.com/UserModule_EARxml|UserModule_EJB.jarxml|GetHostName in application sap.com/UserModule_EAR.; nested exception is: java.lang.NullPointerException; nested exception is: javax.ejb.EJBException: (Failed in component: sap.com/UserModule_EAR) Exception raised from invocation of public com.sap.aii.af.lib.mp.module.ModuleData com.sap.adaptermodule.GetHostNameBean.process(com.sap.aii.af.lib.mp.module.ModuleContext,com.sap.aii.af.lib.mp.module.ModuleData) throws com.sap.aii.af.lib.mp.module.ModuleException method on bean instance com.sap.adaptermodule.GetHostNameBean@299c92f0 for bean sap.com/UserModule_EARxml|UserModule_EJB.jarxml|GetHostName in application sap.com/UserModule_EAR.; nested exception is: java.lang.NullPointerException; nested exception is: javax.ejb.EJBTransactionRolledbackException: (Failed in component: sap.com/UserModule_EAR) Exception raised from invocation of public com.sap.aii.af.lib.mp.module.ModuleData com.sap.adaptermodule.GetHostNameBean.process(com.sap.aii.af.lib.mp.module.ModuleContext,com.sap.aii.af.lib.mp.module.ModuleData) throws com.sap.aii.af.lib.mp.module.ModuleException method on bean instance com.sap.adaptermodule.GetHostNameBean@299c92f0 for bean sap.com/UserModule_EARxml|UserModule_EJB.jarxml|GetHostName in application sap.com/UserModule_EAR.; nested exception is: java.lang.NullPointerException; nested exception is: javax.ejb.EJBException: (Failed in component: sap.com/UserModule_EAR) Exception raised from invocation of public com.sap.aii.af.lib.mp.module.ModuleData com.sap.adaptermodule.GetHostNameBean.process(com.sap.aii.af.lib.mp.module.ModuleContext,com.sap.aii.af.lib.mp.module.ModuleData) throws com.sap.aii.af.lib.mp.module.ModuleException method on bean instance com.sap.adaptermodule.GetHostNameBean@299c92f0 for bean sap.com/UserModule_EARxml|UserModule_EJB.jarxml|GetHostName in application sap.com/UserModule_EAR.; nested exception is: java.lang.NullPointerException
any help is appreciated
Regards,
TejaHi Prateek,
Im facing the same issue...,So i thought I should add to this thread instead of posting a new one
The com channel looks as follows
Processing sequence:
Number ModuleName Type moduleKey
1 ModuleName LocalEnterpriseBean 0
2 CallSapAdapter LocalEnterpriseBean 2
Module Configuration
I have nt added anything in this module configuration tab...can u help me on this
Edited by: Ibrahim on Sep 9, 2009 12:50 PM -
Help required in File Adapter Module Development
Hi All,
I am working out a File to File scenario where my source file is in some different format. Please find the below sample:
<Root>
<ID>100</ID>
<NAME>SAP</NAME>
<END-Root>
Before taking this into IS, I need to change the file to a proper XML format. I need to replace "END-" with "/".
<?xml version="1.0" encoding="UTF-8" >
<Root>
<ID>100</ID>
<NAME>SAP</NAME>
</Root>
I think I can achive this by developing Adapter Modules. I am new to Adapter Module development.
Can you please tell me if there are any inbuilt Adapter Modules for this. If not please suggest me some relevant blogs to solve this issue. Thanks in Advance.Hi Phani Kumar
There are more than one ways to do this. As per your timelines and skill set you can decide
1. You can use the XMLAnonymizerBean this is an inbuilt module
Check Stefen's blog
Remove namespace prefix or change XML encoding with the XMLAnonymizerBean
2. You can read this complete file in a single field and then you can create XSLT or Java mapping to parse it in a target XML you desire.
Check these
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3823 [original link is broken] [original link is broken] [original link is broken](XSLT mapping)
Java Mapping (Part I) (Java Mapping)
The specified item was not found. (Java Mapping helper DOM)
The specified item was not found. (XML Node into string)
3. You can develop Adapter modules for this
Refer
Check Guides
XI 3.0
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3bdc14e1-0901-0010-b5a9-a01e29d75a6a
PI 7.0
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f013e82c-e56e-2910-c3ae-c602a67b918e
PI 7.1
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00838345-708c-2a10-1199-9514c0b0a91c -
Hello experts,
1.
I want to retrieve the value of <b>Target directory</b> for a file <b>reciever</b> communication channel inside module. Is it possible? Any code samples?
2. My audit logs are not getting printed inspite of having a log-configuration.xml in place and proper audit log statements in the code? anybody face similar situations before? These statements are inside a <b>reciever file</b> adapter module.
AmolHi Kapil,
file.targetFileName
In General put the following piece of code in sender or receiver adapter and u can get all the parameters specific to that Adapter Type in channel(Configuration) for outbound and inbound channel depending on direction of channel in which module is configured.
String[] chattr=ch.getAttributeNames();// ch is channel object
If u put this in receiver module of file adapter, the string array will hold the names of all the parameters pertaining to Receiver File Adapter(file.targetFileName,file.targetDir,etc). Same procedure holds good for sender channel.
Once u get the parameter name, u can get the value as given by my earlier post in this thread.
Hope this helps.
Regards,
Sudharshan -
File Adapter Module - Change name of Generated File
Hello all,
My customer has XI v3.0 SP9. For the moment an upgrade is not envisaged.
Since SP14 it is possible to dynamically change filename generated with receiver File adapter. This is done with a manipulation during mapping and a configuration in adapter.
As I am in SP9, is there another solution, by example using a module processor ?
My XML :
<root>
<lineFile>....</lineFile>
<lineFile>....</lineFile>
<lineFile>....</lineFile>
<filename>
</root>
Thanks a lot,
J.C.Hi,
AFAIK - as far as I know
>>>>(Too much tests to do on other processes)
it's good this way the customer will learn the need for test tools
like mercury loadrunner - you can store all the tests inside
and when an upgreade comes just execute them...
customers always learn the hard way
Regards,
michal -
How to send input parameters to a file adapter module
Hi all,
i have a requirement like , i need to pick a file from a file server based on a condition. that condition we write in adapter module (in file sender channel).
the condition needs some input , so how can we send input parameters to adapter module.
please suggest me some way,
thanks in advance
jhansihi jhansi,
u define the parameters to send to a module in 'module configuration' (in module tab) by giving the key to identify the module for which u r giving giving the parameters.
for details refer this:
Adapter module
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/02706f11-0d01-0010-e5ae-ac25e74c4c81
This is all u have to do
http://help.sap.com/saphelp_nw04/helpdata/en/8b/895e407aa4c44ce10000000a1550b0/content.htm
[reward if helpful]
regards,
latika. -
File Adapter Read, Translation error
Hi,
I got problem with BPEL File Adapter. When i'm reading file i got scheme - termineted with semicol and without quoting.
In uploaded test file there was line - first colums;second colums;""third"" column";forth column;
And the problem are five quotes and adapter fails with translation error. Can i somehow ignore them?Hi,
You have use the attribute quotedBy... By default, the specified string is &quot; ("). If your data includes this character, you must override this default even if the field is not quoted.
For example:
{code}
<element name="field" type="string" nxsd:style="terminated" nxsd:terminatedBy=";" nxsd:quotedBy="<"/>
{code}
Read this...
http://docs.oracle.com/cd/E23943_01/integration.1111/e10231/nfb.htm#CHDBBECG
Cheers,
Vlad -
File adapter modules : Access to file data before content conversion
I have a file sender channel for which content conversion in applied. The incoming file has data in comma separated values format.
e.g.
102366,Amol Joshi,DEPT1
107752,XYZ PQR,DEPT2
I want to access the the actual data in the file before content conversion takes place. Is it possible to access this data inside the adaper module? I tried creating an adapter module and put it before CallSAPAdapter,it still gets the XML after content conversion as the input data to the module.
Any pointers?Hi Amol,
I dont know if it is the right approach.
But if u r not able to meet ur requirement u can do one work around.
Use Message Transformation Bean to convert it once again in to CSV (flat file structure) and then proceed with ur module.
There should be a better way than this.
Hope we could find a better solution in the forum.
Regards,
Sudharshan
Maybe you are looking for
-
Hello, We have created the Import PO for Depot, In this case we are using the Inventrising conditions for CVD, ECess, and SECess for Depot and these conditions are defined in Import Pricing procedure ZCV1 IN CVD ( INVENTRY ) ZECV Ecess on CVD( INVTR
-
My downloaded aps won't launch on iPad
I hooked up to my work computer today and I've never done that before so it asked me to sync iTunes, I thought I declined but I was tethering using iBooks... Now none of my downloaded aps will launch. I'm on the iPad 3
-
I'm absorbing a company into our exchange and added them as an accepted domain. There current certificate is pretty standard mail and autodiscover SAN names. Currently RPC over http is not working correctly and that is to be expected since I pointe
-
Difference between CRM 4.0 and CRM 5.0?
Hi, can anybody send me the CRM Release notes 5.0 docs to my mail id <removed by SDN Forum Moderator> I just want to migrate to CRM Release 5.0. Need all the func difference of CRM 4.0 and CRM 5.0 Thank You...
-
Hi Gurus, I getting error while accessing sub dashboard.I have Dashboard Name as Sales and i have sub dashboard underneath Sales says S1,S2,S3 and each sub dashboards has dashboard pages respectively.So when i select S1 sub dashboard it throws me err