Help regarding code for title change

Hi All,
I have a requirement like whenever we change the PO ie., when we change the  line item data say for example, if there is a quantity like 20kg and if we want to update itto 30kg., the PO will be changed.
In such change cases, the title of the PO should be changed to "Purchase Order Change". 
In these cases, the changes will be recorded in the table CDHDR and CDPOS.
Can anyone pl tell me of how to write the code for this in the script as well as in the subroutine ...
Help will be rewarded the best..

Done. Found out the solution

Similar Messages

  • Help with code for inserting horizontal scroll bar in photo gallery in Business Catalyst site?

    Hi,
    I am using Business Catalyst and Dreamweaver to create a trial site.
    I am not sure if this is the correct forum to post this request but anyway I have inserted a photo gallery module at the bottom of the sidebar in the homepage of my test site.
    Can anyone advise on whether jquery or any other code can be inserted into the page or module code that will replace the "next" hyperlink below the first 4 photos with a horizontal scroll bar at bottom of the gallery so users can just scroll through all 12 images ?
    Kind Regards, Matt.
    http://craftime-bs6.businesscatalyst.com/

    Alyssa,
    Have you tried putting this rule back as it was originally:
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible
        left: auto; /*was 9px*/
        color: #EF9CCF;
        background-color: #FFF;
    That is, changing your 9px back to auto.
    And giving  us a link (as you did) is much better than printing out the code for us! Thanks!
    Beth

  • Help regarding code

    hi, i have problem in coding for the below situation. please help me in this regard.
                                    aravind.
    Name          Code name                 No
      --              Master                    -
      --              Master                    -
      --              Visa                      -
      --              Master                    -
    --                Master                    -
    Write code for Knowing how many master and visa records present in local file

    Hai Aravind
    Go through the following
    DESCRIBE - return attributes of an internal table
    Basic form
    DESCRIBE TABLE itab.
    Effect
    Returns the attributes of the internal table itab . You must use at least one of the additions listed below.
    Additions
    1. ... LINES lin
    2. ... OCCURS n
    Addition 1
    ... LINES lin
    Effect
    Places the number of filled lines of the table t in the field lin .
    Example
    DATA: BEGIN OF TAB OCCURS 10,
            X,
          END OF TAB.
    DATA: LIN TYPE P.
    CLEAR TAB. REFRESH TAB.
    MOVE '?' TO TAB-X.
    APPEND TAB.
    DESCRIBE TABLE TAB LINES LIN.
    Result: LIN contains the value 1.
    Addition 2
    ... OCCURS n
    Effect
    Transfers the size of the OCCURS parameter from the table definition to the variable n .
    Example
    DATA: BEGIN OF TAB OCCURS 10,
            X,
          END OF TAB.
          OCC TYPE P.
    DESCRIBE TABLE TAB OCCURS OCC.
    Result: OCC contains the value 10.
    Note
    If the table is meant to accept more lines than specified by the OCCURS parameter, the parameter value is roughly doubled as long as the table size remains smaller than 8 KB; this table area is held in the roll area. If the table exceeds the maximum permitted size, the OCCURS parameter is not increased and the remaining part of the table is rolled out to the paging area (see DATA ).
    For this reason, the OCCURS value determined by the DESCRIBE statement may differ from that in the DATA statement.
    The runtime required to execute the DESCRIBE TABLE statement is approx. 4 msn (standardized microseconds).
    Regards
    Sreeni

  • Re:Help with code for server client

    Hi i am struggling to adapt code for UDPServer and client programs.
    how can i adapt the following server code to add a message before replying to the client?
    import java.net.*;
    import java.io.*;
    public class UDPServer2{
    public static void main(String args[]){
         DatagramSocket aSocket = null;
              try{
              aSocket = new DatagramSocket(9000);
                             // create socket at agreed port
                   byte[] buffer = new byte[1000];
                   while(true){
                        DatagramPacket request = new DatagramPacket(buffer, buffer.length);
                        aSocket.receive(request);
                   DatagramPacket reply = new DatagramPacket(request.getData(), request.getLength(),
                        request.getAddress(), request.getPort());
                             aSocket.send(reply);
              }catch (SocketException e){System.out.println("Socket: " + e.getMessage());
              }catch (IOException e) {System.out.println("IO: " + e.getMessage());
              }finally {if(aSocket != null) aSocket.close();}
    any help would be much appreciated i have tried altering the aSocket.send(reply) line but to no avail.
    thank you in advance

    Hi i am struggling to adapt code for UDPServer and
    client programs.
    how can i adapt the following server code to add a
    message before replying to the client?What do you want to add before replying to the client?

  • Complete List of Error Codes for Customized Change Password Page

    Hi,
    does anyone has a complete list of "Change Password Page Error Codes"?
    The list provided in the document:
    Oracle® Application Server Single Sign-On Administrator's Guide
    10g (9.0.4)
    Part Number B10851-01
    seems to be incomplete. (See: http://download-uk.oracle.com/docs/cd/B10464_01/manage.904/b10851/custom.htm#1009955 )
    I found at least three additional / different error codes:
    auth_fail_err
    pwd_minlength_err
    pwd_numeric_err
    I'm using a JSP Page.
    Thanks for help

    Hi,
    I found the list in the OID Admin Documentation. The list contains the error messages the OID sends to the client. In case of SSO, the client for the OID is the SSO server. So now I know which errors are transmitted to the server, I have to find out what the server sends to the SSO Page for Password change. Probably I should test all cases documented in the OID Admin doc to find the appropriate values for SSO Server.
    Thanks for the tip

  • Help with code for score-keeping with dynamic text box

    Hi All,
    I'm having an actionscript 2.0 problem with keeping score.
    I have a dynamic text box with a variable called score.
    I have the following action code for that variable:
    _root.score = 0;
    For the correct answer button I have this action:
    _root.score = Number (score) +10;
    This works fine to increase the score by 10 for each correct answer.
    The problem is that I can't get an if statement to work for when the score reaches 150 to gotoAndPlay a certain frame. I've tried various syntax, I've tried it on the action for a button and an action for the timeline with: 
    onRelease = function () {
    (My learning game is set up to allow for users to answer up to four extra questions to reach the score of 150).
    Nothing works. Any suggestions please?
    Pam

    Below is a link to a small sample file.  See if you can find anything different between your file and the one linked that might cause yours to not work as desired.
    http://www.nedwebs.com/Flash/AS2_score_sample.fla

  • Help with code for System.currentTimeMillis()

    I need to time how long it takes to do various sorts (selection sort, insertion sort) and was instructed to use System.currentTimeMillis() to accomplish this. Please take a look at the code below and let me know what is wrong. I can get the file to complile but it does not record the time it takes to run the sorts. I'm pretty sure my error is in the below section of code. In order to save space, I've only pasted the snippit of code for this particular function. Let me know if I need to paste more code. Thanks in advance.
    case 5:
                             System.out.print("Enter the value to look for: ");
         val = scan.nextInt();
         time1 = System.currentTimeMillis();
         loc = list.linearSearch(val);
         time2 = System.currentTimeMillis();
                             totalTime = time1 - time2;
                             System.out.println("Total time for this search is: " + totalTime);
         if (loc != -1)
                                  System.out.println("Found at location " + loc);
         else
                                  System.out.println("Not in list");
         break;
                             

    It could be that it isn't actually doing anything
    though. Either because the data is poorly choosen or
    because it isn't actually sorting due to a bug.The name of the method being timed is "linearSearch". That's a really poor name for a method that is supposed to be sorting. But from other aspects of the code I would guess that it is doing a linear search of an array, looking for a particular integer. Even if the integer isn't in the array, comparing 20,000 integers is a trivial exercise.
    People don't realize just how long a millisecond is for a computer. If you have a 1 GB processor (not uncommon these days) then you can do one billion (one thousand million) operations per second. That's one million operations per millisecond. So chances are, even realizing that there's a whole lot of overhead in a high-level language, the OP's code runs in less than 1 millisecond.

  • Help! - code for infix to postfix

    can someome please send me the code for infix to postfix?
    thanks

    Or--and I know this will sound crazy, but just keep an open mind--you could try doing your homework yourself, and then post your attempt here when you get stuck, along with details of what specific problems you are having.
    If you are unwilling or unable to do that, then you should look elsewhere. This site is not a place to get code written for you. Try finding someone who will do it for money.

  • Need help with code for adding dates to form

    Hello forum goers
    I'm new to making forms and figured out how to auto add the date, however I need the form to change the date for every copy made.
    For example today is 06/08/2012 if I print 10 copies of the form it will output 10 pages ranging from 06/08/2012 to 06/17/2012. If code exists to do this I would be very gratefull to whoever helps, I also wouldn't mind if that is not possible for manually inputing the start / end dates.
    Currently I print 15-30 copies of the form and hand write each of the dates but I'm just getting to busy to do that. I also cannot print one a day it must be in batches.
    Thanks in advanced.

    What you are asking for is more complex than just setting the current date. Each time the form prints it has to know that it has to change the date. I would suggest doing this.
    First, setup a document level script to set the date to the current date. I suspect that you have already done this?
    Next, Create a "DidPrint" document action to increment the date.  To do this the script will need to scan the current text value of the date, add one day to it, and then reformat it.  You'll find information on this type of scripting in these articles:
    http://acrobatusers.com/tutorials/working-with-date-and-time-in-acrobat-javascr
    ipt
    http://acrobatusers.com/tutorials/working-with-date-and-time-in-acrobat-javascr
    ipt-part-2
    http://acrobatusers.com/tutorials/working-with-date-and-time-in-acrobat-javascr
    ipt-part-3
    Since the increment happenes in the Did Print you will need to print each copy individually. If you enter 10 copies in the print dialog it won't work. You have to print one at a time.  You can automate this activity with a console script.
    One of the advantages of incrementing in the DidPrint is that you can also manually enter a date and it will increment from there.
    Thom Parker
    The source for PDF Scripting Info
    pdfscripting.com
    The Acrobat JavaScript Reference, Use it Early and Often
    Then most important JavaScript Development tool in Acrobat
    The Console Window (Video tutorial)
    The Console Window(article)
    Having trouble, Why Doesn't my Script Work?

  • Help regarding applet for querying client's MAC?

    Please help with an applet and java code that uses Runtime.getRuntime().exec("ipconfig -all") and gets the client's machine MAC address?
    If any one already worked with applets for querying client mahchine MAC , please give me a solution.

    remus.dragos wrote:
    vasu.mtech wrote:
    I am giving an explanation where I want this:
    We have an application, where user will be given a specific machine(with one MAC) and have to login from there only. If he tries to login from different machine with same user id, we should throw an error message. That's concept. We know that this reduces/kills operatability of the user from different machines.
    But we shouldn't allow the user operating from diffrent machines.What happens if the admins NIC burns? And he gets a news one? He can't log in until you manually change his
    MAC in the database ???Database? That's not secure!
    It has to be hardcoded into the exe (guess what the kid's next question will be?).

  • Where to put the code for dynamically change  dataprovider

    I have a table bound to dataprovider1 by default ( by the SJC ). In the same page, I also have a dataprovider2 which is for the same fields of the same table of dataprovider1. The only different is to put some criteria on one field ( like F_D1 = '5' ) so that one provider will show all rows, the other just some rows.
    The code to change the dataprovider is as follows :
    tableRowGroupWorksheet.setValueBinding("sourceData", getApplication().createValueBinding("#{WorksheetPage.dataprovider2}") );
    If I put this code into some button_action() and then I click that button, then the page displays the corresponding data just fine.
    But if I put this code in either preprocess or prerender, then things seems messed up : the number of pages is for data of dataprovider1, but when I click button Next of the table then it shows the number of pages of dataprovider2. ( I also try to put it in init but this does not help either ).
    I need this code to be run when this page is selected but right now it requires me to click on a button :(
    The reason I need it runs automatically is because of the logic generated from the previous page.
    Thanks for your advive,
    Vu

    After re-reading the life-cycles of JSF and the injected phases of SJC, I think I know why it does not work when the page is first called. In this case, AplyRequestValue phase is skipped therefore preprocess is never called. Also in this case, the component tree, with binding, validators, ... is only built in the Render Response phase and this phase is right after PreRender is called therefore the binding code I put in prerender is overwritten by Render Response.
    When using a button action, the component tree is already built and not rebuit under Render Response, therefore that code is not overwritten. Also in this case, preprocess is called so putting that code under either preprocess or prerender will work.
    Please correct me.
    Thanks,
    Vu

  • Need help regarding executeUpdate() for my database

    i am trying to update my database and set the records to false... althought it can execute, my records are still not changed according.. help appreciated !!
    import java.io.*;
    public class Index {
         private static String mTitle = "";
    public Index() {
    public static void main(String[] args)throws IOException {
    // TODO code application logic here
    System.out.println("===Start===");
    Dbc dbc = new Dbc();
    if(dbc.setCon()==0)
         System.out.println("Database load successful...");
    else{
         System.out.println("Database load unsuccessful...");
         System.exit(1);
    BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
    while(mTitle.length()<1 | mTitle==""){
         System.out.print("Enter movie title: ");
         mTitle = input.readLine();
         if(mTitle.length() > 0 && mTitle!=""){
              //System.out.println("You have entered: \"" + mTitle + "\"");
              System.out.println("Searching database...");
              int searchStatus = 0;
              searchStatus = dbc.readData(mTitle);
              if(searchStatus==0 && mTitle!=""){
                   mTitle = "";
                   System.out.println("Movie title not found...\n");
                        }else if(searchStatus==2 || searchStatus==3){
                             mTitle = "";
         }else
                        System.out.println("Please enter a valid movie title...\n");
    System.out.println("===End===");
    import java.sql.*;
    import java.io.*;
    public class Dbc{
         private Connection con;
         private boolean status;
         final static private String _driver = "sun.jdbc.odbc.JdbcOdbcDriver";
         final static private String dsn = "database";
         final static private String _user = "";
         final static private String _pass = "";
         final static private String _url = "jdbc:odbc:";
         //Establish database connection
         public int setCon(){
              // load the database driver
              try {
              Class.forName(_driver);
              catch (Exception e) {
                   System.out.println("Load driver error");
                   System.exit(1);
              //after loading the driver, establish a connection
              try {
                   String s = _url + dsn;
                   con = DriverManager.getConnection(s, user, pass);
                   //System.out.println("connection is " + s);
              catch (Exception e) {
                   e.printStackTrace();
                   System.exit(1);
              return 0;
         public int readData(String title)throws IOException{
              ResultSet mTitle = null;
              ResultSet cost = null;
              ResultSet loanStatus = null;
              ResultSet mId = null;
              ResultSet ctg = null;
              try{
                   Statement stmt1 = con.createStatement();
                   Statement stmt2 = con.createStatement();
                   Statement stmt3 = con.createStatement();
                   Statement stmt4 = con.createStatement();
                   Statement stmt5 = con.createStatement();
                   Statement stmt6 = con.createStatement();
                   mTitle = stmt1.executeQuery("SELECT MovieTitle FROM Table1 WHERE MovieTitle LIKE '%" + title + "%'");
                   cost = stmt2.executeQuery("SELECT Cost FROM Table1 WHERE MovieTitle LIKE '%" + title + "%'");
                   loanStatus = stmt3.executeQuery("SELECT LoanStatus FROM Table1 WHERE MovieTitle LIKE '%" + title + "%'");
                   mId = stmt4.executeQuery("SELECT CatalogueNo FROM Table1 WHERE MovieTitle LIKE '%" + title + "%'");
                   ctg = stmt5.executeQuery("SELECT Category FROM Table1 WHERE MovieTitle LIKE '%" + title + "%'");
                   int num = 0;
                   while(mTitle.next() && cost.next() && loanStatus.next() && mId.next() && ctg.next()){
                        status = loanStatus.getBoolean("LoanStatus");
                        System.out.println("=== Listing " + (num+1) + " ===");
                        System.out.println("Movie title: " + mTitle.getString("MovieTitle"));
                        System.out.println("Movie ID: " + mId.getString("CatalogueNo"));
                        System.out.println("Category: " + ctg.getString("Category"));
                        System.out.println("Rental price per day: SGD$" + cost.getInt("Cost"));
                        System.out.println("Availability: " + status);
                        System.out.println("===========================\n");
                        //stmt6.executeUpdate("UPDATE Table1 SET LoanStatus=false WHERE MovieTitle LIKE '%" + title + "%'");
                        num++;
                   /*stmt1.close();
                   stmt2.close();
                   stmt3.close();
                   stmt4.close();
                   stmt5.close();*/
                   if(num>0){
                        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
                        if(num==1){
                             String string = "";
                             char choice;
                             while(string.equals("")){
                                  System.out.print("Do you want to rent this movie? <Y/N> ");
                                  string = input.readLine();
                                  string = string.toLowerCase();
                                  if(string.length() == 1 && string.charAt(0) == 'y'){               if(status){
                                            stmt6.executeUpdate("UPDATE Table1 SET LoanStatus=false WHERE MovieTitle LIKE '%" + title + "%'");
                                            }else{
                                                 System.out.println("Sorry, DVD unavailable...");
                                                 return 2;
                                       }else if(string.length() == 1 && string.charAt(0) == 'n'){
                                            return 2;
                                            }else{
                                                 string = "";
                             }else if(num>1){
                                  return 3;
                        return 1;
                   catch(java.sql.SQLException e){
                        System.out.println(e.toString());
                   return 0;
         }

    Here's some ideas:
    You dont need multiple statements and resultSets. Just one of each. Between reuse, close the statement and resultSet . Use each resultSet to read the data into a collection and then get your data out of the collection. Dont work directly with the resultSet. Also, instead of
    "select name1 from person where personID=1234"
    "select name2 from person where personID=1234"
    you can combine them into one:
    "select name1,name2 from person where personID=1234"
    This line will not run because its commented out:
    //stmt6.executeUpdate("UPDATE Table1 SET LoanStatus=false WHERE MovieTitle LIKE '%" + title + "%'");
    Put System.out.println() above this line to print out the values of each
    item in the if statement to see if stmt6 runs.
    if(string.length() == 1 && string.charAt(0) == 'y'){ if(status){
    stmt6.executeUpdate("UPDATE Table1 SET LoanStatus=false WHERE MovieTitle LIKE '%" + title + "%'");
    This line is not good because it assumes mTitle, cost, loanStatus, etc
    are all the same size list. They may be of different sizes.
    while(mTitle.next() && cost.next() && loanStatus.next() && mId.next() && ctg.next()){
    Statements and resultSets should be closed in a try/catch/finally block.
    Also, see my example on:
    http://forum.java.sun.com/thread.jspa?threadID=5193839&messageID=9769059#9769059

  • Urgent  :  code for the change/display button in the ALV Grid control

    Hi gurus,
    Here i have the following situation,
    I must place a button which should work as both change/display,
    first click should be change and the next click should be display,
    when i click for the first time the row/rows selected should be locked and when again click on the same button that should be unlocked.
    If you have the solution please come back with the solution.
    Bharath Kumar<b></b>

    Hi,
    try this
    *&      Form  SET_PF_STATUS
          text
         -->EXTAB      text
    FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
    DATA GIT_FCODE TYPE TABLE OF SY-UCOMM.
      IF GIT_ITEMS IS INITIAL.   ( you have to maintain a counter )
    ( like data: g_count type i.
    and if it is divisible by 2 then display
    other wise change.
        CLEAR GIT_FCODE.
        APPEND 'CHANGE' TO GIT_FCODE.
        SET PF-STATUS 'ZPF_STATUS' EXCLUDING GIT_FCODE.
      ELSE.
        CLEAR GIT_FCODE.
        APPEND 'DISP' TO GIT_FCODE.
        SET PF-STATUS 'ZPF_STATUS' EXCLUDING GIT_FCODE.
      ENDIF.
    thanks & regards,
    Venkatesh

  • Best practice to verify 'public' code for unauthorized changes

    Hi everybody,
    I have to make sure, that some "critical" classes within my project are only executed during runtime, when they are authorized by me. On the other hand these classes are not secret and the source is available for others.
    I thought about signing the jar and verifing the jar during runtime but this check could be already altered.
    What do you think is the best solution for my problem ? The "verifing code" can be obfuscated if needed.

    Hi,
    Per my understanding, you might want to find a better way to create Lookup field.
    Though there are different ways to create Lookup field(declaratively or programmatically), there would be no much difference between them in performance or maintenance.
    If going in the declarative way, the whole definition of the field will be hardcoded, user simply need to deploy the solution, Lookup field to a specific list will be there.
    If creating the field programmatically, there would be great flexibility when provisioning a field as we will be able to specify the properties dynamically.
    Thus, you might need to make a choice depends on the scenario in the actual production environment.
    Thanks
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • GREP code for find/change

    Hi everyone,
    I have a list of about 500 entries, with each entry being formatted as follows:
    Firstname [tab] Lastname [tab] State [tab] Level
    I need to perform a find/change operation using some GREP code that will target the tab between the first and last name and replace it with a space. Then I need to target the tab between the last name and the state and replace it with a comma and a space. Then finally I need to target the tab between the state and level and also replace it with a comma and space.
    I wondered if someone could tell me what the code would be for this type of operation?
    Appreciate any assistance.

    You can also do it in a single search:
    Find
    (.+?)\t(.+?)\t(.+?)\t
    Replace
    $1 $2, $3,
    (there's a space after the $3,)

Maybe you are looking for