UDF for JDBC lookup in PI 71

I am facing some issue while importing the SQL meta-data from db2 in PI 7.1 , guess the db2 version is old and not compatible with 7.1 or could be problem with drivers, I want to go head with writing UDF for the jdbc lookup, can you please let me know  the code and how it can be written or blogs, thanks

>>> can you please let me know the code and how it can be written or blogs, thanks
You can try this link if you dont want to use graphical jdbc lookup... Follow this link , it has code to use ...
/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
Also refer these links
For 7.0 -  http://scn.sap.com/people/william.li/blog/2007/03/30/using-jdbc-connection-pool-in-xi-message-mapping
For 7.1 http://scn.sap.com/people/jin.shin/blog/2008/02/15/sap-pi-71-mapping-enhancements-series-graphical-support-for-jdbc-and-rfc-lookups

Similar Messages

  • Issue with Jar files in UDF for RFC LookUp

    Hi,
    I am writing a UDF for RFC LookUp.
    In the import statement of UDF, I used the JAR File : com.sap.aii.mapping.lookup.*;
    The code inside the UDF uses LookupService.getChannel.
    When I test the UDF, It shows an error ( ^ ) at LookupService.getChannel.
    Could you please help me in understanding why Am I getting this error at all?
    Thanks In Advance.
    Rohan

    Hi,
    I have used 'com.sap.aii.mapping.lookup.LookupService', and I got the following message error:
    G:/usr/sap/XD1/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map1c5a7dc23dcf11dda79f001e4f342f87/source/com/sap/xi/tf/_MM_MT_PlannedOrder_to_ZLOIPLO_.java:3: package aii_map_api does not exist import com.sap.aii.mappingtool.tf3.;import com.sap.aii.mappingtool.tf3.rt.;import java.util.;import java.io.; import java.lang.reflect.;import aii_map_api.jar;import com.sap.aii.mapping.lookup.LookupService;*
    ^
    Also in the above message there are 3 packages that I have not used at all and still I see them in the message.
    Any reason?
    Rohan.

  • Authorizations required in Communication Channel for JDBC Lookup mapping

    Is there of list of required authorizations and or patch needed to use a JDBC Lookup in a message mapping?  We are using PI 7.1, and trying to use the new JDBC Lookup feature.  We currently have a user that is not an ower of the DB tables, this does work in our current solution of using UDFs, but we would like to avoid switching it to a user that has full access on the tables, e.g. SAPXI*
    Current environment: PI 7.1 (not EhP1)
    Thanks,
    Matt

    Do you know what those authorizations should be when using a standard JDBC Lookup mapping function?  Currently we have a custom UDF that calls the table via a <schema>.<table name> and the current user in the Receiver Comm Channel works just fine.  It appears that when using the standard SAP JDBC Lookup function it calls the table directly and the user in the Comm Channel no longer has the correct permissions.
    I would expact that the JDBC Lookup function would allow for a standard "Read" on any table as long as the user has that level of access...but not in this case.  I am going to bring it up to our SAP XI software development team and see what they say, but wanted to get some views from our other experts as well.
    Thanks,
    Matt

  • NullPointerException using @Resource for JDBC lookup

    I had the following working and am trying to convert to using @Resource and have been unsuccessful:
    First I had the following working, inside a jar within an ear deployed to glassfish v3 and no sun-ejb-jar.xml file:
    public CM
    public CM() {
    InitialContext ctx = new InitialContext();
    DataSource ds = (DataSource)ctx.lookup("jdbc/xDataSource");
    Connection conn = ds.getConnection();
    When I switched to the following I get a NullPointerException when I deploy, indicating that the resource could not be found
    @Stateful
    public CM
    @Resource(name="jdbc/xDataSource", mappedName="jdbc/xDataSource")
    private DataSource ds;
    public CM() {
    Connection conn = ds.getConnection();
    and added sun-ejb-jar.xml file to META-INF directory
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD GlassFish Application Server 3.0 EJB 3.1//EN"
    "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_1-0.dtd">
    <sun-ejb-jar>
    <enterprise-beans>
    <ejb>
    <ejb-name>CM</ejb-name>
    <resource-ref>
    <res-ref-name>jdbc/xDataSource</res-ref-name>
    <jndi-name>jdbc/xDataSource</jndi-name>
    </resource-ref>
    </ejb>
    </enterprise-beans>
    </sun-ejb-jar>
    P.S. Sorry about not using code tags I'm not sure which tag to use to properly format it.

    Do you know what those authorizations should be when using a standard JDBC Lookup mapping function?  Currently we have a custom UDF that calls the table via a <schema>.<table name> and the current user in the Receiver Comm Channel works just fine.  It appears that when using the standard SAP JDBC Lookup function it calls the table directly and the user in the Comm Channel no longer has the correct permissions.
    I would expact that the JDBC Lookup function would allow for a standard "Read" on any table as long as the user has that level of access...but not in this case.  I am going to bring it up to our SAP XI software development team and see what they say, but wanted to get some views from our other experts as well.
    Thanks,
    Matt

  • Error in User defined function for jdbc lookup

    I am getting th error as follows "Method TestJDBCAPI$ with 2 arguments not found in class com.sap.xi.tf._JLU_MM_" when i a m testing in message mapping

    //write your code here
    String Query = " ";
    Channel channel = null;
    DataBaseAccessor accessor = null;
    DataBaseResult resultSet = null;
    //Build the Query String
    Query = "Select role from login where username = " + username[0] + " and password = " + password[0] ;
    try{
    //Determine a channel as created in the configuration
    channel = LookupService.getChannel("JLU_BUSS","JLU_chan");
    //  Get a system accessor for a channel.As the call is being made to the database an database accessor is obtained.
    accessor = LookupService.getDataBaseAccessor(channel);
    // Execute the Query and get the values in the resultSet.
    resultSet = accessor.execute(Query);
    for(Iterator rows = resultSet.getRows();rows.hasNext();)
    Map rowMap = (Map)rows.next();
    result.addValue((String)rowMap.get("role"));
    catch(Exception ex){
    result.addValue(ex.getMessage());
    Above is my udf.My logic is that for the given username and password it should select the corresponding role from the database.

  • Error while testing in message mapping for JDBC lookup

    The error is as follows.
    Exception during processing the payload.Problem when calling an adapter by using communication channel JLU_chan (Party: , Service: JLU_BUSS, Object ID: 0519f96e59c534829ebdcdea837dacb7) XI AF API call failed. Module exception: (No information available). Cause Exception: 'Error processing request in sax parser: Error when executing statement for table/stored proc. 'table' (structure 'statement'): java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Missing ), ], or Item in query expression 'username  = [Ljava.lang.String;@d7f610 and password = [Ljava.lang.String;@5b96eb'.'.
    com.sap.aii.mapping.lookup.LookupException: Problem when calling an adapter by using communication channel JLU_chan (Party: , Service: JLU_BUSS, Object ID: 0519f96e59c534829ebdcdea837dacb7) XI AF API call failed. Module exception: (No information available). Cause Exception: 'Error processing request in sax parser: Error when executing statement for table/stored proc. 'table' (structure 'statement'): java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Missing ), ], or Item in query expression 'username  = [Ljava.lang.String;@d7f610 and password = [Ljava.lang.String;@5b96eb'.'.
         at com.sap.aii.ibrun.server.lookup.AdapterProxyLocal.execute(AdapterProxyLocal.java:131)
         at com.sap.aii.ibrun.server.lookup.SystemAccessorInternal.execute(SystemAccessorInternal.java:68)
         at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:149)
         at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:77)
         at com.sap.aii.utilxi.hmis.server.HmisServiceImpl.invokeMethod(HmisServiceImpl.java:169)
         at com.sap.aii.utilxi.hmis.server.HmisServer.process(HmisServer.java:178)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:296)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:211)
         at com.sap.aii.utilxi.hmis.web.workers.HmisInternalClient.doWork(HmisInternalClient.java:70)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doWork(HmisServletImpl.java:496)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doPost(HmisServletImpl.java:634)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Root Cause:
    com.sap.aii.af.service.api.AFException: XI AF API call failed. Module exception: (No information available). Cause Exception: 'Error processing request in sax parser: Error when executing statement for table/stored proc. 'table' (structure 'statement'): java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Missing ), ], or Item in query expression 'username  = [Ljava.lang.String;@d7f610 and password = [Ljava.lang.String;@5b96eb'.'.
         at com.sap.aii.af.service.api.AdapterAccess.sendMsg(AdapterAccess.java:214)
         at com.sap.aii.af.service.api.AdapterAccess.execute(AdapterAccess.java:283)
         at com.sap.aii.ibrun.server.lookup.AdapterProxyLocal.execute(AdapterProxyLocal.java:123)
         at com.sap.aii.ibrun.server.lookup.SystemAccessorInternal.execute(SystemAccessorInternal.java:68)
         at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:149)
         at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:77)
         at com.sap.aii.utilxi.hmis.server.HmisServiceImpl.invokeMethod(HmisServiceImpl.java:169)
         at com.sap.aii.utilxi.hmis.server.HmisServer.process(HmisServer.java:178)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:296)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:211)
         at com.sap.aii.utilxi.hmis.web.workers.HmisInternalClient.doWork(HmisInternalClient.java:70)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doWork(HmisServletImpl.java:496)
         at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doPost(HmisServletImpl.java:634)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

    I'll give you the query.Can you please check my code.Code is as follows.
    //write your code here
    String Query = " ";
    Channel channel = null;
    DataBaseAccessor accessor = null;
    DataBaseResult resultSet = null;
    //Build the Query String
    Query = "Select role from login where username  = " + username + " and password = " + password + "" ;
    try{
    //Determine a channel as created in the configuration
    channel = LookupService.getChannel("JLU_BUSS","JLU_chan");
    //  Get a system accessor for a channel.As the call is being made to the database an database accessor is obtained.
    accessor = LookupService.getDataBaseAccessor(channel);
    // Execute the Query and get the values in the resultSet.
    resultSet = accessor.execute(Query);
    for(Iterator rows = resultSet.getRows();rows.hasNext();)
    Map rowMap = (Map)rows.next();
    result.addValue((String)rowMap.get("role"));
    catch(Exception ex){
    result.addValue(ex.getMessage());
    finally{
    try{
    if (accessor!=null) accessor.close();
    catch(Exception e){
    result.addValue(e.getMessage());

  • JDBC Lookup problem

    we are facing this problem...
    from SAP we send the idoc: WP_PLU03 to PI through transaction WPMA.
    PI do the data format in: XML Document Format for the Mode XMB2DB_XML (http://help.sap.com/saphelp_sem40bw/helpdata/en/4d/8c103e05df2e4b95cbcc68fed61705/frameset.htm)
    but before to do this format, a couple of RFC Lookups and JDBC lookups are executed.
    the important here are the JDBC lookups.
    when SAP sends a lot of Articles, the WP_PLU03 generates many segments, so only one LUW is not enough,then SAP automatically separates in 2 or more LUWs as needed.
    the first LUW is processed correctly, so, the JDBC adapter does good all the LOOKUPS, and the XMB2DB_XML is well formed and sent to the JDBC adapter for his process.
    but, the error is in the second LUW process , when the JDBC adapter begins to do the LOOKUPS, it STOPS, without error, or any alert...
    any idea?

    >
    Christophe PFERTZEL wrote:
    > Hi Guillermo,
    >
    > 1 LUW = 1 IDOC = 1 msg ? Do you use the same JDBC adapter for lookups AND msg sending ? Are those lookups performed using your own UDF/class or are you using PI feature ?
    >
    > Have you also check for error msgs in XI/PI logs and traces ?
    >
    > Rgds
    > Chris
    hi,
    1 LUW = A LOT of iDoc = MANY MSG.
    I've tried both, first, only one JDBC adapter for the lookup and process the message...
    result = the same problem, JDBC stops with the green circle in the RWB.
    second try, 2 jdbc adapters, one for the lookup and the other for the message process,
    result = the lookup jdbc adapter face the same problem.
    I'm using an UDF for the lookup.
    > Have you also check for error msgs in XI/PI logs and traces ?
    that's the problem, PI doesn't shows error.
    THANKS!

  • Calling webservice in udf for inserting data into webservice

    Dear Experts,
          Please give me the drawbacks of using lookup function for inserting data. we are calling a webservice from the udf for inserting the data using a webservice.
    It is a file to jdbc usnig a soap lookup . we use this approach because we need to pass the response from webservice along with the error data to the jdbc.   is there any other way to do it without using bpm ?
        In the udf we are creating the xml structure for webservice and passing the parameters through arguments.
    is there a better approach for this ?
    Thanks,
    Aju

    Hi Aju,
    You can do it without BPM.
    Write UDF for Soap Lookup. Parse the response message from Webservice.  and map the required values to respective fields.
    See the weblog
    Webservice Calls From a User Defined Function.
    Negative point of this solution is that it will take some time to call Webservice and get response back from it.
    Kulwinder

  • Is it possible for the JDBC Lookup in PI 7.1 to read other user's table?

    Hi,
    I have the requirement of using the standard JDBC Lookup in PI 7.1. The user setup in the receiver JDBC adapter is only a service user that has a read access on some tables that are owned by another user or schema. When I am trying to do the import of Table's metadata, I can only see tables that are owned by the user setup in the receiver JDBC adapter.
    Is there any any ways on how the user used in the receiver JDBC adapter can read another user's table (given that it has read access) during the import of Table's metadata?
    Thank you in advacne for any response.
    -Niro

    Hi Matt,
    I am struck in a similar kind of problem.
    I have to do lookup from a view(not a table) available in a particular schema.
    When i am using the external definition --> category dbtab
    I am able to see all the tables available in the schema.Whereas i not able to see any views.
    Please let me know how to proceed in such scenario?
    Thanks,
    Sudhansu

  • Query to Lookup Ship To in a UDF for the Inventory Transfer

    Good Day Experts!
    I created a UDF for the Ship To Code in the Inventory Transfer Window.  The problem is I do not know how to create a query to be used in the Formatted Search for this UDF wherein it will lookup all the Ship To Codes in the table CRD1 of that particular  Customer selected in the Inventory Transfer window.  The objective is to choose a Ship to code just like in the sales document.
    My next problem would be how to display automatically the whole Ship To Address in another UDF based on the Ship To Code chosen in the UDF Ship To Code.
    Your inputs would be highly appreciated.
    Regards,
    Jen

    To get the Complete ShipTO Address, use the following Code
    SELECT T0.cardname+CHAR(13)+isnull(T0.Address,'')+CHAR(13)+
    cast(T0.Building as varchar(100))+CHAR(13)+isnull(T0.city,'')+CHAR(13)
    +isnull(T0.zipcode,'') as Address FROM CRD1 T0
    WHERE T0.CardCode =$[OWTR.CardCode] and  T0.cardtype='S' and
    T0.Address=$[OWTR.UDF1]
    Here Replace UDF1 with the Name of the UDF in which Shipto Address Names are shown as per my previous post.
    Hope you understand

  • Graphical message mapping examples for JDBC and RFC lookup

    hi, can any body provide me graphical message mapping examples for the "JDBC Lookup" function and "RFC Lookup" function?
    I'm now studying the graphical message mapping and want to try those 2 functions. thank you.
    I expect the examples to be simple enoung, not need to set up much.

    >
    Madhu_1980 wrote:
    > can u check this link:
    >
    > PI 7.0 & 7.1 Mapping - Blogs,Articles,Wiki,Code Samples and Videos Collections https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=79955426  
    >
    > it contains a link : SAP PI 7.1 Mapping Enhancements Series: Graphical Support for JDBC and RFC Lookups /people/jin.shin/blog/2008/02/15/sap-pi-71-mapping-enhancements-series-graphical-support-for-jdbc-and-rfc-lookups
    May be I'm too foolish to follow those links, I got issues of each links.
    What I really want is an example from step0
    Swarup:
    Refer the Lookup document - Easy Lookup in Process Integration 7.1
    https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/20befc9a-aa72-2b10-ae9b-b0988791d457
    The first step is "Create an RFC Enabled Function Module for look up", but where can I create the function module? Should I use ESB, IB? or use transaction 'SE11' ?
    Kulkarni:
    Very good links for RFC lookup with 7.0/3.0
    https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/70d90a91-3cf4-2a10-d189-bfd37d9c3231&overridelayout=true
    At page6 "PI Development/Configuration", it saies "You are on the design maintenance screen in the Integration Builder.Expand the subnodes for the software component version for which you want to import interfaces".
    What is "design maintenance screen" ? My IB version is: Service Pack:08 Release:NW07_08_REL.
    When I open IB, it display a screen titled with "Configuration: Intergation Builder", I did not find "software component version" node on the left tree.
    Madhu_1980 :
    it contains a link : SAP PI 7.1 Mapping Enhancements Series: Graphical Support for JDBC and RFC Lookups /people/jin.shin/blog/2008/02/15/sap-pi-71-mapping-enhancements-series-graphical-support-for-jdbc-and-rfc-lookups
    The Prerequisites state:
    The JDBC channel to be used for the lookup must be configured and activated in the Integration Directory.
    The definition of the table used for the lookup must already be imported into the ES Repository as an external definition
    But I don't know how to create a JDBC channel and define the table.

  • How to use a global variable for reading a query resultset in JDBC lookup?

    Hi Friends,
    Using JDBC lookup, I am trying to read from a table Emp1 using a user defined function. In PI 7.0, this function returns values of a single column only even if you fire a " Select * " query. I am planning to use a global variable(array) that stores individual column values of the records returned by a "select *" query. Need pointers on as to how a global variable can be declared and used to acheive the above scenario. Kindly explain with an example. Any help would be appreciated.
    Thanks,
    Amit.

    Hi Amit,
    Sounds like a good idea but then you would need an external db and update the table in a thread safe way !.
    Regarding your question as to how to work with global variable please refer https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/1352. [original link is broken] [original link is broken] [original link is broken]
    Rgds
    joel

  • How to avoid hardcoding in RFC Lookup and JDBC Lookup during transport...

    Hi All,
      We have RFC and JDBC Lookups in some of our scenarios(JDBC to RFC synch)....Now problem is during transport of design objects, we have to change the business system and channel name manually in UDF in target environment....as it wont change although we define the target group in SLD.....we want to avoid this hardcoding.....one idea is we can use a business service inspite of business system and assign the comm channel to it.....this business service will be generic for all environment(dev,qua and prod)...and hence we dnt hav to hardcode....pls let me knw how to achieve or its possible or not....
    waiting for ur inputs....
    Regds,
    Pinangshuk.

    Hi,
    For RFC lookup you might be doing hardcoding for Business system and RFC channel name.
    Options are
    1) Create value mapping for Business system. So you can maintain it in Directory part.
    2) Keep the RFC channel name same for all system (Development, Quality, Production)
        The details of channel can be changed in the Directory part of the respective system

  • JDBC lookup returing only single row

    Hi All,
       I am doing a jdbc lookup using graphical function in message mapping.  I am able to connect the database and retrive result, but only one row.
      I am expecting mulitple rows as ouput in lookup. if i am excuting the same query directly in database i am getting multiple rows as output.
      I am coonecting to a sql 2005 database .
    Please advice how to get multiple rows in output.
    is ther any additional configuration , i have to do for getting multiple rows
    Regards
    Pradeep P N

    Hi,
    You need to use some global variables and store your output..if want to use multiple rows data..
    as the return is type string you can return only row from the UDF...
    I have used global varaibles to store the data and retrieved from the same where ever needed..
    HTH
    Rajesh

  • Mapping JDBC lookup: Passing values to multiple fields at target

    Hi all
    i my scenario  i am using mapping JDBC lookup ,and it is working sucessfully.
    but i need to select 4 fields from lookups select query and passing it to 3 different target field at target MT.
    if i use Global container object methods,than only 1 field i can store inglobal container variable..
    and return it 1 the target fields...
    BUT how do i pass 4 fields ,result of the select query to 4 different fields at target MT..
    query :"
    Select BPNO,emp,BENR,bacepack from Ztable where BPNO='"+BPNO[0]+"'";
    Regards
    AjayP

    Hi,
    I have to fetch 3 values and populate it to the 3 fields in the target. The UDF am using is as attached. This UDF is for fetching one value. Kindly tell me about the changes I will have to make to fetch 3 values instead of 1 value.
    String Query = " ";
    Channel channel = null;
    DataBaseAccessor accessor = null;               
    DataBaseResult resultSet = null;                
    // Query to retrieve the PROP value for the particular source value passed.
    Query ="Select PROP from TANKS where ID='" + ID[0] + "' ";
    try{
    //Determine a channel, as created in the Configuration
    channel = LookupService.getChannel("<Business Service>","<Communication Channel>");
    //Get a system accessor for the channel. As the call is being made to an DB, an DatabaseAccessor is obtained.
    accessor = LookupService.getDataBaseAccessor(channel);
    //Execute Query and get the values in resultset
    resultSet = accessor.execute(Query);
    for(Iterator rows = resultSet.getRows();rows.hasNext();){
    Map rowMap = (Map)rows.next();                      
    result.addValue((String)rowMap.get("PROP"));       
    catch(Exception ex){
    result.addValue(ex.getMessage());
    finally{
    try{
    if (accessor!=null) accessor.close();
    catch(Exception e){
    result.addValue(e.getMessage());

Maybe you are looking for