Authorisation for deletion of sales order

Dear All,
We want to have the check when deleting the sales orders that the users can not be able to delete the sales orders.
We wrote the code to MV45AFZZ for the deleting the sales orders-user exit FORM USEREXIT_DELETE_DOCUMENT
But while deleting the sales order, we got dump.
Could you please help us why we got abap dump?
We wrote the below part:
  message 'ZZZZZz' TYPE 'E'.
Regards
J.Black

The output of error messages and user dialogs is possible only with restrictions in the FORM routine USEREXIT_DELETE_DOCUMENT. Messages of the type E or W cannot be output. This causes the runtime error DYNPRO_MSG_IN_HELP as of Release 4.0.
Other notes
The deletion of the delivery can no longer be prevented at this point by returning to the dialog, since all the delivery data has already been deleted logically. If the user has to prevent the deletion of the delivery for certain reasons, the system should issue an error message of the type A.
Check this link:[http://www.sapnet.ru/viewtopic.php?p=811]

Similar Messages

  • Can we delete the sales order?

    hi,
    can we delete the sales order?

    Use transaction code SARA for deletion of sales order but as every body said it is not recommended as it might affect the documents made against it and also the master data.
    So its better to reject the sales order.
    Regards
    Prashant

  • WHILE DELETING A SALE ORDER GETTING A RUNTIME ERROR " Screen: Illegal message"

    Hi Experts,
    While deleting a sales order giving run time error.  PFB runtime error details.
    If you know any OSS message, please let m know. I tried, but there is no luck.
    Short text
        Screen: Illegal message
    What happened?
        The current screen processing action was terminated since a situation
        occurred where the application could not continue.
        This is probably due to an error in the ABAP program or in the current
        screen.
    What can you do?
        Note which actions and input led to the error.
        For further help in handling the problem, contact your SAP administrator.
        You can use the ABAP dump analysis transaction ST22 to view and manage
        termination messages, in particular for long term reference.
    Error analysis
        The program attempted to issue a " " message during "Exit Command" processing.
        This is an illegal operation.
        The program was terminated.
        Screen name.............. "SAPMV45A"
        Screen number............ 4001
    How to correct the error
        The program must be modified to correct the error.
        The modification must be made in "Exit Command" processing.
        If you cannot solve the problem yourself and want to send an error
        notification to SAP, include the following information:
        1. The description of the current problem (short dump)
           To save the description, choose "System->List->Save->Local File
        (Unconverted)".
        2. Corresponding system log
           Display the system log by calling transaction SM21.
           Restrict the time interval to 10 minutes before and five minutes
        after the short dump. Then choose "System->List->Save->Local File
        (Unconverted)".
    Source Code Extract
    Line  SourceCde
        1 *---------------------------------------------------------------------*
        2 *       FORM YVBEP_LESEN                                              *
        3 *---------------------------------------------------------------------*
        4 *       Lesen der Tabelle YVBEP (nicht sortiert)                      *
        5 *---------------------------------------------------------------------*
        6 FORM YVBEP_LESEN USING US_POSNR
        7                        US_ETENR
        8               CHANGING CH_TABIX.
        9
       10   YVBEP = SPACE.
       11   YVBEP-MANDT = VBAK-MANDT.
       12   YVBEP-VBELN = VBAK-VBELN.
       13   YVBEP-POSNR = US_POSNR.
       14   YVBEP-ETENR = US_ETENR.
       15   READ TABLE YVBEP.
       16   IF SY-SUBRC > 0.
       17     MESSAGE E506 WITH US_POSNR US_ETENR.
       18   ENDIF.
    >>>>>   CH_TABIX = SY-TABIX.
       20
       21 ENDFORM.
    Could you please help on this issue.
    Thanks
    Srinu

    Hi Srinu,
    it looks like you got the error message Schedule line &1 &2 is missing in table YVBEP while deleting the sales order.
    It seems, that there are no SAP notes regarding this issue. Do you have this issue with all orders or with a single order?
    If only a single order causes this issue, maybe something was wrong during an update.
    If you get this error for many orders, then custom code (modification, enhancement, user exit in MV45AFZZ, ...) may be the reason for it.
    If you have no custom code in module pool SAPMV45A, then contact SAP for this issue.
    Regards,
    Klaus

  • Can wevcreate an LSMW for deleting the sales documents

    Hi All,
    Is it possible to create the LSMW to delete open sales orders?
    If yes,
    Which menthod is suitable and why....plz let me know.
    Thanks in advance,
    Praveen

    Hi All,
    Thanks for the inputs. I was able to create a LSMW in the develpment box of our system.
    Now my question is how do i transport my LSMW to Quality system?
    Is LSMW transportable?
    Wht is import and export option in LSMW?
    Please let us know if you guys know about it.
    Thanks in advance.
    Praveen

  • BAPI_SALESORDER_CHANGE to update reason for rejection of sales order item

    Hi,
    The FM BAPI_SALESORDER_CHANGE is not working properly as I am getting below error when try to update the reason for rejection at sales order item level.
    The delivery is done for this salesorder. Is it because the reason for rejection field is not as an input field when delivery done?
    error in return table is " Field 'ABGRU' cannot be changed, VBAPKOM 000010  ready for input"
    Request your suggestions to avoid this error.
    Thanks

    >
    anikaushi wrote:
    > Hi,
    > The delivery is done for this salesorder. Is it because the reason for rejection field is not as an input field when delivery done?
    >
    >  error in return table is " Field 'ABGRU' cannot be changed, VBAPKOM 000010  ready for input"
    >
    >
    > Thanks
    Yes, Most likely.. You can confirm this by trying to change a order without delivery and see if it goes thru (to ensure that you have passed correct parameters)...
    you may have to delete the delivery (and if billing document exist, cancel it), before you can reject the line item... it would be safer to raise an error message and let the users manually delete delivery document as long as you don't have large volumes of this scenario..
    Please see the SDN thread for how you can avoid this error...
    Re: Cancel Sale Order after Issued Billing

  • How to delete a sales order which has already approved

    Hi,
    Could anyone please tell me how can we delete an already approved Sales order if no delivery doc is created and billing document has already been cancelled.
    When i try to delete the order it is not allowing to delete the sales order.
    It allows to put the reason for rejection in the sales order.
    It does not allow me to put the reason for rejection in the sales quotation.
    Please help and guide me.
    Thanks and Regards

    Hi,
    My query is regarding if the delivery is not there and the sales order is already approved and if the billing docu has been cancelled then why can not we delete the sales order?
    After that i need to put the reason for rejection in the sales quotation.
    So please guide me.
    Thanks and Regards
    Edited by: MPVash Vash on Jul 22, 2008 7:29 AM
    Edited by: MPVash Vash on Jul 22, 2008 7:29 AM

  • One line item delivery for 3rd party sales order

    Hello Experts,
    We have configured a 3rd party sales order process where the PR gets created. We are using scheduling agreement(PO) and creating Schedule line and doing a GR for partial line items.  The stock is recieved as a Sales Order stock.
    But when i create a Sales Delivery the delivery document copies all the line items (ieven for the ones which we don't have GR)  from the sales order and we have to manually delete the line items from delivery doc.
    Is there a way i can restrict the delivery document to only copy the line items from the sales order  for which the sales order stock is available? If so how can we do that?
    Appreicate your help.
    Thanks
    Arpita Rani

    Hello All,
    We have configured a 3rd party sales order process. The schedule line category is configured with account assignment categoory as "M". when we are creating GR the Moving average price of the material  is not getting updated.
    But if i replace with "E" it is getting updated, but the CO-PA is not getting generated for Profitability segment reporting.--we need profitability segment reportng.
    Can some one tell me how we can update the moving average price using acc. asssignment category type "M" at the same time the Profitability segement information is updated.
    THanks in advance
    Appreciate your help
    Arpita Rani

  • I have deleted a sales order,how to retreve the same document number

    Hai,
        I have deleted the sales order,so that document number is out.When i craete the next order will i get the same number which i have already deleted.
    I want the same number again,for that what should i do...
    I dont want that number be missed,the reason is there should be a flow in number,with out missing some numbers in between.
    Thx
    Venu
    Edited by: venugopal on Aug 6, 2008 9:12 AM

    Dear Venu
    Yes this is possible but should not hand over the responsibility to end users.
    B4 implementing this in production, please test a document and proceed.
    Go to VOV8, select your order type and execute.  There see what numeric value is maintained against the field "No.range int.assgt".  Now go to VN01, [click on Status]  tab and go to that number.  On your right, you can see the last generated sale order number with editable option.  You can change it.
    For example, if your last created sale order reference is 805, you will see this 805 in the above area.  Change it to 804 and save.  Now if you create a new order, the reference of that particular sale order will again be 805.
    But as I already mentioned, each and every time, you need to go and change this area which is not recommended. 
    thanks
    G. Lakshmipathi

  • Deletion of sales order

    Hai Gurus,
    I want to mass delete the pending sales order for which no delivery hasnt yet done.
    Please guide me with any t.code for mass deletion as there are 2500 nos so deleting one by one is a hectic task.
    As i have pull out all the sales order from Va05. with organisation data.
    With regards

    Dear Saju
    Create a recording for VA02 for LSMW and delete.  But it is not advicable to delete the sale orders instead you assign a reason for rejection and close the sale orders.  At a later date, if you want to track these sale orders, you can do so if you assign reason for rejection.
    thanks
    G. Lakshmipathi

  • Tracking Deletion in Sales Order -

    Dear All,
    I want to keep track for all the Sales Order Material No. Deleted. I get the details from CDHDR and CDPOS tables for Insert, Update and Delete. I could not get the Material No. Which is deleted. Can you please help me out in this topic.
    Kindly Help me out as it is very urgent.
    Your kind co-operation will be appreciated.
    Regards
    Omer Farook.

    Hi omer
    CDHDR table will have the header record as to when the table was changed and actual changes like the old value and new value can be found in the CDPOS table. These two tables are linked by a Key.
    By default the changed documents are not activated for all the fields. This is usually done at the Data element level and can be done using SCDO transaction and checking the relevant flag at the data element level in SE11.
    thanks,
    kiran.M

  • Mass Deletion of Sales Orders

    Hi Gurus,
       I have some unused old sales orders which  affects the MRP run , to rectify this we want to delete or archieve the old SOs. How to do Mass deletion or Archieve the unused SOs?
    Kindly help to resolve .
    Thanks in Advance,
    Regards,
    Joseph

    hello again, Joseph.
    until someone comes up with a standard solution, i believe what ABAP will do is to come up with a customized table that will show all sales orders with status 'not yet processed' (from table VBUK) within a date range.  when the list is called, you will be enable to enter a value in the field 'reason for rejection' (field name ABGRU).
    when you have entered a reason for rejection, the sales orders are effectively closed (completed) and a subsequent transaction based on these orders cannot be done.  you can ask ABAP to use an available user exit to further prevent the re-opening of these orders.
    regards.

  • Mass Deletion of Sales order line items

    Dear Gurus..
    There is a transaction VA02 for change and deletion of sales order line items. it takes time to delete line item of sales order one by one.. is there any abap program to do this process..
    if so please let me know
    regards
    Saad Nisar

    Hi,
    You can use trx MASS with object type BUS2032 to change sales order items. Please check this link:
    Re: Mass deletion of  sales orders
    Or try LSMW.
    Regards,
    Csaba
    Edited by: Csaba Szommer on Apr 10, 2009 8:18 AM
    Edited by: Csaba Szommer on Apr 10, 2009 8:21 AM

  • Reason for Rejection in Sales order

    Hi,
    when my customer sends me a PO cancel request, iam going to delete the Sales order in my SAP system.
    what is the best way to do this, either to delete the SO or keep the Sales order with Reason for Rejection code?
    If it is a Reason for rejection, what happens to the SO,
    1)will it allow for further processing for e.g: Delivery creation.
    2)will the Availability check carried out for this?, and is the stock going to be blocked for this?
    what is the difference between Reason for rejection and the Delivery block, both at the Header and item level.
    Pls reply,its urgent...
    Regards
    SR

    Syed,
    It is always advicable to reject the order by giving a reason for rejection rather than deleting the sales order.
    Once you delete the sales order, the number will be skipped, the system will not create another sales order with the same number.
    Once you reject the order by a reson for rejection, the system will not allow to process the order further, the requirement will be reversed. The order status also will become as closed, so no further processing allowed (like delivery, PGI ... etc).
    If you put delivery block in the item level of the order, the order can't be delivered, but the overall tatus of the order will be being processed.
    So it is advicable to reject the order by giving an appropriate reson for rejection.
    Prase

  • Where can i see who deleted the sales order

    Where can i see who deleted the sales order?

    Hi Raja,
    Thnks for the reply.But I wanted to see Delivery Document which is not in the database as it has been deleted.
    As in this program , When I enter This Delivery Number , it says - No Changes carried out.
    Kindly provide me the program fo Delivery Document.
    Best Regards,
    Ankur

  • Deletion of sales orders

    hi all
    how can i delete the list of sales order from a particular date to particular date.
    regards
    venkat.

    Hi Tarun
    you can delete sales orders only if there are no subsequent documents.
    if accounting documents are generated for a sales order then
    after reversing the accounting documents with the help of FI guys then
    cancel the invoice by VF11
    reverse PGI thru VL09 and making the picking qty '0' in the delivery doc
    delete the delivery using VL02N
    then delete the sales order by VA02.
    Hope this will help you.
    Rewards point if helpful
    Regards
    Hansraj meena

Maybe you are looking for

  • FOR UPDATE with group functions

    Hi, Is it possible to have a select .. FOR UPDATE and in that select using group by and having count? If so, where should be placed the FOR UPDATE clause? Thanks

  • How to loop this

    i need to make a workflow to automatically import images into aperture as i shoot them to a folder....this seems to be easy since there already is a "import to aperture" action...i can import files that are in the folder but how do i tell the workflo

  • Application Server not starting

    Hi All, I am facing issue while starting application server. Below is the error message that I am getting- Error while booting the domain- Attempting to boot ... Booting all admin and server processes in /projects/psoft/hr815B/appserv/gpstst03/PSTUXC

  • How can I select random records from one column

    How can I random select 400 records from a column contains more than 500,000 records? And how long will it take in oracle? Thanks.

  • Encore crashes after editing menus in Photoshop

    Running Encore CS3 3.0.1.008 on Vista. When I open a Menu and then choose Edit Menu in Photoshop, everything works great the FIRST time I edit the menu. I can save it, close in Photoshop, and come back to Encore. If I try to Edit the menu a SECOND ti