on 12-26-2010 3:01 PM
HI EXPERTS,
How to create a report based on agreements from KONA and assigned to Sales documents from VBAK and billing documents from VBRK?
how to create link between these tables? is that based on KNUMA only or do we need to consider any other links to create the report, because one agreement can create to several sales documents or several billing documents.
plz suggest me the logic to create a report.
here is the example.
Agreement Sales Doc Net value Billing Doc Net Value Billing Date
1 10000 100 60000 100 10.12.2010
20000 150 70000 150 11.12.2010
2 30000 100 80000 100 12.12.2010
90000 150 13.12.2010
regards
venuscm
Hi Venugopal
You can try this logic.
The KONA-KNUMA rebate number can be passed through KONP-KNUMA_BO to fetch the Condition record number and the Condition type. The application is always V for rebates. So from KONP table you can fetch out Condition number (KONP-KNUMH) and the condition type (KONP-KSCHL). Once we have this the condition number is the link to fetch the invoice numbers. As in every invoice that references the rebate the condition number would be copied.
You can pass the condition number, condition type and application through KONV. That is KONP-KNUMH as KONV-KNUMH and some more parameters such as condition type and application to make the query faster. You can get KONV-KNUMV from here. Pass the KONV-KNUMV as the VBRK-KNUMV to get the VBRK-VBELN. Since you will get multiple entries for KONV-KNUMV (multiple invoices referenced by one single rebate) you will have to loop to find VBRK-VBELN multiple times.
Now passing VBRK-VBELN through VBFA-VBELN you can get VBFA-VBELV which will be the VBAK-VBELN.
I hope this helps.
Thanks
Indranil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If you create an invoice document for a rebate agreement, then VBRK-KNUMA will be updated with the agreement number. This is the only connection. The same logic can be verified for credit memo requests created for the rebate agreements (VBAK-KNUMA). Using these fields and the link between the order and invoice document in VBFA table, the report can be created.
You first need to take some transactions, verify this, standardise your logic and then create a report for the same.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Navaneetha
In standard ECC VBRK-KNUMA is only updated with the agreement number only for rebate documents. Documents of type B1, B2, B3, B4 etc. But to find out all the invoices in which rebate is accrued is not possible through putting this logic by passing the agreement number through VBRK-KNUMA.
Thanks
Indranil
User | Count |
---|---|
94 | |
11 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.