Check number sequence - previous record variable

Post Author: rmhogan
CA Forum: Formula
I am trying to highlight a record that is out of number sequence with the previous record.  I am guessing that I need to create 2 variables (one for the current number and one for the previous number).  I cannot seem to get this to work.
Any help would be appriciated.
Example ....
Check Number
016000123
016000124
016000126 <--- out of sequence (I want to highlight this detail line)
016000127

Post Author: rmhogan
CA Forum: Formula
Thanks so much.  However, I am getting a error saying  ... "The formula result must be a number".  The fields are strings in the database, however I have converted the to numbers in a formula  &#91;tonumber() function&#93;.
Any ideas.

Similar Messages

  • Validating record by checking all the previous records

    hi all
    i have a tabular form where i have values like
    from_acc to_acc
    100 200
    200 300
    400 450
    now when i enter a new record everytime i want to check the values from the firs record
    i want to make i a record level validation
    i want to know in which trigger can i write the code because in when validate record go_record is not allowed
    can any one help me how to go about it
    hi i want to make sure that the new record that user enters does not overlap any of the values of the from_acc and to_acc hence i need to navigate from the first record to the second last record .
    thanks
    mandar
    Message was edited by:
    bindok mulga

    U can use this type of code in when-validate-item trigger.
    (Here I am validating country name of countries table)
    declare
         vc_country varchar2(1);
    begin
         select 'x'
         into vc_country
         from countries
         where upper(country_name) = upper(:countries.country_name);
         message('Duplicate');
         raise form_trigger_failure;
    exception
         when no_data_found then
          null;
    end;
    Also when-new-record-instance-trigger has(countries datablock level) the code
    post;
    But I prefer to go for when-validate-item trigger combined with Kevin's method..                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • EBS check number with leading zeros

    When we upload EBS, we are getting the check number in the record 16 (reference field). But unlike the check number posted in SAP, the check number in the BAI file has 2 leading zeros. Now since check number is coming in record 16, instead of record 88 we are not able to solve this problem through String configuration.
    So, we thought of following solutions(Options):
    1.    Modify the check lot numbers to have two leading zeros plus associated changes like the form and so on.
    2.    Modify the check number in the incoming file u2013 strip the check number with two leading zeros with the use of customer enhancement. (After upload and before posting)
    Can we solve the problem of leading zeros (before the check number) through any configuration steps instead of changing the SAP script form for check(Check lot) or going for customer enhancement.
    Thanks
    Ron

    You are correct, since the check numbers are coming through only in the 16 records and not in the 88 records, you cannot use a search string to resolve the issue with leading zeros.  Also, I do not know of any other configuration that can be used to reformat the reference values in the 16 records.
    The 2 solutions you have listed are both valid options.  Although with the first option (changing the check lots), you would need to make sure the business users approved of changing the check lots before going forward with that option.  And you would still have to manually clear checks that had been issued prior to the check lot change.
    At my company, we went with the second option - using ABAP code to update the check numbers from the file to match those in SAP (we actually had to add leading zeros to the check numbers).  In our case, we had already created a pre-processor program for other re-formatting of the file that was needed prior to loading it into SAP - so we added the check number logic to that.
    However, if you do not have a pre-processor program, I know there is a user exit available for EBS - exit EXIT_RFEBBU10_001, include ZXF01U01.  I have heard of others using this exit to update the check numbers from 16 records.  The exit is called during the FF.5 processing.
    Regards,
    Shannon

  • System Extract - Incrementing a sequence number in detail record layout

    I have a system extract for a bank that requires a file header, batch header, detail, batch trailer and file trailer record. The detail record is at the run result level as I am looking to choose all records for a particular deduction (savings bonds) and I also have to put employee ssn and full name. This is working fine. I also have to put a sequence number, ie. detail record layout is record type, length 2, string, record sequence number, 5, ?????, employee SSN, length 9, field, employee full name, length 9, field. I need to increment the record sequence number by one for each detail record in the file. Ie. detail record 1 has record sequence number of 00001, detail record 2 has record sequence number of 00002.
    What type of data element would I set up? For this particular field, I don't need to go against a database field, I only need to keep track of the previous record's sequence number so that I can keep incrementing by 1 until all detail records have been written. The batch trailer has a record count of the number of detail lines and that works fine because I've set that up as a type 'total' with a 'count' of the detail records. I also have in the batch trailer a sum of the pay values from each of the detail records and that works fine as subtrailers allow total data elements where detail records do not.

    You can use any of the below mentioned 2 options in the ctl (Control) file:
    1. SEQUENCE(1,1)
    2. "xxcust_autoinv_seq.nextval"
    where xxcust_autoinv_seq is a database sequence.
    Thanks,
    Angelica.

  • Checking a number sequence with regular expressions

    Hello,
    Suppose I have a text in the pattern:
    A1=ha,A2=bla,A3=cha,...
    I don't know how many sections of "A#=$" (# denotes number, $ denotes text) will be in the text, but I want to verify that the numbers of the A's form the natural ascending number sequence (i.e 1,2,3,...). I prefer to use regular expressions to do this, but if there's another way, I will be glad to hear it too.
    Therefore my question is: How can I use regular expressions to check for a sequence of numbers? I know I can search for groups I've caught previously in the expression, but how can I compute the next number in the sequence from the group and search for the result?
    Thank you very much!

    What I'd do--and I'm not saying this is optimal, just what pops immediately to mind--is have a regex that matches "A(\\d+)=" (assuming the ha, bla, cha can never be "A1" etc.--if they can, you can still do it, but it's more complicated), then you iterate with the Matcher, and each time, you get the Integer.valueOf what you matched. You keep track of the last value, and compare the current to the last. If current is < last (or <= last, depending on your requirements), fail.
    Something like this. I don't recall Matcher's methods off the top of my head, so you'll have to fix the details.
    Matcher m = Pattern.matcher("A(\\d+)=");
    int maxSoFar = Integer.MIN_VALUE;
    while (m.matches(input)) {
        int current = Integer.parseInt(m.getMatchedField("$1"));
        if (current <= maxSoFar) {
            // fail
        else {
            maxSoFar = current;
    } maxSoFar =

  • Sortdump when checking number of records of an SAP table

    When trying to check number of records in an SAP table from SE16, that ends with shortdump as below.
    SQL error in the database when accessing a table.
    Database error text........: "601 Could not continue scan with NOLOCK due to
    data movement."
    Internal call code.........: "RSQL/COUN//BIC/B0000116000 "
    Thank you in advance for quick response.

    Hi,
    please follow note 142731 and do a complete database check. This error is often caused by database corruptions.
    Best regards
      Clas

  • Checking Previous record with current record.

    I have a small problem, i want to compare the previous record with the current record with in cursor declared....
    Please help in this issue.
    Thanks in advance.

    Try the lag analytic function.
    select some_value, lag(some_value) over (order by your_ordering_condition) from x order by your_ordering_condition

  • Grey screen and "incorrect number of thread records"

    I think I am in trouble. My eMac will not boot and gets stuck on the great screen with the Apple logo and the spinning windmill. I have followed the instructions in the Apple help article up to but not including "archive and install". I tried the advanced secure boot and the messages I got over and over were "HFSSWAPHFSPlusBTIternalmode: catalog record #30 keylength=34 expected=144 node=15278 File ID=4 volume= Macintosh HD device=/dev/disk 0s 10"
    And
    "Jan31 12:00:35 Launched: /System /Library/CoreServices/Loginwindow.app/Contents/MacOS/Loginwindow Port/dev/console exited abnormally: Trace/ BPT trap"
    And
    Jan31 12:02:13 Launched: Getty repeating too quickly on port/ dev/ console, sleeping"
    I rest the PRAM and NVRAm as instructed.
    I booted from the OSX 10.4 install disk and ran the verify disk and repair disk sequences several times. It did repair a number of things but it kept coming back to "
    Message was edited by: Mont Rigaud Stud
    Itkept coming back to "incorrect number of thread records". Even after running repair disk again several times it came back to the same thing and said
    "the volume Macintosh HD could not br repaired after 3 attempts
    ERROR: the underlying task reported failure On exit
    1HFS volume checked
    1 vOlume could not be repaired because of an error
    Repair attempted on 1 volume
    1 volume could not be repaired"
    What should I do? I am NOT BACKED UP! How do I back up now? Can I usean external Hard drive? I really do not want to lose my photOs, email and business files.
    I am typing my question on my iPhone, so that accounts for the poor capitalization.
    Thanks
    Doug

    Will it boot in Safe Mode? See
    What is Safe Boot, Safe Mode? (Mac OS X)
    http://docs.info.apple.com/article.html?artnum=107392
    Takes a while to run, but it usually "fixes" problems.
    Resolve startup issues and perform disk maintenance with Disk Utility and fsck
    http://docs.info.apple.com/article.html?artnum=106214
     Cheers, Tom

  • EDI: Sender partner number in control record is default

    Hello!
    Another problem... in SUS - MM, Plan Driven Procurement
    I try to send PO from MM to SUS. But in the messages I get following
    error: "EDI: Sender partner number in control record is default"
    Message no. EA608
    SAP Note Number: 111342 doesn't help
    the logical systems are maintained!
    Any idea about this problem?
    Kind regards,
    Barbara

    If this is in regards to an ASN:  Check to see if this customer buys several divisions or is relevant for one division only.  In our instance of SAP, we found that it didn’t go to the Customer Master division setup relevant  to the division on the ASN to get the ACCT AT CUST field, it went to the first in the sequence of divisions and got that ACCT AT CUST field information.  That information was not filled out as it was a new division and that is what kept the output from happening.    For example:   we had divison 02, 04, 06 and 08.   We added division 03 and extended all customers to division 03.     Those customers that only bought division 04 just stopped sending ASNS.    The ASN was for division 04, but SAP logic was retrieving the ACCT AT CUST information (SALES tab, not CORRESPONDENCE tab) for divison 03, but we didn’t have that filled out. 
    Hope that helps.  

  • Design of gap-free invoice number or check number

    Hi, i have this "old question" that i can't seems to find the answer that satisfy the following requirment
    - An audit requirement to have a gap free in the invoice number/check number
    - this is a high concurrent oltp in generating invoices/checks
    - the design should be able to scale well without serialization issue
    - the design should be working well in RAC environment.
    Since sequence will not guarantee gap-free, or nocache suffer will have issue in RAC, thus i wondering what design approach i should use.
    A note i saw was saying using a seq for the primary key and subsequent using a batch process to generate a gap-free number.
    rgds
    Ung
    Edited by: Kok Aik on Jan 7, 2009 10:17 PM

    Kok Aik wrote:
    Hi, i have this "old question" that i can't seems to find the answer that satisfy the following requirment
    - An audit requirement to have a gap free in the invoice number/check number
    - this is a high concurrent oltp in generating invoices/checks
    - the design should be able to scale well without serialization issue
    - the design should be working well in RAC environment.
    If you absolutely have to have something like, then it's going to have a serialising effect - although you can take steps to do damage limitations. I discussed one strategy in Practical Oracle 8i many years ago, which pointed out that basically you have to do your audit by looking at numbers which have been used, but also have a permanent record of numbers that have not been used.
    There are several ways to do this, but here's an outline of one:
    Populate a table with "the next 1000 available values".
    A process that needs an Id updates and commits on the lowest available number.
    Once a number has been marked as allocated, the process creates an invoice, which includes a step either to mark the id as used, or to delete it. (I prefer the latter, as this means on commit the value disappears from the source table and reappears as a value in the invoice table).
    You end up with three possible states for an id:
    Available
    Allocated but not used
    Used
    The audit has to check that the union of all three lists contains no gaps.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    "Science is more than a body of knowledge; it is a way of thinking" Carl Sagan

  • Get the first item value of previous record in a multi record block

    Hai,
    I have a multi record block with four items.I should get the first item value of the previous record so that I can increment its value in the current record.
    Thanks.........

    If you want a distinct value in each row or to be able to retrieve the records in the same order they were written then you should use a sequence.
    If you want to retrieve the records in the same order they were created in the block then you will need a diffferent solution to the one you outline here since a user could enter a new record between two others.
    I posted this a while back in response to someone who was using a sort_key item and resetting it for each row when a new record was inserted:
    If you make the sort_key bigger then you have much more room to insert new rows in between existing rows without having to reset all the sort_keys.
    Eg. you have rows with sort_keys of 129282000000000000 and 129283000000000000 (you can have more zeros if you want) and you want to insert a row in between. if you're using oracle forms then the user would have to click on the first of these rows and then do 'insert'. in your insert process you would store the sort keys of the current record and the one below, create a blank record in between and set the sort_key of that record to the average of the other two. you will be able to insert many new rows in between the original 2 before running out of space in the sort_key field.
    the method above is not sufficient, there are some other cases to consider:
    1) when the user is on the last record of the block then you will just create a new record with sort_key set to a greater number than the row before. you can have the sort_key defined as number(38) and to safely allow you to enter 1000 rows each new row would normally be 10E33 greater than the previous one.
    2) when the user is entering the first record then just set the sort_key to 10E33.
    3) on the off-chance that you do insert a great number of records and cannot insert another in between then you would need to alert the user, process the records so that the sort_keys are evenly spaced and requery the block. this processing could be scheduled nightly to make this eventuality even less likely.
    4) make sure the user cannot run the default 'clear_record' procedure. this would break my method as well as yours!
    James.

  • Previous record value

    I am processing a file in which I need to check the value of a column in the previous record and do some processing; Is this possible in OWB - to capture the value of the column of the previous record into some variable and do a check on it?
    Thanks!

    That's not possible without PL/SQL. You can of course use a procedure etc. for that purpose.
    Jörg

  • How to restrict number of Data Records from Source system?

    Hi,
    How can I restrict the number of Data records from R3 source system that are being loaded into BI. For example I have 1000 source data records, but only wish to transfer the first 100. How can I achieve this? Is there some option in the DataSource definition or InfoPackage definition?
    Pls help,
    SD

    Hi SD,
    You can surely restrict the number of records, best and simplest way is, check which characteristics are present in selection screen of InfoPackage and check in R3, which characteristics if given a secection could fetch you the desired number of records. Use it as selection in InfoPackage.
    Regards,
    Pankaj

  • Using Garageband and I cannot hear previously recorded tracks on headphones.  Prefs are set to output on EMU0404 my audio device - this did work but now is not working.

    I am using Garageband and I cannot hear the previously recorded tracks on my headphones.  I am using an audio input/output device, EMU0404 - this was previously working fine but stopped.  All cables check out OK and so does the unit - I have updated to the latest version of Garageband but this did not help.  Any suggestion?

    Hi Christoph,
    I cannot see anything wrong with the EMU0404.  This is what puzzels me ... Garageband looks OK - headphones are OK - EMU looks OK.
    Thanks anyway
    Paul

  • Invoice and Invoice amount in FI/CO When enter check number

    Hi  All,
       I have a requirement like this. We have custom t-code ZF04 ( FAST CASH ) to post payments to customer accounts. In this t-code, we have one field for Check#.  When they enter Check# number and click on 'SEARCH' icon i need to display list of invoices and amounts with in a check.
    I have no idea about tables,. Where to look? What tables do i need to look when enter check number, which returns invoice details.
    Please let me know ASAP....
    I appreciate your help!
    Thanks,
    Suneetha

    Hi,
    One question - Are you getting customer payment trrough <b>LOCKBOX</b>? If yes, then following are the tables
    Check tables <b>FEBKO</b> and <b>FEBEP.</b> The field is <b>FEBEP-CHECT</b> for check number. For this check number take <b>FEBEP-KUKEY</b>. With this KUKEY read table FEBRE. <b>FEBRE-VWEZW is the invoice number</b>.
    So, sequence is
    1. Put Check# --> FEBEP-CHECT  and get FEBEP-KUKEY
    2. Put FEBEP-KUKEY into --> FEBRE-KUKEY
    3. FEBRE-VWEZW is invoice no.
    If you are not using LOCKBOX, How are you getting customer payment? Let me know so i can give you exact answer.
    Regards,
    RS

Maybe you are looking for

  • Packaging EJBs

    Hi I'm learning EJB technology just from books, so please forgive me if this question doesn't make sense or answer is simple :) I'm developing web application that uses EJB. I've about 25-30 entity beans, each in separate jar file. I've recently read

  • Weird Message

    When I start to play a song it takes multiple clicks. Also a message keeps poping up that says "The iTunes music library file cannot be saved. You do not have enough access privileges for this process"

  • HT4211 While using other app can I listen to youtube

    Please help me how to use multitask while doing something to listing to music

  • My iphone 3 is unresponsive to touch

    my iphone3 is unresponsive to touch====works erratically---seems to simply freeze

  • Apple tv won't play anything

    I bougth an Apple TV 1 week ago. It has been working without problems, but yesterday it suddenly wouldn't play anything. Whenever I try to play youtube, movies from iTunes Store or music from my computer it won't work. It tells me to try again later.