cancel
Showing results for 
Search instead for 
Did you mean: 

User exit for sales order split (MV45AFZZ)

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi,

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

Thanks & Regards

Sudheer

Former Member
0 Kudos

Hi All,

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

regards,

Sudhakar Reddy.A

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Joerg.

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

Thanks

Vikram.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

Lakshmipathi
Active Contributor
0 Kudos
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