Including native database functions in partnerlink

Is there a way to include native Oracle database functions (such as NVL) in the definition of a partnerlink based on a database adapter?

Hi there,
right now we do not support functions when visually creating the where clause in the dbadapter wizard.
But there is a way to specify raw sql for the select outside the wizard.
Please see the tutorial:
integration/orabpel/samples/tutorials/122.DBAdapter/PureSQLSelect
Thanks
Steve

Similar Messages

  • Error - remote stored procedure includes in a function

    Hi,
    I have a stored procedure, it runs properly
    ecos.GetCustTier@BSCSDEV in PL/SQL
    But after included into function F_GETCUSTTIER, it comes error.
    SQL> select f_getcusttier(585510,'20020808') from dual
    ORA-06571: Function F_GETCUSTTIER does not guarantee not to update database
    [Function F_GETCUSTTIER]
    create or replace FUNCTION f_getcusttier(
    Begin
    ecos.GetCustTier@BSCSDEV(i_customer_id, i_at_date, o_seqno, o_custcode, o_tier_id, o_tier_des, o_join_date, o_join_reason,
    o_renewal_date, o_next_review_date, o_last_review_amt_no, o_exit_date, o_exit_reason,
    o_input_by, o_input_date, o_update_by, o_update_date, o_expiry_date, o_next_job_review_date,
    o_status_id, o_return_code);
    RETURN o_tier_id;
    I also try to create a package for this function
    CREATE OR REPLACE PACKAGE abc AS
    FUNCTION f_getcusttier(i_customer_id number, i_at_date varchar2) RETURN NUMBER;
    PRAGMA RESTRICT_REFERENCES(f_getcusttier, WNDS);
    END abc;
    CREATE OR REPLACE PACKAGE BODY bwan AS
    FUNCTION f_getcusttier(
    i_customer_id in number,
    i_at_date in varchar2
    Begin
    ecos.GetCustTier@BSCSDEV(i_customer_id, i_at_date, o_seqno, o_custcode, o_tier_id, o_tier_des, o_join_date, o_join_reason,
    o_renewal_date, o_next_review_date, o_last_review_amt_no, o_exit_date, o_exit_reason,
    o_input_by, o_input_date, o_update_by, o_update_date, o_expiry_date, o_next_job_review_date,
    o_status_id, o_return_code);
    RETURN o_tier_id;
    But with Warning: Package Body created with compilation errors.
    2/1 PLS-00452: Subprogram 'F_GETCUSTTIER' violates its associated
    pragma
    How can I fixed it? Can function pack with remote stored procedure?
    DB version: 8.0.4.4.0
    I know that this problem is resolved in Release 8.1, is it no solution for release 8.0.4.4.0?

    First of all, please do not post three separate threads for the one problem. It simply clutters up the forum for the rest of us.
    Prior to 8i you need to explicitly guarantee that your function does not write to the database. You do this with the RESTRICT_REFERENCES pragma:
    CREATE PACKAGE yr_package AS  -- package specification
       FUNCTION whatever
             (pn IN NUMBER) RETURN NUMBER;
       PRAGMA RESTRICT_REFERENCES (whatever, WNDS);
    END yr_package;The following link goes to a page of helpful stuff assembeled by some of use regulars:Re: How to attach a java bean in forms6i
    It includes jumps to the Oracle online documentation. You may find the Application Developer's Guide - Fundamentals an instructive read.
    Regards, APC

  • "Include control entries"-Function

    Hello,
    i found a SAP-article about a problem im trying to solve - to add a new field to the coding-block (account assignment).
    The url is: http://help.sap.com/saphelp_40b/helpdata/es/ba/e92c7dd435d1118b3f0060b03ca329/content.htm
    Now they write:
    <i>"Using the function <b>'Include control entries'</b> you can have the system maintain the appropriate system control tables automatically. This makes the new field available in Customizing just like any other. You can delete these control entries as long as there are no Customizing entries related to the field in question.
    Although deleting the control entries suppresses the field in Customizing, it still exists on the database and cannot be deleted using standard functions without leading to a loss of data."</i>
    Sadly i have no idea what that "Include Control Entries"-Function shall be. Can anyone please guide me in and tell me where i can find or call that function.
    Thanks alot and regards,
    oliver

    John,
    If the program has to fire the include / user exit you need to create the project using CMOD and activate the same.
    You should not delete the include rather double click and use the same include. You should save that to the customer package and transport it as you will not have access to save anything to SAP delivered packages.
    Try to create the include again and the message that you are getting should only be a warning, just hit ENTER and you should be able to proceed further.
    Regards,
    Ravi
    Note : Please mark the helpful answers

  • Problems compiling Database functions into installer

    Hello,
    I am trying to build an installer for a test program I had written.  I am having issues with the Database functions, nothing is being written to the database, but stuff is being read back.  After I few tries I got fet up and included everything on the extra installers list, but it still does not correctly add the Connectivity functions (it was funny having a 1.6 GB installer though ).   The VI works fine before building it into an installer.
    What can I do to add SQL write functions into the installer?
    Regards,
    Andrew Lynch
    Written with LV 8.2

     Hello Andrew,
    The following KnowledgeBase article should point you in the right direction if this application is written in LabVIEW 8.2:
    KnowledgeBase: Building an Executable with LabVIEW 8.x and Database Connectivity Toolset
    Cheers! 
    -Bob

  • Include default database JDBC driver in CLASSPATH

    Hello,
    We have SAP web application server 6.40 with Oracle 9i as WAS DB and we need to put content of Oracle JDBC Driver Library (default database of WAS) in CLASSPATH, but we can’t include native JDBC Driver. We would need to use the default database driver or resolve it by another form that we can’t see now.
    How can we set up J2EE server for include in CLASSPATH default database JDBC Driver, in this case Oracle?
    Where is located default database driver in SAP web application server?
    Thanks
    Rubén Álvarez

    Hi Brandelik,
    I have to use a third party library who implements internaly a Database connection via JDBC, in this case Oracle. This library use other classes from Oracle Connection Library but it can't find the DB classes.
    I use the DataSource objects but before I need that this third party library can find DB Objects.
    I have added as java library build path, compose it in a .sda and references library in J2EE projects and some other ones things but anything has work.
    I suposed that my problem could be resolved adding library in the CLASSPATH environment variable but I can't add any library DB class to CLASSPATH because this is used for default database connection and make conflicts during server startup. For this reason, I have been looking for the placement of default database connection and then include it into CLASSPATH variable.
    Is this posible?
    Thanks
    Ruben

  • Error While including the Multisite functionality

    Error While including the Multisite functionality & trying to click on SiteAdministraion tab in BCC
    Background: We have migrated our application from ATG v9.1 to ATG v 10.0.2 and implementing Multisite on the same
    Getting this error on BCC console:
    12:55:36,893 INFO [ServerImpl] JBoss (Microcontainer) [5.0.0.GA (build: SVNTag=JBPAPP_5_0_0_GA date=200910202128)] Started in 2m:44s:727ms
    12:57:24,234 ERROR [SiteAdminActivitySource] The acl for the custom workflow activity named siteadmin.manageSiteAssets is invalid. This activity will not be available.
    atg.security.InvalidPersonaException: Profile$role$siteAdminUser
    at atg.security.AccessControlListParser.setPersona(AccessControlListParser.java:239)
    at atg.security.AccessControlListParser.parseAce(AccessControlListParser.java:277)
    at atg.security.AccessControlListParser.parse(AccessControlListParser.java:193)
    Thanks in Anticipation1

    Hello Sudheer,
    Increasing the Swap space is the only thing i noticed in all SAP Notes for your problem.
    Configure more swapspace please and restart the installation.
    Regards,
    Siddhesh

  • How can I call a Report From database function

    Hi all,
    I want to call a Report from a database function. Could you hel
    me???
    Rgds

    Hello there!
    There is a solution for executing an executable like RWRUN60
    from PL/SQL on http://asktom.oracle.com/pls/ask/f?
    p=4950:8:227101::NO::F4950_P8_DISPLAYID,F4950_P8_B:150612348067,Y
    Or you can invoke the CGI from the Reports-Server through
    UTL_HTTP
    Hope this helps
    Dannys

  • How to find which all workbook is using Database function ( User Defined)

    Hi All,
    Is it possible to find out which all workbook is using Database function( User Defined).
    Thanks,

    Hi,
    If I had to do this detective work, I would probably do the following:
    1. Activate for a period of time the function, eul5_post_save_document. This function when activated is triggered at the time a workbook is saved. If you look at its columns, it save the worksheet's SQL.
    2. Next, I would parse the EUL5_WORKSHEET_SQL.SQL_SEGMENT column which is a varchar2(4000) column. There are many effective Oracle functions which could aid you in this effort (e.g. instring or perhaps a regular expression function).
    I hope this helps.
    Patrick

  • How to include non database item in the query

    Hi
    I have a Master-Detail form. where in the detail block one of the field is text item 'X' attached the list of values(Y). Master block includes non database items which is based in the decoding result of the database items for example:
    Gender(Male, Female)>> non database item
    Gender_id(M,F)>>database item
    the form is created based on the template.fmb form for apps. When I run the form in the query mode, i can query about any database item while including query about others non database item does not affect.
    how to can i modify it so this could be handled??
    I know that one way to avoid this issue is to create a view with all my desired field.
    but there should be away to override the build in query used by oracle apps...
    any one has a link, source, document... etc that help on this??
    any idea how to do it without creating a view??
    thnx alot

    Hi HST,
    You can code the handling in POST-Query of the corresponding block to retrive the corresponding data depending on the Queried data.
    Regards,
    Kiran

  • INCLUDE of a Function Module

    Hi All,
    On the Function Module (SE37) Attributes screen, there is a field name "INCLUDE name" which is related to the FM. Is there any table that we can use to search by FM to get this Include?
    I am developing program to read the source code in the FM, I am planning to use the syntax READ REPORT program INTO it_code. Due to this syntax not able to read the source code in FM directly, but can read through Include. So the table that can get the relationship of FM and include is important.
    Or anybody can suggest a way to read the FM's source code?
    Thanks.

    Hi,
    If you have FUNCTIONGROUP with the name FM_FUNCTION_GROUP and if this function group as 10 function modules then these 10 function modules are stored in includes of names
    LFM_FUNCTION_GROUP_U01,LFM_FUNCTION_GROUP_U02, ... so on till  LFM_FUNCTION_GROUP_U10.
    SO now if you want to read a function module then find out the include of that function module from the function group.
    In the function group there will be an include with the name LFM_FUNCTION_GROUPUXX. This include will have the entries of the includes that are specific to each function module.
    Check the include which ends with UXX in a function group to find out the includes of each function module in that function group.
    Regards,
    Sesh

  • Return value from database function taking a lot more time than the query

    Hi guys,
    I have a Query that does a call to a database function. The function takes in a few parameters and returns a Date. Now, the query within the function takes barely .05 seconds. However, doing a select get_join_dates from dual is taking almost 6 seconds for each call.
    Here is the Query:
    select s.student_id, s.student_name, s.organization_code
    from   student s
    where  s.student_id = :p_student_id
    and    s.student_enrollment_date = get_join_dates( :p_year,
                                                       :p_month,
                                                       :p_student_id,
                                                       s.organization_code );And here is the database function. The select inside this function barely takes 0.05 seconds per call. This function gets called 3 times in my case as there are 3 records in the org_body table for this student.
    create or replace function
    get_join_dates( p_yyyy in org_body.fiscal_yyyy%type,
                           p_month in  org_body.fiscal_mm%type,
                           p_student_id in student.student_id%type,
                           p_organization_code in org_body.organization_code%type) return date as
        t_enrollment_date  date;
        cursor cur_latest_enrollment_date is
          select max(enrollment_date)
          from   org_body
          where  fiscal_yyyy = p_yyyy
          and    fiscal_mm = p_month
          and    student_id = p_student_id
          and    organization_code = p_organization_code;
      BEGIN
        open cur_latest_enrollment_date ;
        fetch cur_latest_enrollment_date into t_enrollment_date;
        close cur_latest_enrollment_date ;
        return t_enrollment_date;
      exception
        when others then
          null;
    end;owever, when I run the following statement below, it takes close to 6 seconds to retrieve a record. In turn, my Query is becoming really slow and taking almost 35 seconds. Imagine that with more records.
    select get_join_dates( 2010, '01', '2167543', 'PSYCH01' ) from dual;If I run my query with this condition below, it takes 0.5 seconds.
    select s.student_id, s.student_name, s.organization_code
    from   student s
    where  s.student_id = :p_student_id
    and      s.student_enrollment_date = '01-JAN-10'Any ideas would be greatly appreciated.

    Any reason why you are doing this with the stored function?
    You could just do this with SQL. Embed the query in the function as a subquery in your initial query from STUDENT.
    select s.student_id, s.student_name, s.organization_code
    from   student s
    where  s.student_id = :p_student_id
    and    s.student_enrollment_date =
    (select max(enrollment_date)
          from   org_body
          where  fiscal_yyyy = :p_year
          and    fiscal_mm = :p_month
          and    student_id = s.student_id
          and    organization_code = s.organization_code);Why your function is not performing: I cannot say that with the information you have provided.
    Maybe sqltrace a call and see what the reason is.

  • Problem in using query-database() function in Transformation

    Hi All,
    I am using JDev and SOA 10.1.3.4.
    I have an async process.
    In that I am doing a transformation in which source is InputVariable and target is result.
    In Transformation I am using query-database function to fetch a record from DB and am assigning that to result.
    *<xsl:value-of select='orcl:query-database(concat("select ename from emp where empid=",/ns1:DBXSLProcessRequest/ns1:input),false(),false(),"jdbc:oracle:thin:scott/tiger@localhost:1521:abcd")'/>*
    I am not getting any error but query-database is not returning any thing I maen it is returning null.
    If i run that query in SQL prompt it is returning the empname.
    Please help me out.
    Regards
    PavanKumar.M

    Hi Pavan
    I tried following in BPEL transform actvity's XSL file, and it works fine and returns the sysdate for me.
    <xsl:value-of select='orcl:query-database("select sysdate from dual",false,false,"jdbc/myDS")'/>
    Can you try above in new XSL file of Transform activity and let me know its gives you the result? if it works you can start making changes according to your requirement.
    steps to follow:
    1.create connection pool in EM, and make sure its working fine by using test on connection pool.
    2.create Datasource and point to above created connection pool. and restart the oc4j_soa
    3.rename the xsl file name of transform activity in BPEL and use above query-database function.some times xsl files are cached even if you make changes it will not take effect so for testing if you rename it will be good.
    Thanks
    Seshagiri.Rayala
    http://soabpel.wordpress.com/

  • How to Oracle Database Function in OBIEE Administration Tool

    Hi All,
    I want to use a Oracle Database Function in as a column in OBIEE (BM, Presentation Model). Can anybody has done this inOBIEE. Any pointers to this is much appreicated.
    Thanks,

    Hi user7417334,
    You cannot use any formulas in the presentation layer (not that I know of). But you can definitely use oracle database functions in the BMM layer.
    You want to use the EVALUATE function. It works like this:
    e.x. EVALUATE( 'TO_DATE(%1,%2)' AS DATE, '12/31/2009', 'MM/DD/YYYY')
    Generic Version: EVALUATE( '<FUNC>' AS <DATATYPE>, VALUE1,VALUE2,etc)
    FUNC) Is the syntax for the function you are calling. Any parameters have to be replaced by %<number>, where number refers to the order in which you specify your parameters.
    DATATYPE) The datatype that the function will evaluate to. In this case, DATE.
    VALUE1) The latter part of the formula is a comma separated list of all the parameters used in the function. In this case, it's the date I want to cast
    VALUE2) This is the second parameter. You need as many as you referenced in your function. In this case, it's the date format.
    Good luck and if you found this post useful, please award points!
    best regards,
    -Joe

  • How to use query-database() function in transformation?

    Hi All,
    How to use query-database() function in transformation?
    It is giving four fields but if i write select query in sqlquery field it is saying select node is not found....
    plz help me out
    Regards
    Pavankumar
    Edited by: [email protected] on Jul 29, 2009 2:49 AM

    Hi,
    To answer your query:-
    http://abhishek-soablog.blogspot.com/2008/08/orclquery-database.html
    Cheers,
    Abhi...

  • How to include the COUNT Function in business rule

    Hi all,
         I am working in oracle data quality in ODI.
         This is regarding the business rule in Data quality.
         I need to count the number of records when my status_type="A".
         But when i include the COUNT function in business rule.
         I find the following error as "*Unspecified Count Function*".
         Waiting for ur valuable reply.
         Thanks in advance,
         JayaPradha P

    Hi,
    The following is the condition I have to be used
    For eg:*Count records in DIM_SERVICE_ORDER_CODE where service_type = ‘P’*
    But when i use COUNT function.
    Im getting the error as "Unrecognised function count"
    waiting for ur valuable reply
    Thanks in advance,
    JayaPradha p

Maybe you are looking for