Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

restrict quantity change

Former Member
0 Likes
350

hi experts,

My requirement is the change sales order should not allow changes to Quantity field KWMENG.

SO when the value is changed, I am resetting the value back by comparing YVBAP-KWMENG (Old Quantity) and XVBAP- KWMENG new quantity.

If they are not equal then i am resetting it in USEREXIT_CHECK_VBAP

the value is changed, but when i save and exit and then enter the value is changed back to the new quantity. This is because XVBEP-WMENG is also changed.

So i tried setting the value of it, but still its not working as the value is changed again somewhere else.

Please help me solve this issue.

2 REPLIES 2
Read only

Former Member
0 Likes
295

Hi,

You can use user exit MV45AFZZ and here

FORM USEREXIT_FIELD_MODIFICATION.

  • CASE SCREEN-GROUP3.

  • WHEN '900'.

  • IF VBAK-VBTYP NE 'A'.

  • SCREEN-ACTIVE = 0.

  • ENDIF.

  • ENDCASE.

  • CASE SCREEN-NAME.

  • WHEN 'VBAK-VBELN'.

  • SCREEN-ACTIVE = 0.

  • ENDCASE.

ENDFORM.

Write your code between Form and endform.

<b>Reward points</b>

Regards

Read only

Former Member
0 Likes
295

Hi,

Have you found the solution for this? We have the same requirements, wherein if the quantity is changed I need to pop a warning message but somehow the previous quantity is missing.

Thanks.