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

Similar Messages

  • 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

  • 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 many types of user defined functions are there?

    how many types of user defined functions are there?

    Hi Ramakrishna,
    A user-defined function is only visible in the message mapping in which you created it. You can insert the function in the data-flow editor as a standard function by using the User-Defined function category.
    You can use the following user-defined functions:
    1.Simple functions, which can process individual field input values for each function call. Simple functions therefore expect strings as input values and return a string.
    2.Advanced functions, which can process several field input values for each function call. You can import either all field values of a context or the whole queue for the field in an array before calling the function. For more information, see Advanced User-Defined Functions.
        go through :
    http://help.sap.com/saphelp_erp2004/helpdata/en/22/e127f28b572243b4324879c6bf05a0/content.htm
         Advanced user-defined functions, which can process more than just individual field values.Instead, you can import a complete context or an entire queue for a field as an array before your function is called
        go through :
    http://help.sap.com/saphelp_erp2004/helpdata/en/f8/2857cbc374da48993c8eb7d3c8c87a/content.htm
    *Pls: Reward points if helpful*
    Regards,
    Jyoti

  • Using a User Defined Function as a constraint within a temporary table.

    Hello, 
    I am trying to create a temp table that uses a UDF in a constraint. I'm getting the following error message 
    Msg 4121, Level 16, State 1, Line 1
    Cannot find either column "dbo" or the user-defined function or aggregate "dbo.CK_LoseTeamSportExists", or the name is ambiguous.
    I've tested the function and it works in other contexts. Any idea? All code below:  
    Thanks, 
    - Bryon
    create function dbo.CK_LoseTeamSportExists (@loseteam int, @sportid int)
    returns bit
    as
    begin
    declare @return bit
    if exists 
    select TeamID, sportid from Link_TeamSport
    where 
    TeamID = @loseteam 
    and
    SportID = @sportid
    set @return = 1
    else set @return = 0
    return @return
    end
    go
    create table #check
    SportID int
    ,WinTeamID int
    ,LoseTeamID int
    ,check 
    (dbo.CK_LoseTeamSportExists(LoseTeamID,SportID) = 1)

    Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules. Temporal data should
    use ISO-8601 formats. Code should be in Standard SQL as much as possible and not local dialect. 
    This is minimal polite behavior on SQL forums. 
    >> I am trying to create a temp table that uses a UDF in a constraint. <<
    You do not understand how SQL or any declarative language works! 
    We do not use UDFs (procedural programming)
    We do not use bit flags (assembly language).
    We do not use temp tables (mag tape files).
    We do not use integer as identifiers (what math do you do on them?)
    Your silly “Link_TeamSport” implies a pointer chain; we have no links in SQL. Where is the DDL? 
    Constraints are always predicates in any declarative language. 
    Do you know why you have to create a local variable to pass the non-relational flag back to the calling environment? FORTRAN I and II! These early languages has to use hardware registers in the first IBM computers to return results. In your ignorance, you mimic
    them! 
    We do not use if-then-else control flow in any declarative language. We have CASE expressions that we put where you have a local variable getting an assignment. 
    I see you also put the comma at the start of the line. We did that with punch cards, so we could re-use them 50 years ago. 
    In SQL, we would use REFERENCES to assure a team reference exists. We use names for teams because they are entities, not quantities: 
    CREATE TABLE Game_Results
    (sport_name CHAR(10) NOT NULL PRIMARY KEY,
     win_team_name CHAR(12) NOT NULL
      REFERENCES Teams(team_name)
       ON DELETE CASCADE,
     lose_team_name CHAR(12) NOT NULL
      REFERENCES Teams(team_name)
       ON DELETE CASCADE,
     CHECK (win_team_name <> lose_team_name)); 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • How to implement a user-defined function in a mathscript node

    I am trying to use a mathscript node that includes self-defined functions, but I always get an error. I tried to run an NI-example: MathScript using Riemann Zeta.vi ,and I got the same error I get when I run my own programmes:MathScript Node'MathScript Node' (zeta): User-defined function contains an error. I didn't change anything in that example, so what could be wrong?

    Try the Mathscript forum instead. Good luck.
    (Maybe start reading this, for example)
    Message Edited by altenbach on 11-18-2009 01:48 PM
    LabVIEW Champion . Do more with less code and in less time .

  • How can I find user defined functions in oracle

    Hello All,
    I need to find out what are the user defined functions available in my schema?
    Please let me know on what system tables shall I query and find out the user defined functions?
    Thanks,
    Milind.

    Thanks Satish,
    One more query. Can I find what are the parameters that needs to be passed?
    Here is what I have to do..
    I have to find all the accessible user defined functions. If I select one of them in my UI, I need to show the parameters used in the respective function.
    Please let me know if these parameters are stored anywhere..
    Thanks again,
    Milind

  • Alert messages  by using any User Defined Functions

    Hi friends,
          I  have one requirement.. that  when ever  my scenario successully  processed.. (file to file scenario) i need to raise a ALERT message  that is.. Successfully processed..  otherwise.. it should raise a Errors occured during Scenario..  These messages i want to display for my scenario..
       for this requirement what can i do.. my scenario is with out BPMs, so, can u explain with clear steps.. is there any USER DEFINED FUNCTION IS REQUIRED OR  with that UDF 's also  can we do.. and where can we do other settings..
    Thanks
    Babu

    Hi,
    Check this blog.
    /people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function
    Regards,
    Sudheer.

  • How to distinguish the User-Defined-Function from Oracle Build-In function

    Hi Friends,
    I could get the function list form all_objects table by the SQL:
    select * from all_objects where object_type = 'FUNCTION'
    but there is no column in all_objects specify the function is build-in or user-defined.
    But I found in SQL Server there is a column "is_ms_shipped" in the sys.all_objects table. This column will specify the object is build-in or user-defined. I want to get the equivalent column in Oracle but failed.
    Could anyone tell me how to solve this problem?
    Thanks,
    Ricky

    Thanks Pavan.
    But if an user connects to database using "conn /as sysdba" syntax and creates a function. This user-defined funtion goes into the "SYS" schema also. I know it is not the best practise to create objects using sys user so I think your solution is right.
    Regards,
    Ricky

  • Use of user defined function in mathscript containing structure

    Hi, I am an beginner user of LabView's MathScript Module,
    I have the following problem when integrating my MATLAB code into LabView, for HMM:   In my program, I tried to call a user defined MATLAB function called 'mixgaussinit.m' It show this error ..
    Error -90162 occurred at Line 36, Column 20: unexpected char: '.'
    C:\HMMall\KPMstats\mixgauss_init.m
    Possible reason(s):
    LabVIEW:  A recognition error occurred while generating a stream of tokens.
    the line 36 of the file is this "mu = reshape(mix.centres', [d M])"
    mix.centers is a structure.. 
     How can this error be corrected?
    Solved!
    Go to Solution.

    I just noticed that these files appear to be under copyright. My first question is do you have the copyright permissions to post them in a public forum? If not then you may wish to delete them. That being said I have examined the code and it seems easy enough to work around your issues (provided you have the copyright permissions). The way to work around the issues is indeed to replace the struct fields with variables. This will of course require you to change a couple function definitions to input and output the neccesary variables which I believe was at most 5 variables. You will also need to redo the error checking code that uses a cell array. Altogether I estimate about 30 minutes of work. I would have given you the work around in these files had the files not been copyrighted. So, unfortunately, you will have to implement the work around yourself.
    Good luck!
    K Scott

  • Help: How to call a user defined function in a data block query?

    I created a string aggregation function in the program unit, see reference:
    http://www.oracle-base.com/articles/10g/StringAggregationTechniques.php
    I now like to call the function in my data block query. I got the error: ORA-00904: 'concatenate_list' invalid identifier.
    Please help.
    Thank you in advance.
    Jimmy

    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

  • How to develop a user defined function to convert XML to Base64Binary

    Hello,
    I am trying to develop a solution in which I need to convert XML into Base64Binary so that I can then write this Base64Binary opaquely to a file (as opaque data is nothing but Base64 encoded data)
    So, I want to develop a flow in which:
    *File Adapter (read file based on some XSD) ----{color:#99cc00}XML{color}-----&gt; BPEL/ESB input ----{color:#99cc00}XML{color}---------&gt;Transform ----{color:#99cc00}Base64Binary{color}---------File Adapter that writes files opaquely*
    {color:#000000}
    What should be the signature of such a function. How I can pass the input to it.
    TIA
    {color}

    Think i got something here How to convert String to base64Binary in BPEL process
    but its BPEL all the way, how to get hold of input in an ESB process?

  • How to Use Sequence Object Inside User-defined Function In SQL Server

    I'm trying to call sequence object inside SQL Server user-defined function. I used 
    Next Value for dbo.mySequence  to call the next value for my sequence created. But I'm getting an error like below.
    "NEXT VALUE FOR function is not allowed in check constraints, default objects, computed columns, views, user-defined functions, user-defined aggregates, user-defined table types, sub-queries, common table expressions, or derived tables."
    Is there any standard way to call sequence inside a function?
    I would really appreciate your response.
    Thanks!

    The NEXT
    VALUE FOR function cannot be used for User Defined function. It's one of the limitation.
    https://msdn.microsoft.com/en-us/library/ff878370.aspx
    What are you trying to do? Can you give us an example and required output?
    --Prashanth

  • How to add user defined functions in Menu bar of a Selection Screen?

    Hi,
    Can anybody please suggest me that how can I add user defined functions in the menu bar of a Selection Screen?
    Regards
    s@k

    Dear Amit,
    I am referring to the standard SAP program: RIEQUI20.
    On the initial screen, there are 3 tabs.
    Code:
    SELECTION-SCREEN BEGIN OF TABBED BLOCK tab FOR 25 LINES.
    SELECTION-SCREEN TAB (20) tab1 USER-COMMAND ucomm1
                         DEFAULT SCREEN 001.
    SELECTION-SCREEN TAB (20) tab2 USER-COMMAND ucomm2
                         DEFAULT SCREEN 002.
    SELECTION-SCREEN TAB (20) tab3 USER-COMMAND ucomm2
                         DEFAULT SCREEN 003.
    SELECTION-SCREEN END OF BLOCK tab.
    AT SELECTION-SCREEN.
      CLEAR gv_okcode.
      gv_okcode = sy-ucomm.
      CLEAR sy-ucomm.
      CASE gv_okcode.
        WHEN 'IH08'.
          CALL TRANSACTION 'IH08'. "Equipment Selection
        WHEN 'IW29'.
          CALL TRANSACTION 'IW29'. "Notification Selection
        WHEN 'IW39'.
          CALL TRANSACTION 'IW39'. "Order List Selection
        WHEN OTHERS.
      ENDCASE.
    *   Check date:                                         
      IF NOT datuv IS INITIAL                            
      AND NOT datub IS INITIAL.                         
        IF datub >= datuv.                              
        ELSE.                                           
          MESSAGE e884(ih) WITH datuv datub.            
        ENDIF.                                           
      ENDIF.                                             
      IF variant IS INITIAL AND
         dy_vari IS INITIAL.
        PERFORM get_default_variant_f14 USING variant.
      ENDIF.
      PERFORM variant_existence_f14 USING variant.
      IF datuv IS INITIAL.
        datuv = sy-datum.
      ENDIF.
      IF datub IS INITIAL.
        datub = sy-datum.
      ENDIF.
      IF sy-ucomm = 'ADDR'.
        PERFORM adress_sel_f01 USING 'EQUIR'.
      ENDIF.
      PERFORM check_parnr_f76.
    *  AT SELECTION SCREEN OUTPUT
    AT SELECTION-SCREEN OUTPUT.
      STATICS: l_slset TYPE sy-slset.
    *--- Set initial variant
      PERFORM variant_init_f14 USING 'INST' 'INST' 'INST' 'RIEQUI20'.
      IF variant IS INITIAL AND
         dy_vari IS INITIAL AND
        gv_variant_flag IS INITIAL.
        PERFORM get_default_variant_f14 USING variant.
        gv_variant_flag = 'X'.
      ENDIF.
    *--- Set Icon for adress-button
      PERFORM set_icon_f01 USING dy_adrfl ad_icon text-ad0 text-ad1.
    *--- get classification data from select option
    *--- (if new variant or if called via submit or F3)
      IF ( l_slset NE sy-slset ) OR
         ( s_comw[] IS NOT INITIAL AND gt_clsd_comw[] IS INITIAL ).
        l_slset = sy-slset.
        gv_class_old = dy_class.
        gv_klart_old = dy_klart.
        PERFORM copy_selopt_comw_f79 TABLES gt_clsd_comw s_comw.
        PERFORM class_search_init_f77 USING 'EQUI'.
      ENDIF.
    *--- set Icon for classification
      LOOP AT gt_clsd_comw TRANSPORTING NO FIELDS          
                          WHERE atcod > '0'.               
        EXIT.                                              
      ENDLOOP.                                             
      IF sy-subrc IS INITIAL.
        gv_comw_flag = 'X'.
      ELSE.
        CLEAR gv_comw_flag.
      ENDIF.
      PERFORM set_icon_f01 USING gv_comw_flag cl_icon text-cl0 text-cl1.
      CALL METHOD cl_uid_cust=>selection_screen_output.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR variant.
      PERFORM variant_inputhelp_f14 USING variant 'RIEQUI20'.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR dy_parnr.
      PERFORM f4_for_parnr_f76.
    AT SELECTION-SCREEN ON BLOCK clse.
      IF dy_class NE gv_class_old
        OR dy_klart NE gv_klart_old.
        gv_class_old = dy_class.
        gv_klart_old = dy_klart.
        CLEAR gv_comw_flag.
        REFRESH gt_clsd_comw.
        REFRESH s_comw.
      ENDIF.
      PERFORM class_exist_f77 USING dy_klart dy_class 'DY_CLASS'.
      IF sy-ucomm = 'COMW'.
        CALL FUNCTION 'IHCLSD_VALUATION_POPUP'
          EXPORTING
            i_klart               = dy_klart
            i_class               = dy_class
            i_language            = sy-langu
            i_key_date            = sy-datum
            i_also_subclasses     = dy_subcl
          TABLES
            ct_comw               = gt_clsd_comw
          EXCEPTIONS
            exc_no_class          = 1
            exc_klart_not_allowed = 2.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    *--- fill classification data in select option
        PERFORM copy_comw_selopt_f79 TABLES gt_clsd_comw s_comw.
      ENDIF.
      IF sy-ucomm = 'ONLI'.
        sscrfields-ucomm = sy-ucomm.
      ENDIF.
    Regards
    s@k
    Edited by: siemens.a.k on Jan 15, 2010 10:10 AM

  • Using a SQL user-defined function in Crystal Reports XI

    Post Author: JoannKarp
    CA Forum: Formula
    Is it possible to use a user defined function in SQL and use this in multiple Crystal reports?
    JoannKarp

    SELECT COALESCE(ufn_GetAddressByBusinessEntityIDandAddressTypeID(table1.BusinessEntityID,712),ufn_GetAddressByBusinessEntityIDandAddressTypeID(table1.BusinessEntityID,712)) AS Zipcode
      FROM table1
    Nope. This is two function calls. coalesce(a, b, c, ...) is just syntatic sugar for
       CASE WHEN a IS NOT NULL THEN a
            WHEN b IS NOT NULL THEN b
            WHEN c IS NOT NULL THEN c
       END
    But if you use isnull it's a different matter. (But isnull() permits two arguments.)
    Erland Sommarskog, SQL Server MVP, [email protected]

Maybe you are looking for

  • My MAC does not find my iPhone when trying to sync

    I installed 'OS 10.10, yosemite, and when I plug my iPhone into the computer, it sees the phone, but after creating a new playlist on my mac, in iTunes, then try and syvc the two, the computer 'whirrs' for awhile and then comes back with the error me

  • Hello, we have a Problem with Adobe Photoshop CS6 and VM Ware.

    Hello, our Problem is: A user uses VM Ware and the OS: WIN7 She made Screenshots in the VM Ware, the Screenshots she want to edit in Photoshop, but then Photoshop lag a lot. The PC has 16 GB RAM, but uses just 9 GB ( 6 GB for the VM(she needs 6 GB ,

  • Playback to camera

    Is extremely pixelated and jittery. And the pixels are huge. It plays fine on the computer monitor and it digitizes from the camera with no problem. I've tried changing the quality of playback, restarting the software, suing different projects, about

  • Correction Invoice - Poland/Hungary

    We are facing the following problem in Correction Invoice (RK) eg: Sales Order /Delivery/ Invoice (A) created for 100 pieces. Due to the material fault 50 pieces are returned and the credit note (B)is given for that 50 pieces. Later after few weeks w

  • Decrypt a wireless WEP key from across the country

    Hi All, I recently started a new job where there is no documentation whatsoever anywhere. I have about 200 access points spread across the planet, and the majority of them have WEP keys.  I have access to the APs and can see the encrypted versions of