Use of user function

Hello,
Does someone know if it is possible to create an ODI Sequence where the filter to extract only a single record is an user function ?
Cause it seems to not work on my devlopment.
I can't do it without user function cause the query in my sequence is more than 255 characters.
Else I'm trying to do the same thing with a variable and a user function but it doesn't work better.
So does someone know if in a mapping we can execute a user function based on a variable ??
Thanks in advance.
BM

Hi BM,
how are you?
Did you solve this one? If not I will try to help you....

Similar Messages

  • Problem while using a user function

    Hi,
    I just want to learn how a user function in ODI works.
    I have created a user function(for Oracle technology).
    In Definition Tab, I gave bfun($(branchc))
    In implementation I gave
    if ($(branchc) = 'it' || 'cse') then
    return('IT')
    else
    return('Non-IT')
    end if
    In a mapping rule i am using it as BFUN(STUDENT.BRANCH)
    I am getting the following error...
    Bad Query: ORA-00904: "BFUN": Invalid Identifier
    select BFUN('STUDENT.BRANCH') from EX.STUDENT STUDENT where (1=2).
    EX is my source schema.
    Please help me in resolving this.

    Hi,
    That is a common error on ODI.
    The ODI function, (as ODI variable) is to "substitute words", it means, ODI is a code generator and a function are made to substitute code, not to "execute" that action coded.
    For instance: If there are a "case when" instruction that is necessary be typed over and over again, at several places just change the column to be evaluate, you can create a ODI function to substitute this code avoiding type it several times and better, let the same code in just one place.
    Is a way to have “Object Orientation” coding (OO) to code generation...
    Does it make any sense to you?
    Cezar Santos

  • Using PL/SQL code in ODI User Functions

    Is it possible to write PL/SQL code (with multiple in params and one out param) in ODI User Function ?
    Actually I need to use this user functions in my interface mapping.
    I know it can be done using ODI Procedures but Procedures cannot be used within interfaces when mapping columns.

    Hi Anurag Ambasta,
    You can use the ODI user functions and choose the Linked technology as 'Oracle' where you can implement and use oracle syntax .
    And the user functions can receive the multiple parameters and it returns the single value to the function cal, which use are expecting right?
    Thanks,
    Yellanki

  • How can I use Seeburger java functions on SAP XI's user defined functions?

    Hi All,
    As my title implies; how can I use Seeburger java functions on SAP XI's user defined functions?  I've tried searching over the net in tutorials regarding this topic but I failed to find one; can someone provide me information regarding my question? thanks very much.
    best regards,
    Mike

    Hi Mike !
    You should check your documentation about which java classes you need to reference in the "import" section of your UDF. And also deploy the java classes into the java stack or include them as a imported archive in integration repository...it should be stated in the seeburger documentation.
    What kind of functions are you trying to use?
    Regards,
    Matias.

  • How to use a user defined function module in IP

    Hi All,
    Can you please guide me on how to use a user created function module in IP? My requirement is to have 2 exit function modules to be used in IP to load the falt file data into a cube..
    Regards,

    Hi,
    /people/marc.bernard/blog/2007/11/25/how-to-load-a-file-into-sap-netweaver-bi-integrated-planning-part-1
    thanks to Marc Bernard
    Regards

  • Incorrect Results When Using an In-Line View and User Function in 10g

    My developers are complaining of incorrect Select statement results when using an in-line view along with a user defined function. Below is the statement:
    select test_f(wo1)
    from
    (SELECT a.WORK_ORDER_NBR, b.work_order_nbr wo1/*, facility_f(A.FACILITY),
    A.PLANNER, A.WO_STATUS, mil_date(A.WO_STATUS_DATE)*, A.WORK_ORDER_TYPE,
    A.WO_DESCRIPTION
    FROM TIDWOWRK A, TIDWOTSK B
    WHERE B.WORK_ORDER_NBR(+) = A.WORK_ORDER_NBR))
    where wo1 is null;
    Test_f() is a user defined function and the above query returns thousands of rows. It should return 308 rows. It is apparent that the target database is not evaluating the "where wo1 is null;" clause.
    select to_char(wo1)
    from
    (SELECT a.WORK_ORDER_NBR, b.work_order_nbr wo1/*, facility_f(A.FACILITY),
    A.PLANNER, A.WO_STATUS, mil_date(A.WO_STATUS_DATE)*, A.WORK_ORDER_TYPE,
    A.WO_DESCRIPTION
    FROM TIDWOWRK A, TIDWOTSK B
    WHERE B.WORK_ORDER_NBR(+) = A.WORK_ORDER_NBR))
    where wo1 is null;
    In the above query return 308 rows. The user function was replaced by an Oracle function. The Where clause is now evaluated correctly.
    The query is executed from an Oracle 10g R2 database and retrieves data from a 9.2.0.6 database.
    I've seen a little information on Metalink. It appears that there was some trouble in 9i, but were fixed in a 9.2.0.6 patch. I don't see any information about a 10.2.0.2 database.
    Anyone have any experiences or a successful solution. I suspect that I will need to report this to Oracle and wait for a patch.
    Thanks,
    John

    I can only think of two reasons for this behaviour:
    1) You are executing these two queries from two different users and there is some policy on the table.
    2) The function doesn't do an upper, but returns null a lot of times, even when the input is a not null value, like this:
    SQL> create table tidwowrk
      2  as
      3  select 1 id, 'A' work_order_nbr, 'DST' facility from dual union all
      4  select 2, null, 'TRN' from dual union all
      5  select 3, 'C', 'DST' from dual
      6  /
    Tabel is aangemaakt.
    SQL> create table tidwotsk
      2  as
      3  select 'A' work_order_nbr from dual union all
      4  select 'B' from dual
      5  /
    Tabel is aangemaakt.
    SQL> create or replace function test_f (a in varchar2) return varchar2
      2  is
      3  begin
      4    return case a when 'A' then null else a end;
      5  end;
      6  /
    Functie is aangemaakt.
    SQL> select count(*)
      2    from ( SELECT a.WORK_ORDER_NBR
      3                , test_f(b.work_order_nbr) wo1
      4             FROM TIDWOWRK A
      5                , TIDWOTSK B
      6            WHERE B.WORK_ORDER_NBR(+) = A.WORK_ORDER_NBR
      7              and a.facility in ('DST', 'TRN', 'SUB')
      8         )
      9   where wo1 is null
    10  /
                                  COUNT(*)
                                         3
    1 rij is geselecteerd.
    SQL> select count(*)
      2    from ( SELECT a.WORK_ORDER_NBR
      3                , to_char(b.work_order_nbr) wo1
      4             FROM TIDWOWRK A, TIDWOTSK B
      5            WHERE B.WORK_ORDER_NBR(+) = A.WORK_ORDER_NBR
      6              and a.facility in ('DST', 'TRN', 'SUB')
      7         )
      8   where wo1 is null
      9  /
                                  COUNT(*)
                                         2
    1 rij is geselecteerd.Regards,
    Rob.

  • Using the Dollar($) Sign in a User Function Implementation

    Hi All,
    Just a quick question: how could you use a dollar($) sign in the implementation (Oracle) of a user function? I'm asking because the table name that I'm using in the implementation happens to contain the dollar sign (I$_FACT_SALES) and from the results I'm getting now, ODI reads the $ as reference to a variable, therefore removing the $-sign from my table name upon execution (I_FACT_SALES). Is there something like a backslash or some other character that could be inserted before the $ so it would register as part of the table name?
    Any response would be greatly appreciated.
    Thanks very much,
    Marco

    You may have 3 options:
    1.) Try using the tablename in quotes "MY$TABLE" or may be MY$$TABLE using double $ symbol
    or
    2.) I found this code snippet : odiRef.getInfo( \\u0022DEST_WORK_SCHEMA\\u0022 )+\\u0022.\\u0022,\\u0022\\u0022)?. So on these lines you can use \\u0022 as a symbol for "
    You can see similar problem/solution/explanation in
    Re: Regular Expression wierdness - problem with $ character
    or
    3.) Change the Work Tables Prefix in Topology Manager > Physical Schema > Your_Schema
    from E$_ , C$_ , I$_ to something like ERR_ , SRC_ , INT_
    Edited by: Ace2 on Dec 2, 2009 9:57 AM

  • How to use a user defined function in where cluase condition

    Hi,
    I have designed a query by selecting some columns in the tables and some columns are retrieved directly from table and some columns are passing to a user defined function. Now my requirement is i need to use that user defined function result in oracle where condition clause.
    Ex : select marketing_user_id,get_name(marketing_user_id),item_id,get_item_name(item_id),get_country_name(country_id),
    from
    where get_item_name(item_id) in ('x','y','z')
    and get_country_name(country_id) in ('India','America','China');
    When am i trying the query by above format i am getting the wrong resultset.
    BR,
    uma

    I am not sure why your getting the wrong results but you should seriously reconsider the approach your are taking. Using functions like this is very ineffecient and should be avoided at all cost.

  • How to use a user defined function in XI

    Hi Experts,
    I would like learn how to use a user defined function  in Xi during mapping . Is there any step by step on that.
    Besides during when me make communcaton channels I see the following tabs...Paramters ..Identifiers ...Module...
    The module that is given here ...where and how it is used.

    Hi,
    You can write UDFs in java in Graphical mapping to enhance your XI Graphical mapping functionality
    The steps for doing it would be:
    1. Click on Create New function Button found on Bottom left corner on your XI Mapping window.
    2. Write your java code.
    3. Run the Mapping Test as usual.
    >>The module that is given here ...where and how it is used.
    The adapters in the Adapter Framework convert XI messages to the protocols of connected external systems and the other way around. When doing so, some
    functionality might need to be added specific to a situation which is possible with the use of custom modules.
    Typical example would be validation of file content when using a File Adapter or modification of the message payload to a common content structure which is not supported by any of the standard SAP modules.
    An Adapter module is developed as an Enterprise Java Bean and is called locally by the Adapter.
    An example on modules :
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/da5675d1-0301-0010-9584-f6cb18c04805">How to develop a module for reading file name in a sender file adapter XI 3.0</a>
    Cheers,
    Chandra

  • Can't use voice/video functionality with external domain connected users through federation

    Hello All,
    Hope you keeping well..!!
    We are communicating with external customers lync server through federation option setup on our corporate lync server.  We have received the federation setting from the customer with SIP address which has been setup on our corporate lync servers after
    that we were able to browse the customer contact through corporate lync account.
    We were also able to chat with external customer but however voice/video functionality are not working through same session.  Whenever we try to dial out external customer lync account it ended with error message "call ended due to network issue".
    We have checked the setting from corporate lync servers and network point of view but doesn't find any issue which cause the disconnection to voice/video over lync.  Could you pl help or guide with the way to resolve the issue.
    Thanks, MK

    Thanks for your reply.<o:p></o:p>
    Audio/Video works fine within corporate when dial any lync contact.  We only have issue while trying to use the same functionality with any other
    external lync contact configured over federation option.<o:p></o:p>
    We already checked the security rules and all required ports are open, as confirmed by local resolver group.<o:p></o:p>
    We have checked with external parties and according to them their systems are hosted by Microsoft as part of office 365 suite and they already have
    federation option for 17 different customers which works fine.  Which means issue must be your local end.<o:p></o:p>
    Is there any tool available to identify the issue from client end?<o:p></o:p>
    Also I have a question here....In my corporate environment...client is sitting in India and lync servers are hosted in UK and users connect to it
    over MPLS route.  In Client lync configuration we have  internal/external servers configured .....so when i tried to make a voice call with external lync users then I see from netstat -a command that traffic hitting to multiple public IP addresses
    directly from my machine..<o:p></o:p>
    Does it mean that client required internet connectivity with specific open media ports to connect with external parties for video/voice? or in ideal
    case all request should handle by corporate internal server which should took UK internet path to connect with external lync contact?
    Thanks, MK

  • Lost of brackets using a jython user function

    Hi all,
    I have written a Jython user function. Because of the language, several lines contain square brackets such as :
    if lsrc[0] in [ 'X', 'I' ] :
    I am trying to use this function from a procedure but it fails :
    When I check the detail of the report in the operator, I can see in the "description" tab the jython code is well fetched from the function, except of the brackets (and what is inside).
    The line from my previous example with the brackets looks like this :
    if lsrc in :
    Note that I have choosen the "jython" technology in the target command of my procedure.
    Is there a way to fix this problem ?

    Hi,
    I have found how to fix the problem in the ORACLE Knowledge database : When a Jython program is called bay a procedure, brackets are lost. To prevent this issue, brackets must be preceded by a dollar sign. In my previous example, this means :
    if lsrc$[0$] in :
    so be careful when using jython !

  • How to use standard java functions in a XSLT mapping

    Hi All,
    I wish to use a standard java function in a XSLT mapping, The issue is either i am giving incorrect namespace which is used to invoke the function or the signature of the function call is incorrect, I have read all the links in http://help.sap.com, and i know <b> one can enhance a XSLT mapping by writing one's own java code and thereby using java standard functions </b>, but the requirement is such that i need to try and use java standard function in XSLT mapping itself.
    Please refer to the sample code below:
    <?xml version="1.0" encoding="UTF-8"?>
      <xsl:stylesheet version="1.0"  
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:javamap="java:java.lang.String">
    <xsl:output method="text"/>
    <xsl:template match="/">
    <xsl:variable name="input" select="Title">
    <xsl:if test="function-available('javamap:toUpperCase')">
    <xsl:value-of select="javamap:toUpperCase($input)"/>
    </xsl:if>
    Author:<xsl:value-of select="Author"/>
    </xsl:template>
    </xsl:stylesheet>
    error encountered is: Illegal number or type of arguments.
    please reply if you have tried a similar scenario in SAP XI.
    Thanks & Regards,
    Varun

    Hi Varun,
        First of all i want to tell you that as per the documentation you can only call the static function inside xslt mapping. Your toUpperCase method is a non static function.
    What i am getting is that you have an element called Author and you want to convert its value into uppercase.
    you can write your own user defined function which is static.
    Signature of your java method :
    public static string toUpperCase(String Author,Map inputparam)
    try this xslt map.
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:javamap="java:JavaProgram">
         <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
         <xsl:param name="Author">
                 <xsl:value-of select="//Author_name"/>
         </xsl:param>
         <xsl:param name="inputparam" />
         <xsl:template match="/">
         <Author>
                 <xsl:if test="function-available('javamap:toUpperCase')">
                  <xsl:value-of select="javamap:toUpperCase($Author,$inputparam)"/>
                 </xsl:if>
         </Author>
         </xsl:template>
    </xsl:stylesheet>
    Hope this will work.
    Thanks and Regards
    Vishal Kumar

  • User Function Name wrong resultset in Oracle Apps Query

    Hi,
    I am using the below query to extarct the user function names alonng with responsilibity .But doing so i am getting a User Function Name for eg 'Cross Validation Rules' under Order Management User.But thats wrong.Cross validation rules should exists in Receivables,GL and Payables.
    select distinct frv.menu_id, frv.responsibility_id, frv.responsibility_name, fff.function_name, ffft.user_function_name
    from
    fnd_responsibility_vl frv,
    fnd_responsibility frp,
    fnd_form_functions fff,
    fnd_form_functions_tl ffft,
    fnd_resp_functions resp,
    fnd_menu_entries mnu,
    fnd_menus fmn
    where
    fff.function_id = ffft.function_id
    and mnu.menu_id=frp.menu_id
    and mnu.menu_id=fmn.menu_id
    and frv.responsibility_id=resp.responsibility_id
    and mnu.function_id=ffft.function_id
    and resp.rule_type='M'
    and frv.menu_id in (select me.menu_id
    from fnd_menu_entries me
    start with me.function_id = fff.function_id
    connect by prior me.menu_id = me.sub_menu_id )
    and (frv.responsibility_name like '%Order%')
    order by 1
    Kindly any help will be helpful for me

    What is your application release?
    I am using the below query to extarct the user function names alonng with responsilibity .But doing so i am getting a User Function Name for eg 'Cross Validation Rules' under Order Management User.But thats wrong.Cross validation rules should exists in Receivables,GL and Payables.Please try the queries in these docs.
    Script To Extract Submenu And Function Information About A Menu [ID 458701.1]
    HOW TO GENERATE MENU TREE FOR A MENU ATTACHED TO A RESPONSIBILITY IN ORACLE APPLICATIONS 11i ? [ID 312014.1]
    Thanks,
    Hussein

  • Submit batch job daynamically using batch user id

    Hi,
    I need to submit the background job dynamically from ABAP program with BATCH user id.
    I have created new program. Users will execute program in foreground.
    Had issue with USER id. If I give my user id then batch job successfully creating. If I give u2018BAICHu2019 id then it is giving the error.
    Am I doing any thing wrong here?
    Code:
    Open Job
      CALL FUNCTION 'JOB_OPEN'
        EXPORTING
          jobname  = jobname
        IMPORTING
          jobcount = w_jobcount.
        SUBMIT zrufilep WITH p_file1 = sourfile
                        WITH p_file2 = destfile
                        VIA JOB jobname NUMBER w_jobcount
                        USER 'BATCH_FI'
                        AND RETURN.
    Schedule and close job.
          CALL FUNCTION 'JOB_CLOSE'
            EXPORTING
              jobcount  = w_jobcount
              jobname   = jobname
              sdlstrtdt = sy-datum
              sdlstrttm = sy-uzeit.
    Thanks

    Can any body tell me if that authorization is given to the user, can he submit any other job from front end?
    As you can see if he can, it will conflict security issues of business. So If he is not permitted to execute these kind of statements in any other program, would he be confined to using diff user in this program only?
    Or is there any other way-out to confine the user for getting this authorization for a single T-code or such?

  • How to use the CMS functionality in Sun Portal Server 7.2

    Hi All,
    How to use the CMS functionality using the ccd.war(Portlet) which is available in the library as i could add it to my channel but not able to show the functionality as it is showing the error msg "You are currently not logged in. Please login." should I create userid and there respective roles inorder to use the CMS functionality.
    Has any one used this as I could this in glass fish server.
    Any Input is appreciated.
    Thanks & regards
    Srikanth

    Have a look at the "*Roles*" section of the portal server 7.2 content management system guide
    http://docs.sun.com/source/820-4275/index.html . You can also look at [project mirage|https://mirage.dev.java.net] for some screencasts
    Alternatively,
    1. ccd.war has 3 portlets in it:
    (a) custom content definition portlet
    (b) custom content portlet
    (c) workflow portlet
    2. Inorder to work with these portlets, user needs to be in anyone of the below roles:
    (a)Consumer (b) Editor (c) Approver (d) Administrator (e) Submitter (f) Contributor (g) Publisher
    3. By default ccd.war gets deployed using a default roles file (/var/opt/SUNWportal/tmp/ccd.roles.properties)
    Note: In windows, you may not find this file
    4. Access the portlets as a user in any of the role mentioned in the ccd.roles.properties
    (OR)
    you can use a new roles file which has mapping to your custom roles. For this , undeploy existing ccd.war and deploy again with a new roles.properties file
    Hope this helps!

Maybe you are looking for

  • Re-installing Mac Mail on Tiger

    A well-meaning friend of mine managed to delete my Mac Mail application. All I need to do is re-install it, and I thought that would be simple enough with my installation discs that came with the computer when I bought it. So I inserted disc 1, doubl

  • IPod failing to show songs

    My video iPod refuses to show certain songs under artists, that are shown under songs-browsing, and that are on the iPod and in iTunes like any other songs. The id3-tags are alike, and f.ex. is Ben E. King's song "Stand by me" listed when you look un

  • Pop-up windows in webmin filemanager are behind the firefox app

    When i use the java filemanager application within webmin to administer my websites all the java app windows are poping up behind the firefox screen. The only way to edit information in the "pop under" java windows is to move the firefox window to th

  • Command+V = Failed to load extension?

    Ok so here's what I get after command+V: Failed to load extension com.apple.driver.applemacriscAGP Failed to load extension com.apple.driver.applemacriscPCI Couldn't alloc class AGP Then it keeps repeating: Still waiting for root device Does anyone k

  • User recursive calls in ST04

    Hi Could anyone please explain me what is the field `User/ recursive calls` in ST04 view means? Does it anyway related to the performance of DB? I had a error situation yesterday and after that the user /recursive calls value increased drastically to