Adapter Module for File Adapter
I have a scenario where I have 2 related files (text file and a pdf file) for the message. I need to enhance the payload (content conversion from text file) with the size of the pdf file. I have developed a adapter module for this and it is working fine if there is 1 set of text and pdf file. But if there are more than 1 set of files, it is processing the first set and giving the below error for other files.
"Error: com.sap.engine.services.ejb.exceptions.BaseTransactionRolledbackLocalException: Exception thrown in method process. The transaction is marked for rollback."
Regards
Yogesh
check this thread :
BaseTransactionRolledbackLocalException in custom adapter module
Exceptions in Recievr Communication Channel with Adapter Module
Similar Messages
-
How to create a module for File Adapter
Hi,
I read somethings about module in Adapters.
What I need to create a EJB? I need to generate a jar? Where I put it?
Do they have anything about this or a step by step? I want to create a module fpr File Adapter
Tks.Hi,
>>>What I need to create a EJB?
If you have NDS or Ecclipse you can create them automatically.
>>>I need to generate a jar?
Yes you need to generate a .Jar for that Ejb.
>>>Where I put it?
Put that .Jar in .Ear file. and then deploy it on to the Xi server or PCK or Decentralised Adapter Engine where ever u want to use.
>>>Do they have anything about this or a step by step?
Yes.Step by step procedure for creating module is available.You can get them at the links given above by others.
Regards,
Gowtham K. -
Adapter module for file renaming
Hi all,
I want to rename a file before writing into target directory. Is it possible to do this using adapter module? Im using File adapter at the sender and receiver.
I tried renaming the file using DynamicConfiguration method.I want some custom constants to be added to the file name. I want to know if file renaming is possible by writing an Adapter module ..
ThanksRahul~
Writing a module would be too much effort deploying and using..Instead u can use a dummy mapping to target and use a piece of Java code for transformation..
chk my blog will save u effort..XSL may not be required in ur case
/people/sriram.vasudevan3/blog/2005/11/21/effective-xsl-for-multimapping-getting-source-filenames-in-legacy-legacy-scenarios -
Adapter Module for File Adapter using Eclipse
I want to develop Adapter Module using Eclipse, please let me know if it is possible?
-How to use Eclipse to develop adapter module and deploy it on J2ee server.
ThanksHi,
If you have NWDS , then you can directly deploy AM in PI server, if you are using eclipse to write code then genarate EAR file of your code, then you have to deploy in SDM using manual process.
SEARCH IN SDN like how to deplot AM's, you will find many documents.
Regards,
RAJ -
Problem in creating excel J2EE module for file adapter
Hi All,
I have created an J2EE project for Excel File Reading and added all the required libraries , build an ear of it and also referenced libraries in j2ee.engine.xml of ear , deployed the ear in J2ee engine of XI . Now i am trying to use this module in communication sender channel like this
localejbs/ExcelFileAdapter
ExcelFileAdapter(JNDI Name)
I am using this module name before callsapadapter but nothing is happening , my excel file not getting picked up from the desired location. Can someone tell me where i did things wrong.
Thanx in Advance,
TraxThats part of my bean class code:
public ModuleData process(
ModuleContext mc,
ModuleData imd)
throws ModuleException {
Object obj = null;
Message msg = null;
String msgType = null;
String nameSpace = null;
try {
obj = imd.getPrincipalData();
msg = (Message) obj;
msgType = (String) mc.getContextData("msgType");
nameSpace = (String) mc.getContextData("nameSpace");
if (msg.getMessageDirection()== MessageDirection.INBOUND)
amk = new AuditMessageKey(msg.getMessageId(),AuditDirection.INBOUND);
else
amk = new AuditMessageKey(msg.getMessageId(),AuditDirection.OUTBOUND);
XMLPayload xp = msg.getDocument();
Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"AO: Now got the xml payload object.");
I think their is a some problem before 1st audit message is logged. -
hi all.
if i want get a boolean value that explain if there is a file in a server directory, can i use a particular function?This function module can be used for both servers.
parameters: p_file(128) .
at selection-screen on p_file.
perform check_file_exist using p_file sy-subrc.
if sy-subrc ne 0.
message e000 with 'File does not exist or Path+Filename > 128 chars'.
endif.
*& Form CHECK_FILE_EXIST
* text
* -->P_SY_SUBRC text
form check_file_exist using p_file p_subrc.
data: l_exist(1).
call function 'DX_FILE_EXISTENCE_CHECK'
exporting
filename = p_file
pc = 'X' "if space then check is made in application server else in presentation server
importing
file_exists = l_exist.
if l_exist ne 'X'.
p_subrc = 8.
endif.
endform. " CHECK_FILE_EXIST -
RFC enabled function module for file browse
Suggest a Function Module which is RFC enabled one.
to perform directory browse and file browse
Thankshi,
check these fm.
SRM_RFC_CALL_BROWSER
/BDL/_GET_RFC_DESTINATIONS
SCMS_RFC_FILE_GET
SA_KW_RFC_FILENAME_EXT_GET
SA_KW_RFC_PHIOS_FILE_PROPS_GET -
Developing a module for the sender file/FTP adapter
Hi,
Can anyone tell me the procedure for developing and deploying a custom java moudule in File adapter.
Thanks in Advance
ChemmanzHi,
I had devloped my own modules for one of my interface and may tell you to kick start you need to get the jars needed and they are:
aii_af_cci.jar,aii_af_mp.jar,aii_af_ms_api.jar,aii_af_ms_spi.jar,aii_af_trace.jar,aii_af_svc.jar,aii_af_cpa.jar
You can use ftp to access your XI server and copy locally the jars.Then follow the guide step to step.
I would request you to refer MY thread when i was trying to create my module and was struck with jars.
Libraries For Module Devlopement
All the best!!
Anirban. -
Changing source file for file sender adapter in adapter module
Hi guys!
3rd party partner send us files, which are not acceptable by file adapter, so we need to implement (I suppose) adapter module in file sender adapter to correct the file format before it is taken by standard adapter. I have no experience in this development field. Could you give me:
1, whether it is possible (changing file contents before it is taken by standard file sender adapter)
2. any ideas, where to start with the development (pdf with info etc.)
Thanx a lot!
Olian<i>2. any ideas, where to start with the development (pdf with info etc.)</i>
>>>>>
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/02706f11-0d01-0010-e5ae-ac25e74c4c81
<i>1, whether it is possible (changing file contents before it is taken by standard file sender adapter)</i>
>>
yes you can achieve this in the logic in a module -
Regd. Error in Adapter module for IDOCxml to flat file conversion
Hi Champs!
I am using PI 7.1 and i am trying out the blog for direct conversion of IDOC xml to flat file and vice versa.
/people/william.li/blog/2009/04/01/how-to-use-user-module-for-conversion-of-idoc-messages-between-flat-and-xml-formats
has anyone tried this in Pi7.1
i am getting the following error:
Message processing failed.
Cause: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException:
Path to object does not exist at SAP_XI_IDOC, the whole lookup
name is localejbs/SAP_XI_IDOC/IDOCFlatToXmlConvertor.
I have done all the setting required .. as per the blog.Is it srictly for PI7.11?
Regards,
AbhiHi Abhi,
This feature is a part of PI 7.11 new features , as it is mentioned in the begining of the Blog itself.
So i feel , yes its strictly PI7.11 feature which may not be available in PI7.1 version which you are using currently.
There may be workarounds...lets c fellow SDNer's replys:)...
Regards,
Srinivas -
Need Help in Creating adapter module for SFTP Sender in NWDS
Hi experts,
I have a scenario where i should write an adapter module for SFTP sender in NWDS.. need your help in achieving this..Hello,
>>i have followed the procedure of FTP but, adapter is not picking the file
Make sure u have written proper expression to pick file.
>>do we have any different adapter parameters for SFTP... the input file is .csv..
I don't think there are any specific parameters needed for SFTP (but in case u are reading file name in AM then u might have to adjust SFTP namespace)
Thanks
Amit Srivastava -
Adapter module:: JAR file in the build path of EJB project
Hi Experts,
I have created one adapter module, for this I have created one EJB project and also associated one EAR project to that.
I have completed my coding and changes in the xml files.
I have followed this -
http://www.sdn.sap.com/irj/scn/index;jsessionid=(J2EE3417500)ID1494558950DB01504425675464955468End?rid=/library/uuid/c0b39e65-981e-2b10-1c9c-fc3f8e6747fa&overridelayout=true
while creating the module.
but after finishing this , I can not see the ejb.jar file corresponding to the ejb project, I can see the class file generated in the build path.
but I can not see the ejb.jar in the EJB project after build.
When I checked the EAR project I found under Deployment descriptor there is a folder called module and there is a jar file named as -
EJB<my ejb project name>.jar
when I am about to deploy this EAR in the server it is showing me to choose the file from EAR project and this EAR project contain the EJB Project .
Request you to please let me know is everything ok with my project ? or please let me know how can I see the ejb.jar file corresponding to the ejb project below the build path.
Thanks
VinnyHi Experts,
I have created one adapter module, for this I have created one EJB project and also associated one EAR project to that.
I have completed my coding and changes in the xml files.
I have followed this -
http://www.sdn.sap.com/irj/scn/index;jsessionid=(J2EE3417500)ID1494558950DB01504425675464955468End?rid=/library/uuid/c0b39e65-981e-2b10-1c9c-fc3f8e6747fa&overridelayout=true
while creating the module.
but after finishing this , I can not see the ejb.jar file corresponding to the ejb project, I can see the class file generated in the build path.
but I can not see the ejb.jar in the EJB project after build.
When I checked the EAR project I found under Deployment descriptor there is a folder called module and there is a jar file named as -
EJB<my ejb project name>.jar
when I am about to deploy this EAR in the server it is showing me to choose the file from EAR project and this EAR project contain the EJB Project .
Request you to please let me know is everything ok with my project ? or please let me know how can I see the ejb.jar file corresponding to the ejb project below the build path.
Thanks
Vinny -
Adapter Module for receiver IDOC adapter?
Hi,
I have a scenario where i need to do some custom logging in the receiver adapters. For all receiver file adapters, i have written an adapter module which fulfills this custom requirement but how will i do this in the receiver IDOC adapter as its on the ABAP stack? I cannot write a java adapter module for this.
Is there anyway by which i can write a ABAP adapter mosule and deploy it in the IDOC adapter? Or any other way to achive it. the scenario is such that i need to do the logging before the idoc is posted into R/3 system by the idoc adapter.
Please advice.
Regards,
YashHi Chirag,
Yes i have seen that the module tab is disabled for idoc adapter. I have a fin interface where i need to split a incoming file into an idoc and a file. For this purpose i need to log how many records are received by each adapter and the sum of the line items for audit perspose.
any othr way to do it apart from doing it in message mapping. The req is to do in the adapter engine. -
MalformedInputException Error in Adapter module for SFTP channel
Dear All,
I am using MessageTransformBean in adapter module for Plain to XML conversion. The channel works fine in all the cases but when I recieve " ì " or few more special characters in the file my channel does not pick file and show below error.
Error: com.aedaptive.adapter.sftp.SFTPException : Aborting processing: com.sap.aii.af.mp.module.ModuleException: Transform: failed to execute the transformation: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
I am using below parameter value in adapter module.
Transform.Class : com.sap.aii.messaging.adapter.Conversion
Transform.ContentType : text/xml;charset=ISO-8859-1
Please help me if any of you have faces such error in your developments.
AvanishHi Grzegorg,
I have tried using UTF-8 encoding in my channel but this doesn't work. Communication cahnnel is still giving same problem.
Error: com.aedaptive.adapter.sftp.SFTPException : Aborting processing: com.sap.aii.af.mp.module.ModuleException: Transform: failed to execute the transformation: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
The file which we are trying to process have character Ì and as far as my serach is concerned i think this belongs to charset ISO-8859-1.
Any more suggestion Guys to solve this problem.
Thanks and Regards
Avanish -
Using Request Response Bean Module in FILE Adapter
Hi Experts,
Can we use Request Response Bean Module in FILE Adapter in reverse way. That is can we configure thses adapter modules in Reciever file channel and call a sender file channel in it?
My case is RFC to File synchronous case? How do we do this?
Thanks & Regards,
priyankaCan we use Request Response Bean Module in FILE Adapter in reverse way. That is can we configure thses adapter
modules in Reciever file channel and call a sender file channel in it?
My case is RFC to File synchronous case? How do we do this?
The above is not possible....Bean works only for Sender channel and not for Receiver.....requirement not possible using even a BPM as FILE does not support SYNC communication in receiver end......max you can do is split the scenario into SYNC-ASYNC bridge.
Regards,
Abhishek.
Maybe you are looking for
-
IPod touch 3rd Gen won't finish app updates or movie download.
App updates would get stuck and stop downloading, so after trying different things I have restored to factory 5.01 without restoring any apps or data. That didn't work. App downloads hang, App updates hang. Movie downloads then after processing and s
-
File not being picked by adapter
My Source file name is xml_a1_en.xml the test files are of name xml_a1_02_en_2010.xml , xml_a1_03_en_2010.xml the files are not being picked up by adapter..Is the naming convention wrong for the test files or any reason?
-
-
Hi, I would like to know how to render a JSF page with WML rendering. is it possible to produce such thing with Creator ? Is it necessary to use a specific tld ? Best regards R�gis
-
Hi Experts, I have an issue to solve. While creating a PO using drag & drop, sometimes users are overlooking the delivery date which lies in the past.I want to control delivery date atleast to current date eventhough users skips changing delivery da