How to restrict adding Item Sales Order without itemcost

Hi Experts,
Can i restrict sap user on adding "Sales Order" (Items) if they are adding items without itemcost on item master?

Insert this in your  SBO_SP_TransactionNotification stored procedure after the line
--     ADD     YOUR     CODE     HERE
IF @transaction_type IN (N'A', N'U') AND @object_type = '17'
BEGIN
If exists
(Select 1
From RDR1 O  INNER JOIN OITM I ON O.ItemCode = I.ItemCode
Where I.AvgPrice = 0
   and O.DocEntry=@list_of_cols_val_tab_del)
begin
SET @error = 1
SET @error_message = N'Item without cost ! '
end
END
This code is applicable if you do not set the Manage Item Cost per Warehouse. If you set it, use the modified code of Rahul.
Edited by: István K#rös on Oct 12, 2010 1:59 PM

Similar Messages

  • How to find status of sales order without OBJNR

    Hi All,
    Could you please let me know how to find staus of a sales order without VBAK-OBJNR, sales order type is debit memo request(VBAK-AUART = 'L'), it has no status icon in status tab, and VBAK-OBJNR is empty, but 'Rejection status' is showing as 'Everything rejected' in its status tab.
    Thanks & regards
    RK

    HI,
    I just verified with other statuses of sales orders, it is confirmed,
    Many thanks.
    Regards
    RK

  • Sale Order without a Document Flow

    Hallo Everybody,
    How can i copy a sale Order without a Document Flow ?
    Thanks.

    Hi,
    Try to use the FM BAPI_SALESDOCUMENT_COPY
    Rgds,
    Bujjji

  • How to restrict saving of a sales order without a material.

    Hi Gurus
    Please advice How to restrict saving of a sales order without a material. That is the system saves the order even if no item is assigned to it.

    Hi Raghu,
                 In standard SAP we can not do that. Even for some requirements of the customer this feature is required, specially in case of milestone billings, custom materials etc. client after saving the empty sales order they may create materials based on that sales order number.
                 If it is mandatary for u to save sales order only after the entry of the materials, u can try user exits or go for a code with the help of an ABAPer.
    Regards,
    Ravi Duggirala
    Edited by: ravi duggirala on Jun 20, 2008 11:11 AM

  • Restrict deletion of sales order line items

    Hi,
    I need to restrict deleting of sales order line item, I think we can use the user exit, MV45AFZB, USEREXIT_CHECK_XVBAP_FOR_DELE.
    But when i set the flag to 'X', even though it does not delete at tht instance when the sales order save is clicked again the line item gets deleted.
    ANy idea , to prevent that?
    Thanks
    Keshi

    Hi Keshi,
    That is the correct exit, we are using the same without any problem. Just set US_EXIT  = CHARX.
    Regards,
    John.

  • Re: Creation of sales order without material master

    Hi All,
                Is it possible to create sales Order, without material master. In case if so please provide the details.

    Hi,
    It is possible to save order without any material.
    But if you want to restrict it, go to VOV8 and select your Sales Document Type and see if any incompletion procedure is assigned.
    Now go to SPRO - SD - BASIC FUNCTIONS - LOG OF INCOMPLETION ITEMS - SALES ORDER ITEM -
    and for your incompletion procedure maintain VBAP under table and MATNR under field name. Also you can tick on warning message, if user now tries to save the order without any material.
    So now you can restrict saving order without having any material.
    I am sure this will help you, if it does, please dont forget to reward points for contribution.
    Regards
    Ravi

  • How to configure rescheduling for sale order quantities

    kindly explain how to configure rescheduling for sale order quantities that are created last month. kindly explain. i am in urgent.
    regards,
    g.v.shivakkumar

    Hi,
    Short text
    Rescheduling sales and stock transfer documents: by material
    Description
    The 'Rescheduling' program (SDV03V02) processes sales document items that are contained in the item directory for the material. It takes into consideration open items and schedule lines from stock transfer items, stock transfer scheduling agreements and purchase order requests (items only), referred to hereafter as stock transfer documents, for the materials.
    All sales documents for the material that are still open are selected. This means that the material index must be activated for at least all sales document types, whose items may have requirements. All stock transfer documents or items for the material that are still open are also selected. Open in this case means for example, that there is no deletion indicator, that the item from a stock transfer purchase order request cannot be labeled as completed or that the quantity delivered and posted to goods issue for the item in a stock transfer purchase order is the same as the amount ordered. An availability check can only be carried out if a checking rule is assigned to the document type - if this is not the case, the document or document item is not checked.
    Checking rule 'A' is used as a basis for rescheduling sales orders (exceptions to this are rush orders  they use checking rule B, and orders with individual customer stock; they use checking rule AE). Stock transfer documents use the checking rule that is assigned in Customizing for Purchasing. It is important that the scope of checks is consistent for both the stock transfer documents and the sales documents and that they do not exclude each other, as this can lead to incorrect test results. An example of an incorrect setting would be: The scope of check for checking rule 'A' checks delivery schedules for stock transfer purchase orders and stock transfer purchase requests, however the scope of check for the checking rule for the stock transport scheduling agreement does not.
    The items and schedule lines found in the selection are sorted according to 'Priorities' - document category, delivery priority, creation date of the item or schedule line (for stock transfer purchase orders and delivery plans) entered on the selection screen or according to the schedule line date of the earliest schedule line with order quantity, document number and item number and then transferred to the availability check. Priority 1 is highest priority and priority 5 the lowest. Stock transfer purchase order requests are sorted after stock transfer purchase orders and scheduling agreements, as they are less binding. This means that when you have identical sort criteria such as delivery dates, the stock transfer purchase order item is checked first and then the item from the stock transfer purchase order request.
    The preset option 'Unconfirmed documents required' only carries out rescheduling for materials for which there is at least one unconfirmed transaction.
    You can use the parameters 'Sorting criteria delivery date' to define whether sorting is carried out with the order quantity after the creation date of the item or the delivery date of the earliest schedule line.
    If you mark the 'Simulation' field, the checked documents are not saved. Instead a results list is generated and saved. However, the availability check for the corresponding documents continues as if saving has taken place already, that is, that the simulated list corresponds to the actual one.
    Under 'Options' on the selection screen, specify whether sales documents and/or stock transfer documents should be processed. For stock transfer documents you can enter whether stock transfer purchase orders and scheduling agreements should be processed at item or schedule line level:
    Processing at item level:
    All open schedule lines for the item are read and collected, then transferred to the availability check. To sort and prioritize documents, you do not need each individual schedule line. It is sufficient to have the item or data from the first schedule line. All open schedule lines for the item are processed and checked.
    Example of processing at item level:
    Sorting: Date (Delivery date first schedule line) - Document number - Document item
    Doc. cat. Doc. number  Doc. item  Doc. schedule line  Delivery date PO        4500000012      10               0001              26.01. PO        4500000012      10               0002              26.02. PO        4500000025      20               0001              28.01. PO        4500000025      20               0002              02.02.
    You can see that the second schedule line for document 4500000025/20 from 02.02 was processed after the second schedule line for document 4500000012/10 from 26.02. This is because all open schedule lines for an item are read and processed. The first schedule line from 4500000012/10 has the earliest delivery date, therefore it has priority.
    Processing at schedule line level:
    Each open schedule line for an item is entered in document sorting in accordance with the values entered under 'Priorities'. The availability check is carried out for each individual schedule line.
    Example for processing at schedule line level:
    Sorting: Date (delivery date first schedule line) - document number -document item
    Doc. cat.    Doc. number  Doc. item  Doc. sched. line  Del. date PO           4500000012    10             0001           26.01. PO           4500000025    20             0001           28.01. PO           4500000025    20             0002           02.02. PO           4500000012    10             0002           26.02.
    Here you can see that each schedule line was sorted according to its delivery date. Note that this type of processing requires more runtime due to the individual checks and more frequent saving.
    The results of rescheduling are saved, as long as the program was not started in simulation mode. When calling up from the 'Sales' area menu or when directly starting via the development environment, the iniator is informed via a dialog box that he has just started a process that changes data. He can then decide whether or not he wants to continue.
    Checking procedure for stock transfer documents:
    An availability check of stock transfer documents in rescheduling is carried out in accordance with the check carried out when manually creating a document. If, however, the required quantity for a schedule line is not available on a particular date and will not be ready until later, new schedule lines are created for the stock transfer purchase orders and scheduling agreements, containing the relevant data. New items are created in this case for stock transfer purchase order requirements. The total sum of schedule line quantities for a processed schedule line corresponds to the schedule line quantity of the original schedule line.
    First example: Using a stock transfer purchase order item with a schedule line:
    a) Status of item before rescheduling run:
    Del. date  PO quantity   Confirmed quant  Confirmed del. date 23.07.      50 items       0 items              -
    ==> This now affects the stock/requirement situation:
        - Goods issue is posted for the material in the delivering plant on the 23.07.
        - A purchase order of 10 items was created for the material in the delivering plant. Delivery is expected on the 29.07.
    b) Status of stock transfer purchase order item after rescheduling run:
    Del. date PO quantity   Confirmed quant   Confirmed del. date 23.07.     40 items      40 items            23.07. 29.07.     10 items      10 items            29.07.
    ==> The first schedule line was changed in accordance with the results of the rescheduling availability check. Only 40 of the 50 original items could be delivered on the 23.07. Therefore, a new schedule line is created for the rest on the 29.07. for 10 confirmed items.
    Second example: Same output situation as the above example.
    ==> There is now a change in the requirement/stock situation:
    A purchase order for 10 items is created for the material in the delivering plant. Delivery is expected on the 29.07. A further purchase shows another 40 planned items on the 30.07.
       Status of stock transfer purchase order item after rescheduling run:
    Del. date PO quantity  Confirmed quant  Confirmed del. date 29.07.     10 items       10 items          29.07. 30.07.     40 items       40 items          30.07.
    ==> The first schedule line was changed in accordance with the result of the availability check for rescheduling. The original delivery date is set to the date confirmed in the ATP check. A new schedule line is created for the remaining 40 items, that are available on the 30.07.
    Note:
    Any set fixed delivery date and quantity indicators and creation indicators for schedule lines or items are 'inherited' by newly created schedule lines. Assuming that the original schedule line was fixed in the above example (since it is created manually), this indicator is also set for the newly created schedule line.
    If shipping scheduling is activated for a stock transfer document type, this is also implemented for newly created schedule lines, with the exception of route schedule determination. This means that in the current version of the program no route schedule has been determined for a schedule line containing a route schedule for which new schedule lines may need to be created.
    The results of the run are issued in the form of a list, which is also saved, so that the results can be controlled at a later date. This is done using the function 'Evaluate rescheduling', but it is only a good idea to do this after the first rescheduling has taken place. You can restrict selection requirements but these can however affect the runtime. You can use this function to analyze the saved list until the next rescheduling run, which writes over the result. If you start rescheduling in the background, a spool file with the result list referred to will be created in the corresponding setting. You can see this in spool management.
    Output
    A list of changed documents, a list of documents in which an error occurred during processing and as a result were not changed, can be called up via the menu 'Edit - Error log'. If in a subsequent evaluation a restricted selection is carried out, a note appears at the end of the list to say that not all document items are displayed.
    You can set the scope of the list under the menu option 'List' in the list display. You can view improvements, deteriorations and the whole list. Before the documents can be included in one or either of the restricted lists, the date or quantity has to have changed so that the item can be contained in both the list of improved or deteriorated documents.
    You can use the interface for changing transactions and the order list to navigate. Use 'Back' to exit the list and 'New selection' to return to the selection screen.
    Recommendation
    You should only start this program occasionally and use very restricted selectin criteria during working hours as it requires enormous system resources.
    Note
    The columns for 'New date' and 'New confirmed qty' only contain entries if the dates or quantities have changed.
    As the system only runs the change check (dates/quantities) per line in the original list, an item whose backlog has increased in the list of improvements. This occurs, for example, if the whole quantity can be delivered at once but at a later date. In this situation, the system determines an increase for the line when it compares quantities.
    Regards,
    Amrish Purohit

  • How can I convert of Sales order to Purchase order automatically?

    How can I convert of Sales order to Purchase order automatically?
    It is a TPSO (Third party sales order) situation, I am using item category as TAS, it automatically converts Sales order to (PR)Purchase Requisition.
    But can I convert Sales order to (PO)Purchase order? without any manual intervention?

    Hello,
    you can't create a sales order with reference to a purchase order. You can input customer PO nuber in the sales order Purchase Order number filed.
    Prase.

  • Sale Order without Division

    Hi,
    I have an issue in prodution system, there is a sales order created in 2008 without division (I dont know how the system allowed), this sale order is created with reference to a contract, and the contrct is having division. And now users want to close the sale order. When i am trying to open sale order in VA02 / VA03, it is giving error mesage " Sales area 1000 10 is not defined". Now I am unable to open the order.
    Pls anybody suggest me how to close this order??
    How system will allow to create a sale order without delivery??
    Regards,
    Srikanth

    Hi,
    I can see a way by which this could have happened.
    Initially there was a sales area called 1000/10/00. For tihs sales area, some transactions were created. After sometime, by mistake or intentionally the assignment of this sales area is deleted in configuration. If this is done, it will affect the documents in retrospect and all those documents cannot be processed from then onwards. There is a possibility that this has happened in your case.
    Check some other sales orders for the sales org 1000 created in 2008 and you are bound to get this error. If you realise that there are lot of documents affected because of this, please check the change logs in the sales area configuration and find out when was the sales area dimantled in the system. There can be some business reason behind this. Find out the business reason, tell them implication of removing the sales area, do the configuration once again and rectify the affected documents once again by means of a Zprogram.
    Please check initially what is said, and let me know if you need more information on this

  • How can I create multiple sales orders with reference to one contract?

    Hello Gurus,
    Can you please how can I create multiple sales orders with reference to one contract?
    thanks!
    Rakesh

    hi
    Lets consider example
    In your contract for line item 1 you have entered qty 100
    You careated sales order with 70 quantity, and now you want to creat another sales order for 30
    For this first you need to check what is your item category in contract (VA42)
    Goto VOV7
    SPRO - IMG  - Sales and distribution - Sales - Sales document item - Define item categories - Go to change mode
    Make the completion rule = B Item is completed after full quantity has been referenced

  • Restrict creation of sales order for specific customer

    Hello All,
    I want to restrict creation of sales order (of particular sales order type) for specific customer, please let me know how can I do it.
    Your early reply will be highly appreciated.
    Thanks & Regards,
    Mahavir

    HI
    As per My knowledge it is not possible in Standard SAP , you need to go with Enhancement
    Go to SE38 : MV45AFZB, User Exit: USEREXIT_CHECK_VBAK
    Regards,
    Prasanna

  • How can we reject a Sales order after first Down payment invoice for Italy?

    Hello,
    As a legal requirement in Italy the Down paymenty have to be transformed into real invoices, another legal requirement is that an invoice cannot be cancelled it has to reversed by a credit memo.
    I would like to know in this context how we can reject a sales order line once a Down payment invoice has been emitted.
    When I do enter a reason for rejection in the sales order line I receive the message : V1036: Subsequent documenst exist for item XXX and then V2432 Cancellation not possible. Down payment request already created.
    I can create a down payment credit memo in order to cancel the down payment invoice but how can I get rid of my SD requirement in MD04 if I cannot reject the sales order line?

    Hello,
    have you tried using a recjection code which is not relevant for billing?
    Regards,
    Uli

  • Sales order without accounting context

    Hi all
    I need a sales order without billing. (With accounting or costing context required completely out of the way. The material type is without valuation)
    When I create the sales order I get following message (despite the settings described below):No pricing procedure could be determined, Message no. V1212
    I appreciate any help in determining the cause, thanks in advance
    Anton
    Settings
    Document type :following fields blank  :  Check credit limit, credit group , doc. pricing procedure
    Item category: following fields blank: Item type, Billing relevance, Billing Plan type , pricing, Credit active, Determine cost, Billing form
    Item category : Incompletion procedure = 24 (Free of charge item)
    Customer master : Sales area data: following fields blank: Price determination, Subsequent invoice process, inco terms, terms of payment, credit control area, account assignment group
    I have item category with following settings

    HI
    Document type :following fields blank : Check credit limit,
         credit group , doc. pricing procedure
    Pricing procedure in sales document is determined by sales doc pricing procedurecustomer pricing proceduresales area.
    In your case, doc. pricing procedure is blank, so you are getting this error.
    Edited by: Lakshmipathi on Oct 9, 2009 10:54 AM
    Aligned the coded sentence to two lines

  • User exit or badi to restrict PROO in Sales Order for certain sales organisation

    Hi SAP SD experts,
    I would like to know the User exit or badi to restrict PROO in Sales Order for certain sales organization. This can be done by making condition type as D but will affect all sales org and we to restrict for a certain sales org only.
    thanks,
    SG 

    Kindly  explained  how  you have  solved  others  may benefit..
    regards
    Arunkumar

  • Re : sales order without assigning document type in OVAZ

    Hi
        How to create sales order without assigning document type in OVAZ.
    Thanks
    Mani

    Hi Mani,
    If all your order types can be used in all the sales orders, you dont need to maintain in OVAZ. If you think ur order type has to be used only in one of the sales area then you need to maintain in OVAZ.
    Hope this helps.
    Kind Regards
    Chakradhar

Maybe you are looking for