Application Development 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: 

Order quantity and confirmed quantity

0 Kudos

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.

1 ACCEPTED SOLUTION

bamjimmy
Explorer
0 Kudos

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!

4 REPLIES 4

raymond_giuseppi
Active Contributor
0 Kudos

Which user exits did you already try (Look at includes such as MV45AFZF, MV45AFZB or MV45AFZZ)

0 Kudos

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.

bamjimmy
Explorer
0 Kudos

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!

0 Kudos

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