RE:[sap-log-sd] Delivered quantity is more than the ATP quantity

Posted by wnash7658 (SAP Specialist and Project Leader)
on Jul 29 at 3:25 AM
I guess you are using CN in the sales order for the free goods item?

Regards


Waza

---------------Original Message---------------
From: srikant
Sent: Monday, July 25, 2011 6:43 AM
Subject: Delivered quantity is more than the ATP quantity

Hi All,

Recently we had done some program changes in the user exit MV45AFZZ
where in
1. Delivery of Main Items should not be restricted due to unavailability of Free Good Items
2. More Free Good Items compared to Main Items cannot be delivered.

CONSTANTS: c_1000 TYPE vkorg VALUE '1000.
DATA: lwa_xvbap TYPE vbapvb,
lwa_xvbep TYPE vbepvb.
FIELD-SYMBOLS: <fs_xvbep> TYPE vbepvb.

IF vbak-vkorg = c_1000
* Free Good Items
LOOP AT xvbap INTO lwa_xvbap
WHERE NOT uepos IS INITIAL
AND stlnr IS INITIAL.

CLEAR: lwa_xvbep.
* Main Item
READ TABLE xvbep INTO lwa_xvbep
WITH KEY vbeln = lwa_xvbap-vbeln
posnr = lwa_xvbap-uepos.
IF sy-subrc EQ 0.

READ TABLE xvbep ASSIGNING <fs_xvbep>
WITH KEY vbeln = lwa_xvbap-vbeln
posnr = lwa_xvbap-posnr.

IF <fs_xvbep> IS ASSIGNED AND
* More Free Goods than Main Items cannot be delivered
<fs_xvbep>-bmeng GT lwa_xvbep-bmeng.
<fs_xvbep>-bmeng = <fs_xvbep>-lmeng =
<fs_xvbep>-olfmng = lwa_xvbep-bmeng.
ENDIF.

But now there is an issue where in the Sales order Quantity = 100 PC
ATP confirmed quantity = 75 PC
but Delivery created for 100 PC ie more than the confirmed quantity

Is this due to the above program changes done in the User exit?

Thanks
srikant

__.____._
Copyright © 2011 Toolbox.com and message author.

Toolbox.com 4343 N. Scottsdale Road Suite 280, Scottsdale, AZ 85251
Mark as helpful
View this online
  
wnash7658
SAP Logistics Sales and Distribution Top Contributor

Contributed the most posts in a group for 3 consecutive months to earn a Gold Achievement
Popular White Papers

In the Spotlight
Share Knowledge About SAP Scripting. Join the Discussion Group
_.____.__