Which function call to execute posting change WM?

HI experts
I am new in ABAP and  program I would like to execute posting change (WM)  but I don't know which function or BAPI to call.
I was debugging transaction LQ02  and there is called BAPI_GOODSMVT_CREATE. But before calling this BAPI it should by (imported/exported) parameter of Storage unit number to some function or BAPI, but I dont know which one it should be.
Can anybody give my some suggestion about it?
Any advice is highly appreciated
Thanks

What you want to do with Posting change notice? if you want to chareate Transfer order with reference to posting change notice then use FM - L_TO_CREATE_POSTING_CHANGE.
Regards
Arif Mansuri

Similar Messages

  • Call forwarding - after the change of the phone nu...

    Hello!
    I have an subscription, which inludes Call forwarding . After changing the phone number, my Skype credit began to decrease. What is the reason and which solution could be found in this case? Looking for an answer.

    Hua Min wrote:
    D:\oraclexe\app\oracle\product\10.2.0\server\BIN>LSnrctl status
    連線至 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
    TNS-12541: TNS:沒有監聽器
    TNS-12560: TNS:協定介面程式錯誤
    TNS-00511: 沒有監聽器
    32-bit Windows Error: 2: No such file or directory
    連線至 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.104)(PORT=1521)))
    TNS-12541: TNS:沒有監聽器
    TNS-12560: TNS:協定介面程式錯誤
    TNS-00511: 沒有監聽器
    32-bit Windows Error: 61: Unknown error
    D:\oraclexe\app\oracle\product\10.2.0\server\BIN>LSnrctl service
    連線至 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
    TNS-12541: TNS:沒有監聽器
    TNS-12560: TNS:協定介面程式錯誤
    TNS-00511: 沒有監聽器
    32-bit Windows Error: 2: No such file or directory
    連線至 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.104)(PORT=1521)))
    TNS-12541: TNS:沒有監聽器
    TNS-12560: TNS:協定介面程式錯誤
    TNS-00511: 沒有監聽器
    32-bit Windows Error: 61: Unknown error
    Thanks & Best Regards,
    HuaMinYou have OS related errors; external to Oracle.
    Are both OS Services for Database & Listener running?

  • Function module is used to change the bp role

    WHICH function module is used to change the bp role????

    I have another doubt also,when i add a role (example prospect) for a bp using the function module it works fine.but if i see the classification tab in bp transaction for that particular partner,the prospect check box is not checked.
    how to check that checkbox in classification tab automatically while we create a role????

  • An error occurred when executing a REMOTE FUNCTION CALL.

    Dear all,
    We have two syetms called DXD and GRD , we have a remote enabled function module in the DXD system , when i am trying to call this Function module from
    GRD system it is going for the short dump, and giving the follwing error,
    <b>Error analysis
        An error occurred when executing a REMOTE FUNCTION CALL.
        It was logged under the name "RFC_NO_AUTHORITY"
        on the called page.</b>
    But i do have the access for the DXD system also, i am really struggling to solve this problem, if any lights are there to help me , i will be thank full for then,
    some body suggested for me that we need to maintain the Trusted system tables in the target system.
    Thanks & regards
    Satya.

    first u( user id ) have to get the Authorizations to use RFC ?
    object will be  like S_RFC or some thing like this.
    when u get this kind of error just call /NSU53 then u will come to know which Authorization Object is missing from ur User Profile.
    Regards
    Prabhu

  • Calling and executing a function module in the Portal iview development

    Hello Portal development gurus...
        I am very new to portal iview development and am learning a lot of stuff.. I now have a requirement to do the following:
      1. I need to use the NWDS to create java code in developing an iview
      2. I need to call and execute a function module and display the parameters pulled in from the function module onto a Jsp.
    3. I need to create an iview based on this deployed component.
    Could anybody please explain me how to do the coding on this front?
    I appreciate if anybody can share documentation about this kind of a development.
    As always, points galore for useful and helpful suggestions.
    Regards,
    ~~~LB

    Hi,
    Firstly Have you searched in SDN for the same, anyhow please go through the link to work on the requirement
    [/docs/DOC-8061#15|/docs/DOC-8061#15]
    Go through the thread which will talk in detail
    [https://forums.sdn.sap.com/click.jspa?searchID=19551584&messageID=6348955|https://forums.sdn.sap.com/click.jspa?searchID=19551584&messageID=6348955]
    Hope this helps.
    Cheers-
    Pramod

  • Execute Oracle Package Function call from FORTE

    Has anyone EVER successfully execute an Oracle Package Function call from FORTE
    via " sql execute procedure "?
    Here's my question, I am able to execute a stored procedure but hasn't figured
    out a way to execute a function which defined in a package. The syntax goes
    like this: sql execute procedure <PackageName>.<FunctionName> ( input
    input_parm, output output_parm). If anyone EVER successfully execute a
    function, please let me know, thanks.

    You'll need to provide a column alias for the function call:
    select func(val) as alias from dual

  • The order of execution (of PL/SQL function calls) changes...why??

    select e.EMPID empid,
    e.name name,
    aatest.SETVALUES(2) z,
    aatest.TEST1() b,
    aatest.TEST2() x,
    aatest.TEST3() y
    from emp e
    where e.empid = 101
    order by e.name;
    when I execute this select statement...the order of function calls is as follows:
    setvalues 1st (call no:1)
    test1 (call no:2)
    test2 (call no:3)
    test3 (call no:4)
    Now...I introduce a join between the two tacles as mentioned in the query
    select e.EMPID empid,
    e.name name,
    e2.deptno deptid,
    aatest.SETVALUES(2) z,
    aatest.TEST1() b,
    aatest.TEST2() x,
    aatest.TEST3() y
    from emp e, emp2 e2
    where e.empid = e2.empid
    order by e.name;
    The order of execution of function calls changes to
    (I observed this using DBMS_OUTPUT.PUT_LINE)
    test3 (call no:1)
    setvalues 1st (call no:2)
    test1 (call no:3)
    test2 (call no:4) (the first and last calls swap!)
    i.e: it calls the last function in the select statement at the beginning
    instead of calling it at the last. Is it the normal behaviour? or whats going on
    here?
    Can somebody explain me, please....
    Details:
    the following four functions are defined in a package called 'aatest' and compiled.
    aatest.SETVALUES(2)
    aatest.TEST1()
    aatest.TEST2()
    aatest.TEST3()
    the Tables EMP and EMP2 are two tables defined in the same schema.

    Your "thinking" is wrong here. You can not use the column order to model your program flow. As SQL is set/tupel based, there is no given sequence of the execution order. Otoh you want to have a specific order in wich your functions must be executed otherwise the result will be wrong (or undefined). Thus here you need a procedural approach. This can be done by using PL/SQL for example.
    You would code your functions in that way, that they are working correctly independent from the place where they are called ie if function1 needs the setvalues function, this function must be called inside the function1 then.
    Are you sure you need all these functions in this procedural approach inside the sql-statement? This is mostly not needed and can be accomplished by using pure SQL. If not, may be your design is broken.

  • Need to track Function modules called when executing a transaction

    Hi All,
              Is there a way through which i can track function modules called, while executing a Transaction. Kindly provide pointers to it.
    Thanks in advance.
    Regards,
    Navin.

    Goto SE80 Transaction and use Program name for corresponding Transaction Use Find operation like Call Function .. then you will get list of FM ..
    There is no other option .
    reward Points if it is helpful
    Thanks
    Seshu

  • We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader. For which, We created and execute the below command line to call Adobe Reader and print the PDF on a

    We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader. For which, We created and execute the below command line to call Adobe Reader and print the PDF on a printer."C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" /T "\\<Application Server>\Report\<TEST.PDF>" "<Printer Name>". Current Situation: The above command line parameter when executed is working as expected in a User's Workspace. When executed in a command line on the Application Server is working as expected. But, the same is not working while executing it from Deployed environment.Software being used: 1. Adobe 11.0 enterprise version. 2. Webshpere Application Server 8.5.5.2. Please let us know if there is a way to enable trace logs in Adobe Reader to further diagnose this issue.

    This is the Acrobat.com forum.  Your question will have a much better chance being addressed in the Acrobat SDK forum.

  • Call an executable program inside function module and pass the table values

    Hi,
           i'm pretty new to HR Abap programming. I have a requirement like "calling an executable program within a function module and the output of the program data(Stored in internal tables) should be passed to the function module tables".
    I've some idea about SUBMIT keyword and i used it in the function module..
    Please do the needful to solve this.
    Regards,
    Selvi.

    Hi,
    Thanks for all your reply.
      I've used Option 3 as per dsouzajovito suggestion. Now i'm getting data in function module tables using import/ export table to memory concept.
    Again a small issue arises, while i'm executing function module it fetches all pernr available in the server and displays the details of last pernr. GET pernr statement is used in the Z report and submit statement is used like this as follows.
      SUBMIT ZHR_RFC_PAYSLIP   WITH  PERNR-PERNR EQ EMPCODE
                                          WITH PYBEGDA EQ FDATE
                                          WITH PYENDDA EQ LDATE
                                          AND RETURN.
    Pls suggest if there is any corrections in the code.
    If i give a pernr as input in the function module, then it should fetch the details related only to that pernr.
    FYI, No selection screen is used here as per requirement.
    Regards,
    Selvi.

  • Executable created in LabVIEW 7.1 containing Call Library Function Node runs but creates error when Call Library Function Node is executed

    I have created a simplee application that controls a piece of equipment with all control via a supplied dll.  Hence, there are a number of Call Library Function Nodes within the code and a modicum of other LabVIEW code.  Everything works fine as a LabVIEW application, but when converted to an executable, although the application runs and functions, as soon as any Call Library Function Node is executed, calling from the dll, I get the C++ debug error in the attachment.
    Is this something that I can solve from within LabVIEW, or is the problem likely buried in the dll?
    Damian
    Attachments:
    CLFN error.JPG ‏22 KB

    Hi Wise,
    Try building an executable from a very simple VI that makes one call to the dll. Have you also try using the Call Library Function node on other simple dlls that you know will work?
    Regards,
    Stanley Hu
    National Instruments
    Applications Engineering
    http://www.ni.com/support

  • Cannot have execute_query in post-change but can have it when-radio-changed

    why is it possible to put execute_query in a when-radio-changed trigger but one cannot put it in
    a post-change or post-text-item trigger? (11.1.1.4)
    For example I want to ask for a year, and a month. I don't much feel like creating radio items for all those years. Whenever a year
    or a month is changed I want it to reconstruct the where clause and execute the query. But the year not being a radio group
    is more problematic about how to get execute_query to run. What is thinking here? I think that a text item post-change deserves as much power as a radio_group change! It's unfair.

    Over the years, I have found that the people that complain about Oracle Forms the most are the people that refuse to learn how Oracle Forms works. You can't expect to develop in a any framework unless you learn the rules of the framework. I've seen numerous complaints about the lack of documentation on Forms and yet the single most important form of documentation is the Oracle Forms Help system. The answer to virtually every question you might have can be found in the Forms help system, but it helps to understand a little about how Forms functions so you can ask the right questions in the help system.
    I also find it hard to understand how an employer will throw someone, with little or no exposure to Oracle Forms, into a Forms project and expect them to "Pick it up" along the way rather than take the time and expense to send them to an Oracle Forms class. How can the employer expect the employee to be successful if they are unwilling to give them the resources they need to be successful. If you are one of the unfortunates that are in this situation, then you could at least perform a simple Google search on "Forms Tutorials" and you will find numerous on-line "Free" tutorials. Don't worry about the Forms version used by these tutorials as you are only going through the tutorial to learn how to create a Form and how the Forms tool interacts with the database; which is doesn't matter which Forms version you are using because this part hasn't changed all that much between the Forms versions.
    There are even some really good books (however, quite old) that you can purchase that teach you all the basics of Oracle Forms. Here are just a few:
    Developing Oracle Forms Applications by Albert Lulushi
    Oracle Forms Developer's Handbook by Albert Lulushi
    Oracle Developer: Advanced Forms and Reports by Peter Koletske
    Programming with Oracle Developer by Matthew BennettThese are just a few books and yes they are all for older versions of Oracle Forms. But the concepts you will learn apply to any Forms version.
    While I admit that it is inconvenient that I can't call a Restricted built-in from certain triggers once you understand the reasons why you can't call Restricted built-ins it make sense why Oracle built their event model the way they did. By calling certain restricted built-ins in a trigger, such as the When-Validate-Item trigger, you could very easily cause an an endless loop to occur in your application. For example, if you were allowed to call the GO_BLOCK or GO_ITEM built-ins from a When-Validate-Item trigger you could cause cascading validation events to occur. While this is not a bad thing in and of itself, but what would happen if I sent the Forms Navigation cursor to go to an item before I had completed my validation logic. The item I sent the cursor too also happens to have validation logic assigned to it that just so happens to send the navigation cursor to the item I just left. Understand, the first item has not yet completed it's validation process and the second item sends the cursor right back the first item - which triggers a new validation event on the first item. Now I've got compounding events in the execution stack and I've put my application into a loop that I will never get out of because I've got validation logic that never completes successfully so the validation event never exits - it just keeps running and running.
    At first, you might say that it is the developers responsibility to ensure this does not happen and the developer should be more careful with their code to prevent this from happening and you would be right. We (developers) are responsible for writing safe code. However, after a while, software manufacturers eventually put restrictions in place because there are enough irresponsible developers out there causing problems and the only way to fix the issue is through the use of framework restrictions.
    Having said that, Oracle Forms has certain restrictions for good reasons. Because you don't understand what those reasons are is not a good reason to complain about the restrictions. Rather, I would hope, that your lack of understanding of a particular framework/methodology would encourage you discover the "Why's" and "How come's" of the framework.
    The simple fact of the matter is you cannot be successful with Oracle Forms unless you learn how to program within the Forms Framework. You can't take C++, Java or any other programming language and apply the rules of programming these languages to Forms. You absolutely must learn how Oracle Forms operates and what the rules are for developing successful Forms applications.
    That's my two cents on the topic. I'm trying to start a flame war; I'm just tired of hearing people complain about Forms just because they don't understand or haven't taken the time to understand how Forms operations and what the rules are for developing within Oracle Forms.
    Sincerely,
    Craig...
    Edited by: CraigB on Aug 2, 2011 12:38 PM

  • Java.lang.VerifyError - Incompatible object argument for function call

    Hi all,
    I'm developing a JSP application (powered by Tomcat 4.0.1 in JDK 1.3, in Eclipse 3.3). Among other stuff I have 3 classes interacting with an Oracle database, covering 3 use cases - renaming, adding and deleting an database object. The renaming class simply updates the database with a String variable it receives from the request object, whereas the other two classes perform some calculations with the request data and update the database accordingly.
    When the adding or deleting classes are executed, by performing the appropriate actions through the web application, Tomcat throws the following:
    java.lang.VerifyError: (class: action/GliederungNewAction, method: insertNewNode signature: (Loracle/jdbc/driver/OracleConnection;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V) Incompatible object argument for function call
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:120)
         at action.ActionMapping.perform(ActionMapping.java:53)
         at ControllerServlet.doResponse(ControllerServlet.java:92)
         at ControllerServlet.doPost(ControllerServlet.java:50)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    ...The renaming works fine though. I have checked mailing lists and forums as well as contacted the company's java support but everything I have tried out so far, from exchanging the xerces.jar files found in JDOM and Tomcat to rebuidling the project didn't help.
    I just can't explain to myself why this error occurs and I don't see how some additional Java code in the other 2 classes could cause it?
    I realize that the Tomcat and JDK versions I'm using are totally out of date, but that's company's current standard and I can't really change that.
    Here's the source code. I moved parts of the business logic from Java to Oracle recently but I left the SQL statements that the Oracle stored procedures are executing if it helps someone.
    package action;
    import java.sql.CallableStatement;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.util.StringTokenizer;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    import oracle.jdbc.driver.OracleConnection;
    * This class enables the creation and insertion of a new catalogue node. A new node
    * is always inserted as the last child of the selected parent node.
    public class GliederungNewAction implements Action {
         public String perform(ActionMapping mapping, HttpServletRequest request,
                   HttpServletResponse response) {
              // fetch the necessary parameters from the JSP site
              // the parent attribute is the selected attribute!
              String parent_attribute = request.getParameter("attr");
              String catalogue = request.getParameter("catalogue");
              int parent_sequenceNr = Integer.parseInt(request.getParameter("sort_sequence"));
              // connect to database    
              HttpSession session = request.getSession();   
              db.SessionConnection sessConn = (db.SessionConnection) session.getAttribute("connection");
              if (sessConn != null) {
                   try {
                        sessConn.setAutoCommit(false);
                        OracleConnection connection = (OracleConnection)sessConn.getConnection();
                        int lastPosition = getLastNodePosition( getLastChildAttribute(connection, catalogue, parent_attribute) );
                        String newNodeAttribute = createNewNodeAttribute(parent_attribute, lastPosition);
                        // calculate the sequence number
                        int precedingSequenceNumber = getPrecedingSequenceNumber(connection, catalogue, parent_attribute);
                        if ( precedingSequenceNumber == -1 ) {
                             precedingSequenceNumber = parent_sequenceNr;
                        int sortSequence = precedingSequenceNumber + 1;
                        setSequenceNumbers(connection, catalogue, sortSequence);
                        // insert the new node into DB
                        insertNewNode(connection, catalogue, newNodeAttribute, parent_attribute, "Neuer Punkt", sortSequence);
                        connection.commit();
                   } catch(SQLException ex) {
                        ex.printStackTrace();
              return mapping.getForward();
          * Creates, fills and executes a prepared statement to insert a new entry into the specified table, representing
          * a new node in the catalogue.
         private void insertNewNode(OracleConnection connection, String catalogue, String attribute, String parent_attribute, String description, int sortSequence) {
              try {
                   String callAddNode = "{ call fasi_lob.pack_gliederung.addNode(:1, :2, :3, :4, :5) }";
                   CallableStatement cst;
                   cst = connection.prepareCall(callAddNode);
                   cst.setString(1, catalogue);
                   cst.setString(2, attribute);
                   cst.setString(3, parent_attribute);
                   cst.setString(4, description);
                   cst.setInt(5, sortSequence);
                   cst.execute();
                   cst.close();
              } catch (SQLException e1) {
                   // TODO Auto-generated catch block
                   e1.printStackTrace();
    //          String insertNewNode = "INSERT INTO vstd_media_cat_attributes " +
    //                    "(catalogue, attribute, parent_attr, description, sort_sequence) VALUES(:1, :2, :3, :4, :5)";
    //          PreparedStatement insertStmt;
    //          try {
    //               insertStmt = connection.prepareStatement(insertNewNode);
    //               insertStmt.setString(1, catalogue);
    //               insertStmt.setString(2, attribute);
    //               insertStmt.setString(3, parent_attribute);
    //               insertStmt.setString(4, description);
    //               insertStmt.setInt(5, sortSequence);
    //               insertStmt.execute();
    //               insertStmt.close();
    //          } catch (SQLException e) {
    //               e.printStackTrace();
          * This method returns the attribute value of the last child of the parent under which
          * we want to insert a new node. The result set is sorted in descending order and only the
          * first result (that is, the last child under this parent) is fetched.
          * If the parent node has no children, "parent_attr.0" is returned. 
          * @param connection
          * @param catalogue
          * @param parent_attribute
          * @return attribute of the last child under this parent, or "parent_attr.0" if parent has no children
         private String getLastChildAttribute(OracleConnection connection, String catalogue, String parent_attribute) {
              String queryLastChild = "SELECT attribute FROM vstd_media_cat_attributes " +
                                            "WHERE catalogue=:1 AND parent_attr=:2 ORDER BY sort_sequence DESC";
              String lastChildAttribute;
              PreparedStatement ps;
              try {
                   ps = connection.prepareStatement(queryLastChild);
                   ps.setString(1, catalogue);
                   ps.setString(2, parent_attribute);
                   ResultSet rs = ps.executeQuery();
                   /* If a result is returned, the selected parent already has children.
                    * If not set the lastChildAttribute to parent_attr.0
                   if (rs.next()) {
                        lastChildAttribute = rs.getString("attribute");
                   } else {
                        lastChildAttribute = parent_attribute.concat(".0");
                   rs.close();
                   return lastChildAttribute;
              } catch (SQLException e) {
                   e.printStackTrace();
                   return null;
          * This helper method determines the position of the last node in the attribute.
          * i.e for 3.5.2 it returns 2, for 2.1 it returns 1 etc.
          * @param attribute
          * @return position of last node in this attribute
         private int getLastNodePosition(String attribute) {
              StringTokenizer tokenizer = new StringTokenizer(attribute, ".");
              String lastNodePosition = "0";
              while( tokenizer.hasMoreTokens() ) {
                   lastNodePosition = tokenizer.nextToken();
              return Integer.parseInt(lastNodePosition);
          * This method calculates the attribute of a node being inserted
          * by incrementing the last child position by 1 and attaching the
          * incremented position to the parent.
          * @param parent_attr
          * @param lastPosition
          * @return attribute of the new node
         private String createNewNodeAttribute(String parent_attr, int lastPosition) {
              String newPosition = new Integer(lastPosition + 1).toString();
              return parent_attr.concat("." + newPosition);
          * This method checks if the required sequence number for a new node is already in use and
          * handles the sequence numbers accordingly.
          * If the sequence number for a new node is NOT IN USE, the method doesn't do anything.
          * If the sequence number for a new node is IN USE, the method searches for the next free
          * sequence number by incrementing the number by one and repeating the query until no result
          * is found. Then all the sequence numbers between the required number (including, >= relation)
          * and the nearest found free number (not including, < relation) are incremented by 1, as to
          * make space for the new node.
          * @param connection
          * @param catalogue
          * @param newNodeSequenceNumber required sequence number for the new node
         private void setSequenceNumbers(OracleConnection connection, String catalogue, int newNodeSequenceNumber) {
              // 1. check if the new sequence number exists - if no do nothing
              // if yes - increment by one and see if exists
              //           repeat until free sequence number exists
              // when found increment all sequence numbers freeSeqNr > seqNr >= newSeqNr
              String query = "SELECT sort_sequence FROM vstd_media_cat_attributes " +
                        "WHERE catalogue=:1 AND sort_sequence=:2";
              PreparedStatement ps;
              try {
                   ps = connection.prepareStatement(query);
                   ps.setString(1, catalogue);
                   ps.setInt(2, newNodeSequenceNumber);               
                   ResultSet rs = ps.executeQuery();
                   // if no result, the required sequence number is free - nothing to do
                   if( rs.next() ) {
                        int freeSequenceNumber = newNodeSequenceNumber;
                        do {
                             ps.setString(1, catalogue);
                             ps.setInt(2, freeSequenceNumber++);
                             rs = ps.executeQuery();
                        } while( rs.next() );
                        // increment sequence numbers - call stored procedure
                        String callUpdateSeqeunceNrs = "{ call fasi_lob.pack_gliederung.updateSeqNumbers(:1, :2, :3) }";
                        CallableStatement cst = connection.prepareCall(callUpdateSeqeunceNrs);
                        cst.setString(1, catalogue);
                        cst.setInt(2, newNodeSequenceNumber);
                        cst.setInt(3, freeSequenceNumber);
                        cst.execute();
                        cst.close();
    //                    String query2 = "UPDATE vstd_media_cat_attributes " +
    //                                      "SET sort_sequence = (sort_sequence + 1 ) " +
    //                                      "WHERE catalogue=:1 sort_sequnce >=:2 AND sort_sequence <:3";
    //                    PreparedStatement ps2;
    //                    ps2 = connection.prepareStatement(query2);
    //                    ps2.setString(1, catalogue);
    //                    ps2.setInt(2, newNodeSequenceNumber);
    //                    ps2.setInt(3, freeSequenceNumber);
    //                    ps.executeUpdate();
    //                    ps.close();
                   } // end of if block
                   rs.close();
              } catch (SQLException e) {
                   e.printStackTrace();
          * This method finds the last sequence number preceding the sequence number of a node
          * that is going to be inserted. The preceding sequence number is required to calculate
          * the sequence number of the new node.
          * We perform a hierarchical query starting from the parent node: if a result is returned,
          * we assign the parent's farthest descendant's node sequence number; if no result
          * is returned, we assign the parent's sequence number.
          * @param connection
          * @param catalogue
          * @param parent_attr parent attribute of the new node
          * @return
         private int getPrecedingSequenceNumber(OracleConnection connection, String catalogue, String parent_attr) {
              int sequenceNumber = 0;
              String query = "SELECT sort_sequence FROM vstd_media_cat_attributes " +
                                "WHERE catalogue=:1 " +
                                "CONNECT BY PRIOR attribute = parent_attr START WITH parent_attr=:2 " +
                                "ORDER BY sort_sequence DESC";
              try {
                   PreparedStatement ps = connection.prepareStatement(query);
                   ps.setString(1, catalogue);
                   ps.setString(2, parent_attr);
                   ResultSet rs = ps.executeQuery();
                   if ( rs.next() ) {
                        sequenceNumber = rs.getInt("sort_sequence");
                   } else {
                        // TODO: ggf fetch from request!
                        sequenceNumber = -1;
                   rs.close();
                   ps.close();
              } catch (SQLException e) {
                   e.printStackTrace();
              return sequenceNumber;
    }

    After further googling I figured out what was causing the problem: in eclipse I was referring to external libraries located in eclipse/plugins directory, whereas Tomcat was referring to the same libraries (possibly older versions) in it's common/lib directory.

  • Java function call from Trigger in Oracle

    Moderator edit:
    This post was branched from an eleven-year-old long dead thread
    Java function call from Trigger in Oracle
    @ user 861498,
    For the future, if a forum discussion is more than (let's say) a month old, NEVER resurrect it to append your new issue. Always start a new thread. Feel free to include a link to that old discussion if you think it might be relevant.
    Also, ALWAYS use code tags as is described in the forum FAQ that is linked at the upper corner of e\very page. Your formulae will be so very much more readable.
    {end of edit, what follows is their posting}
    I am attempting to do a similar function, however everything is loaded, written, compiled and resolved correct, however, nothing is happening. No errors or anything. Would I have a permission issue or something?
    My code is the following, (the last four lines of java code is meant to do activate a particular badge which will later be dynamic)
    Trigger:
    CREATE OR REPLACE PROCEDURE java_contact_t4 (member_id_in NUMBER)
    IS LANGUAGE JAVA
    NAME 'ThrowAnError.contactTrigger(java.lang.Integer)';
    Java:
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "ThrowAnError" AS
    // Required class libraries.
    import java.sql.*;
    import oracle.jdbc.driver.*;
    import com.ekahau.common.sdk.*;
    import com.ekahau.engine.sdk.*;
    // Define class.
    public class ThrowAnError {
    // Connect and verify new insert would be a duplicate.
    public static void contactTrigger(Integer memberID) throws Exception {
    String badgeId;
    // Create a Java 5 and Oracle 11g connection.
    Connection conn = DriverManager.getConnection("jdbc:default:connection:");
    // Create a prepared statement that accepts binding a number.
    PreparedStatement ps = conn.prepareStatement("SELECT \"Note\" " +
    "FROM Users " +
    "WHERE \"User\" = ? ");
    // Bind the local variable to the statement placeholder.
    ps.setInt(1, memberID);
    // Execute query and check if there is a second value.
    ResultSet rs = ps.executeQuery();
    while (rs.next()) {
    badgeId = rs.getString("Note");
    // Clean up resources.
    rs.close();
    ps.close();
    conn.close();
    // davids badge is 105463705637
    EConnection mEngineConnection = new econnection("10.25.10.5",8550);
    mEngineConnection.setUserCredentials("choff", "badge00");
    mEngineConnection.call("/epe/cfg/tagcommandadd?tagid=105463705637&cmd=mmt%203");
    mEngineConnection.call("/epe/msg/tagsendmsg?tagid=105463705637&messagetype=instant&message=Hello%20World%20from%20Axium-Oracle");
    Edited by: rukbat on May 31, 2011 1:12 PM

    To followup on the posting:
    Okay, being a oracle noob, I didn't know I needed to tell anything to get the java error messages out to the console
    Having figured that out on my own, I minified my code to just run the one line of code:
    // Required class libraries.
      import java.sql.*;
      import oracle.jdbc.driver.*;
      import com.ekahau.common.sdk.*;
      import com.ekahau.engine.sdk.*;
      // Define class.
      public class ThrowAnError {
         public static void testEkahau(Integer memberID) throws Exception {
         try {
              EConnection mEngineConnection = new EConnection("10.25.10.5",8550);
         } catch (Throwable e) {
              System.out.println("got an error");
              e.printStackTrace();
    }So, after the following:
    SQL> {as sysdba on another command prompt} exec dbms_java.grant_permission('AXIUM',"SYS:java.util.PropertyPermission','javax.security.auth.usersubjectCredsOnly','write');
    and the following as the user
    SQL> set serveroutput on
    SQL> exec dbms_java.set_output(10000);
    I run the procedure and receive the following message.
    SQL> call java_contact_t4(801);
    got an error
    java.lang.NoClassDefFoundError
         at ThrowAnError.testEkahau(ThrowAnError:13)
    Call completed.
    NoClassDefFoundError tells me that it can't find the jar file to run my call to EConnection.
    Now, I've notice when I loaded the sdk jar file, it skipped some classes it contained:
    c:\Users\me\Documents>loadjava -r -f -v -r "axium/-----@axaxiumtrain" ekahau-engine-sdk.jar
    arguments: '-u' 'axium/***@axaxiumtrain' '-r' '-f' '-v' 'ekahau-engine-sdk.jar'
    creating : resource META-INF/MANIFEST.MF
    loading : resource META-INF/MANIFEST.MF
    creating : class com/ekahau/common/sdk/EConnection
    loading : class com/ekahau/common/sdk/EConnection
    creating : class com/ekahau/common/sdk/EErrorCodes
    loading : class com/ekahau/common/sdk/EErrorCodes
    skipping : resource META-INF/MANIFEST.MF
    resolving: class com/ekahau/common/sdk/EConnection
    skipping : class com/ekahau/common/sdk/EErrorCodes
    skipping : class com/ekahau/common/sdk/EException
    skipping : class com/ekahau/common/sdk/EMsg$EMSGIterator
    skipping : class com/ekahau/common/sdk/EMsg
    skipping : class com/ekahau/common/sdk/EMsgEncoder
    skipping : class com/ekahau/common/sdk/EMsgKeyValueParser
    skipping : class com/ekahau/common/sdk/EMsgProperty
    resolving: class com/ekahau/engine/sdk/impl/LocationImpl
    skipping : class com/ekahau/engine/sdk/status/IStatusListener
    skipping : class com/ekahau/engine/sdk/status/StatusChangeEntry
    Classes Loaded: 114
    Resources Loaded: 1
    Sources Loaded: 0
    Published Interfaces: 0
    Classes generated: 0
    Classes skipped: 0
    Synonyms Created: 0
    Errors: 0
    .... with no explanation.
    Can anyone tell me why it would skip resolving a class? Especially after I use the -r flag to have loadjava resolve it upon loading.
    How do i get it to resolve the entire jar file?
    Edited by: themadprogrammer on Aug 5, 2011 7:15 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:21 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:22 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:23 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:26 AM

  • Calling LrTasks.execute from within a plug in manager control

    I'm working on a Lightroom post-processing-filter plug in which has most of the functionality inside an executable that resides inside the plug in folder.
    The executable is responsible for doing the actual photo processing but is also responsible for obtaining and verifying that there is a valid license. This means that I need to let the user eneter an activation code, pass that to the executable which will talk to our server and get a license.
    I would like to handle that activation part from the plug-in manager dialog so I've added a top section (see following code) with a text field and a button and I've added code to call the executable when the button is pressed, but the executalbe is never called.
    Is what I'm trying to do impossible? Any workarounds?
    Thanks in advance!
    Eyal
    function PluginManager.sectionsForTopOfDialog( f, p )
              p.my_result = 0
    return {
              -- section for the top of the dialog
                        bind_to_object = p,
                        title = "MyPlug",
                        f:row {
                                  spacing = f:control_spacing(),
                                  f:static_text {
                                            title = LrView.bind( "my_result")
                                  f:push_button {
                                            width = 150,
                                            title = 'Run Exe',
                                            enabled = true,
                                            action = function()
                                                      command = '"' .. LrPathUtils.child(LrPathUtils.child( _PLUGIN.path, "mac" ), "MyTool" ) .. '" ' .. '-action check"'
                                                      quotedCommand = command  
                                                      p.my_result = LrTasks.execute( quotedCommand )
                                            end,
    end

    Thanks Rob,
    I'm afraid it didn't work for me. The code inside postAsyncTaskWithContext is not executed, as far as I could see. I didn't see any diagnostic messages.
    local LrView = import "LrView"
    local LrHttp = import "LrHttp"
    local bind = import "LrBinding"
    local app = import 'LrApplication'
    local LrPathUtils = import 'LrPathUtils'
    local LrTasks = import "LrTasks"
    local LrDialogs = import 'LrDialogs'
    local LrRecursionGuard = import 'LrRecursionGuard'
    PluginManager = {}
    function PluginManager.sectionsForTopOfDialog( f, p )
              p.my_result = 0
              local buttonGuard
    return {
              -- section for the top of the dialog
                        bind_to_object = p,
                        title = "MyPlug",
                        f:row {
                                  spacing = f:control_spacing(),
                                  f:static_text {
                                            title = LrView.bind( "my_result")
                                  f:push_button {
                                            width = 150,
                                            title = 'Do Something',
                                            enabled = true,
                                            action = function(button)
                                                      LrFunctionContext.postAsyncTaskWithContext(button.title,function (context)
                                                                p.my_result = 3
                                                      end)
                                            end,
    end

Maybe you are looking for

  • Time Machine and Time Capsule Problems

    I have a Time Capsule and my Time Machine no longer seems to work on my MBA. It had been working fine for the past 2 months. It would do quick backups (between 1-3 MB normally) after my first long backup. Now whenever I look at my MBA it will show Ti

  • Value Transport (Exporting) to multiple screen fields in Search Help

    Hi all, I have created elementary search help using exit and attached it to data element. After F4 when I get hitlist I want all the values from the selected rows to get copied to the screen fields. I.e. I want the value transport. In the search help

  • Oracle Upgrade from 8.1.7.4 to 9.2

    Hi ALL, I am having a problem when i am trying to upgrade oracle from 8.1.7 to 9.2. I have installed Oracle 9i in seperate oracle home directory than the original 8.1.7 home directory. After that i have removed oracle_home = sid from <SID>adm user en

  • How to arrange two items into a row in the webdynpro provided by SAP?

    I am trying to custormize the ESS personal information - address info. My question is that how to put two separate items (like City and Address) into a same row? That is to change City: xxx Address: bbb to City: xxx     Address: bbb ps: I didn't got

  • 9.0.5.2: Problems with JUComboBoxBinding (range size wrong)

    This worked in 9.0.3.3: We have a simple JComboBox with a navigation binding. In 9.0.5.2 the navigation binding doesn't navigate anymore. The cause for this is that ADF somewhere for whatever reasons sets the range size of the underlying RSI to 1. Th