MAPPING for xi USED-DEFINED FUNCTION(UDF)

Hi, all !
Does anybody know how to use package  com.sap.engine.lib.security.http.*  in the  UDF ?
when i import it  in the UDF ,the system reports " package com.sap.engine.lib.security.http does not exist"
can anybody help me ?
Thanks a lot in advance!
Edited by: ALAN WANG on Sep 16, 2008 10:44 AM

HI,
Check Adapter Specific Message attributes.This blog will  help you
The specified item was not found.
You can also go for variable substitution :-
When you specify the target directory and file name schema, you have option of setting variables and defining them in a table. The variables are replaced by elements from the XML structure at runtime.
http://help.sap.com/saphelp_nw2004s/helpdata/en/8e/464442c1a1c253e10000000a1550b0/content.htm
links on the dynamic variable substitution
The specified item was not found.
The specified item was not found.
Dynamic File Name Part 1
Dynamic File Name using XI 3.0 SP12 Part - I
  Dynamic File Name Part 2
Dynamic file name(XSLT Mapping with Java Enhancement) using XI 3.0 SP12 Part -II
Thanks

Similar Messages

  • User Defined Function (UDF) help required. Pls advice urgent.

    Hi ,
    CRM -- XI (UDF) -- Socket Connection
    Now in User Defined Function (UDF) of Message Mapping I will open Socket Connection.
    Send CRM XML request to socket and get XML response from Socket and then map to some system.
    Can I write Java Class code in User Defined Function (UDF)  of Message Mapping instead of Java Mapping in blog below?
    /people/saravanakumar.kuppusamy2/blog/2005/12/15/socket-integration-with-xi
    Regards

    Henry,
    Do you have a structure for your response...if you do then you can do extended reciever det with sync/async..shouldent matter, i just tried it and i dont get any error.
    in your reciever determination..Check the box for standard rec det then add your first condition..of the value of a field to true..then send to A..
    then you select add condition..and add for second reciever..that should be it, you shouldent need a bpm for such a simple scenario..it definetly is an overkill.
    Regards
    Ravi Raman

  • File scenario error in Used defined function

    Hi Everyone,
    I was doing file to file scenario, i want to get the same source file name in target also.
    I created the structure as FileName, Company, Address. I did direct mapping for Company and Address
    but for field FileName, i created a userdefined function as i want the same file name.
    I mentioned the following code in  Used defined function
    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; 
    When i test the mapping in IR, with sample data, i am getting this error.
    RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ns0:Target_File_MT/FileName. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._Source_File_to_Target_File_MM_ method DynamicFile$[, com.sap.aii.mappingtool.tf3.rt.Context@1763e46]
    Could anyone please help me with the issue.
    I have done only IR part, I didnot configured ID.
    Regards,
    Varun.

    HI,
    Check Adapter Specific Message attributes.This blog will  help you
    The specified item was not found.
    You can also go for variable substitution :-
    When you specify the target directory and file name schema, you have option of setting variables and defining them in a table. The variables are replaced by elements from the XML structure at runtime.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/8e/464442c1a1c253e10000000a1550b0/content.htm
    links on the dynamic variable substitution
    The specified item was not found.
    The specified item was not found.
    Dynamic File Name Part 1
    Dynamic File Name using XI 3.0 SP12 Part - I
      Dynamic File Name Part 2
    Dynamic file name(XSLT Mapping with Java Enhancement) using XI 3.0 SP12 Part -II
    Thanks

  • Does LDS 1.1 Support use-defined functions?

    Does LDS 1.1 Support use-defined functions? I'm working with the W3C use case
    REL Q12 which fails with the function, but succeeds if I "inline" the function.

    LD 1.1 does not support User Defined Functions. This feature was omitted for performance
    reasons.
    - Mike
    "Mark Maxey" <[email protected]> wrote:
    >
    Does LDS 1.1 Support use-defined functions? I'm working with the W3C
    use case
    REL Q12 which fails with the function, but succeeds if I "inline" the
    function.

  • How do you create a user defined functions  UDF and passing a value like a ID to GEt a Value.

    How do you create a user defined functions UDF and passing a
    value like a ID to GEt a Value.
    using a query.
    are there example.
    Thanks

    tons of examples at cflib.org - good place to start, even
    though many
    udfs there are a bit outdated in their code...
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com

  • Modify toolbar for alv using CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'

    Hi Experts,
    I am using CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC' inside an exit.
    I need to modify the tolbar with just three options :-
    a-  add new row
    b- delete rows
    c- save data
    Please guide me step by step as how to proceed as I am very new to ALV.
    and after applying your solution to show the toolbar what should I do to Make these buttons working.
    Thanks a lot for your replies in advance.
    regards,
    Udit

    I'm not really sure why you would use an ALV grid display in a user exit.  I'm not sure how that works.  Another point is that the ALV object is really easier to use once you get used to it.
    However:
    Usually you would create a GUI status, and just add your buttons to it.  Then when the function module is called specify the gui status, and user command.
    For example
    v_repid = sy-repid.
    w_user_command = 'USER_COMMAND'
    w_set_status = "Status you define below.
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_bypassing_buffer       = 'X'
          i_callback_program       = w_repid
          i_callback_pf_status_set = w_set_status
          i_callback_user_command  = w_user_command
          is_layout                = w_layout
          i_structure_name         = 'ZGOODSMOVE'
        tables
          t_outtab                 = gt_outtab
        exceptions
          program_error            = 1
          others                   = 2.
      if sy-subrc <> 0.
        message e000 with 'Error in Displaying the Output Report'(025).
      endif.
    Put your code for the different functions into one user function module
    form user_command using r_comm like sy-ucomm
                            rs_selfield type slis_selfield.
      read table it_final1 index rs_selfield-tabindex.  " This will give you back the row you selected
      if sy-subrc = 0.
      endif.
    endform.
    To define the GUI Status:
    Copy the status from
    Then change it to add your fields

  • I have problems for to use Start function inside a case structure.

    I am doing data acquisition using the Config, Start and Read functions, all them inside a while loop. I want to use Config function only when certain conditions occur, so I put the function inside a case and no problem. But when I put the start function inside the same case, the acquisition is not good. Please view my attachment. My application is client-server type.
    Attachments:
    scope_server(config_start).vi ‏160 KB

    Boxer,
    I checked your example and have several easy but important suggestions for you:
    1.- First, make sure that the first time you initialize the VI, the AI Config and AI Start are executed, because based on the debug I made, your program doesn't do it, and this is very important.
    2.- Add an AI Clear after the acquisition is done, so that you release the resources. This is a good programming technique, and may help you solve your issue.
    3.- Add an Error Cluster, so that you know if an error occurred at some point of the acquisition. This will help you track the issue.
    4.- What do you mean by "the acquisition is not good". What does it happen? What does it do? Do you get an error? <- This is the reason of step 3.
    5.- Finally, if you have doubts
    programming AI, check one of the shipping examples of LV. They can give you a much clearer idea.
    Hope this helps,
    L Aguila
    Applications Engineeer
    National Instruments

  • I can't get the syntax for a table defined function to work.

    Specifically I'm trying to use a table type definition in my function.
    CREATE TYPE "MYSCHEMA"."TT_MYTABLE" AS TABLE (
         "Field" varchar(12)
    CREATE FUNCTION "MYSCHEMA"."MYFUNCTION"()
    RETURNS TABLE ("MYSCHEMA"."TT_MYTABLE")
    LANGUAGE SQLSCRIPT
    All the function examples use an actual field definitions and not an predefined table type.  I've tried the above and a bunch of other variations but I get a syntax error on all of them.
    This is the documentation page;
    http://help.sap.com/saphelp_hanaplatform/helpdata/en/20/d42e77751910149f0ff6b879b1290f/content.htm
    They don't show any examples using the table types and I can't seem to make sense of " <datatype> ::= <sql_type> | <table_type>".

    If you read the grammar correctly then I think it is not possible. Table UDF does not allow return table type that refers to another structure type definition but only elementary sql_type
    I think what grammar you refering is from input parameters
    Table Functions must return a table whose type is defined by <return_table_type>. And Scalar Funcitons must return scalar values specified in <return_parameter_list>.
    Defines the output parameters
    <return_table_type> ::= TABLE ( <ret_column_list> )
    Defines the structure of the returned table data.
    <ret_column_list> ::= <ret_column_elem>[{, <ret_column_elem>}...]
    Defines the list of columns returned from the function.
    <ret_column_elem> ::= <column_name> <sql_type>
    <column_name> ::= <identifier>

  • Key Mapping for iTunes use

    I just got my keyboard replaced for the third time, all not my fault so covered under my warranty. The keyboard I had before this one was the newest version with the play/pause, forward, and backward keys on the f7, f8, and f9. My latest keyboard is the old version without those keys, but I used those keys often. Is there some way I can program or map those keys to be the same as the newest version keyboard.
    Thank you! Meghan

    Technically "AirPort Ready" indicates that your Mac has an internal slot for the proper Apple wireless card.
    A Power Mac G4 800 MHz has an internal slot for the original AirPort card. It is not compatible with the AirPort Extreme card
    AirPort Extreme is Apple's name for 802.11g. The original AirPort card is 802.11b.
    802.11g is backward compatible with 802.11b. In other words, 802.11b devices can connect to a 802.11g device as long as the 802.11g device is configured in an 802.11b compatible mode.
    AirTunes is only available on the AirPort Express.

  • User defined function during Mapping.

    Hi,
    I am trying to retrieve filename using user defined function.
    The payload is simple.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:FTPTOFTP_MT_OB xmlns:ns0="urn://ftptoftp.com">
       <RECORD>
          <ROW>
             <EMPNO>723</EMPNO>
             <NAME>Jack</NAME>
          </ROW>
       </RECORD>
    </ns0:FTPTOFTP_MT_OB>
    the code for user defined function is
    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; 
    now during message mapping ...
    do I have to have extra xml tag in the destination
    message which is now having
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:FTPTOFTP_MT_IB xmlns:ns0="urn://ftptoftp.com">
       <RECORD>
          <ROW>
             <EMPNO>723</EMPNO>
             <NAME>Jack</NAME>
          </ROW>
       </RECORD>
    </ns0:FTPTOFTP_MT_IB>.
    If yes ...
    Then how to graphically map this extra xml tag.

    Hi Deepak,
    If u want to display the source file name in ur output, then ur output XML structure there should be an extra tag for displaying the file name.
    In message mapping, select the user defined function which u have already created and map it to the tag for storing the file name in the target message XML format.
    There is a editor present to write the user defined function on the bottom left corner of the message mapping screen.
    For this function u need to select the Simple Function Tab.
    Regards
    Neetu

  • Using User Defined Function is SQL

    Hi
    I did the following test to see how expensive it is to use user defined functions in SQL queries, and found that it is really expensive.
    Calling SQRT in SQL costs less than calling a dummy function that just returns
    the parameter value; this has to do with context switchings, but how can we have
    a decent performance compared to Oracle provided functions?
    Any comments are welcome, specially regarding the performance of UDF in sql
    and for solutions.
    create or replace function f(i in number) return number is
    begin
      return i;
    end;
    declare
      l_start   number;
      l_elapsed number;
      n number;
    begin
      select to_char(sysdate, 'sssssss')
        into l_start
        from dual;
      for i in 1 .. 20 loop
        select max(rownum)
          into n
          from t_tdz12_a0090;
      end loop;
      select to_char(sysdate, 'sssssss') - l_start
        into l_elapsed
        from dual;
      dbms_output.put_line('first: '||l_elapsed);
      select to_char(sysdate, 'sssssss')
        into l_start
        from dual;
      for i in 1 .. 20 loop
        select max(sqrt(rownum))
          into n
          from t_tdz12_a0090;
      end loop;
      select to_char(sysdate, 'sssssss') - l_start
        into l_elapsed
        from dual;
      dbms_output.put_line('second: '||l_elapsed);
      select to_char(sysdate, 'sssssss')
        into l_start
        from dual;
      for i in 1 .. 20 loop
        select max(f(rownum))
          into n
          from t_tdz12_a0090;
      end loop;
      select to_char(sysdate, 'sssssss') - l_start
        into l_elapsed
        from dual;
      dbms_output.put_line('third: '||l_elapsed);
    end;
    Results:
       first: 303
       second: 1051
       third: 1515
    Kind regards
    Taoufik

    I find that inline SQL is bad for performance but
    good to simplify SQL. I keep thinking that it should
    be possible somehow to use a function to improve
    performance but have never seen that happen.inline SQL is only bad for performance if the database design (table structure, indexes etc.) is poor or the way the SQL is written is poor.
    Context switching between SQL and PL/SQL for a User defined function is definitely a way to slow down performance.
    Obviously built-in Oracle functions are going to be quicker than User-defined functions because they are written into the SQL and PL/SQL engines and are optimized for the internals of those engines.
    There are a few things you can do to improve function
    performance, shaving microseconds off execution time.
    Consider using the NOCOPY hints for your parameters
    to use pointers instead of copying values. NOCOPY
    is a hint rather than a directive so it may or may
    not work. Optimize any SQL in the called function.
    Don't do anything in loops that does not have to be
    done inside a loop.Well, yes, but it's even better to keep all processing in SQL where possible and only resort to PL/SQL when absolutely necessary.
    The on-line documentation has suggested that using a
    DETERMINISTIC function can improve performance but I
    have not been able to demonstrate this and there are
    notes in Metalink suggesting that this does not
    happen. My experience is that DETERMINISTIC
    functions always get executed. There's supposed to
    be a feature in 11g that acually caches function
    return values.Deterministic functions will work well if used in conjunction with a function based index. That can improve access times when querying data on the function results.
    You can use DBMS_PROFILER to get run-time statistics
    for each line of your function as it is executed to
    help tune it.Or code it as SQL. ;)

  • Need help with user defined function

    Hello SDN,
    I need some help with a user-defined function. My source message contains multiple
    generic records (1000 char string), and my target message is 1 header record,
    then multiple generic records.  See description of source and target messages below:
    Source:
      GenericRecordTable 1..unbounded
        Row (1000 char string)
    Target:
      Field1 (char5)
      Field2 (char5)
      Field3 (char5)
      IT_Data
        GenericRecordTable 1..unbounded
          Row (1000 char string)
    Basically, what I need to do in my user defined funtion is to map the first record
    in my source record to the 3 header fields, then map all of the rest of the records
    (starting from line 2) into the GenericRecordTable.
    Can someone please help me with the code for the user defined function(s) for this
    mapping?
    Thank you.

    hi,
    Activities
    1. To create a new user-defined function, in the data-flow editor, choose Create New Function (This
    graphic is explained in the accompanying text), which is located on the lower left-hand side of the
    screen. In the menu, choose Simple Function or Advanced Function.
    2. In the window that appears, specify the attributes of the new function:
    Name
    Technical name of the function. The name is displayed in the function chooser and on the data-flow
    object.
    Description
    Description of how the function is used.
    Cache
    Function type (see above)
    Argument Count
    In this table, you specify the number of input values the function can process, and name them. All
    functions are of type String.
    3. In the window that appears, you can create Java source code:
    a. You can import Java packages to your methods from the Imports input field, by specifying them
    separated by a comma or semi-colon:
    You do not need to import the packages java.lang., java.util., java.io., and java.lang.reflect. since
    all message mappings require these packages and therefore import them. You should be able to
    access standard JDK and J2EE packages of the SAP Web Application Server by simply specifying the
    package under Import. In other words, you do not have to import it as an archive into the Integration
    Repository. You can also access classes of the SAP XML Toolkit, the SAP Java Connector, and the
    SAP Logging Service (see also: Runtime Environment (Java-Mappings)).
    In addition to the standard packages, you can also specify Java packages that you have imported as
    archives and that are located in the same, or in an underlying software component version as the
    message mapping.
    b. Create your Java source text in the editor window or copy source text from another editor.
    4. Confirm with Save and Close.
    5. User-defined functions are limited to the message mapping in which you created the function. To
    save the new function, save the message mapping.
    6. To test the function, use the test environment.
    The new function is now visible in the User-Defined function category. When you select this category,
    a corresponding button is displayed in the function chooser pushbutton bar. To edit, delete, or add the
    function to the data-flow editor, choose the arrow next to the button and select from the list box
    displayed.
    http://help.sap.com/saphelp_nw04/helpdata/en/d9/718e40496f6f1de10000000a1550b0/content.htm
    http://java.sun.com/j2se/1.5.0/docs/api/
    /people/krishna.moorthyp/blog/2006/07/29/documentation-html-editor-in-xi
    /people/sap.user72/blog/2006/02/06/xi-mapping-tool-exports
    http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
    UDF -
    http://help.sap.com/saphelp_nw04/helpdata/en/22/e127f28b572243b4324879c6bf05a0/content.htm
    Regards

  • Error in User defined function

    I have created a user defined function to make a call to SAP using JCo.
    But I am getting an error "package com.sap.mw.jco does not exist"
    Do we need to install JCo on our server?
    Thanks in advance

    Hallo Vijaya Kumari,
    if you use XI3.0 then you should check csn note 753294: 
    Symptom                                                                         
    A message mapping contains a user-defined function that uses a class            
    from the "com.sap.mw.jco", "sapxmltoolkit" or "com.sap.tc.Logging"              
    library. An error stating that the source code contains syntax errors           
    occurs when you test or activate the message mapping. When you use a            
    class from "com.sap.mw.jco", the system reports, for example, "package          
    com.sap.mw.jco does not exist".                                                 
    This error only occurs in systems containing a Support Package lower            
    than 5.                                                                               
    Solution                                                                        
    Import Support Package 5 or higher.                                             
    You can use the following workaround as a short-term solution: Upload           
    the library that is referenced in the message mapping into the software         
    component of the message mapping as an "imported archive". Do not               
    activate the "imported archive" with the library since it is not needed         
    for the runtime. The only purpose of the archive is to allow the message        
    mapping to be compiled. To avoid version conflicts with newer libraries,        
    you should delete the archive again after you import Support Package 5          
    or higher.
    In your case you will find the relevant jar file in the path
    [sap_j2ee_engine_installaltion_path]\cluster\server0\bin\ext\com.sap.mw.jco\jrfc.jar
    Regards Franz

  • Component Palette - User Defined Functions not visible

    I have created a simple class for a User Defined Function I want to add into a Transformation process in my BPEL process.
    I followed this tutorial - https://blogs.oracle.com/bwb/resource/custom_xpath_functions/Creating_Custom_XPath_functions_with_JDeveloper_FullPost.ht…   to create the extension and add it in to JDeveloper
    However when I open the Transformation editor I have no option in the component Palette for User Defined functions.
    I am currently on 11.1.1.7. However this was working on 11.1.1.6 but this also has stopped.
    Does anybody have any suggestions of where I should look.
    Any help much appreciated
    Cheers
    Owen

    Hi Raja,
    Prior to trying Gordons option of unmarking and remarking them i would suggest you do a little more investigation as this can potentially change the field names in XL report and if you have any reports using them they may stop working (it can add a post fix of _1).
    Firstly, what are the fields set as in the User Defined Fields window in XL reporter?  Light Dimensions, Dimension Attribute or Measure?  If its a Dimension Attribute for example on the Business Partner UDF, it will not be visible in the tab section but should be shown if you drag and drop the Business Partner dimension in the report, then right click and choose display more attributes (dimension attribute UDFs will be in this list).  Light Dimensions and Measures should appear in the tabs.
    If they are set as a light dimension or measure and are not in the tab section, has this only just started happening or have they never been visible?  If its just started happening, having you recently upgraded to a new patch?  If so, in future you need to run a script on the Company and Common database prior to the patch upgrade.  If you did not run these scripts you will need to do Gordons solution but as I say, if any reports have UDFs in these may not work after and you will have to manually edit them.
    Regards,
    Adrian

  • XI 7.0 Advnaced User Defined Function  how to check Cache Entire Queue ?

    Hi Friends ,
                       We are using XI 7.0 (PI)   . There is no Selection For Advanecd UserDefinedFunction .  I think in this version Both will perfom in the User DefinedFunction Itself .
               There is option for Context and Queue While we are creating Function . If we select Queue is it eqivalent to Check box of Cache Entire Queue ? Is My assuption is correct  ?
              I want to cache the Entire Queue  ? Can you please tell me about this.
              My environment is like
    Session Information
    Application:
    Design: Integration Builder
    User:
    Test
    Logon Language:
    English
    Server:
    xidev_XID
    Server Node:
    server0
    Runtime Environment
    Java version:
    1.4.2_13
    Java vendor:
    Sun Microsystems Inc.
    Version
    Service pack:
    10
    Release:
    645_VAL_REL
    Best Regards .,
    V.Rangarajan

    you advanced user defined functions are now known as 
    Enhanced Functions (Cache = Context or Cache = Queue)
    From Help -
    +Features
    Depending on which values are available in the cache for a user-defined function, different functions are available:
    ·        Simple Functions (Cache = Value)
    This function type can process individual input values of a field for each function call. Therefore, simple functions expect strings as input values and return a string.
    ·        Enhanced Functions (Cache = Context or Cache = Queue)
    This function type can process multiple input values of a field for each function call. Before you call the function, you can either import all the field values of a context or the whole queue for the field in an array.+
    Have this link as your reference - http://help.sap.com/saphelp_nw04s/helpdata/en/22/e127f28b572243b4324879c6bf05a0/content.htm

Maybe you are looking for

  • Firewire Video still Not working in 64 bit with 9.2.1

    Let's keep up the request for this! Otherwise, thanks to Apple for a lot of improvments, and support of our newer 12 and 6 core machines.

  • IMovie 5.0.2 project won't import into iDVD 4.0.1

    Aloha-- I'm working on an iMac G5 running OS 10.4.7. I am trying to bring an iMovie (just over 13 GB) on a La Cie external firewire drive into iDVD, also to be saved to the La Cie. The La Cie is formatted as Mac OS Extended. iMovie quits after/during

  • Re: Will my line support ADSL2/+ ?

    Having just moved to BT from another ISP I am disappointed with the upload speed I am currently getting, it would appear that I have been provisioned on ADSL Max not ADSL2+.  See connection details below:-                 Downstream      5.875 Mbps  

  • Putting my music on an MP3 player.  HELP!

    I'm a new user to ITunes and I cannot figure out how to put my music on the MP3 Player.   Can someone please help me figure this out?   Much Appreciated. 

  • Varray Solution help

    Please help, i am trying to understand VARRAY, but cant around working through this question. Not to sure of the syntax Trying to create datatype: a Varray of 7 Numbers to hold Exam marks . Create a table with Customer ID, Name and marks. Any data ty