12-11-2018 7:03 AM
Hi SAP Guru,
I have a requirement that when the order Qty is updated, program should check order qty and if it is greater or equal to confirmed quantity, then it should confirm the quantity even if there is a credit block.
example.
Steps
Create Sales order as below with Qty = 10 [VA01]
Update the Order Qty from 10 to 5 [VA02]
Currently Confirmed Qty is not changed to 5 [this is the issue]
Expected result is Confirmed Qty should be changed to whatever was order quantity and re-ATP is executed
ATP QTY = 100
Scenario I
Order is created with Order Qty = 100 and Confirmed QTY = 100
Order Qty is changed to 90, confirmed Qty should be changed to 90
Scenario I
Order is created with Order Qty = 100 and Confirmed QTY = 100
Order Qty is changed to 110, confirmed Qty should be changed to 100
I have debugged this but unable to find out the enhancement to implement this code and ATP check. Please suggest.
06-15-2023 11:51 AM
In the included program FV45PFAP_VBAP_BEARBEITEN_ENDE, there's an enhancement point,
ENHANCEMENT-POINT VBAP_BEARBEITEN_ENDE_22 SPOTS ES_SAPFV45P.
In that enhancement point, you can use parameters VBEP-WMENG and VBEP-BMENG. These parameters contain values for Order Quantity and Confirm Quantity respectively. See the example code below.
IF sy-tcode = 'VA01' AND ( VBAK-AUART = 'ZO01' OR VBAK-AUART = 'ZO02' OR VBAK-AUART = 'ZO03' ).
IF VBEP-WMENG GT VBEP-BMENG.
MESSAGE 'Order quantity does not match confirm quantity.' TYPE 'E'.
ENDIF.
ENDIF.
Hope this will be helpful. Thank you!
12-11-2018 9:27 AM
Which user exits did you already try (Look at includes such as MV45AFZF, MV45AFZB or MV45AFZZ)
12-11-2018 3:50 PM
Thanks for your reply.
I have tried with enhancement 'FV45EFEP_XVBEP_AENDERN' but it is not .
The scenario is like when i change the order quantity(ex:100) at item level through ATP check then in the schedule line item tab the confirm quantity should be changed to '100'.this should also work for withoug ATP.
Unable to find the any enhancement and not sure how to put ATP check for this.
Please help me on this if you can as this is very urgent requirement.
06-15-2023 11:51 AM
In the included program FV45PFAP_VBAP_BEARBEITEN_ENDE, there's an enhancement point,
ENHANCEMENT-POINT VBAP_BEARBEITEN_ENDE_22 SPOTS ES_SAPFV45P.
In that enhancement point, you can use parameters VBEP-WMENG and VBEP-BMENG. These parameters contain values for Order Quantity and Confirm Quantity respectively. See the example code below.
IF sy-tcode = 'VA01' AND ( VBAK-AUART = 'ZO01' OR VBAK-AUART = 'ZO02' OR VBAK-AUART = 'ZO03' ).
IF VBEP-WMENG GT VBEP-BMENG.
MESSAGE 'Order quantity does not match confirm quantity.' TYPE 'E'.
ENDIF.
ENDIF.
Hope this will be helpful. Thank you!
06-15-2023 6:47 PM
Hello Jimmy,
We normally don't recommend posting answers to old questions, as it is very unlikely that the author will see your answer and accept it.
If you would like to work on your reputation in the Community, it would be best if you answered new questions.
Kind regards,
Anne