Relative Record Number in DB2?

Has anybody had success retreiving relative record number of
a DB2 (8.1) DB? I've used SELECT RRN(column), SELECT rrn, column
and a mulititude of other options. Tried CF 6.1,7.02 and 8, none of
which have worked. Using latest JDBC drivers (I think)
Any insight would be appreciated.
Thanks!

a is the correlative I associated with the file name so I
don't have to type the whole file name every time I reference it.
You could also try:
select rrn(sysdummy1) from sysibm.sysdummy1

Similar Messages

  • Interaction record number is populating in"Related Knowledge Article" field

    Hi,
    I'm creating a Problem in IC....Once I click on save in problem management a interaction record will be created which was expected but the Interaction record number is Populating automatically in the "Related Knowledge Article & Related request for change" fields in the Problem management....No clue of where I need to change the things....Please advise...
    KK.

    KK,
    It looks like the issue is with your document flow. Most likely the standard handler class CL_CRM_DOCFLOW_RUN_BTIL was replaced with some custom class. This is where SAP cleans up those follow up transactions (eg: IRs) which do not match the correct type requested (eg: Problem, KA). Check your config in:
    Customer Relationship Management -> CRM Cross-Application Components -> Generic Interaction Layer/Object Layer -> Component-Specific Settings -> Business Transactions -> Define Custom Handler Classes for Business Transaction Model Nodes
    If the class for object BTDocFlow has been replaced, look into the new class, specifically method GET_MULTI_ID. (Note that you have to append RUNBTIL to the structure name in this table to get the actual class). This method is where SAP does the cleanup work. If this method does not have all the logic that is available in the SAP standard class, then that is why your IRs are not getting filtered out when SAP is trying to find related Problems or Knowledge Articles.
    Hope that helped. If not, let us know so that we can suggest another direction.
    Rahul

  • Joining 2 related records using PL SQL in Apex - Problems when there are more than 2 related records?

    Hi
    I am combining 2 related records of legacy data together that make up a marriage record.  I am doing this in APEX using a before header process using the following code below which works well when there are only 2 related records which joins the bride and groom record together on screen in apex.  I have appended a field called principle which is set to 'Y' for the groom and 'N' for the bride to this legacy data
    However there are lots of records where in some instances there are 3, 4 , 5, 6 or even 1 record which causes the PL/SQL in APEX to not return the correct data.  The difference in these related columns is that the name of the bride or groom could be different but it is the same person, its just that from the old system if a person had another name or was formally known as they would create another duplicate record for the marriage with the different name, but the book and entry number is the same as this is unique for each couple who get married.
    How can I adapt the script below so that if there are more than 2 records that match the entry and book values then it will display a message or is there a better possible work around?  Cleaning the data would be not an option as there are thousands of rows of where these occurrences occur
    declare 
         cursor c_mar_principle(b_entry in number, b_book in varchar2) 
         is 
              select DISTINCT  id, forename, surname, marriagedate, entry, book,  formername, principle
              from   MARRIAGES mar 
              where  mar.entry   = b_entry
              and    mar.book = b_book
              order by principle desc, id asc; 
         rec c_mar_principle%rowtype;
    begin 
    open c_mar_principle(:p16_entry,:p16_book)  ;
    fetch c_mar_principle into rec;
    :P16_SURNAME_GROOM   := rec.surname; 
    :P16_FORNAME_GROOM   := rec.forename;
                   :P16_ENTRY := rec.entry; 
                   :P16_BOOK :=rec.book;
    :P16_FORMERNAME :=rec.formername;
    :P16_MARRIAGEDATE :=rec.marriagedate;
    :P16_GROOMID  := rec.id;
    fetch c_mar_principle into rec;
    :P16_SURNAME_BRIDE   := rec.surname; 
    :P16_FORNAME_BRIDE   := rec.forename;
                   :P16_ENTRY := rec.entry; 
                   :P16_BOOK :=rec.book;
    :P16_FORMERNAME :=rec.formername;
    :P16_MARRIAGEDATE :=rec.marriagedate;
    :P16_BRIDEID  := rec.id;
    close c_mar_principle;
    end;

    rambo81 wrote:
    True but that answer is not really helping this situation either?
    It's indisputably true, which is more than can be said for the results of querying this data.
    The data is from an old legacy flat file database that has been exported into a relational database.
    It should have been normalized at the time it was imported.
    Without having to redesign the data model what options do I have in changing the PL/SQL to cater for multiple occurances
    In my professional opinion, none. The actual problem is the data model, so that's what should be changed.

  • Count Records in Table Except If Related Record Exists in Child Table

    Dear All
    I have the following query that counts all of the records in the table SENAlert based upon the teacher's username in a related table.
    SELECT COUNT(SENAlert.SENAlertID) AS Expr1
    FROM Class INNER JOIN ClassMember ON Class.ClassClassCode = ClassMember.ClassMemberClassCode
    INNER JOIN Student ON ClassMember.ClassMemberStudentID = Student.StudentID
    INNER JOIN SENAlert ON Student.StudentID = SENAlert.SENAlertStudentID
    INNER JOIN Teacher ON Class.ClassTeacherCode = Teacher.TeacherCode
    WHERE (Teacher.TeacherUsername = 'dsmith')
    I need to extend this query by adding another table called SENAlertHistory. I would like to count the number of alerts (SENAlertID) for the specified teacher
    but where there is no related record in the SENAlertHistory table. Here's what the relationship diagram looks like:
    What's going to happen is when a teacher clicks a button to say they have read an alert, I will record this in the SENAlertHistory table. Therefore when performing a count of how many unread alerts the teacher has, I need to ignore the alerts they have
    already read (i.e. the records in the SENAlertHistory table).
    This is a bit too advanced for me -- I have tried! I was hoping someone would be able to help me please?
    Many thanks
    Daniel

    Try below code
    -- If you dont need the read alert count
    SELECT COUNT(SENAlert.SENAlertID) AS Expr1
    FROM Class INNER JOIN ClassMember ON Class.ClassClassCode = ClassMember.ClassMemberClassCode
    INNER JOIN Student ON ClassMember.ClassMemberStudentID = Student.StudentID
    INNER JOIN SENAlert ON Student.StudentID = SENAlert.SENAlertStudentID
    INNER JOIN Teacher ON Class.ClassTeacherCode = Teacher.TeacherCode
    WHERE (Teacher.TeacherUsername = 'dsmith')
    AND NOT EXISTS
    (SELECT * FROM SenAlertHistory SAH WHERE Teacher.TeacherCode = SAH.SenAlertHistoryTeacherCode and SENAlert.SENAlertID = SAH.SEMAlertHistorySENAlertID )
    -- If you need the read alert count
    SELECT COUNT(SENAlert.SENAlertID) - COUNT(SAH.SEMAlertHistorySENAlertID) AS Expr1,COUNT(SAH.SEMAlertHistorySENAlertID)readalert
    FROM Class INNER JOIN ClassMember ON Class.ClassClassCode = ClassMember.ClassMemberClassCode
    INNER JOIN Student ON ClassMember.ClassMemberStudentID = Student.StudentID
    INNER JOIN SENAlert ON Student.StudentID = SENAlert.SENAlertStudentID
    INNER JOIN Teacher ON Class.ClassTeacherCode = Teacher.TeacherCode
    LEFT OUTER JOIN SenAlertHistory SAH ON Teacher.TeacherCode = SAH.SenAlertHistoryTeacherCode and SENAlert.SENAlertID = SAH.SEMAlertHistorySENAlertID
    WHERE (Teacher.TeacherUsername = 'dsmith')
    Thanks
    Saravana Kumar C

  • Reg condition record number (knumh)

    Hello All,
    I want to knw from which tcode the entries of field knumh are getting entered in the table konp.
    Where we define this condition record number?
    Thnks,
    Sunita

    Hi
    From Pricing related transactions in Both SD and MM modules the data is entered in the pricing related tables KONV,KONP etc
    KONP stores the item level condition based amounts.
    Not from a single tcode, all pricing related tcodes data will enter into it.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Request Number, request id, datapackage number, record number

    Hi friends,
    Please help me out in figuring out the relation between between terms - Request Number, request id, datapackage number, record number.
    Regards,
    Simmi

    Hi Simmi,
    One Request number cannot have many Request IDs...for clarification between the number and ID, do the following: In RSA1 select an ODS which has some data, right click and select Manage. On the requests tab you can see the different requests loaded to the ODS. The first column you will see if called Request ID. This has numeric values of the request ID.
    Now on any row, click the monitor button (blue icon). This takes you to the data load monitor. On the right hand side you will see the Header tab. On this, the first item is Request and it is represented with a long name starting with REQU_.... (called GUID). Click on Request and here you can see Request Number and SID. This SID is nothing but the value that you saw in the ODS > Manage screen.
    Hope this helps...

  • How can i get the tax code from Condition record number

    Hi all,
    i have the Condition record number from which i have to get the tax code as i looked inthe KNOP that Condition record number there but no tax code is maintained there.
    so is there any other way to find the tax code for particular Condition record number
    Regards
    suresh

    hi suresh,
    can u tell me the field name for condition record number and in which table it is stored.
    because i knew one condition number which is stored in table EKKO and the field name is
    KNUMV- Number of the document condition.
    from ekko take relevant details and look for  ekpo where u find the tax code
    filed name of the tax code id MWSKZ- Tax on sales/purchases code

  • How to get the Data Record Number in BI 7.0?

    Hi All,
    In our requirement we need to load the Data Record Number in the DSO. I got the Request ID and Data Packet Number but not the Data Record Number.
    Does anyone has any idea?

    Hi......
    When the data is activated in DSO, it is written to the table of active data, where it is then available for reporting. Requests are sorted by the key of the DataStore object, request ID, data package ID, or data record number.
    You just load the data to the DSO.....and activate it.......it will autometically get generated.......You cannot load it from one DSO to other beacuse in this case Change log table is used........and this filed is in active table..........I think you need this fir reporting purpose.....so load it and activate the DSO......then it will be available in your active table for reporting.........because reporting is done on active table.......
    Check this link :
    http://help.sap.com/saphelp_nw04s/helpdata/en/a9/49453cabf4ef6fe10000000a114084/frameset.htm
    Hope this helps you....
    Regards,
    Debjani....
    Edited by: Debjani  Mukherjee on Sep 16, 2008 5:22 PM
    Edited by: Debjani  Mukherjee on Sep 16, 2008 5:25 PM

  • Modify Record Number in a Random Access File

    Hi Does anyone know if I can modify the record number in the random access file hardware.dat for each hardware record each time and update it in hardware.dat to display it? Also why does it say "Record does not exist" if I modify the record number for a hardware and try to update it but could not find that record?
    Here is the code below:
    // Exercise 14.11: HardwareRecord.java
    package org.egan; // packaged for reuse
    public class HardwareRecord
      private int recordNumber;
      private String toolName;
      private int quantity;
      private double cost;
      // no-argument constructor calls other constructor with default values
      public HardwareRecord()
        this(0,"",0,0.0); // call four-argument constructor
      } // end no-argument HardwareRecord constructor
      // initialize a record
      public HardwareRecord(int number, String tool, int amount, double price)
        setRecordNumber(number);
        setToolName(tool);
        setQuantity(amount);
        setCost(price);
      } // end four-argument HardwareRecord constructor
      // set record number
      public void setRecordNumber(int number)
        recordNumber = number;
      } // end method setRecordNumber
      // get record number
      public int getRecordNumber()
        return recordNumber;
      } // end method getRecordNumber
      // set tool name
      public void setToolName(String tool)
        toolName = tool;
      } // end method setToolName
      // get tool name
      public String getToolName()
        return toolName;
      } // end method getToolName
      // set quantity
      public void setQuantity(int amount)
        quantity = amount;
      } // end method setQuantity
      // get quantity
      public int getQuantity()
        return quantity;
      } // end method getQuantity
      // set cost
      public void setCost(double price)
        cost = price;
      } // end method setCost
      // get cost
      public double getCost()
        return cost;
      } // end method getCost
    } // end class HardwareRecord-------------------------------------------------------------------------------------------------
    // Exercise 14.11: RandomAccessHardwareRecord.java
    // Subclass of HardwareRecord for random-access file programs.
    package org.egan; // package for reuse
    import java.io.RandomAccessFile;
    import java.io.IOException;
    public class RandomAccessHardwareRecord extends HardwareRecord
      public static final int SIZE = 46;
      // no-argument constructor calls other constructor with default values
      public RandomAccessHardwareRecord()
        this(0,"",0,0.0);
      } // end no-argument RandomAccessHardwareRecord constructor
      // initialize a RandomAccessHardwareRecord
      public RandomAccessHardwareRecord(int number, String tool, int amount, double price)
        super(number,tool,amount,price);
      } // end four-argument RandomAccessHardwareRecord constructor
      // read a record from a specified RandomAccessFile
      public void read(RandomAccessFile file) throws IOException
        setRecordNumber(file.readInt());
        setToolName(readName(file));
        setQuantity(file.readInt());
        setCost(file.readDouble());
      } // end method read
      // ensure that name is proper length
      private String readName(RandomAccessFile file) throws IOException
        char name[] = new char[15], temp;
        for(int count = 0; count < name.length; count++)
          temp = file.readChar();
          name[count] = temp;
        } // end for
        return new String(name).replace('\0',' ');
      } // end method readName
      // write a record to specified RandomAccessFile
      public void write(RandomAccessFile file) throws IOException
        file.writeInt(getRecordNumber());
        writeName(file, getToolName());
        file.writeInt(getQuantity());
        file.writeDouble(getCost());
      } // end method write
      // write a name to file; maximum of 15 characters
      private void writeName(RandomAccessFile file, String name) throws IOException
        StringBuffer buffer = null;
        if (name != null)
          buffer = new StringBuffer(name);
        else
          buffer = new StringBuffer(15);
        buffer.setLength(15);
        file.writeChars(buffer.toString());
      } // end method writeName
    } // end RandomAccessHardwareRecord-------------------------------------------------------------------------------------------------
    // Exercise 14.11: CreateRandomFile.java
    // creates random-access file by writing 100 empty records to disk.
    import java.io.IOException;
    import java.io.RandomAccessFile;
    import org.egan.RandomAccessHardwareRecord;
    public class CreateRandomFile
      private static final int NUMBER_RECORDS = 100;
      // enable user to select file to open
      public void createFile()
        RandomAccessFile file = null;
        try  // open file for reading and writing
          file = new RandomAccessFile("hardware.dat","rw");
          RandomAccessHardwareRecord blankRecord = new RandomAccessHardwareRecord();
          // write 100 blank records
          for (int count = 0; count < NUMBER_RECORDS; count++)
            blankRecord.write(file);
          // display message that file was created
          System.out.println("Created file hardware.dat.");
          System.exit(0);  // terminate program
        } // end try
        catch (IOException ioException)
          System.err.println("Error processing file.");
          System.exit(1);
        } // end catch
        finally
          try
            if (file != null)
              file.close();  // close file
          } // end try
          catch (IOException ioException)
            System.err.println("Error closing file.");
            System.exit(1);
          } // end catch
        } // end finally
      } // end method createFile
    } // end class CreateRandomFile-------------------------------------------------------------------------------------------------
    // Exercise 14.11: CreateRandomFileTest.java
    // Testing class CreateRandomFile
    public class CreateRandomFileTest
       // main method begins program execution
       public static void main( String args[] )
         CreateRandomFile application = new CreateRandomFile();
         application.createFile();
       } // end main
    } // end class CreateRandomFileTest-------------------------------------------------------------------------------------------------
    // Exercise 14.11: MenuOption.java
    // Defines an enum type for the hardware credit inquiry program's options.
    public enum MenuOption
      // declare contents of enum type
      PRINT(1),
      UPDATE(2),
      NEW(3),
      DELETE(4),
      END(5);
      private final int value; // current menu option
      MenuOption(int valueOption)
        value = valueOption;
      } // end MenuOptions enum constructor
      public int getValue()
        return value;
      } // end method getValue
    } // end enum MenuOption-------------------------------------------------------------------------------------------------
    // Exercise 14.11: FileEditor.java
    // This class declares methods that manipulate hardware account records
    // in a random access file.
    import java.io.EOFException;
    import java.io.File;
    import java.io.IOException;
    import java.io.RandomAccessFile;
    import java.util.Scanner;
    import org.egan.RandomAccessHardwareRecord;
    public class FileEditor
      RandomAccessFile file; // reference to the file
      Scanner input = new Scanner(System.in);
      // open the file
      public FileEditor(String fileName) throws IOException
        file = new RandomAccessFile(fileName, "rw");
      } // end FileEditor constructor
      // close the file
      public void closeFile() throws IOException
        if (file != null)
          file.close();
      } // end method closeFile
      // get a record from the file
      public RandomAccessHardwareRecord getRecord(int recordNumber)
         throws IllegalArgumentException, NumberFormatException, IOException
        RandomAccessHardwareRecord record = new RandomAccessHardwareRecord();
        if (recordNumber < 1 || recordNumber > 100)
          throw new IllegalArgumentException("Out of range");
        // seek appropriate record in a file
        file.seek((recordNumber - 1) * RandomAccessHardwareRecord.SIZE);
        record.read(file);
        return record;
      } // end method getRecord
      // update record tool name in file
      public void updateRecordToolName(int recordNumber, String newToolName)
         throws IllegalArgumentException, IOException
        RandomAccessHardwareRecord record = getRecord(recordNumber);
        if (record.getRecordNumber() == 0)
          throw new IllegalArgumentException("Record does not exist");
        // seek appropriate record in file
        file.seek((recordNumber - 1) * RandomAccessHardwareRecord.SIZE);
        record.setToolName(newToolName);
        record = new RandomAccessHardwareRecord(
           record.getRecordNumber(), record.getToolName(), record.getQuantity(), record.getCost());
        record.write(file); // write updated record to file
      } // end method updateRecordToolName
      // update record in file
      public void updateRecordQuantity(int recordNumber, int newQuantity)
         throws IllegalArgumentException, IOException
        RandomAccessHardwareRecord record = getRecord(recordNumber);
        if (record.getRecordNumber() == 0)
          throw new IllegalArgumentException("Record does not exist");
        // seek appropriate record in file
        file.seek((recordNumber - 1) * RandomAccessHardwareRecord.SIZE);
        record.setQuantity(newQuantity);
        record = new RandomAccessHardwareRecord(
           record.getRecordNumber(), record.getToolName(), record.getQuantity(), record.getCost());
        record.write(file); // write updated record to file
      } // end method updateRecordQuantity
      // update record in file
      public void updateRecordCost(int recordNumber, double newCost)
         throws IllegalArgumentException, IOException
        RandomAccessHardwareRecord record = getRecord(recordNumber);
        if (record.getRecordNumber() == 0)
          throw new IllegalArgumentException("Record does not exist");
        // seek appropriate record in file
        file.seek((recordNumber - 1) * RandomAccessHardwareRecord.SIZE);
        record.setCost(newCost);
        record = new RandomAccessHardwareRecord(
           record.getRecordNumber(), record.getToolName(), record.getQuantity(), record.getCost());
        record.write(file); // write updated record to file
      } // end method updateRecordCost
      // add record to file
      public void newRecord(int recordNumber, String toolName, int quantity, double cost)
         throws IllegalArgumentException, IOException
        RandomAccessHardwareRecord record = getRecord(recordNumber);
        if (record.getRecordNumber() != 0)
          throw new IllegalArgumentException("Record already exists");
        // seek appropriate record in file
        file.seek((recordNumber - 1) * RandomAccessHardwareRecord.SIZE);
        record = new RandomAccessHardwareRecord(recordNumber, toolName, quantity, cost);
        record.write(file); // write record to file
      } // end method newRecord
      // delete record from file
      public void deleteRecord(int recordNumber) throws IllegalArgumentException, IOException
        RandomAccessHardwareRecord record = getRecord(recordNumber);
        if (record.getRecordNumber() == 0)
          throw new IllegalArgumentException("Account does not exist");
        // seek appropriate record in file
        file.seek((recordNumber - 1) * RandomAccessHardwareRecord.SIZE);
        // create a blank record to write to the file
        record = new RandomAccessHardwareRecord();
        record.write(file);
      } // end method deleteRecord
      // read and display records
      public void readRecords()
        RandomAccessHardwareRecord record = new RandomAccessHardwareRecord();
        System.out.printf("%-10s%-15s%-15s%10s\n","Record","Tool Name","Quantity","Cost");
        try  // read a record and display
          file.seek(0);
          while (true)
            do
              record.read(file);
            while (record.getRecordNumber() == 0);
            // display record contents
            System.out.printf("%-10d%-15s%-15d%10.2f\n",record.getRecordNumber(),
               record.getToolName(), record.getQuantity(), record.getCost());
          } // end while
        } // end try
        catch (EOFException eofException)  // close file
          return;  // end of file was reached
        } // end catch
        catch (IOException ioException)
          System.err.println("Error reading file.");
          System.exit(1);
        } // end catch
      } // end method readRecords
    } // end class FileEditor-------------------------------------------------------------------------------------------------
    // Exercise 14.11: TransactionProcessor.java
    // A transaction processing program using random-access files.
    import java.io.IOException;
    import java.util.NoSuchElementException;
    import java.util.Scanner;
    import org.egan.RandomAccessHardwareRecord;
    public class TransactionProcessor
      private FileEditor dataFile;
      private RandomAccessHardwareRecord record;
      private MenuOption choices[] = {MenuOption.PRINT, MenuOption.UPDATE, MenuOption.NEW,
              MenuOption.DELETE, MenuOption.END};
      private Scanner input = new Scanner(System.in);
      // get the file name and open the file
      private boolean openFile()
        try // attempt to open file
          // call the helper method to open the file
          dataFile = new FileEditor("hardware.dat");
        } // end try
        catch (IOException ioException)
          System.err.println("Error opening file.");
          return false;
        } // end catch
        return true;
      } // end method openFile
      // close file and terminate application
      private void closeFile()
        try // close file
          dataFile.closeFile();
        } // end try
        catch (IOException ioException)
          System.err.println("Error closing file.");
          System.exit(1);
        } // end catch
      } // end method closeFile
      // create, update or delete the record
      private void performAction(MenuOption action)
        int recordNumber = 0;  // record number of record
        String toolName;       // tool name of the hardware instrument
        int quantity;          // total amount of items
        double cost;           // hareware tool price
        int choice;            // choose an update option   
        int newRecordNumber;   // the updated record number
        String newToolName;    // the updated tool name
        int newQuantity;       // the updated quantity
        double newCost;        // the updated cost
        try // attempt to manipulate files based on option selected
          switch(action) // switch based on option selected
            case PRINT:
              System.out.println();
              dataFile.readRecords();
              break;
            case NEW:
              System.out.printf("\n%s%s\n%s\n%s","Enter record number,",
                "tool name, quantity, and cost.","(Record number must be 1 - 100)","? ");
              recordNumber = input.nextInt();  // read record number       
              toolName = input.next();         // read tool name
              quantity = input.nextInt();      // read quantity
              cost = input.nextDouble();       // read cost
              dataFile.newRecord(recordNumber, toolName, quantity, cost); // create new record
              break;
            case UPDATE:
              System.out.print("\nEnter record number to update (1 - 100): ");
              recordNumber = input.nextInt();
              record = dataFile.getRecord(recordNumber);
              if (record.getRecordNumber() == 0)
                System.out.println("Record does not exist.");
              else
                // display record contents
                System.out.printf("%-10d%-12s%-12d%10.2f\n\n", record.getRecordNumber(),
                   record.getToolName(), record.getQuantity(), record.getCost());
                System.out.printf("%s%s","\nEnter 1 to update tool name, ",
                  "2 to update quantity, or 3 to update cost : ");
                choice = input.nextInt();
                if (choice == 1)
                  System.out.print("Enter new record tool name : ");
                  newToolName = input.next();
                  dataFile.updateRecordToolName(recordNumber,newToolName); // update record
                                                                           // tool name            
                  // retrieve updated record
                  record = dataFile.getRecord(recordNumber);
                  // display updated record
                  System.out.printf("%-10d%-12s%-12d%10.2f\n", record.getRecordNumber(),
                     record.getToolName(), record.getQuantity(), record.getCost());
                else if (choice == 2)
                  System.out.print("Enter new record quantity : ");
                  newQuantity = input.nextInt();
                  dataFile.updateRecordQuantity(recordNumber,newQuantity); // update record
                                                                           // quantity             
                  // retrieve updated record
                  record = dataFile.getRecord(recordNumber);
                  // display updated record
                  System.out.printf("%-10d%-12s%-12d%10.2f\n", record.getRecordNumber(),
                     record.getToolName(), record.getQuantity(), record.getCost());
                else if (choice == 3)
                  System.out.print("Enter new record cost : ");
                  newCost = input.nextDouble();
                  dataFile.updateRecordCost(recordNumber,newCost); // update record cost            
                  // retrieve updated record
                  record = dataFile.getRecord(recordNumber);
                  // display updated record
                  System.out.printf("%-10d%-12s%-12d%10.2f\n", record.getRecordNumber(),
                     record.getToolName(), record.getQuantity(), record.getCost());
              } // end else     
              break;
            case DELETE:
              System.out.print("\nEnter an account to delete ( 1 - 100): ");
              recordNumber = input.nextInt();
              dataFile.deleteRecord(recordNumber);  // delete record
              break;
            default:
              System.out.println("Invalid action.");
              break;
          } // end switch
        } // end try
        catch (NumberFormatException format)
          System.err.println("Bad input.");
        } // end catch
        catch (IllegalArgumentException badRecord)
          System.err.println(badRecord.getMessage());
        } // end catch
        catch (IOException ioException)
          System.err.println("Error writing to the file.");
        } // end catch
        catch (NoSuchElementException elementException)
          System.err.println("Invalid input. Please try again.");
          input.nextLine();
        } // end catch
      } // end method performAction
      // enable user to input menu choice
      private MenuOption enterChoice()
        int menuChoice = 1;
        // display available options
        System.out.printf("\n%s\n%s\n%s\n%s\n%s\n%s","Enter your choice",
         "1 - List hardware records", "2 - Update a hardware record",
         "3 - Add a new hardware record", "4 - Delete a hardware record", "5 - End program\n?");
        try
          menuChoice = input.nextInt();
        catch (NoSuchElementException elementException)
          System.err.println("Invalid input.");
          System.exit(1);
        } // end catch
        return choices[menuChoice - 1];  // return choice from user
      } // end enterChoice
      public void processRequests()
        openFile();
        // get user's request
        MenuOption choice = enterChoice();
        while (choice != MenuOption.END)
          performAction(choice);
          choice = enterChoice();
        } // end while
        closeFile();
      } // end method processRequests
    } // end class TransactionProcessor-------------------------------------------------------------------------------------------------
    // Exercise 14.11: TransactionProcessorTest.java
    // Testing the transaction processor.
    public class TransactionProcessorTest
      public static void main(String args[])
         TransactionProcessor application = new TransactionProcessor();
         application.processRequests();
      } // end main
    } // end class TransactionProcessorTest-------------------------------------------------------------------------------------------------
    Below is the sample data to be entered into the random input file hardware.dat :
    Record                     Tool                        Quantity                Cost
    Number                   Name                
       3                      Sander                    18                         35.99
      19                      Hammer                128                      10.00
      26                      Jigsaw                   16                        14.25
      39                      Mower                    10                        79.50
      56                      Saw                        8                          89.99
      76                      Screwdriver            236                      4.99
      81                      Sledgehammer       32                        19.75
      88                      Wrench                      65                        6.48Message was edited by:
    egan128
    Message was edited by:
    egan128
    Message was edited by:
    egan128

    Hi Does anyone know if I can modify the record number
    in the random access file hardware.dat for each
    hardware record each time and update it in
    hardware.dat to display it?If the "record number" is data that is stored in the file, then you can modify it. More precisely: it is possible to modify it.
    The rest of the question had too many incompatible verbs for me to understand it.
    Also why does it say
    "Record does not exist" if I modify the record number
    for a hardware and try to update it but could not
    find that record?"Record does not exist" is a fairly reasonable error message for the situation where a program looks for a record but cannot find it. Are you asking why that particular lump of code actually does that?
    (One thousand lines of code removed)

  • Identify record number being processed in Custom Integrator?

    Hi gurus,
    We have developed a custom integrator using a PL/SQL packaged procedure as the interface. Inside this package we insert into a custom table.
    We are on Oracle Financials 11.5.10.2.
    The custom table is located in a custom schema called CGL.
    Our requirement is to perform some validation in the database package when the Web ADI infrastructure is processing the first row in the excel spreadsheet that the user is using to upload data.
    We have a header row with the following columns.
    Source System
    Feeder System
    Version Number
    When the user chooses Oracle => Upload option from the Excel menu, we have to validate that the Version Number is valid i.e. we have to validate that the previous version of the file for the Source System and Feeder System combination has been successfully processed by the subsequent programs before the user is allowed to upload the next version of the file for this combination.
    Our requirement is to perform the validation when row number 1 is being processed. However, I have not been able to find any documentation that allows us to identify the record number in PL/SQL.
    Alternately, is there an environment variable or some other way to populate row numbers in excel spreadsheets being downloaded using the template so it can be passed to the package and used to identify the row being processed.
    Any help in this regard will be greatly appreciated.
    Venkat

    Hi Venkat,
    Would you give a try with the following option:
    Define a column in your layout, and set the default type to formula and enter an excel formula like
    =IF(ISBLANK(C7);"";ROW()-ROW($B$6))
    This function should put a number into the column and it should start with one, followed by 2,3 etc. The 7,C,B,6 needs to be set according your layout. I hope you can manage this.
    Assuming your sheet has 100 lines, you shall have then a 1-100 in this column. I would secure this column, read only flag in the layout.
    Any further explanation needed? Just replay here.
    br, Volker

  • PO item Condition Record number and delivery address of PO - Need a table n

    Hello Experts,
    I need some help as I have searched enough but did not find any solution.
    I need a table name where I can find Condition Record number for PO line item.
    As I have to create a new PO Layout in which I have to mention each & every condition type with value for line item.
    I need to know one more thing that from which table I will get delivery address number so on the basis of that I can read entries from table ADRC.
    Thanks in advance.
    Bhagat

    HI,
    The First Question is regarding the PO Conditions.
    For Extracting the same. we have to Go to The Table EKKI and in this table pass the PO Number and after entering the PO NUmber ,at each item level we will have a condition record number KNUMV created,
    collect the condition record number and pass the value in KONV table ,in that table we will get all the conditions and its values maintained.
    The second question is the delivery Address
    the Delivey address comes from four ways
    Plant
    EKPO -Pass PO NUmber - collect the plant and pass in table T001W  to get the address number
    and pass the address number to ADRC table
    Customer (third party)
    IN table EKPO -collect the customer Number-KUNNR and pass that value to KNA1 table and then get the address number and then get the address from ADRC table.
    Direct address number ( created by t code MEAN- Type ME01)
    This adress number-ADRNR can be taken from EKPO table and pass this value to adrc table to get the address.
    Vendor ( subcontracting)
    In this IN EKPO we will have the vendor field -LIFNR and this field collect the vendor number and pass in LFA1 and get the address number and then pass the address number to ADRC table
    If in EKPO,the address number and customer vendor field are blank then it picked from the plant and we have to default the Plant Address
    Hope so it helps
    Regards
    Anjanna.

  • Vendor Master Record number ranges

    Hi,
    We have one requirement . At present my client is maintaining the vendor master record number ranges with 4 digits. Ex. 0001 to 9999
    His present requirement is that to maintain the number ranges with 4 digits .ex. 00001 to 99999. They want this should apply even to existing records. Ex: Old number 2345 , they want the present number should be 02345.
    Request you to please help in resolving the issue. Thanks in advance for the help. Matter is urgent
    Thanks
    D.K.Lakshmi narayana

    Hello Lakshmi,
    It seems to me these are your alternatives.
    1) For each old vendor in the 4-digit scheme, create a new vendor master record in the 5-digit scheme with the leading zero. Then, transfer all open documents/master records (invoices, purchase orders, info records, etc.) from the old vendor to the new vendor. Then, block the old vendor.
    2) Same as previous except instead of changing all open documents, only change the master data (e.g., info records or long term contracts or agreements) to the new vendor master record and continue to use the old vendor master record until the open documents are closed. Then, block the old vendor master record.
    I think option 2 will be the "safer" choice. Plus, for reporting, you will probably need to continue using both vendor numbers for a while.
    Maybe someone else has an easier way...
    Cheers,
    Larry

  • Why is records number  different?

    Hi expert,
    I have loaded R/3 GL data into a cube(0FIGL_C01) successful. But one thing confused me very much which is: the transfered and added records' number is different. In my case, transfered records are 117991, but the added are 87929. I have checked the detail message in Monitor, where the data deduction of update to cube took place after update rule, before the update rule all the data number are same( the system generated 2 data packages for this single request, in each packge the different records number added to cube with transfered happened just after the update rule), this means something happened in update rule, right? but I checked the update rule, there's no any routine exist. So could you please tell me what does any operations cause this result?

    Hi Paolo,
    Thank you very much for your reply. In my understanding of your explanation, if Chars in a cube for example: company code, business area, G/L account, currency type, fiscal year, fiscal year/period, and KFs like Total Debit Postings,Total credit postings, Cumulative Balance. If two records from R/3 which all the chars are same, then only one record will be keeped in the cube but the value of KFs will be added. Am I correct? But if somehow, someone load the data(Full load) one more time, what will be the result?
    thank you in advance
    Message was edited by:
            Ryan Zhang

  • Finding CRM Order number from Interaction Record number

    In our scenario when a CRM Order is created, an interaction record also gets simultaneously created. If I want to find out the Order number based on the corresponding interaction record number, how will I achieve it through linking tables?

    Hi,
    Use FM CRM_ORDER_READ and check ET_DOC_FLOW.
    Hope this helps!
    Best regards,
    Caíque Escaler

  • XD02 : Previous Master Record Number

    Hi,
    in the customer master data we have this field : "Previous Master Record Number" (KNB1-ALTKN)
    here we can enter only one number, is there any possibility to enter more than one number in this field ?
    because for each customer i have two or three previous number !
    Please advise.
    Regards.

    Hi,
    It is a free field of length 10 digits. You can either manage to input all the numbers in that 10 digits or you can increase the field space in the table.
    Regards,
    Mike

Maybe you are looking for

  • Hugely disappointed with Apples lack of Support for iPhone 3G

    I am so very disappointed in Apples lack of response or help regarding the OS4 and iphone 3G. Originally a hugh support of Apple's philosophy and product, I find myself questioning their values and ulterior motives. Currently, I have an iphone 3G 8GB

  • HELP!  My ipod shows up in itunes but none of the songs show up.

    I need HELP. I just restored my ipod mini and manually put my songs from home onto my ipod. Everything worked great. I took my ipod to my work to download a few podcast and when I connect it to the computer, Itunes opens and recognizes my ipod. BUT t

  • Problem using repaint() method from another class

    I am trying to make tower of hanoi...but unable to transfer rings from a tower to another...i had made three classes....layout21 where all componentents of frame assembled and provided suitable actionlistener.....second is mainPanel which is used to

  • How to Copy Standard Business Areas in Oracle apps

    Does anyone knows how we can copy new Standard BUsiness Areas in Oracle Apps for fresh implementations. Thanks

  • The Best Way To Edit Multiple Photos On One Scan

    Hi... I would like to know what the best way to edit out photo's from a scan that has multiple photo's? It seems like I must make a duplicate of the scan, in the amount of photos, on that one scan and then crop each "duplication". Is there some other