Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

User Exit for VA02

Hi,

I have written code in user exit EXIT_SAPMV45A_003 for TCode VA02 (Sales Order Change). The code is as given below:

LOOP at XVBAP.

If XVBAP-kwmeng = 100.

XVBAP-kwmeng = 99.

Modify XVBAP.

Endif.

If XVBAP-ARKTX = 'Pumpe Stahlguss Etanorm 170-230'.

XVBAP-ARKTX = 'Changed'.

Modify XVBAP.

Endif.

Endloop.

In debug mode I can see the changed values for Order Quantity (KWMENG) and description (ARKTX). However after the entire code is executed and when I enter the sales order, first I get a pop up "Express Document Update Was Terminated received from author XXXXX". And then when I hit enter, the values are not changed

The project in CMOD and the enhancement in SMOD are activated.

Any help would be appreciated.

Thanks in advance,

Mick

Tags:
Former Member
replied
LOOP at XVBAP.
If XVBAP-kwmeng = 100.
XVBAP-kwmeng = 99.  "this quanity i am not sure 
"i think you have to change schedule lines also
"which is XVBEP table.
XVBAP-UPDKZ = 'U'.
Modify XVBAP.
Endif.
If XVBAP-ARKTX = 'Pumpe Stahlguss Etanorm 170-230'.
XVBAP-ARKTX = 'Changed'.
XVBAP-UPDKZ = 'U'.  "Try this...
Modify XVBAP.
Endif.
Endloop.

Keep a break point in the above loop, and check in SM13 transaction for the Update termination cause. find the source code wher the error is from SM13 transaction.

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question