cancel
Showing results for 
Search instead for 
Did you mean: 

Open contract - remaining quantity report?

Former Member
0 Kudos

Hello,

I need to find a report which will show open contract quantity. T-code: VA45, VA46 has no such data. There are only information about open contracts, but I can not find data about remaining contract quantity.

Do you know any t-code or program?

Best regards,

Maciej K.

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member188076
Active Contributor
0 Kudos

Hi

There is no such data available in SAP. But you can get the same if you make a Z-report with the help of ABAP (I already made a similar report). The logic for getting Balance Quantity in Cotract is :-

On the basis of Contract no.(VBELN) take the value of VBAP-ZMENG (quantity of Contract)

Then with respect to Contract no. pick ALL the Order No. from the Table VBFA created against this contract.

Now with respect to these Order Nos. pick the value of VBAP-KWMENG (quantity of Sales Order which is created with respect to Contract) Add all the value of VBAP-KWEMNG.

Now you have the Quantity of Contract and Quantity of Sales Order which is created against this contract. Now substract the Order quantity from Contract quantity = the result will be balance quantity of contract.

Hope this will help you.

Regards

Amitesh Anand

Former Member
0 Kudos

Dear Maciej,

Also there are reports to see the contract status.

1) SDV1 - Expiring Contracts

2) SDV2 - Expired Contracts

3) SDV3 - Completed Contracts

Hope this will help solve your requirement.

Regards,

Nithin.

former_member217082
Active Contributor
0 Kudos

Hi Maciej K.

Check V.06 which shows Incomplete Contracts. In this report you can check how much open contract quantity is there.

Regards

Srinath

Shiva_Ram
Active Contributor
0 Kudos

Hi,

It looks there is no standard report that can show the open contract quantity.

In our business, we developed an ABAP query and I used logical database table VAV.

Couple of Z-fields were introduced to find the total release quantity (for quantity contract) and total released value (for value contract).

To find the total released value a function module CALL FUNCTION 'SD_READ_CALL_OFF_VALUE' was used. To find the released quantity, a query was used to fetch information from VBFA table like below;

SELECT SINGLE SUM( rfmng )

INTO ZRELEASEDQUANTITY

FROM vbfa

WHERE vbelv = vbak-vbeln

AND posnv = vbap-posnr

AND vbtyp_n = 'C'.

If the above two values are known, then you can subtract these fields from target quantity (VBAP-ZMENG) and target value (VBAP-ZWERT) fields to find the open quanity and value details.

Regards