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

Similar Messages

  • How can you change a user defined swatch

    How can you change a user defined swatch

    Double click on the swatch in the swatches palette.
    In most case you can do that , unless for example you have a placed image that has that color in a spot channel.

  • 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

  • How to use StreamTransformationException in user-defined function?

    Hi,
    I'm doing a DBLookup (using Java pgm in one of my Imported Java archives) for populating one of the fields in message mapping. If the DB connection fails, I want to terminate the mapping by throwing a StreamTransformationException from within a user-defined function.
    I require urgent help in this regard.
    Thanks in advance.
    Regards,
    Sridhar Rajan N

    Hi,
    I had the same problem. I failed to find the way how to throw a StreamTransformationException in my user-defined function. But I used another exception: NullPointerException. Yes, I know, this is not an elegant solution...
    Best regards,
    Andrzej Filusz

  • How to call Microsoft SQL User defined function??

    I am trying to call Miscrosoft SQL user defined function (not stored procedure) and experience problems. The function -- func_profile_history takes 3 inputs and returns resultSet.
    Please let me know if there is any examples some where. All the examples I found are for stored procedure.
    Thanks....
    Siu
    ************ source *************
    public Vector callSqlFunction(String eidTradcom, String idSku, String endDate, String idUserPost)
    throws TradcomException, RemoteException
    System.out.println("--------------in callSqlFunction--------------1");
    Connection conn = null;
    java.sql.CallableStatement cstmt = null;
    ResultSet rs = null;
    ForecastInfo info = null;
    Vector v = new Vector();
    try{
    conn = TradcomUtils.getConnection();
    String sql = "{call func_profile_history(?,?,?)}";
    System.out.println("--------------in callSqlFunction--------sql="+sql);          
    cstmt = conn.prepareCall(sql);
    System.out.println("--------------in callSqlFunction-------2");                         
    cstmt.setString(1, eidTradcom);
    cstmt.setString(2, idSku);
    cstmt.setString(3, endDate);
    System.out.println("--------------in callSqlFunction-------3");                    
    rs = cstmt.executeQuery();
    System.out.println("--------------in callSqlFunction-------4");                    
    while (rs.next()){
         info = new ForecastInfo ();
         info.setEidTradcom(rs.getString("eid_tradcom"));
         info.setIdSku(rs.getString("id_sku"));                    
         info.setQtOnHand(rs.getDouble("qt_on_hand"));                    
         info.setQtOnHold(rs.getDouble("qt_hold"));
         info.setQtNetOnHand(rs.getDouble("qt_net_on_hand"));
         info.setQtAlloc(rs.getDouble("qt_alloc"));
         info.setQtAvailUnalloc(rs.getDouble("qt_avail_unalloc"));     
         info.setQtPoShip(rs.getDouble("qt_po_ship"));
         info.setQtPoRcvd(rs.getDouble("qt_po_rcvd"));
         info.setQtTransit(rs.getDouble("qt_transit"));
         info.setQtAsn(rs.getDouble("qt_asn"));                    
         info.setQtPo(rs.getDouble("qt_po"));
         info.setQtPoBalance(rs.getDouble("qt_po_balance"));
         info.setQtSoShip(rs.getDouble("qt_so_ship"));     
         info.setQt4Cast(rs.getDouble("qt_4cast"));
         v.addElement(info);
    System.out.println("--------------in callSqlFunction-------5");     
    System.out.println("--------------in callSqlFunction-------v="+v);          
    return v;
    }catch(Exception ex){
    System.out.println("Error in callSqlFunction:"+ ex.getMessage());
    throw CachingManager.getTradcomException(ex, "Error in callSqlFunction");
    }finally{
    try{ if (cstmt != null) cstmt.close(); } catch(Exception ex){}
    try{ if (conn != null) conn.close(); } catch(Exception ex){}
    ********************* error output ***************
    ********************* bef calling callSqlFunction
    --------------in callSqlFunction--------------1
    --------------in callSqlFunction--------sql={call func_profile_history(?,?,?)}
    --------------in callSqlFunction-------2
    --------------in callSqlFunction-------3
    Error in callSqlFunction:The request for procedure 'func_profile_history' failed
    because 'func_profile_history' is a function object. Severity 18, State 1, Proc
    edure 'LAP_DUAL null', Line 4
    ERROR=Error in callSqlFunction...The request for procedure 'func_profile_history
    ' failed because 'func_profile_history' is a function object. Severity 18, State
    1, Procedure 'LAP_DUAL null', Line 4

    well, I tried the preparedStatemnet and it worked. Case closed.

  • How can you create a user using mbean

    Or if you already created a user via console,
    how can you access it with mbean ?
    what is the domain, and type etc?
    Thanks
    netatta

    Thanks Wayne. I'll have to try that. Although I'm wondering, doesn't Oracle have plans to use one-way password encryption at some point? making this method of password retrieval break?
    I've also found the following article. It talks about how the OIM API can get an authenticated user session from the authenticated WLS session. It's tantalizing! But doesn't really match my use case or reveal the inner mechanics of how the OIM API gets what it needs from WLS; and therefore I don't think I can subvert that mechanism to do impersonation.
    http://fusionsecurity.blogspot.com/2013/01/authenticating-oim-apis-without-end.html
    Another approach I'm looking at, which works if all i want to do is fire up a session for one specific user (e.g. an unprivileged service account), is to use creds (username and password) stored in the WLS Credential Store (CSF). See appendix A in:
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/oim/oim_11g/developing_oim_custom_approval_process_for_resource_provision/developing_oim_custom_approval_process_for_resource_provision.pdf

  • How can you edit a User defined Graphic Style Library?

    Sometimes I need to make small changes to my User defined Graphic Style Libraries - Add or remove an item or update another etc... Is this possible?
    Thank you for your time
    ++Michael

    I thought I was the only one!
    I asked a similar question and got no reply. My problem is I want to move from one library to another. I even had a chat with Adobe tech support and got no answer.
    I ended up deleting the assets and re-downloading into the new one.

  • How do you add a user defined page size for a "standard" user

    I have been trying to add a User Defined Page size in the Adobe PDF Properties with a "Standard" AD account.  When I click add/modify, no error shows up on the screen but the page size does not show up in the drop down menu.  The only accounts that can add page sizes are "Admin" accounts, as far as I know.  Does anyone know a workaround?  PLEASE HELP!!!

    Firefox unable to store your password without username.
    *https://support.mozilla.org/en-US/kb/password-manager-remember-delete-change-passwords

  • How do I create new user table in program and then access it?

    I am writing an application where I check for the existence of user objects when the add on starts and run the setup if the objects do not exist. I can create the user tables and fields but after the setup completes these objects still are not visible.
    If the user objects exist when the add on is first run everything is detected correctly.
    When a user object is added in SAP the user is eventually prompted to restart so I suspect something needs to happen prior to the add on being able to use the new fields.
    Does the add on need to wait for the DI Server to perform some action? Do I need to just quit the add on's class and rerun it, disconnect and reconnect to the company, or get a new Application and/or company object?
    What I want to do is figure out a way for the add on to automatically run the configuration if the user tables and fields do not exist yet and then kick off the regular add on code. I haven't seen anyone else's code so I don't know what is recommended or required here.
    Thanks for any assistance!

    I found that the add on can validate the existance of the user fields if I disconnect from the company object, set the SAPbouiCOM.Application and SAPbobsCOM.Company objects to null, set the new application, context, and company objects, and reconnect once more.
    HOWEVER...
    I still have to wait for the client to be restarted manually before I can run any of the form I added to the menu.
    So, I'd still like to know what the best practice is here. Should I just exit after setting up the tables and tell the user to restart SAP?

  • HOW DO YOU DISABLE X-MARKS FROM POPPING UP AND SHUTTING DOWN PC HAVE TO RESTART TO GET IT TO WORK AGAIN

    X- MARKS COMES ON SCREEN AND IF I DO NOT CANCEL
    IT LOCKS UP MY PC AND THEN I HAVE RESTART MY PC TO
    GET TO WORK,ALL I WANT KNOW IS WHERE CAN FIND HOW TO DISABLE X-MARKS OR REMOVE IT FROM MY PC.
    THANKS

    no, u can't disable it. it is automatic.

  • Problem creating a user defined function...

    I have written a function in oracle as follows:
    ===========================
    CREATE OR REPLACE
    function getTeacherNameForHmroomAndSch(in_student_id STUDENTS.STU_ID%TYPE)
    return varchar2 as
    emp_full_name varchar2(64);
    begin
         stu_school_id STUDENTS.STU_CURRENT_SCHOOL_ID%TYPE;
         stu_home_room STUDENTS.STU_HOMEROOM%TYPE;
         emp_id EMPLOYEES.EMPLOYEE_ID%TYPE;     
         select STU_CURRENT_SCHOOL_ID, STU_HOMEROOM INTO stu_school_id, stu_home_room from STUDENTS where STU_ID = in_student_id;
         select el1.TL_EMPLOYEE_ID into emp_id from EMPLOYEE_LOCATIONS el1
         where el1.TL_ID = (select max(el2.TL_ID) from (select el.TL_ID
         from EMPLOYEE_LOCATIONS el
         where el.TL_LOCATION_ID = stu_school_id
         and el.TL_HOMEROOM = stu_home_room) el2 group by el2.TL_ID);
         select case when FIRST_NAME is null then LAST_NAME else FIRST_NAME || ' ' || LAST_NAME end into emp_full_name from EMPLOYEES where EMPLOYEE_ID = emp_id;
         return emp_full_name;
         EXCEPTION
              WHEN NO_DATA_FOUND THEN
              RETURN null;
    end getTeacherNameForHmroomAndSch;
    ===========================
    When I am executing this create function i.e., compiling function in a SQL Editor, the SQL engine is throwing a warning message as follows:
    ===========================
    Warnings: --->
    W (1): Warning: execution completed with warning
    <---
    ===========================
    As a result, am not able to use this function in my SQL.
    Please suggest a solution for my problem.
    Thank You.
    Shravan Kumar.M

    Hello,
    It is possible to create user fields using SDK on anykind of table but, sometimes in some Tables, adding them causes integrity problems and B1 cannot create the document of the Table, you can try that, but if there's an error when adding the bank statement you should erase it from the OBNK table using SDK again.
    I've tried this on MRV1 (Inventory Revaluation Lines) and IPF2 (Landed Costs, Costs), when I tried to add the document (Inventory Revaluation or Landed Costs) appeared an error and B1 could not create the document, so i had to remove them with SDK again and the error was solved.
    Best Regards hope it'll help you
    Gabriela

  • How do I modify a user-defined function in SQL Plus

    I have created some functions in my database. Can anybody tell me how to modify/edit those functions?

    PS C:\> $Class2 = New-Object MyTest.Class1
    PS C:\> $Class2
    MyString Struct1Property Struct2Property
    MyTest.Struct1 MyTest.Class1+Struct2
    PS C:\> $Struct2 = New-Object MyTest.Class1+Struct2
    PS C:\> $Struct2.Property = "X"
    PS C:\> $Struct2
    Property
    X
    PS C:\> $Class2.Struct2Property = $Struct2
    PS C:\> $Class2.Struct2Property.Property
    XPS C:\> $Struct2.GetType()
    IsPublic IsSerial Name                                     BaseType                                                                    
    False    False    Struct2                                  System.ValueType                                                            
    Struct2 is a valuetype, (by value)
    The classes are by reference
    PS C:\> $Struct3 = $Class2.Struct2Property
    PS C:\> $Struct3
    Property
    X
    PS C:\> $Struct3.Property = "Y"
    PS C:\> $Class2.Struct2Property.Property
    X
    PS C:\> $Class2.MyString = "A"
    PS C:\> $Class3 = $Class2
    PS C:\> $Class3.MyString = "B"
    PS C:\> $Class2.MyString
    B

  • How do you create a complete database in notepad and execute it in SQL*Plus

    I am new to Oracle / SQL*PLUS / and the SQL Language. I have never done anything with these products before. I am running Oracle 9i Enterprise Edition. I have a database created and I was able to get a table created.
    That's it so far....
    I would like to start doing all coding and editing in Windows Notepad and then execute the code from within the SQL*Plus editor.
    Can someone please tell me......How do I do this???
    I have my data, that I will be running queries on, located in a text file.
    How do I get my SQL code to import the data from a text file into my tables???
    Thanks,
    Bobby Howerton

    Actually, @your_text_file would start executing this textfile - which is ok if there is SQL code in the file. But how I understand the question, is that the data to load into one ore more tables is in the text file. Is that correct?
    If so, if it's a lot of data, it's worth entering the documentation on the Server Utilities, search for SQL loader for example.
    If it's only a view records, than simply alter the contents to something like:
    insert into <put_table_name_here> (<put_column_names_here>) values (<data in the text file, seperated with comma's>);
    And there should be one line like this for each record, or look up the command "insert all" in the SQL reference.
    Good luck!

  • How do you create a jar file with txt and classes?

    Hey, I'm trying to create code to create a jar file with a text file, but I can't figure out how to add the text file. Here is what I have so far:
    try {
                // Name of jar file to write
                String archiveFile = "test.jar";
                Manifest jman = new Manifest();
                try {
                    // Create a manifest from a file
                    //InputStream fis = new FileInputStream("manifestfile");
                    //Manifest manifest = new Manifest(fis);
                    // Construct a string version of a manifest
                    StringBuffer sbuf = new StringBuffer();
                    sbuf.append("Manifest-Version: 1.0\n");
                    sbuf.append("Ant-Version: Apache Ant 1.7.1\n");
                    sbuf.append("Created-By: 1.5.0_19-137 (Apple Inc.)\n");
                    sbuf.append("Main-Class: Main\n");
                    sbuf.append("Class-Path: lib/swing-layout-1.0.3.jar\n");
                    sbuf.append("X-COMMENT: Main-Class will be added automatically by build\n");
                    // Convert the string to a input stream
                    InputStream is = new ByteArrayInputStream(sbuf.toString().getBytes("UTF-8"));
                    // Create the manifest
                    jman = new Manifest(is);
                } catch (IOException e) {
                FileOutputStream stream = new FileOutputStream(archiveFile, true);// archive file is jar file name
                JarOutputStream out = new JarOutputStream(stream, jman);
                out.putNextEntry(new JarEntry("test.txt"));
                out.closeEntry();
                out.close();
            } catch (Exception ex) {
            }It creates the .jar file with the correct manifest but I can't get it to write the test.txt or anything else into the jar file.
    -Gandolf
    Edited by: GanMatt on Jun 18, 2009 8:18 AM
    Edited by: GanMatt on Jun 18, 2009 8:19 AM

    Alright, my question has changed. Here's the code:
    try {
                // Name of jar file to write
                String archiveFile = "test.jar";
                Manifest jman = new Manifest();
                try {
                    // Create a manifest from a file
                    //InputStream fis = new FileInputStream("manifestfile");
                    //Manifest manifest = new Manifest(fis);
                    // Construct a string version of a manifest
                    StringBuffer sbuf = new StringBuffer();
                    sbuf.append("Manifest-Version: 1.0\n");
                    sbuf.append("Ant-Version: Apache Ant 1.7.1\n");
                    sbuf.append("Created-By: 1.5.0_19-137 (Apple Inc.)\n");
                    sbuf.append("Main-Class: Main\n");
                    sbuf.append("Class-Path: lib/swing-layout-1.0.3.jar\n");
                    sbuf.append("X-COMMENT: Main-Class will be added automatically by build\n");
                    // Convert the string to a input stream
                    InputStream is = new ByteArrayInputStream(sbuf.toString().getBytes("UTF-8"));
                    // Create the manifest
                    jman = new Manifest(is);
                } catch (IOException e) {
                FileOutputStream stream = new FileOutputStream(archiveFile, true);// archive file is jar file name
                JarOutputStream out = new JarOutputStream(stream, jman);
                out.putNextEntry(new JarEntry("test.txt"));
                out.write("Hi".getBytes());
                out.flush();
                out.closeEntry();
                out.close();
            } catch (Exception ex) {
                JOptionPane.showMessageDialog(this,ex.toString(),"BUG!",JOptionPane.INFORMATION_MESSAGE);
            }It creates the jar file with the txt file inside it, but I can't write "Hi" inside of the text file. Any ideas?
    -Gandolf

  • How do You create menu buttons that move up and down with a remote?

    I have six menu items that are linked to their proper locations. When I simulated it a Hand moves over the proper choice then when I click there we go.
    But on the DVD simulator you can't navigate. I thought maybe I would bring in one of the templates to use their buttons I can't get my images to replace theirs. Any help appreciated.
    Jerome

    Take a look here to make sure buttons are being set properly
    http://dvdstepbystep.com/buttons07m.php
    And download the movie if you like
    I create a button, then set the text and include highlights
    I then create another button, then set the text and the include highlights
    I then click on the menu and go to the inspector to see colors
    RED Normal
    BLUE Selected
    YELLOW Activated
    In simulater I then use the remote control and CANNOT navigate through the buttons
    I stop Simulator and then use Auto Assign Buttons Now Command, then relaunch Simulator and get the remote control to work
    Make sure to link the button to the track you want to go to.
    I thought the issue is that you cannot navigate the buttons with the remote control? If you only have one button on the screen, it will always be selected (Yellow in your project as described)
    If it is flashing Megenta and nothing happens, it means a target has not been set (or somehow you are targeting the menu again)
    So the only two condiitions you will see is yellow or magenta.

Maybe you are looking for

  • Delivery split based on schedule lines

    Hello toghether, I hope someone could help me. I have the following problem. I need to split a delivery, if some data on the schedule lines is different. That means, if I have 3 schedule lines with different data (except the delivery date) I need 3 d

  • US Macbook Pro, wanting to print '£' symbol, Alt+3 not working.

    I have a U.S. Macbook. Region Set to United Kingdom. Alt+3 does not result in '£' sign being printed instead of a white space. AltShift2 prints out '€' easily enough, every other keyboard shortcut for symbols works as well. Shift+4 prints '$' as it s

  • Bug CSCti41352 for Common Services 3.0.5

    /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Tabla normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm

  • Why Acrobat 9.5.5 Pro scrambles PDF text print, OSX.10.2?

    As I'm getting ready to meet with City officials I am unable to print my material and the only option I have is to post a question on a forum, this is just wrong. If I was told to buy an update I would, happily, but I have no idea if that would fix t

  • Cant get javac to run

    new to programming, but not computers. have installed the JDK but javac will only give me a bad command message. I've permanantly set the path and other programs in the bin file will run with no error messages. I've rebooted and reinstalled and then