User defined modules in File Adapters
Hi SapAll.
i just want to know how and in what situations we will use user defined modules in the file communication channels under Module Tab.
can any body explain me briefly with a real time scenarios.
regards.
Varma.
hi,
user defined modules or custom adapter modules can be used to do few thing which can't be done by standard SAP modules, typical example in file adapter would be:
Reading/ Writing excel file through file adapter
https://wiki.sdn.sap.com/wiki/display/stage/AdapterModuleToReadExcelFilewithMultipleRowsandMultiple+Columns
Generating PDF file through file adapter
/people/shabarish.vijayakumar/blog/2009/05/17/trouble-writing-out-a-pdf-in-xipi
Adapter Module to stop processing of duplicate file (FTP Location)
/people/sandeep.jaiswal/blog/2008/05/13/adapter-module-to-stop-processing-of-duplicate-file-ftp-location
Doing PGP Encryption for the payload in receiver payload.
/people/dijesh.tanna/blog/2008/09/15/sap-pi-integrating-macafee-e-business-server-with-sap-pi-70-for-pgp-encryptiondecryption
Check this forum:
Uses of custom adapter module
Thanks,
Mayank
Similar Messages
-
The sequence of system modules & user-defined modules
Hi Experts,
can u help me clear about the execution sequence about system modules , user-defined modules & the adapter of XI/PI ??
I presume the sequence is first adapter ,second own modules, finally system modules at the sender end.
and the sequence at the receiver end is first own modules , second system modules ,third adapter.
im right?
by the way, how about the sequence when the scenario is be setted to synchronization, specially the sequence of the
response.
thx in advance.
Brian.http://help.sap.com/saphelp_nw2004s/helpdata/en/a4/f13341771b4c0de10000000a1550b0/frameset.htm
1. for async sender/receiver adapters, you use modules before the standard adapter module.
2. for sync sender/receiver adapters, you can wither use modules before the standard adapter module (they will affect the request message) or after the adapter module (affecting the response message). -
Hi folks;
I had a query that can we access a file placed on netweaver server(copy the content or delete a particular file) using a User defined Module,added to file adapterhi
To explain you more clearly our scenario
We have a sender folder in which we have xyz.xml(Source file) and xyz.PDF (Attachment) .
while configuring the file adapter we are archiving both these files to a folder
With the help of user modules we need a abc.xml file to be picked from some other folder and placed to our sender folder
For this functionality to be added to our file adapter we have to write a code
my e mail add is [email protected] -
User Defined Module Processing
Could some one send me the User Defined Module Processing Step By Step guide to
[email protected]
Thanks for your help.Hi,
Are you talking about Adpter Modules ?
If so , here is a guide from service.sap.com-
https://websmp202.sap-ag.de/~form/sapnet?_SHORTKEY=01200252310000071155&_SCENARIO=01100035870000000202
Regards,
Moorthy -
[SOLVED] Loading user-defined modules [FAIL]
Since the linux upgrade that rolled out on Nov 9, I have encountered an error during boot that says loading user-defined modules [FAIL]. I read a post mentioning the problem being related to the /boot dir being on a separate partition (https://bbs.archlinux.org/viewtopic.php?id=129970). Mine is not on a separate partition, so no booting to a live disk will fix that problem for me. Another post mentions the problem causing loss of USB support (https://bbs.archlinux.org/viewtopic.php?id=130030) which is, as of yet, unresolved. I For all the people upgrading to linux3.1.1 with no problems, do you know what my problem would be?
I have tried upgrading 3 times but each time it kills my wireless support completely. All else seems to be working fine.
Does anyone know what is causing this? or how to fix it or work around it? I updated my mirrorlist and ran pacman -Syyu but this problem is still there 2 weeks later. I've been running pacman -U /var/cache/pacman/pkg/linux-3.0.7* and rebooting after every system update.
Please help.
Thanks.
Last edited by jdoggsc (2011-11-22 19:39:00)skunktrader wrote:If you have any modules from the AUR (broadcom-wl?) you need to rebuild and reinstall the module every time the kernel is updated.
Thanks. I didn't realize I had to get a new driver every time. I've gone through several kernel upgrades so far and haven't had any problems. That fixed it, though. -
How to add/restore user-defined presets (.cst files)?
Having recently fixed my corrupted install of GB2 with a clean install of GB3, I want to restore all my customized twiddles. Restoring all my self-made and 3rd-party loops was as easy as dragging them to the Loop Browser. I'm less sure about how to restore things like my self-made Real Instrument presets and so forth (all those fiddly .cst files).
From my old GB2 install, I archived the whole /Library/Application Support/GarageBand/Instrument Library/ tree, so all my presets and everything are saved in their correct locations under that path. So, for example, I can drill on down to my archived [...]/Instrument Library/Plug-In Settings/Amp Simulation/ and find my old user-defined .cst presets.
When I drag them to the appropriate [...]/Instrument Library/Plug-In Settings/Amp Simulation/ location in the support files tree of my new GB 3 installation, I get a warning that I need authorization. This is presumably a permissions issue, and if I authorize it by typing in my admin password, my old .cst files will be where I want them.
But I have a nagging worry about whether they'll be correctly recognized by GarageBand when I then restart it. Is there some other better/different way to get my old .cst presets recognized in the new installation? Will they not appear because they haven't been indexed or something? I want to be sure of the best way to do this so I don't mess up my shiny new GB3 installation
Cheers,
Carl
iBook G4 Mac OS X (10.4.6)Making the backup archive before futzing around is certainly a good idea And, yes, there is quite a bunch of Instrument Library stuff new for GB3 that wasn't there in my GB2! (I look forward to messing with it
When trying to copy my .cst and .pst files, when I clicked the Authenticate button on the you-ain't-got-permissions dialog box that came up, nothing happened. So I twiddled the permissions for the whole Instrument Library via Get Info, and then moved my stuff. That worked, though of course, Repair Permissions in Disk Utility won't fix them back now because the files aren't on the Start-Up disk. But, hopefully, it shouldn't really matter!
For some reason, it still wouldn't recognize the added .cst and .pst files until I'd trashed the GB .plist/.cs and restarted, but now it seems to be fine. It was a bit slow to respond when I tested things be selecting some of my newly restored presets, but perhaps that's because it was still indexing. I haven't really checked it all through thoroughly to make sure things sound all right, but the signs are good
Cheers,
Carl -
User defined path, assigned file name
I would like enable the user to define the directory where the file created will be saved but keep the naming convention I implemented the same. I set up a small, and yes crude, program to test out the functionality of the code and its just not working out. Any suggestions? I'm, using Lab View 6.1.
LabVIEW 2012 - Windows 7
CLAD
Attachments:
FileSave.vi 55 KBTry replacing the File Dialog function with a Build Pth function.
It looks like you want to append two parts of path together to build a
complete path. The File dialog does not do this, it just lets the user
select a path. You can then use that path to build the complete path
with your filename using the Build Path function.
Ed
Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences. -
Exception related to user defined module in sap xi ????
I developed one userdefined module after configuring that i am getting the below exception, can any body tell where exactly the problem
com.sap.aii.af.ra.ms.api.RecoverableException,
Thanks,
Madhusudhan.Madhusudana,
Well...I would in that case suggest you to put debug statements in your code. For this you would need to carry out certain steps which are :
1. In NWDS , create a new file in the META-INF folder of Enterprise Project. The name of the file should be log-configuration.xml.Paste the following content in this file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log-configuration SYSTEM "log-configuration.dtd">
<log-configuration>
<log-formatters>
<!-- This formatter produces human readable messages. -->
<log-formatter
name="trc"
pattern="%26d %150l [%t] %10s: %m"
type="TraceFormatter"/>
</log-formatters>
<log-destinations>
<!-- Destination for Trace Information of this sample -->
<log-destination
count="5"
effective-severity="DEBUG"
limit="2000000"
name="sample.trc"
pattern="./log/applications/sample/default.trc"
type="FileLog">
<formatter-ref
name="trc"/>
</log-destination>
</log-destinations>
<log-controllers>
<!-- Trace Location sample -->
<log-controller
effective-severity="DEBUG"
name="sample">
<associated-destinations>
<destination-ref
association-type="LOG"
name="sample.trc"/>
</associated-destinations>
</log-controller>
<!-- Logging Category: none, use the default XILog -->
</log-controllers>
</log-configuration>
2. In your process method, add following statement
AuditMessageKey auditMKey =
new AuditMessageKey(message.getMessageId(), AuditDirection.INBOUND);
Audit.addAuditLogEntry(
auditMKey,
AuditLogStatus.SUCCESS,
"CustomModule :: process method started");
This would send the statement "CustomModule :: process method started" to the Audit Log of XI server and you would be in a position to see upto which step your code is executing sucessfully. Audit log can be viewed at
http://<host>:<port>/MessagingSystem/monitor/monitor.jsp. you need to know the message ID for your transaction in this case.
Hope this helps.
Nilesh -
User Defined Function Error - Can't find function
Hi All,
Version: 11.1.1.4
I created a user defined function and added it to one of my BPEL Processes. I can see the function in JDeveloper and can compile the project without issue. We placed the jar file out on the SOA Server following the oracle user defined function examples. After placing the file out on weblogic I was able to successfully deploy the project.
Oracle Deployment Steps:
To deploy user-defined functions to runtime:
1. Copy the user-defined function JAR files to BEA_Home/user_projects/domains/domain_name/lib or a subdirectory of lib. Where domain_name is the name of the Oracle WebLogic Server domain (for example, soainfra).
2. Restart the Oracle WebLogic Server.However, when I try to run the composite application I get the below error. I am not really sure why it can't find the Function? The jar is out on the server and the jar was added to the project?
Error:
Non Recoverable System Fault :
<bpelFault><faultType>0</faultType><subLanguageExecutionFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>XPath expression failed to execute. An error occurs while processing the XPath expression; the expression is pnl:GetManager(string(bpws:getVariableData('inputVariable','payload','/client:process/client:input'))). The XPath expression failed to execute; the reason was: Function 'GetManager' not found.. Check the detailed root cause described in the exception message text and verify that the XPath query is correct. </summary></part><part name="code"><code>XPathExecutionError</code></part></subLanguageExecutionFault></bpelFault>Any suggestions would be greatly appreciated!
Thanks,
S
Edited by: Scarpacci on Apr 1, 2011 6:06 AMtry putting the jar location explicitly in weblogic server's classpath i.e. add BEA_Home/user_projects/domains/domain_name/lib to wls classpath and restart server.
-
Cannot comile user defined classes
Hello i have a problem on compiling user defined classes .
example
file x.java
public class x{
file y.java
import x;
public class y{
I first compile x.java and everything is OK .
Then i compile y.java and the compiler gives the folowing
y.java:2: '.' expected
import y
I have tried to put the classes on a package and added the folowing line yo each file
import /home/bill/test
Then i puted the java files on that dir
and compiled with
javac -classpath /home/bill/test y.java
AGAIN THE SAME
y.java:2: '.' expected
import y
WHAT I DO WRONG PLEASE HELP!!!!!!!!!!!!1. Since J2SDK 1.4, you can not import classes that are in the default (or unnamed) package. You are getting the error because the compiler expects something after y like y.*;
2. You do not need to import classes that are in the same package, and all classes in the default package are in the same package.
In your case, your classes are in the default package so remove the import statement. -
Driving processing with user defined rules
Hi,
I am looking for some examples of user defined rules for file processing.
So I have a file loaded in to the application in a staging table, user will want to define rules to process the data and then an output will be created.
Very vague question I know but has anyone got any examples where they did something similar which might help?
Thanks.Roger,
Here's one that I found that may not look very simple but it actually is if you just break it down piece by piece.
create or replace FUNCTION "SQL_IP_SUBNET" (
p_octet1 in varchar2,
p_octet2 in varchar2,
p_octet3 in varchar2,
p_octet4 in varchar2,
p_slash in varchar2,
p_status in varchar2)
return varchar2
as
l_select varchar2(1000);
l_octet1 varchar2(200);
l_octet2 varchar2(200);
l_octet3 varchar2(200);
l_octet4 varchar2(200);
l_slash varchar2(200);
l_status varchar2(200);
l_cidr varchar2(50);
l_where varchar2(1000);
l_order_by varchar2(100);
l_sql varchar2(32767);
begin
l_select := q'!select id, get_ip_addr(octet1, octet2, octet3, octet4) ip_addr, slash, description, !';
l_select := l_select || q'! octet1, octet2, octet3, octet4 from poc_subnets where 1=1!';
if (p_octet1 is not null) then
l_octet1 := q'! and octet1=!' || p_octet1;
end if;
if (p_octet2 is not null) then
l_octet2 := q'! and octet2=!' || p_octet2;
end if;
if (p_octet3 is not null) then
l_octet3 := q'! and octet3=!' || p_octet3;
end if;
if (p_octet4 is not null) then
l_octet4 := q'! and octet4=!' || p_octet4;
end if;
if (p_slash is not null) then
if substr(p_slash,1,1) != '/' and length(p_slash) = 2 then
l_cidr := '/'||p_slash;
else
l_cidr := p_slash;
end if;
l_slash := q'! and slash='!' || l_cidr || q'!'!';
end if;
if length(l_octet1) > 0 then
l_where := l_octet1;
end if;
if length(l_octet2) > 0 then
l_where := l_where || l_octet2;
end if;
if length(l_octet3) > 0 then
l_where := l_where || l_octet3;
end if;
if length(l_octet4) > 0 then
l_where := l_where || l_octet4;
end if;
if length(l_slash) > 0 then
l_where := l_where || l_slash;
end if;
if length(p_status) > 0 then
case
when p_status = 'YES' then
l_status := q'! and assigned = 'YES'!';
when p_status = 'NO' then
l_status := q'! and assigned = 'NO'!';
else
l_status := null;
end case;
end if;
if length(l_status) > 0 then
l_where := l_where || l_status;
end if;
-- do the order by clause
l_order_by := q'! order by octet1, octet2, octet3, octet4!';
if length(l_where) > 0 then
l_sql := l_select||l_where||l_order_by;
else
l_sql := l_select||l_order_by;
end if;
return l_sql;
end;
Just so you know, this is not necessarily the best way to do what you're asking. It does get the job done however.
If you inspect the code it's basically just a bunch of string concatenation operations based on the presence or absence of each of the input parameters. Pretty much what you were asking about.
Earl -
BUG in DB XML? (when dealing with modules, user-defined functions)
Hi,
this post can be related to Different results for the semantically the same queries but here examples are even simpler.
I have the module with one user-defined function:
module namespace tnt = "http://tntbase.mathweb.org/ns";
declare function tnt:filter-path($docs as document-node()*, $path as xs:string) as document-node()*{
$docs[dbxml:metadata('tnt:path') = $path]
};Then I have a query:
import module namespace tnt = 'http://tntbase.mathweb.org/ns' at 'file:/path/to/module/user-func.xq';
(: this variable is IMPORTANT in the query:)
declare variable $len := 3;
(: here goes the same function as in the module, but with different name :)
declare function tnt:filter-path2($docs as document-node()*, $path as xs:string) as document-node()*{
$docs[dbxml:metadata('tnt:path') = $path]
(:the query itself :)
tnt:filter-path(collection("xml_content.dbxml"), substring("a:/doc.xml", $len)) If I execute the query I get *0* results, if I use function tnt:filter-path2 (instead of module's tnt:filter-path) then I get the expected *1* result.
Also I experimented a bit with a query and got the following observations (independent from each other):
1) If I substitute $len by value *3* or *3.0*, then I get right results in both cases, i.e. if the query itself looks:
tnt:filter-path(collection("xml_content.dbxml"), substring("a:/doc.xml", 3)) 2) If I change the module's function so that it uses value comparison instead of general comparison, then I get the right results in both cases as well:
module namespace tnt = "http://tntbase.mathweb.org/ns";
declare function tnt:filter-path($docs as document-node()*, $path as xs:string) as document-node()*{
$docs[dbxml:metadata('tnt:path') eq $path]
};Please, help me out! I'm pretty sure it's a problem of DB XML and I'm struggling with it for a long time in this or that shape.
Thanks a lot in advance,
VyacheslavI upgraded from 2.5.13 to 2.5.16 and the bug disappeared. The reason why I didn't do it before was that I hadn't seen any relevant for me fixes in the release notes of 2.5.16 comparing to 2.4.13 (Actually I already have had two patches for two relevant issues in the 2.5.13 version)
Sorry for the false alarm.
Vyacheslav -
How to deploy jar file for use within mapping user-defined fcn
Hi all,
I have a java class I'd like to called from a mapping user-defined function.
Here's what I've done (but hasn't worked)
1. Added 'package com.<mycompany>.xi.util.base64 to the source class file and compiled it.
2. Created a sda with a plain provider.xml file, i.e. no references were made to any other library files.
3. Deployed the sda to the xi 3.0 j2ee server successfully using SDM.
4. Under the Visual Admin tool, I see that the library was deployed successfully.
5. In the import text box in the user-defined function (design time), I enter com.<mycompany>.xi.util.base64.*.
A syntax check returns an error indicating the package could not be found.
Can anyone give me pointers as to how I can get this working?
Thanks,
--jtbHey James,
No! That's not the right way!
What you have done is for accessing external JMS & JDBC drivers in their corresponding adapters. For the access inside a mapping user defined function, it's enough if you import the jar files.
Look at this blog and you will be very clear!
/people/divya.vidyanandanprabhu/blog/2005/06/28/converting-xml-to-pdf-using-xi
regards,
Felix -
Error in User defined function for dynamic file naming
Hi,
While creating User Defined function with this following code for dynamic fieldname
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;
which options should i select for cache Value, Context, Queue
for Augument , what name shd i mention.
Regards,
VarunHi Varun,
I guess I have answered a similar question just a few minutes before on very similar post from you. Just pasting the same here .................
Are you trying to access the ASMA values from the SOAP header of the XI message for the source file name?
First of all you need to Set the Sender File Adapter for Set ASMA and then file name. So it will work fine when you actually run the scenario end to end.
But in the mapping tool when you test the mapping - there is not message header updated with the actual source filename - and whenever you try to read the FileName attribute in the message header from the UDF - it cannot find the object and returns a NullPointerException.
I would suuggest for your mapping tool testing to be successful, have a check in the java code for null values,
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);
If (ourSourceFileName != null)
Return ourSourceFileName;
Return "NoFileName.txt";
Let us know if this works.
Regards,
Suddha -
How to apply dll file or user defined function in B1
Dear all,
I have dll file and user defined function which use for converting number amount to text of my language. I plan to create UDF to keep the result of function on A/R invoice and I will use this UDF on print layout desiner but I don't know how to apply my function on B1. Please kindly suggest.
Thanks you in advanced.
AngnamHi Angnam,
Check this link.
Re: amount in words
Thanks,
Srujal Patel
Maybe you are looking for
-
I am looking for a order taking app which works on iPad
Hi, I am in the catering business. I am looking for an iPad app which will help me in maintaining orders received from my customers and generate few reports like orders for a selected date etc., I need to maintain a master list of Food items that I s
-
Moving old iPhoto 6 file from eMac to new iMac with iPhoto 8
I plugged in a portable hard-drive to my old eMac, dragged the iPhoto icon into it and waited as it copied into the portable HD. When I tried up-loading it into my new iMac (with iPhoto 8), nothing would happen. Same for iTunes. Any suggestions? I'm
-
To restore the missing files, use the iWork Installer to reinstall iWork.
To restore the missing files, use the iWork Installer to reinstall iWork. What can i do ?
-
Standard MLC integration: Different costs throughout a period
Hi Experts: Taking into account the following scenario: Task based MLC Cost rate A defined - From 2007.01.01 to 2008.01.01 of 100 /h; - From 2008.01.02 to 2009.01.01 of 110 /h; Task, with a resource assigned from 2007.12.01 to 2008.02
-
Hi all, I am working on opportunity planning module of BPS. I need to install 4CRMSP01 planning area. But I am not able to find this under any of the object type of my BI content. Currently I am on BI 7.0. Does BI 7.0 provides the business content fo