Generating next available Sales Order Number

Hi experts,
I have a requirement where i need to get to know the next available Sales Order Number in SAP for an SAP to  third-party system integration scenario.
Is there any BAPI available which can list the next-available sales order number in the system?
Kindly share your expertise on this one.
Thanks in advance.
Regards,
Keerthi

Hi
You can use FM CVV8_GET_NEXT_NUMBER.
Provide  Number range object as RV_BELEG.
To get the number range interval you have to pick value of NUMKI field from table TVAK according to your sales document type.
The function module will return the next available number.
Regards
Vijai

Similar Messages

  • How to generate sales order number

    Hai friends,
         In sales order creation, I want to generate a sales order number (i.e., 1 for the first sales order, 2 for the second and so on). This number should be generated successively in background. How it can be done..?

    Hello,
    Yes, I'm struggling to understand what you're after too. You could create a z table to keep track of the number if it's bespoke. Otherwise try these tables: FBN1, NRIV (intervals), T161 (po) TNRO (linked to NRIV).
    Good luck!
    Ash Thomas
    http://www.ashthomas.com
    Sap Abap Developer & Sap Abap Programmer

  • How sales order number generated in the SAP R/3  is transferred to SAP APO

    Dear Experts,
    During the creation of the Sales order in SAP  R/3 an Purchase requisition is created in SAP APO and assigned with temporary sales order and when we save the sales order in R/3 the corresponding sales order number is attached with the purchase requisition in SAP APO. Is there any exits or BADI available while this Sales order detail transferred to APO or during this sales order details attached to Purchase requisition  in APO side.
    Many thanks in advance,
    Senthil

    Senthil,
    During the creation of the Sales order in SAP R/3 a Purchase requisition is created in SAP APO
    ?? I guess you are talking about one of the planning procedures that executes 'Start product heuristic immediately', yes?
    and assigned with temporary sales order
    I guess you are talking about [Temporary Quantity Assignments|http://help.sap.com/saphelp_glossary/en/74/b171467944d3119b440060b0671acc/content.htm], yes?
    Is there any exits or BADI available while this Sales order detail transferred to APO
    Standard enhancements are
    Sales order CIF enhancement on the ECC side
    CIFSLS03  (outbound from ECC)
    Sales order CIF enhancement on the APO side
    APOCF010 (Inbound from ECC)
    Best Regards,
    DB49

  • Invoice numbers to generate Sales Order Number

    I work for a billing department and we use SAP to key our invoices however we have a sales order that has a different number that corresponds with each invoice.
    If i get a list from my manager that has a bunch of invoice numbers, is there a way i can load them into sap and have it create something where it tells me the sales order number that goes with the invoice number? If it can work with multiple numbers at once will be best..
    what if the invoice numbers have a customer name in the Bill To line that i want to see as well. can that happen?

    Hello,
    Yes, I'm struggling to understand what you're after too. You could create a z table to keep track of the number if it's bespoke. Otherwise try these tables: FBN1, NRIV (intervals), T161 (po) TNRO (linked to NRIV).
    Good luck!
    Ash Thomas
    http://www.ashthomas.com
    Sap Abap Developer & Sap Abap Programmer

  • Sales Order number is  not showing in MD04

    Hi Gurus  ,
    I have got one case where  Sales order number is not showing  in MD04 screen  . This sales order , line item  has already delivered , PGI &  billing document also been generated  . Moreover accounting document is also been created .As cheeked & found that it is not shwoing in MD04 screen  because at  the time sales order creation  availability check “01” was maintained  which has sum up all the  requirement in one  particular day ( Also as
    per SAP note -70408) .
    Now because  all the subsequent document has been generated  for sales order so we can not mark it for “Rejection for rejection “  & to create new  sales order  with  availability check “02” in material master .
    Please let  me know the possible solution for the same or  if any  sap note would  be required to get the sales order number in MD04  .
    Thanks  ,
    Aman

    Hi Kiran ,
    Actually  before running the  report in “SDRQCR21”  in PRD I wanted to  run it in “Quality “ .
    In quality I am not able to simulate the same  .
    Please refer below points related to my testing result .
    1.Mainatined availability check group “01” .
    2 . Created Sales order 
    3. Check in MD04 screen & as expected  sales order  was coming blank  with negative Qty .
    4. Run the MRP which generated PR
    5. PR converted to PO  & GRN was done which updated the stock
    6. Created delivery  & checked the same in MD04  . It was also coming blank  . No delivery  document  numbe was showing in screen  but  it was coming with negative  Qty .
    7. Done the PGI  & blank  delivery document number  was removed & it become  normal .
    In PRD .
    There are 3 sales order
    One sales order is already marked reason for rejection & two sales order delivery , PGI has been done  .
    But still it is showing  blank sales order with negative Qty  & after MRP run it is generating the PR also  .
    I don't why it was  showing with negative values  .
    Please refer attacehed screen shot  .
    Thanks,
    Regards ,
    Aman

  • Error using BAPI_BUSPROCESSND_CREATEMULTI, how to get sales order number

    Hi all, i am using the BAPI BAPI_BUSPROCESSND_CREATEMULTI to create a sales order of type ZWEB in CRM. I am using HEADER,  INPUT_FIELDS ,  ITEM ,  CREATED_PROCESS and  RETURN
    tables. In the CREATED_PROCESS i am getting the GUID but no value for object id. and in return table i find the error mesages as "no status object available for unknown object", "A log has been generated for single document", "no status object availabe for unknown object".
    what mistake i am doing? i want to create a sales order in SAP CRM and get the sales order number as the output. am i using correct bapi. many people suggested of using bapi BAPI_BUSPROCESSND_SAVE....i dont know how to use it and what values i should pass to the objects_to_save paramter of this bapi.
    here is my code please help me
    ***TABLES
    DATA: IT_HEADER TYPE TABLE OF BAPIBUS20001_HEADER_INS.
    DATA: IT_INPUT_FIELDS_FILL TYPE TABLE OF BAPIBUS20001_INPUT_FIELDS.
    DATA: IT_ITEM TYPE TABLE OF BAPIBUS20001_ITEM.
    ***WORK AREA
    DATA: WA_INPUT_FIELDS TYPE BAPIBUS20001_INPUT_FIELDS.
    DATA: WA_HEADER TYPE BAPIBUS20001_HEADER_INS.
    DATA: WA_ITEM TYPE BAPIBUS20001_ITEM.
    DATA: IT_EV_GUID_32 TYPE GUID_32.
    DATA: IT_EV_GUID_32_1 TYPE GUID_32.
    CALL FUNCTION 'GUID_CREATE'
      IMPORTING
        EV_GUID_32       = IT_EV_GUID_32.
    WA_HEADER-GUID                      =  IT_EV_GUID_32.
    WA_HEADER-PROCESS_TYPE    =  'ZWEB'.
    WA_HEADER-DESCRIPTION        =  'WEB ORDER'.
    WA_HEADER-CREATED_BY        =  'SAPUSER
    APPEND WA_HEADER TO IT_HEADER.
    WA_INPUT_FIELDS-REF_GUID               =  IT_EV_GUID_32.
    WA_INPUT_FIELDS-REF_KIND               =  'A'.
    WA_INPUT_FIELDS-OBJECTNAME             =  'ORDERADM_H'.
    WA_INPUT_FIELDS-LOGICAL_KEY            =  '1'.
    WA_INPUT_FIELDS-CHANGEABLE             =  ' '.
    WA_INPUT_FIELDS-FIELDNAME              =  'PROCESS_TYPE'.
    APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
    WA_INPUT_FIELDS-FIELDNAME              =  'GUID'.
    APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
    WA_INPUT_FIELDS-FIELDNAME              =  'DESCRIPTION'.
    APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
    WA_INPUT_FIELDS-FIELDNAME              =  'CREATED_BY'.
    APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
    REFRESH: CREATED_PROCESS.
    CALL FUNCTION 'GUID_CREATE'
      IMPORTING
        EV_GUID_32       = IT_EV_GUID_32_1.
    WA_ITEM-GUID              =  IT_EV_GUID_32_1.
    WA_ITEM-NUMBER_INT        =  '10'.
    WA_ITEM-ORDERED_PROD      =  '90000000'.
    WA_ITEM-ITM_TYPE          =  'ZTAN'.
    WA_ITEM-MODE              =  'A'.
    APPEND WA_ITEM TO IT_ITEM.
    WA_INPUT_FIELDS-REF_GUID               =  IT_EV_GUID_32_1.
    WA_INPUT_FIELDS-REF_KIND               =  'A'.
    WA_INPUT_FIELDS-OBJECTNAME             =  'ORDERADM_I'.
    WA_INPUT_FIELDS-LOGICAL_KEY            =  '1'.
    WA_INPUT_FIELDS-CHANGEABLE             =  ' '.
    WA_INPUT_FIELDS-FIELDNAME              =  'GUID'.
    APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
    WA_INPUT_FIELDS-FIELDNAME              =  'NUMBER_INT'.
    APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
    WA_INPUT_FIELDS-FIELDNAME                 =  'ORDERED_PROD'.
    APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
    WA_INPUT_FIELDS-FIELDNAME                 =  'ITM_TYPE'.
    APPEND WA_INPUT_FIELDS TO IT_INPUT_FIELDS_FILL.
    REFRESH: created_process.
    CALL FUNCTION 'BAPI_BUSPROCESSND_CREATEMULTI'
    TABLES
      HEADER = IT_HEADER
      INPUT_FIELDS = IT_input_fields_fill
      ITEM = IT_ITEM
      CREATED_PROCESS = CREATED_PROCESS
      RETURN = RETURN.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
       EXPORTING
        WAIT = 'X'
      IMPORTING
        RETURN = RETURN1.
    Edited by: jessica sam on Dec 11, 2008 5:23 AM

    Hi Jessica,
                    I am not able map billing plan details for BAPI_BUSPROCESSND_CREATEMULTI.
    If u done alreay please guide or send program for that.I will be grateful for you.
    Regards,
    Dilip

  • CM25--display sale order number

    Hi all
    With transaction code: CM25 and overall profile: SAPSFCG011. We can display: Planning Table: SAPSFCG011 Finite scheduling forw./all functs.activ. 
    then there will be three sections, in the left of the bottom section "orders (pool)", there will be disaplay field "Sql" material" "Prio" "order" "operation" "work center" etc. but I would like to display "sale order number", because our production style is make to order. so when planner pull the production order and dispatch it, the planner needs to know the sale order number. Could be sale order number displayed here?
    thanks in advance!
    DanDan

    This is entirely possible... please see my post from a previous post with a similar question... what you would need to do is add field KDAUF (for planned orders) or field KDAUF_AUFK (for production orders).
    The configuration for manipulating the profiles and columns is a bit confusing in the IMG.
    However.. if you use transaction OPD0 you can open up the configuration for the default profile that you are using in production. For instance... overall profile SAPCRPG001 uses planning table profile SAPSFCL010. If you click the button to the right of the planning table profile entry it will take you to the planning table profile configuration screen. Double click on profile SAPSFCL010.
    In this transaction you will note there is an entry for Layout ID which is (if you have not changed the default config) SAPSFCLA10. If you click the button to the right of this entry it will take you to the list of Layout ID's available for you. Locate the Layout ID SAPSFCLA10, select it and double click on the "Definition of charts" option.
    In this case the graphical planning table is using three different sections. Select the section that you wish to manipulate the column headings for and double click on Grouping Names option. Select the option that shows up in the next screen then click on the Grouping Names option.
    Listed here should be the layout keys used in this section of the layout ID. Make note of the layout key(s). Execute transaction CY38. Input the Layout Key you wish to manipulate. From here you can select any field you would like to add/remove from the current listing.
    You can click the Sequence/Heading button to manipulate the specific order of the columns and how large you want those columns to be as well as what text is displayed as the heading.
    My suggestion if you are going to make changes like this is to copy the existing profiles to Z********* profiles so that you have a golden copy to work with.
    Hope that helps.
    Rachael

  • To save the sales order number in custom table while creation of the order.

    Hi Experts,
    Does there exist any exit to save the sales order number in a custom table while the sales order is created in VA01. The requirement is to capture the sales order number in a Z table when a field (payment terms ) is changed during the sales order creation.
    Regards,
    Sunitha

    Hi Sunita,
    You can store your data in the User exit MV45AFZZ in the form 'userexit_save_document'.
    You can navigate to MV45AFZZ from SE38 wherein an access key needs to be generated for that program, if you know to implement enhancement points then you can create an implicit enhancement point in this form without generating an access Key.
    Regards,
    Ravi Kiran

  • How to get master sales order number from delivery number

    Hi All,
    I need logic for getting master sales order number from available Delivery number.
    Note: There can be many SO's in diffrent levels.
    Finally i need to pick up master sales order no.
    Thanks in advance.
    Thanks,
    Deep.

    Hi,
    I have a outbound delivery[VL03N] 'X' in my system .
    Then for getting sales order no i am writing below code:
      SELECT single vbelv vbeln
             from vbfa
             INTO (vbelv, vbeln)
             where vbeln   EQ p_vbeln AND
                   vbtyp_n EQ 'J'.
    Then vbelv i need to pick up master sales order no.
        SELECT vbelv vbeln
               from vbfa
               INTO TABLE i_so
               where vbeln   EQ l_vbelv AND
                     vbtyp_n EQ 'C'.
    If i write code as above it is giving four sales orders which one of them is master sales order no!
    Thanks,
    Deep.

  • How to copy Customer Sales Order number to Purchase Order for 3rd party sal

    Hi experts,
    We are doing third party sales. So once we create Customer Sales Orders manually via VA01, users also manually create Purchase Req for it.
    We do not automatically create PR from Sales Order, as this is not my clients requirement. So we don't use item category group BANS in the material master.
    In the item level in the PR under the Contact Person tab, the creation indicator shows "V Sales & distribution document". Once PR is created this updates the PR number under the item level Schedule lines in the Sales Order.
    After PR creation, we run a job to create PO's.
    But the new requirement from the client is to automate this PO creation thru EDI.
    Our SAP is 4.6C & the Idoc type we use is ORDERS05 & Message Type is ORDERS. We are using EDIFACT std.
    Once I get the idoc xml file for this PO, I find that my Customer PO number (from the Sales Order) & also the Customer Sales Order number is not copying to the xml output.
    Please advise what needs to be done inorder to have it.
    This will be great help & I will reward for the answers !
    Rgds,
    Pri

    Tables are related.
    MATNR
    WERKS
    MBDAT
    LGORT
    CHARG
    etc fields are common in both VBBS and VBBE.
    May be you can generate a condition a fetch data using this.
    I hope it helps.
    thanks

  • Sales order number in Output text as subject in External Email

    Dear Friends,
    I have configured every thing in customisation so that whenever the sales order is saved an email goes to customer email mail id. this is working fine.
    Please help as i want to have Sales order number also in the subject of the email.
    I am doing this process through OUTput and not workflow.
    Please help.
    regards,

    Hi can you please tellme what configuraiton settings that to be made. i am not able to get the email generated in the spool and before that it is issuing no output is issue.
    the following are the configuration changes that i did for the new output type for Emails
    In General data of the Output type i maintinaed :  SAPMV45A - TEXT_SYMBOL_REPLACE under replacement of Text symbols
    i selectd the medium as extenal send.did i miss anything. or else i request you to provide me the complete configuration on emails.
    Thanks

  • Sales order number in customer invoice

    Hello,
    I have an FI custome invoice created automatically from SD module.
    Is it possible to enter the sales order number in the fI invoice?
    In the FIinvoice there is the field KDAUF (Sales order number) how is possible to popultate automatically this field?
    Thanks a lot,
    Cheers,
    Emanuela

    In standard this is not possible.
    You have to develop a zee transaction which should consider Tables VBFA and VBRK or VBRP.  In this zee transaction, automatically you can populate sale order reference and billing documents with the above table combinations so that the end user can see against one sale order, how many billing documents have generated in a day.  There should be one more editable field  where the end user has to key in the value against the sale order so that the same has to be updated in VBRP table.
    This is possible only if the accounting document has not been generated.
    thanks
    G. Lakshmipathi

  • Sales order number in customer line item

    Hi All,
    we have a requirement whereby we need to get the sales order number in the customer line item. Normally, the sales order number is populated in the GL line item (BSEG - VBEL2). We need to copy the sales order number to the customer line item.
    Can anyone let me know if you have worked on such requirement.
    Thanks in advance!!
    Aman Goel

    You can map Sales Order number to either 'Assignment' or 'Reference' fields in accounting document using Copy control function in SD. Please use transaction VTFA, this needs to be maintained for combinations of billing type and sales document type. Please ensure these fields are not currently used in your system for other information.
    Following fields can be mapped to 'Assignment' or 'Reference'.
    A Purchase order number
    B Sales order number
    C Delivery number
    D External delivery number
    E Current billing document number
    F External delivery no. if available, otherwise delivery no.
    If you currently use 'Assignment' or 'Reference' fields for other details, you can use user exit EXIT_SAPLV60B_008.
    Thanks
    Venkata Ganesh Perumalla
    Edited by: Venkata Ganesh Perumalla on Oct 4, 2010 11:52 AM

  • Sales order number  not copied to documents in accounting

    Dear all,
    I have created normal sales order ,delivery and billing and creation of excise billing invoice which i do for the sales  which happens directly from factory.
    now go to VF02, and click on 'accounting overview '  click on accounting document .Here sales order number (COBL-KDAUF) is not copied. where as accounting document generated for excise invoice sales order number is appearing .
    The same is the case with  STO through SD route ....
    kindly suggest . 
    thanks,
    Shankar

    Dear Shankar
    As you would be aware, four Accounting Documents would be generated for one billing document viz
    -  Accounting Document for Customer Debit
    -  Profit Center
    -  Controlling Document
    -  Profitability Analysis
    Of the above four documents, in which you have seen.  You can see the order reference in Profitability Analysis. 
    thanks
    G. Lakshmipathi

  • How to show Invoice number same as Sales Order Number..?

    HI,
    I need to show Sales Order Number same as Invoice Number how i can setup this..? can any one help me on this..?
    Ex: I raised a Sales Order: 00001, this has booked and shpieed now i ran the WF back ground process and run the autocreate master program to generate the invoice, here i need to show the invoice number as 00001 i..e same as the Sales Order Number.
    How i can achieve this..?
    Please advice..
    Regards,
    KV.

    KV,
    I suspect you'll need to customize the Autocreate routine to ignore the sequence nextval call and instead look at your sales order number.
    You would also need to be very careful that your OM setups supported this. I've seen this as a 'business requirement' before but almost invariably it doesn't make a lot of sense when you have the originating sales order number, line and shipment to quote as a reference on the invoice. Have you considered all of the following:
    <li> If you ever need to short ship or to ship on different dates, you will need more than one invoice for the same order. How would you manage that given that those invoices would need unique numbers?
    <li> Different order types - by adopting a 'synchronized' invoice sequence, you will need to ensure that you don't create a conflict with order type sequences - i.e. OM allows you to have an order 100001 of Order Type A and an order 100001 of Order Type B if you give different sequence assignments but this would cause problems with your invoice sequence.
    Regards,
    Jon

Maybe you are looking for