Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9233

Variable which stores Order Quantity for a Sales Order Created with Reference to a Contract

$
0
0

Dear Experts,

 

We have created user-exits in MV45AFZZ AND MV45AFTZZ for storage location determination at the Sales Order.

 

Now we have a logic in the user-exit, wherein, it choses the storage location based on

the Order Quantity vbap-kwmeng LE (Less than Equal to) Stock in one of the Storage Location lv_labst

 

SELECT SINGLE labst into lv_labst from mard where matnr = vbap-matnr and werks = vbap-werks and lgort = p_v_lgort01

If sy-subrc is INITIAL.

    If lv_labst GT 0.

     If vbap-kwmeng LE lv_labst

        lv_stloc = p_lv_lgort01.

   ELSE.

      lv_stloc = p_lv_lgort02.

  ENDIF

 

 

In the above code, when it finds unrestricted stock in storage location p_v_lgort01, and then needs to check if order quantity is less than this Stock through the Condition vbap-kwmeng LE lv_labst, in order to identify whether storage location p_v_lgort must be chosen

 

But the Problem here is that vbap-kwmeng is always empty (without the order quantity selected) while creating the Order with reference to the Contract.

Hence it is selecting this storage locationp_v_lgort01 even when the Order Quantity is not less than the unrestricted available stock in this storage location.

 

Request you to please advise the Field Variable which stores the Order Quantity when the Sales Order is Created with Reference to Contract.

 

I checked the Copy Control VTAA, and the Data Transfer Routine for the General item Data is 151.

 

Please advise, thanks a lot.

 

Regards

Sameer Shinghal


Viewing all articles
Browse latest Browse all 9233

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>