Skip to Content
avatar image
Former Member

User exit for sales order split (MV45AFZZ)

Hi Guys.

Requirement is to split the sales order line items into multiple based on certain requirement. I Started coding in MV45AFZZ (USerexit_Save_Document_Prepare). Basically what i am doing is looping at XVBAP and based on some condition inserting additional line in XVBAP and adding a new line with new UOM and incrementing the POSNR.). The data seems to be ok to me. But when i save i am getting update terminated error. Can anyone help me out ?

Thanks

Vikram.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Feb 24, 2010 at 03:14 PM
    Started coding in MV45AFZZ 
    But when i save i am getting update terminated error

    The root cause would be in coding only. Ask your ABAPer to check once again the coding.

    thanks

    G. Lakshmipathi

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 24, 2010 at 10:06 PM

    Most likely the added code is not consistent and it making some changes which is in conflict with the standard. Need to analyze where update is getting terminated and probably that will take you to the point of conflict.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 24, 2010 at 10:10 PM

    How do you know if the data is ok?

    What does the abend indicate as the error for terminating error? Is there a error number involved?

    For starters, check security and that the correct tables are being updated in MV45AFZZ. Generally, the table is not updated directly in this routine, but an 'x' version is updated e.g. xvbap-field.

    Unless you are an ABAPer, I suggest changes to the user exit be discussed with programmer and let them work through it.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 26, 2010 at 01:22 PM

    Hi Vikram,

    first of all I would use userexit_move_field_to_vbap in include MV45AFZZ if you want to modify table (X)VBAP. The update error is likely caused by one of the following points:

    Current header lines of internal structures or current table

    structures should not be changed in user exits because this often

    causes errors. If possible, use local structures for the data

    transfer from and to the internal table.

    You should not delete entries from the standard table or set the

    update indicator 'D' for them. Inconsistencies concerning

    dependent entries may occur in other tables. In addition to the

    above symptoms requirement errors may occur, for example.

    When you change individual fields in an internal table (for

    example, XLIPS, XLIKP), make sure that the line that corresponds

    to the work area of the table is changed (for example, MODIFY

    XLIKP INDEX 1 usually causes inconsistencies or terminations).

    Avoid changing the sorting of the internal standard tables

    because this may cause problems during the access to these

    tables. Many tables are sorted by certain key fields to ensure

    that they can be accessed effectively using binary search. If you

    want to sort the table in a different way, use a copy of the

    standard table.

    Best regards,

    Joerg

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Joerg.

      I will try your idea and let u know the result. Thanks for your feedback.

      Thanks

      Vikram.

  • avatar image
    Former Member
    May 07, 2010 at 07:02 AM

    Hi All,

    can any one tell me how to do that or If anyone knows please give me sample code.

    regards,

    Sudhakar Reddy.A

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 07, 2010 at 08:01 AM

    Hi,

    Please check remaining dependent tables like XVBFA and apply the same logic if required.

    Thanks & Regards

    Sudheer

    Add comment
    10|10000 characters needed characters exceeded