Document number generation w. ref to Part no.

Hi Gurus,
We have created a template to upload Cutover data  in CV01N with the following series.
Document
Document Type
Document Part
Document version
Description
1
DWG
000
00
TEST TEST TEST
2
DWG
000
00
TEST TEST TEST
3
DWG
000
00
TEST TEST TEST
3
DWG
001
00
TEST TEST TEST
3
DWG
002
00
TEST TEST TEST
4
DWG
000
00
TEST TEST TEST
when the input data is taken from Document Field i.e 1-4, system is generating an internal number as following:
PS-2014-DWG-802864
PS-2014-DWG-802863
PS-2014-DWG-802862
PS-2014-DWG-802861
As the system have to check the Input which we are giving in the excel sheet (Document) and generating the new number also validate the part number. If the Document Part number has a series like 000,001,002 it should not generate a new number, but should take the same system generated number and proceed like the following.
Document
Document Type
Document Part
Document version
Description
PS-2014-DWG-802863
DWG
000
00
TEST TEST TEST
PS-2014-DWG-802863
DWG
001
00
TEST TEST TEST
PS-2014-DWG-802863
DWG
002
00
TEST TEST TEST
Please let me know if there is any enhancement / solution to achieve this scenario.
I appreciate for your help.
Regards
Naveen

Hi Naveen,
For data with document part & version as 000 & 00, you provide only the document type as input but in case of document part with 001, 002... you need to provide DIR number, document type, document part as inputs in your Z program.
First, you need to have separate sheets for DIR's without document part & version and upload it for creating the DIR numbers. Then update new created DIR numbers in the second sheet where document part & versions are maintained and upload the same.
You can have one Z program which checks document part & version (If it is 000 & 00), create the internal numbers and if document part & version is maintained, then take DIR number maintained in the sheet as input of DIR creation
Regards,
Ravi

Similar Messages

  • 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

  • Material Document number generation

    Hi,
    The transaction GI, Trsfr Posting, Other Goods Movement is clubed to a wide category of Trans./Event Type(WA).So all the three documents has  been generated under a single number range.
    Still further based on certain specific mvt.types(transactions) can i  segregate the number generation to identify the transactions uniquely.
    Regards,
    Milton.I

    Hi
    The number range is generated for the trans/event type. One cannot have number range for specific movement type.
    Rgds
    SVJ

  • Document Number generation

    hi all
    for a user defined form,i created a field as document number,as the forms loads doc number is creating. Once the  form  mode changed to update mode,and now i m pressing  (Ctrl+A ) or menu UID 1282 to change the mode into add mode. but i m not able handle this menu event  by code. more clearly  i m using the following code
    if pval.menuUid="1282" then
    objForm.objmain.objApplication.Forms.getform("formtype",0)
    me.getDocnum()
    end if
    Actually i need to generate the doc number at the time of form mode changed into add mode also
    Edited by: ajith464 on Aug 31, 2010 7:32 AM

    Hi
    Did you go through the B1DE document.
    In that you can find  detailed information about how to create addons using B1De.
    First create required UDT and UDF's for your addon and register it through object registration wizard.For creating form you have 2 option create form manually or using form generator to create form automatically.Form generator will create form in xml format you easy change the extension to srf.Then create addon project in visual studio , choose the connection type second one (sigle side ) . if you created the udt and udf then you can avoid next step. Choose a menu  location for you addon give the required fields such as menu name description and choose menu type string. After the menu is created you have to attach the new form to that menu item for that right click on that menu and select attach form browse the location of your newly created form you can  also add menu events in this step.To add listener again right click on the menu and select add listener you can add onaftermenuclick and onbeforemenuclick( there is  a check box to differentiate these two events). Then press next , in this window you can find that your form name is listed in the left side ,expand it select the item for adding listener.
    for eg take the case of OK button its unique id is 1 we can add various listener to it such as onBeforeItemPress , On AfterItemPress, onBeforeItemClick and afterItemClick etc that up to your requirement. Click next here you can add form events listeners such as formDataAdd , formDataUpdate etc . complete the steps and create the project
    sorry for my english
    I will also send you some samples
    Regards
    Arun

  • Document Number generation in SRM

    Hi All,
    We have allocated a number range to various documents ( PO's, Contracts & Shopping carts ) in SRM SPRO. During transactions such as creating PO's & Contracts the number range gets generated even before saving the order.
    This leads to a situation where the number range gets allocated even when the order is not saved. Due to this problem we have observed that the number remains unconsumed & there is a skip in the PO numbers.
    Please provide a suitable solution to this issue. Also, confirm if this is a part of SRM standard functionality.
    Regards,
    Srinivas Reddy

    Hi Srinivas,
    Number ranges in the system are buffered in the main memory of          
    the application server. The server reads the next 10 free numbers       
    when starting up or when these 10 numbers are consumed. The symptom     
    you described can happen as follows:                                    
    Server 1 has 10 numbers 2,3,4,5,6,7,8,9,10,11 in memory.                
    Server 2 has 10 numbers 12,13,14,15,16,17,18,19,20,21 in memory.        
    A user logged on server 1 creates a document with number 2. Another     
    user creates the next document. If this user is logged on server 2,     
    this document will have the number 12. If you shut down a server,       
    the numbers not used are lost. This causes a gap in the sequence.       
    In case of having one server only, a missing number can happen when     
    rebooting the server. If the server had number range 2 - 11 in memory   
    and the last created document was no. 3, the next number after          
    rebooting the server will be no. 12.                                    
    To avoid having gaps in the number range, turn buffering off using      
    transaction SNUM for a particular object, REQREQ (shopping carts),      
    for example.  In that case the system reads the number from the database
    strictly in order.  However, please understand that buffering is        
    turned for performance reasons.                                         
    Regards
    Jason

  • Double Document number Generation from Z-tables -urgent

    I have a Z table with a number range and my user performs some task and when they press save button , a number is selected from the Z table, now problem is that when two users press ave at same instant same number is assigned to both for different entries -- try to sort this urgently

    Hi Joshi,
       Use Locks or Enque and Deque statements. Refer the following link.
    http://help.sap.com/saphelp_47x200/helpdata/en/a3/df5b1ee1bed348b198719e50af835d/frameset.htm
    regards,
    Chandra.
    Note: Please reward if helpful.

  • Document Number templates

    How Gurus
    I would like to have a document number that includes a fixed part and a changing part, for example PF/HCM/0001, i want PF/HCM/ to be fixed and then the number will always increase, how can i make this happen. I have tried checking on number assignements but i couldnt get anything meaningfull but i have a feeling that this is possible in SAP, pliz help me.
    partson

    Hi
    You can have the number assignment 3 -Mixed Number assignment with Exit so that if you pass ABC as document number it appends a number to it . But while creation , document number field cannot be left blank.
    If you want to automatically generate this number try implementing the BADI ,DOCUMENT_NUMBER01~DOCNUMBER_CHECK() .
    make sure that the number assignment for the documenttype is either blank or 1 .
    you can try something like this :
    METHOD if_ex_document_number01~docnumber_check.
      DATA : tdwa TYPE tdwa.
      DATA: subrc    TYPE inri-returncode,
            number   LIKE draw-doknr,
            number1  LIKE draw-doknr,
            new_number  LIKE draw-doknr,
            new_num TYPE string,
            lv_docnum1 TYPE string.
      CHECK sy-uname = 'MSRO'.
      CHECK tcode = 'CV01'.
      CHECK  draw-doknr = '' OR draw-doknr = '*'.
      CALL FUNCTION 'CV200_DB_TDWA_SELECT'
        EXPORTING
          pf_dokar  = draw-dokar
        IMPORTING
          psx_tdwa  = tdwa
        EXCEPTIONS
          not_found = 1
          OTHERS    = 2.
      IF sy-subrc <> 0.
    Implement suitable error handling here
      ELSE.
        CALL FUNCTION 'NUMBER_GET_NEXT'
          EXPORTING
            nr_range_nr             = tdwa-inumnr
            object                  = 'DOKUMENT'
          IMPORTING
            number                  = number
            returncode              = subrc
          EXCEPTIONS
            interval_not_found      = 4
            number_range_not_intern = 8
            object_not_found        = 12
            quantity_is_0           = 16.
        CONCATENATE 'ABC' '-' number INTO new_num.
        WRITE new_num TO doc_number.
        CONDENSE doc_number NO-GAPS.
      ENDIF.
    ENDMETHOD.
    This should work .
    Best Regards,
    Roopa

  • 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?

  • Duplicate Document number in Document Draft while sending for Approval

    Hello Experts,
    In Purchase order when we create document and send for approval ... if in a single day we create 25-30 Purchase orders, system assign same number lets say: 120011 to all the 30 documents created in a single day.
    is there a way we can give unique number to all the PO drafts being created and sending for approval ... ?
    Help Required
    Regards,

    Hi Shazad,
    The document number that you refer to works as follows. If you go into Purchase Orders, it will say that the next purchase order number (OPCH.DocNum) will be for example 345. When you're done capturing the information and go to File > Save as draft, the same screen appears again and you can add another draft.
    Seeing that the first draft didn't actually create a purchase order, but only a draft, the next available number is allocated. The next available purchase order number is still 345.Only you add a actual purchase order will the number be changed again.
    Internally in the SAP database, the DocEntry field of the draft contains the actual draft internal number. You can view this number if you open the drafts. Draft No is unique, but document number isn't and doesn't matter until the actual document is added.
    Hope it helps,
    Adele

  • 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

  • Unbale to create new document part with same document number

    Number range assigned to the X Document Type is internal. I have created new document (0001) with Document Part 000 & Version 00. For same Document Number when i tried to create New Document part by mentioning Document Numner 0001, Document Part 001 and Version 00, it says Document Type X can be assigned to internal number range only.
    Even I tried with following selection....
    Document Number = Blank
    Document Part = 001
    Document Version = 00
    Template:
    Document = 0001
    Document Part = 000
    Document Version = 00
    Now system is creating document with new number i.e. 0002.  But we want to create another document part with same Document Number. What is the problem with internal number range for Document Number?

    Hi Pradeep,
    Following are the config parameter of the document type.
    CM Relevnce = blank
    Number assignmt= 01
    Internal Number Range =02
    External Number Range= blank
    Number Exit =MCDOKZNR
    Vers. No. Incr. =0
    Version Sequence = blank
    AlternativeScreen = blank
    Let me know if you need anything more.
    Edited by: JJSingh76 on Dec 7, 2010 7:25 PM

  • What algorithm does Excel 2010 use for Pseudo Random Number Generation (MT19937?)

    Does Excel 2010+ use the Mersenne Twister (MT19937) algorithm for Pseudo Random Number Generation (PRNG), implemented by the RAND() function?
    This has been a nagging question for some time now, with "hints" that it indeed does.  However, a relatively thorough search turns up no definitive documentation.  The most direct indication is perhaps given by Guy Melard [Ref 9] where
    he tests Excel 2010's RAND() function using the Crush battery of tests in TestU01 by L'Ecuyer & Simard.  Melard references a "semi-official" indication that Microsoft did indeed implement MT19937 for the RAND() function in
    Excel 2010, but this reference no longer seems to be available. http://office.microsoft.com/enus/excel-help/about-solver-HP005198368.aspx?pid=CH010004571033.
    The other references below [Ref 1-10] document the history of the statistical suitability of the PRNG and probability distributions in various versions of Excel.  This includes the Wichmann-Hill PRNG implementations supposedly (arguably) used in
    Excel 2003 & 2007 for random number generation.  But still, we have no answer as to which PRNG algorithm is used in
    Excel 2010 (and 2013 for that matter).
    Microsoft indicates that RAND() has been improved in Excel 2010; Microsoft states, "...and the RAND function now uses a new random number algorithm." (see https://support.office.com/en-ca/article/Whats-New-Changes-made-to-Excel-functions-355d08c8-8358-4ecb-b6eb-e2e443e98aac). 
    But no details are given on the actual algorithm.  This is critical for Monte Carlo methods and many other applications.
    Any help would be much appreciated. Thanks.
    [Ref 1] B. McCullough, B. Wilson.  On the Accuracy of Statistical Procedures in Microsoft Excel 97. 
    Computational Statistics & Data Analysis. Vol. 31 No. 1, pp 27-37. July 1999.
    http://users.df.uba.ar/cobelli/LaboratoriosBasicos/excel97.pdf
    [Ref 2]L. Knüsel.  On the accuracy of the statistical distributions in Microsoft Excel 97. Computational Statistics & Data Analysis. Vol. 26 No. 3, pp 375-377. January 1998.
    http://www.sciencedirect.com/science/article/pii/S0167947397817562
    [Ref 3]B. McCullough, B. Wilson.  On the Accuracy of Statistical Procedures in Microsoft Excel 2000 and Excel XP. 
    Computational Statistics & Data Analysis. Vol.40 No. 4, pp 713-721. October 2002.
    https://www.researchgate.net/publication/222672996_On_the_accuracy_of_statistical_procedures_in_Microsoft_Excel_2000_and_Excel_XP/links/00b4951c314aac4702000000.pdf
    [Ref 4] B. McCullough, B. Wilson.  On the Accuracy of Statistical Procedures in Microsoft Excel 2003. 
    Computational Statistics & Data Analysis. Vol.49. No. 4, pp 1244-1252. June 2005.
    http://www.pucrs.br/famat/viali/tic_literatura/artigos/planilhas/msexcel.pdf
    [Ref 5] L. Knüsel. On the accuracy of statistical distributions in Microsoft Excel 2003. Computational Statistics & Data Analysis, Vol. 48, No. 3, pp 445-449. March 2005.
    http://www.sciencedirect.com/science/article/pii/S0167947304000337
    [Ref 6]B. McCullough, D.Heiser.  On the Accuracy of Statistical Procedures in Microsoft Excel 2007. 
    Computational Statistics & Data Analysis. Vol.52. No. 10, pp 4570-4578. June 2008.
    http://users.df.uba.ar/mricci/F1ByG2013/excel2007.pdf
    [Ref 7] A. Yalta. The Accuracy of Statistical Distributions in Microsoft<sup>®</sup> Excel 2007. Computational Statistics & Data Anlaysis. Vol. 52 No. 10, pp 4579 – 4586. June 2008.
    http://www.sciencedirect.com/science/article/pii/S0167947308001618
    [Ref 8] B. McCullough.  Microsoft Excel’s ‘Not The Wichmann-Hill’ Random Number Generators. Computational Statistics and Data Analysis. Vol.52. No. 10, pp 4587-4593. June 2008.
    http://www.sciencedirect.com/science/article/pii/S016794730800162X
    [Ref 9] G. Melard.  On the Accuracy of Statistical Procedures in Microsoft Excel 2010. Computational Statistics. Vol.29 No. 5, pp 1095-1128. October 2014.
    http://homepages.ulb.ac.be/~gmelard/rech/gmelard_csda23.pdf
    [Ref 10] L. Knüsel.  On the Accuracy of Statistical Distributions in Microsoft Excel 2010. Department of Statistics - University of Munich, Germany.
    http://www.csdassn.org/software_reports/excel2011.pdf

    I found the same KB article:
    https://support.microsoft.com/en-us/kb/828795
    This was introduced (according to the article) in Excel 2003. Perhaps the references in notes 2 and 3 might help.
    The article describes combining the results of 3 generators, each similar to a Multiply With Carry (MWC) generator, but with zero carry. MWC generators do very well on the Diehard battery of randomness tests (mentioned in your references), and have
    very long periods. But using zero carry makes no sense to me.
    Combining the three generators only helps if the periods of the 3 are relatively prime (despite what the article implies). Then the period of the result will be the product of the 3 periods. But without knowing the theory behind these generators, I have
    no idea what the periods would be. The formulas for MWC generators fail here.
    Richard Mueller - MVP Directory Services

  • Document Number Assignment.

    Hi Guru's
    Am a newbee in this mySAP PLM area and have a question regarding Number Assignment.
    I have a small scenario. Company "S" aquired companies A,B,C & D. All companies were following thier own ways of generating new part numbers.Now the task is implement SAP in all these companies and standardise the procedure of generating the part numbers AS PER THE GROUPS.
    Meaning, files belonging to one particular group should start with particulat number. like,
    Assemblies -
    S10XXXXX
    Parts----
    S20XXXXX
    Piping assemblies-------S70XXXXX
    Harness Assemblies----S80XXXXX
    Library Parts----
    S90XXXXX
    Lables etc----
    S91XXXXX etc.
    The same should be followed in all the companies like S, A,B,C & D.
    How to configure this type of numbering system ? I guess I should use mixed numbering , am I right ? Once done in SM, how normally it will be rolled out in other plants ?
    Please suggest.
    This may be a very basic question in DMS, but a clear answer for this will be really appriciated.
    Thanks,
    S.Achar.

    Hi Achar,
    in case you want to use such kind of document number, you should customize value '3' or '4' in the field 'Number Assgmt' in transaction DC10 for your document type. This kind of number assignments will also check the logic in BADI DOCUMENT_NUMBER01. Further you would have to create your own number exit and replace the standard program 'MCDOKZNR' with this own individual number exit program.
    Within your own number exit you can define your individual logic for the generation of your document numbers. For further information please see also the small blue info button at the upper right corner at the document type detail screen.
    Best regards,
    Christoph

  • 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

  • How to find Invoice number linked to FI accounting document number ??

    Hello All,
    I have been looking around for all possible combinations to find the link between FI accounting document number (BSEG-BELNR) and Intercompany Invoice number (for which billing corr. to STOs' or POs' is done).
    The requirement is that during ERS posting, we have accounting document numbers (BSEG-BELNR) and associated STOs' for this (BSEG-EBELN), but we are unable to map the Intercompany Billing Invoice number(s) (where the billing corr. to STOs' obtained from BSEG-EBELN) to this accounting document number (BSEG-BELNR).
    Any pointers or detailed view solution would be of great help.
    Thanks,
    Ansh

    Hello DPM,
    Thank you for the descriptive help. But my requirement is to look for Intercomapny Billing number (VBRK-VBELN) linked to an accounting document number (BSEG-BELNR) and not Invoice Receipt Number.
    The steps that I am following are:
    From BSEG, found EBELN (Stock Transfer Order) and XREF3 (Reference Key, combination of fiscal yr., some ref. number, maybe GR no. and ref item no.), based on BELNR (Accounting document number).
    From EKBE, found XBLNR (Reference Delivery Number or Direct Intercompany Billing Number on which GR is done) based on
    EKBE - EBELN = BSEG - EBELN
    EKBE - BELNR = BSEG - XREF3 (only ref and item no., considering it to be a GR no.)
    EKBE - VGABE = '1' and EKBE - BEWTP = 'E'.
    From VBRP, found VBELN (Intercompany Billing No., which is a desired number) based on
    VBRP - AUBEL = EKBE -EBELN (Stock Transfer Order)
    VBRP - VGBEL = EKBE - XBLNR (Delivery number)
    Here, I am not sure about 2 things:
    Whether the reference no in BSEG-XREF3 will always be Goods Receipt number for Stock Transfer Order or not. If not, then what it can be and how I will have to proceed further then.
    Secondly, If in case for an accounting document number, I have 2 Stock Transfer orders (BSEG - EBELN) and same reference number (BSEG-XREF3), then from History table (EKBE) I get only single delivery based on which GR was doen for both STOs', then I shall be getting single Intercompany Billing Invoice from VBRP or different ?
    Kindly provide your inputs.
    Thanks,
    Ansh

Maybe you are looking for