Auto generate Invoice Number

Dear All,
I want to auto generate inovice number. I did not want to handle this from sequences because I still did not understand/handle this, so kindly suggest an other best way to generate invoce number automatically through programitcally. I have three tables, one master table and two detail tables.
Thanks and regards,
Hassan

christian erlinger wrote:
what's the trouble with using sequences?!?
http://docs.oracle.com/cd/B28359_01/server.111/b28318/schema.htm#CNCPT611
http://docs.oracle.com/cd/B28359_01/server.111/b28310/views002.htm#ADMIN11796
the max+1 approach is a dangerous one, and will lead to unexplainable random occuring ora-0001...
http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:3379873654938
cheersOf course nothing is wront with sequences, but he/she is generating invoice-numbers, means there should be no gaps between the numbers -> sequences not usable for this problem
you definetely need a different approach, but have to take care! what happens if two people at the same time press commit in forms? both select e.g. 42 for the invoice-number, it will (hopefully you made unique contraints) crash with a UK-violation, so just put a select max+1 in pre-commit is not good enough.
I think best way to realize it is to make a table with one record that contains the last invoice-number, before every commit you select the record for update, if its already locked, wait or retry later the commit and increment in the invoice-number table is done when commiting the invoice itself.
Any flaws in this thought? Other suggestions?

Similar Messages

  • How to auto generate SFC Number(using the Old SFC Num) when I split a SFC

    when I split a SFC (SFC Number:A001), I want to auto generate  the new SFC number, and the new SFC number pattern is A001-01 (the prefix is old SFC number). I don't know how to do.
    Please help me if you  know  it.

    Wenjun,
    SFC ID is actually a key field so I would suggest you following [Note 1363812|https://service.sap.com/sap/support/notes/1363812] "SAP ME 5.2: Key Field Character
    Restrictions" to use only legal characters in Next Number patter. If the system does not generate serialized SFCs in accordance with the patter even in this case, then it is definitely a bug.
    Per on-line help: "SFC Number Serialize - the pattern that uniquely identifies the serialized SFC number during serialization, split, or relabel"
    Sergiy

  • Why is the system generated invoice number jumping by 20?

    Hello,
    We have a document sequence set for our internal invoices that was created recently. When an invoice is dropped, we noticed that the number has jumped by 20. Why is that? How do I correct this?
    Thank you
    SK

    Hi SK,
    Please check the underlying database sequence for the document sequence set. It is quite possible that the database sequence has been created with the cache option set to 20. If that is the case, then specifying the 'no cache' option should resolve the issue.
    PS: Oracle does not support the manipulation of database objects.
    Regards,
    Sujoy

  • How to send sap generated invoice numbers using rffoedi1 program

    Hi all
    we are generating PEXR2002 IDocs using RFFOEDI1 program . The program is populating the invoice number field in IDoc with the value from reference number field in MIRO screen. Is there any way that we can populate the SAP generated invoice number also in the IDoc.

    Hi Steve,
    Have you tried the user-exits or BADi available.
    Regards,
    Atish

  • ERS generated Invoice Not Editable when Sequential Numbering is enabled

    Dear All,
    We have an issue of the ERS Generated invoice (Autoinvoice) number not editable, if the Sequential Numbering Profile option is set to YES.
    We need to keep the Sequential Numbering enabled to generate the Voucher Number.
    In the case of ERS generated Invoice, the Voucher number won't get generated automatically, if we do the validation of the Invoice.
    But normally created invoices will be generating the Voucher Number, when a validation of the invoice is done, even though the Sequential Numbering profile option is NOT set.
    Our requirement is that the ERS generated Invoice number should be editable, as well as the Voucher Number should get generated automatically when a validation of the invoice is been done.
    How can we achieve this..? Please update....
    many thanks in advance.....

    Hi,
    Have you checked  whether the POdelivery (PO quantity) has cmpleted in the previous invoice? Is the PO marked for ERS? If no please mark for ERS. I hope this will help you. Thanks
    Edited by: Padmasri G on Sep 6, 2011 4:55 AM

  • EWay field Mapping for Invoice Number

    We are currently setting up the eWay and BC integration and we have found we are unable to map the invoice number fields and invoice description fields from our website form to the transaction email generated by eWay. I have spoken with eWay who have advised they offer this as part of the API but the BC integration does not allow us to take advantage of this.
    This leaves our customers with a receipt of their transaction and a randomly generated invoice number that doesn’t correspond with the invoice number they have paid. Seems a bit strange as this is information that is important for us and the client. 
    Will there be any improvements to this integration in the future or has anyone encountered a similar issue and found a way around?
    Thanks
    Katie

    Hi,
    Am interested to know if you ended up finding a way around this?
    Andrew

  • Excise Invoice number not display in case auto generate

    Dear Experts,
    we have use auto excise invoice generation functionality, it is working properly, but only Excise Invoice number not display after saving billing document. what to do for display the same after saving billing document.
    Regards
    BK GAIKWAD

    Thank you Lakshmipathiji,
    My question is when we have create excise invoice through J1IIN excise invoice number has been display in bottom line after saving billing document.
    But in case we have creating  auto generate Excise invoice, Excise Invoice number not display in same screen. How to do to display excise invoice after saving billing document.(Excise invoice generating in background but number not display in same screen)
    We have changeover manual to auto generate excise invoice system.
    Regards
    BK GAIKWAD

  • How to Create a Auto Generated number with some preceding text in Sharepoint 2010

    I am trying to create a auto generated number field in Sharepoint 2010 list item. My requirement is to have the following format number generated when new request is created in Sharepoint using form. Auto generated Ticket ID should be in the following format
    "IR13000" "IR13001" "IR13002"....... Please let me know how to get this done. I tried to use combination of default ID and Characters but its not working for new requests, its only reflecting for existing uploaded requests. I
    am trying this for taking up Ticket requests by filling up some fields in the form. Any quick help is much appreciated.
    Thanx

    Here are the steps:
    1 - Open your SharePoint site in SP Designer 2010.
    2 - Click Workflows and add a List workflow. Associate this workflow on the list where you want the Random Text to be generated.
    3 - Inside the workflow editor, select the Action "Update list item"
    4 -  Select 'Current Item'.
    5 - Click Add.. and select the field which needs to be updated with the Random Text. Make sure this column is not of type "Calculated" type, otherwise you won't see it in the list of the fields within the workflow.
    6 - Click "..." button in the next textbox which will open String Builder dialog box.
    7 - Type IR and then click 'Add or Change Lookup and select ID column from "Field from source". Hit OK.
    8 - It should look like IR[%Current Item:ID%]
    9 - Hit OK.
    10 - Save and publish the workflow. (Please note that currently this workflow is not set to auto run on creating new items. That's because we want to test it at this point of time).
    11 - Go to your list in SharePoint and create a new item. After creating, select the item and click Workflows and then run this workflow.
    12 - You should be able to see the text "IR1" in the designated column.
    13 - Once you see that it's working, go to SPD and set the workflow to run automatically on creation of the new item. Save and publish and then return to your list in SharePoint.
    14 - Create a new item there and you should see the Random value in the column.
    15 - You will also see the column in the New form. In order to remove it, go to List settings > content types > Item content type > and select Hidden for this column so that it doesn't showup in any form.
    Try it and let me know how it goes.
    Thanks,
    Ashish

  • Make changes to auto generated line items when posting invoice thru MIRO?

    Hi All,
    My requirement is to make some changes in line items data when posting invoice through MIRO transaction.
    I have written a substitution for the same, The issue is that some line items get automaticaly created (i.e inter company posting). I need to make changes to these line items as well but substitution is not being triggered for these auto generated line items.Is there any way by which I can update in these line items as well ?
    further do we have any internal table which holds all the line items at runtime....to which I can refer and make the changes. I have searched but could not find one.
    Can anybody provide some inputs on this.
    Thanks,
    Lucky.

    Hi Kaushik,
    Thanks for your reply.
    I am using BADI INVOICE_UPDATE but here we will not be having line items which are auto generated.
    When we do inter company posting, line items are automatically created and these are not avaliable in the BADI. I am not sure if we can trap these line items any where.....the possible alternative which I can think of is to use memory reference and modify the internal table which holds all the items but unfortunately I am not able to find any such internal table to refer to at run time ...have u got any idea on this?
    Thanks,
    Lucky.

  • Auto-Generated Number For All Users

    We're on Lync Server 2013, running a front-end pool consisting of 3 front-end servers. Users are VoIP enabled. We're seeing some inconsistent behavior while right-clicking an user and selecting the "Call" option. Even though the respective target
    users don't have an "Other" phone number set in AD, the Lync client seems to be somehow auto-generating a normalized entry and presenting this as an "Other" entry in the contextual menu that allows calls. The entry always begins with +1
    (425). Strange enough, this is the prefix used in some sample normalization rules in a Microsoft article
    here.
    Even though Dial Plans - to my understanding - shouldn't alter this (they only apply normalization rules for manually dialed numbers only), I've searched through all the normalization rules but there's none that start with +1 (425). I've also tried running
    ABSConfig, yet this tool crashes systematically on multiple machines (the Lync servers have updates dating from less than 2 months ago).
    Also - there's no normalization .txt file created in the ABFiles in the Lync Share, as in
    this article. Taking a look in the local GalContacts.db file shows the regular phone numbers, but not this one - hinting that it's something the Lync client creates on the fly. Additionally, no Lync Address Book Web Query is visible in Fiddler when browsing
    through the users' phone numbers in the Lync client.
    Adding to the problem is that some users see the "Other" entries, while others don't - eg. user X right clicks user Z and sees a wrong "Other" entry, while user Y right clicks user Z and doesn't see any wrong entry containing "Other".
    First question is what could trigger this behavior in the client ? Secondly, has ABSConfig.exe become broken by a recent update ?

    According to the 2nd article - I've created an empty Company_Phone_Number_Normalization_Rules.txt file and placed it in the Lync file share, in order to avoid any suspicion that the built-in file might be used. I've updated the address book but unfortunately
    can't restart the FE services at this time. There's no still no change in the client.
    Yet - the problem here is the numbers shown aren't present in the files making up the Lync address book inside the local user's sip profile folder.

  • Reports Generated From The Invoice Number

    Hello All,
    Firstly, thank you for this website, and also those who make contributions by asking questions and also answering.
    So my question is, can SAP be generate a report from an invoice number which will then show which voucher for reimbursement includes that invoice number?  And if so, how?
    At this moment, the only way I can know this happens is by running a report for the specific reimbursement voucher which in turn will show me the invoices that is being paid for.  However, I would like to input the invoice number which will show me which voucher the bill was paid for and which check number paid it.
    I look forward to your replies, and thank you.

    I should add, I do not mean a journal voucher, I'm talking about a public voucher for reimbursement from the government.
    Thank you.

  • Invoice Number to get generated - MIRO

    Hi All,
                 Can any one please tell me sap note that we have to apply to get the number generated while creating vendor invoice - MIRO

    You Mean to See Account Number along with Invoice Number in MIRO..
    If yes, then
    Please add Parameter IVFIDISPLAY in User parameters.
    Goto Transaction SU3 & add this Parameter in the tab page parameters & give a value X.
    Edited by: Manohar Raju on May 2, 2008 10:31 AM

  • CIN-Exicse Invoice created but no internal invoice number generated

    Hi all,
    While saving the Excise Invoice, the Excise Duties get updated and  shows that the MODVAT is updated, but no internal invoice number is generated. Hence I am not able to change/display the saved invoice in J1IIN. It shows " No document generated or the document has been archived". Secondly if I check the number range J_1IINTNUM which is for internal number range, it is updated.
    Kindly suggest what may the error be.
    Karthik

    Hi Gautam,
    Thanks for the answer. As I said I have already maintained the number range. Secondly I am being able to issue the output. But I tried changing the number range as you have given, but the outcome is the same. It says 'Document no does not exist or the document must have been archived'
    Is there any way that I can retrive the archived document?
    Note:
    In the T-Code J1IIN when I select the Due List in the Change mode I am being able to see all documents.
    Kindly suggest whether I am getting things jumbled up.
    Karthik.

  • Auto generate employee/applicant number

    Hi All
    I want to auto generate the employee and applicant number as follows:
    ABCW0000001
    ABCS00000001
    Where first 3 characters i.e., ABC stands for the company name and fourth characters i.e., W stands for Workers and followed by the employee number.
    The category of employee i.e., Staff or Worker is captured in the People Group segment in assignments.
    I can write a fast formula to auto generate the employee numbers, but as employee number has to be generated first before updating the assignments.
    How to auto generate the numbers before updating the assignments?
    Thanks in advance for any help.
    Regards
    Rahman

    Hi
    Do you have multiple assignments over there?There are no multiple assignments.
    If not, can you move the people group segment to the people screen?How can I move this to People Screen?
    What should be the empl number if the people group changes anyway?If the employee gets promoted, say from worker to staff, then a new number should be generated from the date of new assignment. Also the old number should not be used in future.
    Thanks for the help.
    Regards
    Rahman

  • Generating Tax Invoice Number for deferred taxes (Thailand)

    Hi all,
    I'm implementing deferred taxes for Thailand, and am attempting to generate an internal tax invoice number for vendors during the running of the program "Transfer Deferred Taxes".
    I've set up the number ranges & intervals, number groups, created a dummy document class, and activated official document numbering for document type SA, which I'm using for the transfer posting.
    However, when running the program "Transfer Deferred Taxes", I'm prompted to key in a tax invoice number of my own, which means that the system is not generating the number for me. How can I get this to work?
    Thanks,
    Daniel

    Hi
    Ideally if it is configured for SD then VBRK-XBLNR and BKPF-XBLNR would be filled with the tax invoice number which is a 16 digit number. For your F1 invoice type check the accounting document type generated. It would mostly be RV.
    You need to set up this accounting document type to consume the tax invoice number range. I guess FB70 transaction would be associated with accounting document type DR which is configured to use up the tax invoice number range.
    So follow these steps:
    1. First check the accounting document type created for the invoice of type F1.
    2. Go to SPROCross Application Component-General Application FunctionsCross-Application Document NumberingIndonesia--Document Numbering
    3. Check the document class created for country ID.
    4. If document class is created as I guess it has been because you can already generate the number through FB70 transactions then check if accounting document type created from F1 invoice is assigned to the document class.
    I guess it is this setting which you are missing. As a result of this tax invoice number is not getting generated for SD documents.
    Thanks
    Indranil

Maybe you are looking for

  • Text Tab delimited file-Strcuture-validation

    Hi Folks, 1.Is there a way to check whether the file is text tab delimited or not,programatically ? 2.can we check whether the data in the text tab delimited file is in line with the structure of the internal table into which it is going to be upload

  • Mapviewer Admin Problem

    I am attempting to have two mapviewer applications deployed inside two different oc4j instances on a server for development and testing. I am having trouble administering the second mapviewer instance as the all the pages have the "mapviewer" applica

  • OEM Issue: oemagent stops after some time on specific node on a 3 node RAC system.

    We have a 3 node RAC system running 11.2.0.3 . The oemagent keeps failing on 1 particular node and needs to be brought up every now and then. What could be the probable cause of this. Also, I have not seen anything suspicious in the agent logs. Oracl

  • SSRS/Powerview to compare SQL table and excel sheet

    I have a SQL table and an excel sheet with some data... I want to be able to compare the two and find out which Excel rows are missing in the SQL table... Would it be easier to do this report in SSRS or would it be better to do it in Excel PowerView?

  • Screen Resolution problem in BDC

    Hi, I am writing a BDC for credit memo creation using FB65 transaction in 4.6b version. I am facing BDC problems because of screen resolution. Is there a way to determine the number of lines items that may show up in the table control based on the re