Sales order number based on delivering Plant.

Hello,
I have a requirement where in , it is expected that SO nr should be based on the delivering plant. In other words number range should be based on delivering plant. Has any one come across such a requirement and if  yes how was this requirement met?
thanks in advance
Best Regards
Shripad

Hi Shripad,
For this Use the User Exit "MV45AFZZ" and Include Program " FORM USEREXIT_NUMBER_RANGE  " OR SAVE_Document_ PrePare" Any one of the above which suits the requirement
Ask ABAPer to change the Code Accordingly. Give the Functional Specifications
to the ABAPer that Specs need to map the requirement .
Ask him to develop one table that holds Sales Document Type, Delivering Plant. and other Requirement Specific.
and he will call the table in the user exit when the Sales Document is going to Save.
Reward If Helpful...
Regards..
Praveen.D

Similar Messages

  • How to get sales order number based on purchase order

    hi,
    what is the transaction code to find the sales order number based on the purchase order number
    Regards,
    Murali

    Hi,
    Go to Se16 (data browser), see the table VBKD, enter the PO number, if any, execute.
    Prase

  • Get the sales order number based on customer number

    HI all,
    how can i get the sales order numbers based on the customer number?
    plz tell me the table names.
    thanks,
    Srini

    hiiiii..
    go to database table VBAK
    where you can find customer id and sales order
    use a select statement in your report program
    and key as kunnr ...
    i hope it does ...the job

  • Getting a Sales Order Number based off a Customer PO Number

    I have a program that runs nightly that created orders based off files from another program.  I use the order numbers from the other program as the Customer PO Number in the SAP order.  This works fine.  Now I'm trying to write a report where the user can put in that PO Number (the order number from the other program) and get the order details.  Currently I'm doing a select on VBAK, but it goes really slow.  It takes about 3-5mins a search.  Are there any other tables or ways you all can think of to speed this up?
    Thanks,
    Curtis
    Moderator message - Moved to the correct forum
    Edited by: Rob Burbank on Oct 21, 2009 3:41 PM

    VBAK is the header table, so is best possibility...
    but the field you are using for select is a nonkey field...
    the select is slow when a where clause exists with a nonkey field..
    so either
    create an secondary index on that field
    or
    donot use any nonkey field in the where clause at all, though this fetches more records but works much faster than passing a nonkey element. after getting the values into an internal table , use 'delete itab where field NE ponum. '
    this wil work much faster

  • Sales order number based on Production order number.

    Hi,
    Can anyone provide me the relationship between the sales order and production order .
    I need to get the customer material description(ie from vbap for related sales document no) when i give the input  as a production order number ,now my question is how the data is  retriewed  i mean how the production order gets related to sales order and form it how the material no is picked up and its material description..
    Please provide me with the tables and what key fields  are related (clear view how tables are related and how could i fetch the data)

    Swetha,
    There is no exact relationship between a Production order and a Sales order in an MakeToStock environment.  I will therefore assume that you are speaking of MakeToOrder,  where there is an exact relationship between the Production order and the Sales Order/Item.
    Functionally, CO03 > enter the production order number.  On the display screen will be displayed the associated Sales order and item.  Double click on this and it will bring you to VA03.  Select the item of interest, and then Goto > Item > Purchase order data.  The customer material is displayed.  If you have entered a customer material description in your Customer Material Info Record (CMIR) (VD51), and if the Material in the sales order was determined by the customer material info record, then the description will be displayed instead.
    So, at table level:
    Look in AFPO to find production order number.  Contained in AFPO is AFPO-KDAUF and AFPO-KDPOS.
    Use these fields to look in VBAP to locate your sales order/item.  Find VBAP-KDMAT. This is customer material.
    The description of the 'standard' customer materials can always be found in KNMT.  To look this up, you need to know sales org, dist channel, customer, and material.  Lookup using a program is dicey, since it is possible, within a sales order, to determine the material from Customer material, or it is possible to just enter any customer material in the sales order.  When the material is determined, it depends upon your determination logic (sold to? Hierarchy?), which can differ from system to system, and from customer to customer.  To sum it up, it is possible to get the CustMat description from data found in VBAP and VBAK, but you first need to know how your CMIRs are structured.
    For a simple lookup, I suggest you just get to the customer material in VBAP, and stop there.
    For more info about how data is stored in the Sales documents, you might want to ask your question in one of the SD forums.
    Best Regards,
    DB49

  • "Delivered without sales Order Number"

    Hi Geeks
    Can anybody let me know the steps to solve the error "Delivered without sales Order Number"?
    thanks&regards
    dj reddy

    hi
    Sure this document will help you. ple go thru it.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c81f9190-0201-0010-0b96-9106fd90ef8c
    Thanks
    Varun CN

  • VF04 display also sales order number in case of delivery based billing

    Hi,
    for delivery related billing VF04 displays the delivery number in column 'sales document'.
    Does anyone know, if possible to display also the sales order number additonally?
    thanks
    MG

    Hello,
    it is necessary to modify the strcuture VKDFIF used to show the billing due list.
    The include VKDFIZ is reversed for custom development.
    You should add the field for sales order.
    Then you have to fill the added field by userexit.
    The SAP note [69519|https://bosap-support.wdf.sap.corp/sap/support/notes/69519] gives an idea about it (it is for another field, you have to adapt it).
    Best regards,
    Ivano.

  • Sales order number range

    Hi all,
    When we save the sales order, One number will generate based on the sales document number range, client requirement was based on plant sales order number should be generate. So what are the configuration i have to do this?

    Hi,
    I would recommend what JP has mentioned in a previous thread.
    But be very careful when you develop such an enhancement. Plant is in the sales order line item table (VBAP) But the sales document number (VBELN) is in the sales order header.
    Imagine you have a sales order with 2 line items. One has "Plant 1" and this other line item has "Plant 2". In that case, how does your enhancement generate a number for your sales order? Either you should not allow users to create a sales orders with different plants in different line items (One sales order can have one plant)
    Else the best way is to take any other combination in the sales header (VBRK) to design the solution. (Like Sales Org)
    Thanks and best regards,
    Rahal

  • Sales order Number not appearing in CO-PA report painter

    Hi
    I have prepared profitability report through report painter through t-codes KE34 and KE31-
    Characteristics I have chosen is Sales order No/Plant/sales organization/product and customer-
    In the report Sales order Number is not appearing?
    We are able to see plant number/sales organization no/product no and customer no-
    Where I have committed mistake
    Thanks in advance
    joseph david

    HI,
    In order for you to see Characteristics in KE34 form definition, they have to be defined as 'Segment level' in KEQ3, as also metioned by Christian. However, it is not advisable to define 'Sales order #' as a Segment level, considering that 'Sales order #', changes frequently and also owing to performance issues with huge number of Segment level records which gets created in the course of time.
    If you want to report based on Sales order, then please consider using line item form/report KE94/KE91 or check if KE24 is sufficient.
    Hope this helps.

  • How to update sales order number (KAUFN) characteristic in the profitability segment of the PA document created at the time of service entry sheet confirmation, as a result of shipment cost document

    Hi,
    We have a scenario wherein we create shipment cost documents against delivery. As a result of shipments fully transferred, a PO for freight vendor is automatically created and a service entry sheet confirmation happens. As a result of service entry sheet confirmation, we have Financial accounting, Controlling and profitability analysis documents created. We have a requirement wherein we need to have the characteristic “sales order number (KAUFN)” populated in the profitability analysis document created as a result of service entry sheet confirmation.
    Could someone please advice how could this be attained in COPA. Thanks for your help in advance.
    Regards,
    Sandeep

    Hi Ajay,
    Thank you for the quick update.
    The document is updated to COPA through OKB9 settings. The profitability segment is updated with fields like customer, product, company code, plant, sales area data, profit center, etc; however the sales order number is missing.
    Could you please elaborate further how could FI substitution be implemented to call for the FM COPA_PROFITABILITY_SEGMENT through user exit? Are you recommending the substitution through GGB1? What could be the possible validation to call for the user exit to be implemented?
    Regards,
    Sandeep Kulkarni

  • Fetch Sales Order number VBELN from Purchase requisition number BANFN

    Hi,
    I'm not able to find a suitable method to fetch the sales order number(VBELN) from the purchase requisition number(BANFN).
    I tried using VBEP table to fetch the data, but it is giving serious performance issues, as in for fetching one record it is taking approx 20 seconds!!!
    Kindly suggest a suitable method for this.
    I've used the query as folllows:
    select single vbeln banfn
    from vbep
    into (wa_vbep-vbeln, wa_vbep-banfn)
    where banfn eq wa_eban_zdd1_x-banfn.
    where: wa_vbep is the workarea having two fields vbeln and banfn, and wa_eban_zdd1_x-banfn is the reference preq number.
    Scenario in brief described below:
    Whenever a direct delivery sales order is created on a supply chain plant, a dummy purchase requisition without source of supply is created automatically at preferred supplying plant for the customer in the sales order. Direct Delivery Sales Orders which are still in Open status and for the associated dummy purchase requisitions with these sales order, the deletion flag set has to be unchecked.
    in this case, only one sales order is created corresponding to a preq..
    BAPI: BAPI_PR_GETDETAIL is not giving entries for the table as this is a special case of direct delivery from the production plant directly to the customer, bypassing the warehouse / distribution center...
    selection screen has input fields preq, matnr(product) and plant. we fetch entries depending on the data filled in selection screen and also they should be of document type(BSART in EBAN table) ZDD1 and deletion indicator is set(LOEKZ in EBAN).
    then we check if the sales order corresponding to the preq is in open status...
    for this i need to programmatically fetch the sales order number corresponding to the preq...
    this is causing a performance issue as i could find only one way -- fetching sales order number from VBEP table corresponding to BANFN... indexing for easier also didnt work...
    no other way i could find to fetch sales order number corresponding to the preq number....
    there is a bapi: BAPI_PR_GETDETAIL, but this is not fetching entries to the changing tables related to sales order...
    also EBKN table doesnt have any entries as this is a special case of direct delivery preq..
    Guess i couldnt find anyother way...
    Thanks.

    I'm not sure as to why the select query was still throwing performance issues. I could see that the index had been created on only BANFN in the DB. Prior to creating the index, it was taking approx 20 seconds per entry, but after creating the index, it took 13seconds approx.
    I used the select query as follows:
    select single vbeln banfn
    from vbep
    into (wa_vbep-vbeln, wa_vbep-banfn)
    where banfn eq wa_eban_zdd1_x-banfn.
    where: wa_vbep is the workarea having two fields vbeln and banfn, and wa_eban_zdd1_x-banfn is the reference preq number.
    I tried a few other combinations also, but  those also didnt work effectively:
    select vbeln banfn
    from vbep
    into (wa_vbep-vbeln, wa_vbep-banfn)
    where banfn eq wa_eban_zdd1_x-banfn.
    without using SINGLE in the select query as the select query would implicitly pickup only a single record,
    select vbeln banfn
    from vbep
    into wa_vbep
    where banfn eq wa_eban_zdd1_x-banfn.
    and another query where the INTO statement was directed directly to a workarea.
    But unfortunately, nothing seemed to be working.
    The index i had created was on BANFN alone in the VBEP table.

  • 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

  • How to provide relation b/w sales order number &  purchase order number

    hi.....
    i created one report  based on sales order number and displayed by alv grid then by selecting one sales record  using bdc i created purchase order number ,then i have to display that purchase order in alv again,hoe to provide relation b/w sales order and purchase order

    This is what VA05 Does
    SELECT bstkd 
                   vbeln  "Sale order Number
                   posnr
              FROM m_vmvaa
              INTO TABLE i_m_vmvaa
              FOR ALL ENTRIES IN i_bstkd
              WHERE bstkd = i_bstkd-bstkd.   "Your PO Number

  • Reserved sales order qty based on sales order

    Dear All,
    is there any way to reserve the sales order qty in stock based on the sales order?. Actually i want to block the some qty for paticular sales order.  For example I created one sales order with 100 qty of x article and now i want to delivery of sales order with the  same qty after one month . In this case i want to reserve this qty for this sales order that should be not deliverd by another sales order.
    Thanks
    Abhi

    Hi,
    Block this qty against sales order
    MB1B >>> Use movement 413 & enter
    Speciefy sales order number & item number
    Then this qty will be permanently reserved or blocked for the perticular order.
    Kapil

  • Customer Sales Order number & Customer PO number

    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

    Hi,
    In VOV8 you can only Check whether the purchase order number already exists or not.
    If you want to do any other check like you said based on customer & PO number combination then follow steps below:
    Ask your ABAPER to
    1: Create a Z-table where you can store the required Customer No & PO No combinations.
    2: Write a code to check the PO no & Customer No entered in Sales order with the entries in the Z-table & throw an error if there is no match.
    This code needs to be written in the User exit Save_document_prepare by your ABAPER.
    3: This will work at time of Save & not a point of entry. The result will be same "error msg will be thrown"
    regards
    Edited by: Innovation is key on Feb 28, 2011 6:08 PM

Maybe you are looking for

  • Recurring Printing Problem with HP Office Jet Pro L7590 w/Windows XP operating system

    This printer is a real workhorse but frequently, when printing large documents from the internet, the type changes from regular print to total giberish -something similar to a Russian Script. It does this midsteam into the document and there is no er

  • How do I copy my itunes library to my new computer?

    I know this questions must have been asked and answer a million times, but here it goes... I just purchased a new MacBook, I used to have a Toshiba, so I'm new to the whole Apple thing. I've had my Ipod for over a year now, and I want to copy all tho

  • How to uninstall acrobat standard 5 silently ? ---- 090112

    how to be silent to uninstall acrobat standard 5 ? Now use: C:\WINDOWS\ISUNINST.EXE -f"C:\Program Files\Common Files\Adobe\Acrobat 5.0\NT\Uninst.isu" -c"C:\Program Files\Common Files\Adobe\Acrobat 5.0\NT\Uninst.dll" -y it's not silent completely. any

  • I can't connect to server after installing router (WRT54G2)

    Anyone please help. I can't seem to connect to the server, 192.168.1.1 after installing the router. Prior to installation it worked fine. Weird thing is I can connect to the internet through the router and stuff, just can't access the server. Help...

  • Lists/collections in JDBC

    Hi all, Does anyone know if it is possible to pass to an Oracle stored procedure a Java defined list/collection/array/vector as an IN parameter? E.g. an array/list of Strings or a vector of booleans. I know it is possible to pass an sql.array, but I