Delete generated document number of Transaction ABAVN

Hi,
My problem is that user run the BDC for ABAVN - Asset Retirement, inplace of F-92 BDC with correct file (means with F-92 flat file).
After that system shows 1 generated number is 0100003616.
How can i reverse/ delete this genertaed number. Because it's a wrong generated number.
Regards,

Dear
AB08 is the T-code for reversal of asset document. Once you have given the asset number it will give you the list of documents posted on the said asset. Select the document you want to reverse and a new no. for reversal doc will be generated.
Do the same for all the assets posted against the said document.

Similar Messages

  • Reg - sap generated document number

    hi all,
          In fv60 transaction code,if u save a document,sap will generate a documnet number,how to find to which table the generated document number is saved???????
    plz help me with this regard,
                          very very urgent....
    regards,
    balaji.s

    hi madhavi,
                    thx,it worked,thanks a lot.....
    regards,
    balaji.s

  • Authority Check or BADI for deleting a document in SOLAR02 transaction

    Hi All,
    Could anyone tell me whether there is any authorization object or BADI to do the check before deleting any document from
    SOLAR02 transaction in Project Documentation Tab or General Documentation Tab
    Thanks a lot in Advance.

    Hi Jonathan,
    Appreciate your reply. As you know the validations kick in based on your input on the screen, kind of mostly part of PAI of the screen (0750 in this case). But my requirement is to prevent this change in the first place, not validating the user's input after a change option is given to the user.
    If you know if and how we can achieve this, please share your thoughts.
    Thanks & Regards,
    Venu

  • AR AUTOINVOICE ignores the checked box "copy document number to transaction

    dear ,
    AR AUTOINVOICE ignores the checked box "copy document number to transaction number"
    I setup the batch source as check "copy document number to transaction number" but when
    I import the invoice by auto invoice I found the transaction number is 2 and
    the document number is 1
    That mean the system ignore the check box in definition of batch "copy document number to transaction number"
    Facts: Navigate -> Setup -> Transactions -> Sources
    Setup Transaction Source with Automatic Transaction Numbering checked and Copy Document Sequence Number to
    Transaction Number checked.
    Navigate - > setup -> system option  tab (transaction & customer)
    Document number generation level: when completed
    Expected Behavior:
    The Expected Behavior is that when I checked the "copy document number to transaction number" in definition of the source
    AR Auto Invoicing must assign the document number to transaction number
    Business impacts :
    There is gaps with the sequence number for the invoice that not accepted from the finance auditor in the last of the year
    thanks

    check have u performed these steps or not.
    you have to do all the necesarry set up steps:
    1) Enable the Sequential Numbering Profile Option
    2) Enable the AR: Document Number Generation Level Profile Option
    3) Check Copy Document Number to Transaction Number box on Transaction Sources
    4) Define Sequences
    5) Assign Sequences to Categories
    In batch source definition for your invoice, there is a flag for 'copy doc num to trx num'. is it ticked?

  • BAPI_ACC_DOCUMENT_POST & generated document number

    Hi,
    I am using BAPI function BAPI_ACC_DOCUMENT_POST to post financial documents in the system. My question is, how properly retrieve generated document number (BKPF-BELNR). We are using internal document number generation so the function generates document number. But, function itself, does not return generated document number. Currently, after commit I try to locate a record of generated document using reference key ... Isn't there any better way how to get generated document number?
    Tkank you.

    Yes, I found this code ... as I wrote, there is not problem if I set curtp = '10'. BUT, there is another problem, with different currencies. Then, when I try to post document in different currency that the currency of company code is, function raises error "Inconsistent currency information" ...
    here is an example, how I fill tax information, as requested:
    DATA:   docHeader     TYPE BAPIACHE09,
            accGL         LIKE BAPIACGL09 OCCURS 0 WITH HEADER LINE,
            accReceivable LIKE BAPIACAR09 OCCURS 0 WITH HEADER LINE,
            accAmnt       LIKE BAPIACCR09 OCCURS 0 WITH HEADER LINE,
            accTax        LIKE BAPIACTX09 OCCURS 0 WITH HEADER LINE,
            extension     LIKE BAPIACEXTC OCCURS 0 WITH HEADER LINE,
            tax_account   TYPE STRING,
            tax_code      TYPE STRING,
            tax_trans     TYPE STRING,
            tax_spec      LIKE ZIFPRMS-VALUE,
            itemno        TYPE N LENGTH 10.
    * initialize document header
      docHeader-bus_act    = 'RFBU'.
      docHeader-username   = sy-uname.
      docHeader-header_txt = fin_data-text.
      docHeader-comp_code  = header-company_code.
      docHeader-doc_date   = header-document_date.
      docHeader-pstng_date = fin_data-posting_date.
      docHeader-ref_doc_no = header-id_sale.
      docHeader-doc_type = params-doc_type.
    * process document items, in loop
      LOOP AT fin_items INTO fin_item.
    * initialize AR (line 1)
         accReceivable-itemno_acc = itemno.
         accReceivable-customer   = cus_data-id_contact.
         accReceivable-comp_code = header-company_code.
         CONCATENATE fin_item-text ' (receivable)' INTO accReceivable-item_text.
         accReceivable-pmnttrms = params-payment_term.
         accReceivable-pmnt_block = params-payment_block.
         IF doc_type = 'APR'.
            accReceivable-sp_gl_ind = 'F'.
         ENDIF.
         APPEND accReceivable.
    * initialize receivable amount
         accAmnt-itemno_acc = itemno.
         accAmnt-currency = fin_data-currency.
         accAmnt-curr_type = '10'.
         accAmnt-amt_doccur = fin_item-vat_base + fin_item-vat.
         IF doc_type(2) = 'CR'.
            accAmnt-amt_doccur = accAmnt-amt_doccur * ( -1 ).
         ENDIF.
         APPEND accAmnt.
         itemno = itemno + 1.
    * do not continue when posting a down payment request
         CHECK doc_type < > 'APR'.
    * initialize GL account line item
         accGL-itemno_acc = itemno.
         accGL-gl_account = params-doc_gl_account.
         CONCATENATE fin_item-text ' (revenue)' INTO accGL-item_text.
         accGL-pstng_date = fin_data-posting_date.
         accGL-tax_code = tax_code.
         accGL-doc_type = params-doc_type.
         accGL-costcenter = fin_item-cost_centre.
         APPEND accGL.
    * initialize GL amount
         accAmnt-itemno_acc = itemno.
         accAmnt-currency = fin_data-currency.
         accAmnt-curr_type = '10'.
         accAmnt-amt_doccur = - ( fin_item-vat_base ).
         IF doc_type(2) = 'CR'.
            accAmnt-amt_doccur = accAmnt-amt_doccur * ( -1 ).
         ENDIF.
         APPEND accAmnt.
         itemno = itemno + 1.
    * initialize TAX account line item
         IF STRLEN( tax_code ) > 0.
            accTax-itemno_acc = itemno.
            accTax-gl_account = tax_account.
            accTax-tax_code   = tax_code.
            accTax-cond_key   = 'MWAS'.
            APPEND accTax.
    * initialize tax amount
            accAmnt-itemno_acc = itemno.
            accAmnt-currency = fin_data-currency.
            accAmnt-curr_type = '10'.
            accAmnt-amt_doccur = - ( fin_item-vat ).
            accAmnt-amt_base = - ( fin_item-vat_base ).
            IF doc_type(2) = 'CR'.
               accAmnt-amt_doccur = accAmnt-amt_doccur * ( -1 ).
               accAmnt-amt_base = accAmnt-amt_base * ( -1 ).
            ENDIF.
            APPEND accAmnt.
            itemno = itemno + 1.
         ENDIF.
      ENDLOOP.
    * translate customer field to BAPI format
      CALL FUNCTION 'MAP2E_BAPICOBL_CI_TO_BAPIEXTC'
         TABLES    INTERNAL_CI_COBL      = cust_ext
                   EXTENSION_CODINGBLOCK = extension.
    * call BAPI function to create customer invoice
      CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
         EXPORTING DOCUMENTHEADER = docHeader
         IMPORTING OBJ_TYPE = obj_type
                   OBJ_KEY  = obj_key
                   OBJ_SYS  = obj_sys
         TABLES    ACCOUNTGL = accGL
                   ACCOUNTRECEIVABLE = accReceivable
                   ACCOUNTTAX = accTax
                   CURRENCYAMOUNT = accAmnt
                   EXTENSION1 = extension
                   RETURN = returnTab.
    Edited by: Rastislav Mojzis on Jul 9, 2008 7:18 AM

  • Error when Generating Document Number

    Hi Friends,
    I am trying to generate Document Number which uses C1-DOC-NBR and generate Document Number . when i click on Freeze/Complete button of bill ,the following error is coming .
    Document Sequence for Issuing Center HITECH with Branch 1011 and Document Type C1IN
    not found
    But i already attached issue center to the user ,SA characterstic type ie(public/non public),and all other parameters for that algorithm.
    pls help to solve this error.
    Thanks&Regards
    sivaram

    You need to verify the configuration of "Issuing Center", also ensure that "HITECH" Issuing Center is part of the User's Characteristic Value as defined under Document Number Details algorithm on the Installation Record.

  • Unable to capture fi document number using transaction ABUMN

    hello guys,
    I am trying to create a bdc for transsaction ABUMN which generates a fi document at the end.
    but in BDC the bdcmsgcoll table is empty.
    is there any way so that i can capture document number as soon as it is posted.
    Please help, Thanks in advance.
    Thanks & Regards,
    Deepak.

    can you run your BDC after call transaction method  if you get success message based  on your input  values, then   goto the document tables and pick that values  and pass the success message.
    CALL TRANSACTION tcode USING gi_bdcdata                "#EC CI_CALLTA
                       MODE   gv_ctumode
                       UPDATE gc_cupdate
                       MESSAGES INTO gt_messtab.
      l_subrc = sy-subrc.
      IF sy-subrc <> 0.
        WRITE: / 'CALL_TRANSACTION',
                 tcode,
                 'returncode:',
                 l_subrc,
                 'RECORD:',
                 sy-index.
        LOOP AT gt_messtab INTO gwa_messtab WHERE msgtyp = 'S'.
          CLEAR lwa_t100.
          SELECT SINGLE * FROM t100 INTO lwa_t100  WHERE sprsl = gwa_messtab-msgspra
                                    AND            arbgb = gwa_messtab-msgid
                                    AND            msgnr = gwa_messtab-msgnr.
          IF sy-subrc = 0.
            l_mstring = lwa_t100-text.
            IF l_mstring CS '&1'.
              REPLACE '&1' WITH gwa_messtab-msgv1 INTO l_mstring.
              REPLACE '&2' WITH gwa_messtab-msgv2 INTO l_mstring.
              REPLACE '&3' WITH gwa_messtab-msgv3 INTO l_mstring.
              REPLACE '&4' WITH gwa_messtab-msgv4 INTO l_mstring.
            ELSE.
              REPLACE '&' WITH gwa_messtab-msgv1 INTO l_mstring.
              REPLACE '&' WITH gwa_messtab-msgv2 INTO l_mstring.
              REPLACE '&' WITH gwa_messtab-msgv3 INTO l_mstring.
              REPLACE '&' WITH gwa_messtab-msgv4 INTO l_mstring.
            ENDIF.
            CALL FUNCTION 'FORMAT_MESSAGE'
              EXPORTING
                id        = gwa_messtab-msgid
                lang      = sy-langu
                no        = gwa_messtab-msgnr
                v1        = gwa_messtab-msgv1
                v2        = gwa_messtab-msgv2
                v3        = gwa_messtab-msgv3
                v4        = gwa_messtab-msgv4
              IMPORTING
                msg       = l_mstring
              EXCEPTIONS
                not_found = 1
                OTHERS    = 2.
            IF sy-subrc <> 0.
              MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
            ENDIF.
            CONDENSE l_mstring.
            IF NOT l_mstring IS INITIAL.
              WRITE: / gwa_messtab-msgtyp, l_mstring(250).
              MESSAGE l_mstring TYPE 'I'.
            ENDIF.
          ELSE.
            WRITE: / gwa_messtab.
          ENDIF.
    ENDIF.
        ENDLOOP.
        READ TABLE gt_messtab INTO gwa_messtab WITH KEY msgtyp = 'S'.
        IF sy-subrc NE 0.
          MESSAGE s069(msg class)
        ENDIF..

  • Mass deletion of document number ranges intervals for several company codes

    Dear experts,
    We are running version ECC6 and are about to go-live a lot of company codes simultaneously. We would like to delete satndard number ranges intervals for these company codes.
    Is there a way to delete the number ranges intervals (which have not been used) for several company codes at the same time ? I'm looking for a transaction or a program similar to OBH1 (used for the creation of number ranges ).
    Thanks in advance for your help.
    Best Regards,
    Steven

    Hi
    I am also not aware of such T.code to delete number ranges for a company code.
    Alternatively, you can go to FBN1 in change intervals mode.
    From the Menu Select all and Press Shift + F2 (Delete interval).
    Ofcourse, this have to be done individually for each co. code.
    Regards

  • How to generate unique document number ?

    Hi All,
    We need to generate Document Number where there should be any gap, so that we cannot use sequence. For example : Invoice Number.
    one possible approach like : Select MAX(InvoiceNumber)+1 from invoice, what if that table has millions of rows, is this reliable enough ?
    How to avoid two user do the same query at same time that lead to dupplicate number ?
    Anybody has done it this way in production? or any other approach ?
    Thank you for your info,
    xtanto

    I strongly second Justin's strong suggestion about re-considering the requirement.
    Be aware that for any of the schemes suggested to have a chance of working, all access to the table must be through stored procedures that use a SELECT FOR UPDATE on the counter table. No user in the database can have insert privileges on the document table except the owner. The owner's password should be kept in a locked safe and be unknown to anyone. If for some reason the owner needs access to the database, then remove the password from the safe, do what needs to be done, then get some guy off the street to set a new password, write it down and lock it in the safe again.
    If you really need a gap-free number, it needsto be another column, separate from the PK. Use a sequence to generate the pk gaps and all, then create a procedure that runs periodically to update the gap free column. Soemthing like:
    SQL> CREATE PROCEDURE fix_gap_free AS
      2     l_v NUMBER;
      3     TYPE id_tbl IS TABLE OF number INDEX BY BINARY_INTEGER;
      4     l_ids  id_tbl;
      5     l_id2s id_tbl;
      6  BEGIN
      7     SELECT MAX(NVL(id2,0)) INTO l_v FROM t;
      8     SELECT id, ROW_NUMBER() OVER (ORDER BY id)
      9     BULK COLLECT INTO l_ids, l_id2s
    10     FROM t
    11     WHERE id2 IS NULL;
    12
    13     FORALL i IN 1 .. l_ids.COUNT
    14        UPDATE t
    15        SET id2 = l_id2s(i) + l_v
    16        WHERE id = l_ids(i);
    17     COMMIT;
    18  END;
    19  /
    Procedure created.
    SQL> SELECT * FROM t;
            ID        ID2
             1
             2
             5
             7So, id2 is going to be the gap-free column.
    SQL> exec fix_gap_free;
    PL/SQL procedure successfully completed.
    SQL> SELECT * FROM t;
            ID        ID2
             1          1
             2          2
             5          3
             7          4So first pass is fine. Now lets add a few rows, so the table now looks like:
    SQL> SELECT * FROM t;
            ID        ID2
             1          1
             2          2
             5          3
             7          4
             8
             9
            25and generate more gap free number:
    SQL> exec fix_gap_free;
    PL/SQL procedure successfully completed.
    SQL> SELECT * FROM t;
            ID        ID2
             1          1
             2          2
             5          3
             7          4
             8          5
             9          6
            25          7If there may be deletions in the table, and you need to maintain the gap free nature, then just skip the WHERE id2 IS NULL predicate.
    John

  • Receivables: Diferrence between "transaction number" and "document number"

    Hi!
    What is the difference between "transaction number" and "document number" as shown in the transactions window?
    Where are they used?
    thanks!

    Transaction number is the Invoice number. It can be a manually entered number in case of manual invoices. Even in case of imported invoices, it can be a manually assigned number if the trx_number field is populated in the ra_interface_lines_all table. If you Invoice batch source setup indicates automatic transaction numbering, the transaction (invoice) number will be automatically generated sequentially. The starting number is mentioned in the Trx batch source.
    The document number is a number which is generated by Document sequencing. To have the document number generated, you have to do few Doc sequencing setups like setting the 'Sequencial Numbering' profile options, creating document sequences and assigning the sequence to the Categories. The trx types are created as categories.
    The Transaction number can be the same as the document number if you enable the option 'Copy Document number to Transaction number' in the Invoice batch source.
    Hope that helps.
    Thanks,
    Anil

  • Alphanumeric Document number for Sales order

    Dear Experts,
    I got a requirement, The sales order number after saving the document the SO document number should be SO ( Alphabetic) 00012074 (Numeric) ie. SO00012074,
    The numeric portion will come from the number range assigned for that document and Alphabatic portion should come depending on the transaction code and document type.
    in SAPMV45AFZZ  User-exit
    FORM USEREXIT_NUMBER_RANGE USING US_RANGE_INTERN.
    This exit triggers before call function 'NUMBER_GET_NEXT'  that generates document number for the current document and return to the field vbak-vbeln and finally this is the document number, In the debug mode if I change the number for example 0000012074 to SO00012074 runtime I can get the expected number and also it is saved in the system. But in the real time it is not possible as this coding in not any user-exit.
    So I can't use this user-exit for the to get alphanumeric number in the document.
    FORM USEREXIT_SAVE_DOCUMENT
    This exit triggers after the generation of document number. In this user exit if we change the document number for example 0000012074 to SO00012074, it shows the expected number after saving the sales order but it is not actually saving in the database. Means if we try to open the same SO for example SO00012074 in va02/va03 it is showing
    SD document SO00012074 is not in the database or has been archived but if we try open 0000012074 in va02/va03, we can get the document.
    We can use this user-exit but if we change the value of vbak-vbeln in this user-exit finally it is not saving in the system.
    Can anybody help me how I can achieve the requirement ?

    bro...
    You have got an option to copy the program the standard program into zprogram....
    goto se38 and copy the program into a z program....and in doing so copy everything from the ctandard program ie vaients,documentation and function module etc.
    now change this z program to meet your need....
    both way if you dont make lot of changes you will get same performance with your work done
    regards

  • Regarding creation of document number for user defined form

    Hi all,
    we had created a form , but we don't no how to generate document number as in sap
    we created but it is not creating automatically
    after adding only it is showing that number in series
    but i need that number at the time of opening only

    hi srvanth
    Use this code in a data binding of the form to load automatically the doc numbers
        ds = oform.DataSources.DBDataSources.Add("@TODACT")
            oform = oapp.Forms.ActiveForm
            Dim reset As SAPbobsCOM.Recordset
            Dim qsr As String
            reset = ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
            qsr = "SELECT max(T0.DocNum) as c  FROM [dbo].[@TODACT]  T0"
            reset.DoQuery(qsr)
            If reset.Fields.Item("c").Value <= 0 Then
                a = 1
            Else
                a = (reset.Fields.Item("c").Value) + 1
            End If
            oitem = oform.Items.Item("doct")
            oedit = oitem.Specific
            oedit.DataBind.SetBound(True, "@TODACT", "DocNum")
            oedit.Value = a
    this will load document number everytime you load the form at the edit box with unique id "doct"
    hope this helpful
    you have to bind this edit box with DocNum Userfield of the table.
    report back if there is any error
    Regards
    Cool Ice
    Edited by: Cool Ice on Aug 19, 2008 7:20 AM

  • Document number not available in BSAD Table even after clearing

    Dear Experts,
    with the FM posting_interface_start, posting_interface_clearing, posting_interface_end iam able to post the document with clearing using Tcode f-30/fb05 and can see the document number getting generated and when i see the BSAD table with the same generated document number it say no table entires for that document number BUT is still available in BSID table even after getting cleared. Can any body explain me why the document  is not getting moved from BSID Table to BSAD Table.
    Your inputs will be highly appreciated.
    Regards,
    Jyothsna Reddy

    Hi experts,
    when iam clearing the open item with posting_interface_clearing getting the message like :" Documnet number xxxxx posted in company code xxxx". when i checked that particular document in table bsad it says no table entries for that particular document. iam confused whether my document got cleared or not.
    Thanks
    Jyothsna Reddy
    Edited by: Rob Burbank on Dec 30, 2011 11:56 AM

  • Document Number generation as per the client requirment

    Hi,
    I would like to generate the document no as per our client's document numbering logic. This is not available in standard.
    In additional data tab am collecting information from user (Characteristics values) to generate document number.
    E.G.
    I have 2 characteristics
    1. Part Type:
        Values: A - Type 1
                    B - Type 2
    2. Part Code:
        Values: 01- Part 1
                    02 - Part 2
                    03 - Part 3
    When am creating document am selecting Part Type = A & Part code = 02 so my document number is A-02. ("-" : constant).
    I am planning to use BADI "DOCUMENT_MAIN01" - method "ASSIGN_NUMBER".
    In this method how can i get the characteristics values which filled user on screen ? Is there any Function Module for that ?
    I tried Function Module "CTMS_DDB_CLOSE" but this is not released also this is not working in Easy DMS.
    Is there any other way i can take i/p from user to generate document number ?
    Regards,
    Sunny
    Edited by: Sunny on Sep 25, 2008 9:09 PM

    Hi Sunny,
    An experienced ABAPer can capture the required information from the sub screen(additional data) number (4000) and the subscreen program (SAPLCTMS). This data can be used  in the method of the BADI.
    Regards,
    T T Subudhi

  • Clearing Document Number (AUGBL)

    Hello Experts,
    Can anybody tell me that where we can see the clearing document number in Transactions.My requirement is to get the Clearing Document Number by giving Document number.
    Thanks in advance.

    you want it in BI or in R/3 ?
    if in BI, do u have 0fi_gl_4 infosource up and running?
    Message was edited by:
            Pradhiba

Maybe you are looking for

  • What to Do When Your iPad is Not Charging?

    When you first bought your iPad, did you plug it into your PC and become frustrated when you discovered that it wouldn’t take a charge? Were you disappointed to discover that the iPad doesn’t charge through PCs and you have to plug it into the wall t

  • Incorrect operators in af:query component

    We have created a search popup using af:query component based on a view criteria. The view criteria uses two string[varchar2(60) in EO] attributes named "Name" and "Owner". TerritorySearchViewCriteria Group Name CONTAINS :BindTerritoryName -- String

  • After Upgrading my Library does not Display

    I backed up my entire Macpro and did a clean install of Leopard and iPhoto 08. I copied the contents of my backed-up pictures folder to the pictures folder in the new install of Leopard. IPhoto 08 shows my albums and folders on the left side, and the

  • Alpha channel showing black background

    Hello... I'm importing a logo from Photoshop that is on a transparent alpha channel. It looks fine in Photoshop... no background (other than the checkerboard). When I bring it into Final Cut there is a black box around the logo image. I have tried re

  • Listbox problem in screen painter

    Hi all, I have a screen with 3 I/O fields 1.handling unit 2.label template(listbox) 3. printer(listbox) number. Regards, Pavan