cancel
Showing results for 
Search instead for 
Did you mean: 

Block changes to the order quantity

Former Member
0 Kudos

Say I have a quotation for itemA with 10 qty.

When I create a sales order with ref to this quotation, i want the system to blcok any changes to the quantity.

The incompletion rule gives me a warning message, but it will allow.

Any way to do this blocking to order quantity?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

In the incompletion log , you can block...you have to define a rule for this

Please check and post

Hope this helps

Regards

N Ganesh

Answers (5)

Answers (5)

Former Member
0 Kudos

Siarhei Mahulenka ,

could please give more details on where/how to make these changes to the user exit?

Former Member
0 Kudos

mv45afzb, change form userexit_check_vbap,

add code like :

  • Quantity checks for orders created w/ ref. quotation *

  • Vorlageposition lesen

perform vvbap_lesen(sapfv45p) using vbap-vgbel

vbap-vgpos

vbap-upflu

sy-subrc.

  • Umrechnung in Basismengeneinheit

z_kwmengv = vvbap-kwmeng * vvbap-umvkz * vbap-umvkn / vvbap-umvkn

  • Umrechnung in Verkaufsmengeneinheit des akt. Beleges

/ vbap-umvkz.

perform xvbapf_lesen(sapfv45p) using vbap-vgbel

vbap-vgpos

sy-subrc.

z_krfmngv = xvbapf-erlmenge * vbap-umvkn / vbap-umvkz * quan_1.

z_krfmngv = z_krfmngv + vbap-kwmeng - *vbap-kwmeng.

if z_krfmngv > z_kwmengv and

z_kwmengv > 0.

write z_kwmengv to z_mengec. "write to char field

write z_krfmngv to z_mengec1. "write to char field

set cursor field rv45a-kwmeng line sy-stepl.

message e494 with z_mengec vbap-vrkme

z_mengec1 vbap-vrkme.

endif.

endif.

Former Member
0 Kudos

I checked the TCODE VTAA and maitained the copy ctrl as you described.

Still, all what I get is a warning message!

N Ganesh,

what is the definition of the new incomletion rule?

Former Member
0 Kudos

Asad,

you can add a code to userexit_check_vbap for example (copy it from SAP routine where htis check for qty is doen and warning message is issued) and raise same message as error message.

We did it for orders created with reference to quotation and it works fine - does nto allow order qty increase over quotation qty.

Former Member
0 Kudos

hi

first should check <b>this transaction code: VTAA</b> in <b>Copy quantity</b>

Target SalesDocTyp OR From SalesDoc Type QT

Standard Order Quotation

ItemCat Proposal Item Category AGX

Quotation Item

Copying requirements 301

DataT 151 General item data Pos./neg. quantity +

<b>Copy quantity </b> DataT 102 Bus.data/item compl. Pricing type A

DataT 002 Partner item X Update document flow Cont. item copy mode

Copy product select.

FPLA 251 Conditions Configuration

Rewards point it helps

Former Member
0 Kudos

N Ganesh ,

Thanks for the input.

It works but it only gives the user a warning message

<i>W: Item has been created by full reference</i>

If the user clicks ENTER, the system allows it.

Is there a way to change this to an error message?

Same results from the incompletion log, it only gives a warning message.

Former Member
0 Kudos

Hi

Go to the SPRO -> sales and distribution -> basic func -> log of incomplete terms

You have to create a rule and define the new rule and assign it to your document type

Rule should be created by you newly and define....what you get is default rule

Hope this helps

Regards

N Ganesh

Former Member
0 Kudos

Hi.,

You can do it in the copy controls of QT to OR, go to vfaa in the header there is complete reference,so tick that complete reference so that quantity is copied from the qt to or ,so that if any changes in the order ,the system shows a message

Award points if u feel it is right