cancel
Showing results for 
Search instead for 
Did you mean: 

How to find related billing document of a rebate settlement

Former Member
0 Kudos

Hi Experts,

i am facing an issue. I need to start from a rebate settlement document which in an invoice with type Rebate partial settlement. to find out all related invoices . I mean from the sap tables. Based on the threads i found I can only start from VBRK


obtain the document condition number (VBRK-KNUMV), pass it to KONV-KNUMV to fetch KONV-KNUMH (Condition Record Number), pass this inturn to KONP-KNUMH. The field KNUMA_BO in table KONP gives the rebate agreement number


But the rebate settlement ( Credit Memo automatically created ) was generated by calling transaction VB(7, and all invoices fit the criterien would be considered. Is there a way to find all these invoices?


I am waiting online , thanks!!!


Regards



Message was edited by: G Lakshmipathi

Avoid using "Urgent", "Waiting Online" etc., You have to wait till you get some feedback from members




Accepted Solutions (0)

Answers (4)

Answers (4)

former_member182378
Active Contributor
0 Kudos

via VA01 - VF01 : - order 1- invoice1; order2 - invoice 2; order 3- invoice 3

via VB(7  :  one CMR1 ( Rebate Credit Memo ) is created for these 3 invoices above.

via VF01 : create invoice100  for this CMR

via VA01 - VF01 : - order 4- invoice4; order5 - invoice 5; order 6- invoice 6

via VB(7  :  one CMR2 ( Rebate Credit Memo ) is created for these 3 invoices above.

via VF01 : create invoice200  for this CMR

Now, my question is, from the last invoice100 , how can I find invoices 1, 2, 3

Recke,

The same question is asked in https://scn.sap.com/thread/560920


Step 1: Create rebate agreement number-100 for customer X.

Step 2: Create two invoices 90000001 and 90000002 for the customer.

Step 3: Create final settlement for the agreement and raise a credit memo number 60000001.

Now i need a way of finding for the CM (60000001) the list of invoices . I.e. by giving the input as CM (60000001) the list of invoices (90000001 and 90000002) needs to be displayed.

I think the OP has not designed the solution correctly. None the less, it might give you an idea that this is a business need from many customers of SAP and is unresolved.

TW

former_member182378
Active Contributor
0 Kudos

Recke,

Let me give a non-SAP example:

There are two big buckets which are empty, placed on a table.

You pour mugs of water into either of the two buckets. The more mugs you pour, the water level rises in those buckets.

Then, you want to take out some mugs of water from the buckets because you want to give water away.

The table is the rebate agreement.

The buckets are the rebate condition records.

The mugs of water to fill the bucket are the sales invoices.

The water is the accrual.

The mugs of water to give away (and reduce the level of water in the bucket) are the settlements to customers.

Accumulation of accruals happen at bucket or condition record level. These are labelled with condition type + variable key combination.

If you want to link mugs of water to fill and the mugs of water to empty at bucket (condition record) level, then you need to filter based on cond type + variable key combination level, in both processes.

But if you have only one bucket (one condition record) you cannot find out for which mugs of water which raised the level of water in the bucket are linked with which mugs of water which emptied the level of water.

TW

Former Member
0 Kudos

Hi, Typewriter,

I may find out a way to get the relevant invoices of  a credit memo

Starting with Rebate invoice number (Credit Memo)  --->  in table find VBRK-KNUMV

then in table KONV find KONV-KNUMH then find in KONH- KOTABNR : agreement number  , then go to table VBOX to find out all the relevant invoices ( sales invoices) Certainly the TOs can be fetched from respective invoices based on its nubmer and item number.

--> then, only ZB3 is rebate settlement invoices in VBRK table. e.g. if we are trying to printout rebate credit memo 2 ,  then we need to find the last recent settlement   which is creditmemo 1

According to the creation date of creditmemo 2 , and the creation date of credit memo 1 , we can filter out all the relevant sales billing document for the recent rebate settlement.

What i am not sure is , there is a field called settlement period or settlement date,

I dont know if these dates are set early as todays date, whether my logic is still correct or not.

.

if above is really some stupid idea, then i am slowly understanding what you mean by the water buckets issue.  Agreement and invoices are pouring water into the bucket and if creditmemo is created ( settled, ) , it is like pouring out.

and you can not tell which water belonging to which source ...

a more typical example is i can create manually accurals as partial rebate based on none documents, that is just like taking water out ... then there is no way to map the rest of accurals to the invoices left. Is this understanding correct ?

thanks!

former_member182378
Active Contributor
0 Kudos

Recke,

Your "logic of deduction" is creative! But will not work.

But VBOX has billing documents which could contain the rebate condition or not.

OSS Note 75778:

"Only the fact that there may be a rebate condition at some point for which this document item would be relevant is the determining factor."

Also the sheer size of billing documents retrieved from VBOX will be way too much.

According to the creation date of creditmemo 2 , and the creation date of credit memo 1 , we can filter out all the relevant sales billing document for the recent rebate settlement.

How can you do this? What is the link between creation date of settlement creditmemo2 and sales invoices (date)?

If settlement credit memo request 1 and 2 are created on the same day, then?

TW

Message was edited by: TW Typewriter

Former Member
0 Kudos

Hehe, that was exactly i am worrying about.

and the date in VB(7 as settlement date, I can not find in any table. A developer is helping me. Otherwise i can only say sorry to the user, we can not have any volumn in the creditmemo...

but it is really weird that by standard sap in this situation generating one creditmemo with 0 as volumn....

As said, now i am really convinced by your water theory, because it is the only way to explain how the manual accurals created based on none documents....

Regards

former_member182378
Active Contributor
0 Kudos

Recke,

I have faced this type of (and variations of) this business need, and after assessment, I have always gone back and said that it is not possible.

TW

Former Member
0 Kudos

Hi TW,

it seems for business, it is also not necessarily to track the volumn they sold to  one customer, if they can issue accurals manually.

or in the other case, we can set in agreement a different price than the accural to be accumulated. e.g. if a customer buy 1000 TO , then he will get 1 euro / TO, but if he buys 2000 TO he will get 2 euro/TO.

In System we can create condition as scale, but in accural for the safty reason, we can set accurals always as 2 Euro/TO. In the end, we have a bigger accural than reality.   If the customer only purchased 1000 TO in the end, of coures only part of the accurals can be released. Then there would be no need/way to build connection to the sales orders.

one more question , can we addup accurals manually without creating documents, because we are facing the problem of how to migrate the old accurals into the sap system.

thanks

Regards

VeselinaPeykova
Active Contributor
0 Kudos

I am probably too late for the discussion, but still... take a look at how report rebate_general_analyze is built, maybe you can reuse some of that.

Former Member
0 Kudos

Hi Veselina,

it is never too late, hehe,

because I still need to persuade the user to accept , we can not find the relevant sales invoices relevant to the credit memo...

Thanks for the tipp, I would check that.

Regards

Former Member
0 Kudos

Hi, TW,

i read your story again .  I feel sorry that i stiil can not totally explain.

what do u mean by Variable key ? do u mean the "variable key " in the VBOX table ? in VBOX is condition table + variable key ---> invoice, do you know what the date "Serv.rendered", obviously it is not the date when the invoices were settled, are they creation date ?


Accumulation of accruals happen at bucket or condition record level. These are labelled with condition type + variable key combination.

If you want to link mugs of water to fill and the mugs of water to empty at bucket (condition record) level, then you need to filter based on cond type + variable key combination level, in both processes.

by "need to filter these in both processes" , do you mean so extra enhancements or exits ?

or do u mean the records in the VBOX table ? or other tables ?

to tell the truth, I still can not answer properly the question from cusomter, how SAP pick the sales documents,

If VB(7 is called. --- If the accurals are saved on the conditon record level. ( this is how i assume ) , every time i do settlement, it just clear up all the waters( accurals ) . But e.g. if  there are 100 invoices in the last months, if i set the " settlement date " = 15.June,  in VB(7,  then only 50 invoices would be settled, how system pick up these 50 invoices?

again, sorry to bother you again, and thanks for ur help.

regards

former_member182378
Active Contributor
0 Kudos

If VB(7 is called. --- If the accurals are saved on the conditon record level. ( this is how i assume ) , every time i do settlement, it just clear up all the waters( accurals ) . But e.g. if  there are 100 invoices in the last months, if i set the " settlement date " = 15.June,  in VB(7,  then only 50 invoices would be settled, how system pick up these 50 invoices?

Recke,

I suggest you test this with a small number of sales invoices and find the logic SAP uses to select "a group" (for ex 50 invoices out of 100) of invoices.

Variable key is the concatenation of the values of fields of a condition record, check KOHN-VAKEY

Table VBOX would impact performance. It has all the entries for which rebate condition record could be found, not only at present but also for future. OSS Note referred in previous post.

TW

former_member182378
Active Contributor
0 Kudos

one more question , can we addup accurals manually without creating documents, because we are facing the problem of how to migrate the old accurals into the sap system.

Recke,

When finance/invoicing department creates a back dated rebate agreement, agreement created today, but valid from date is 01.Jan.2016. Then business uses VBOF transaction to build up the accruals.

When you want to transition from a legacy system to SAP, sales billing documents not in SAP, then things become more complicated and a migration/cut over plan needs to be in place, with validations of figures before go live.

There are two ways to build manual accrual - one with documents (accrual credit notes) and the other is changes at table level. I would strongly oppose changes at table level. I don't know what could be the impact of this.

Maybe create a few accrual document cycle with aggregated accruals.

TW

Lakshmipathi
Active Contributor
0 Kudos

Have a look at this thread

G. Lakshmipathi

Former Member
0 Kudos

Hi

thanks, I have already checked the thread, but it does not really help to solve the linkage from sales billing to settlement ( CMR ), please kindly check the example above.

what in that thread provide is how to find all invoices related to one agreement.

but thanks anyway

former_member182378
Active Contributor
0 Kudos

Recke,

VBRK-KNUMA gives you the rebate agreement no. is all the settlement (partial, final and accrual) billing documents. This is because the respective CMR are created from the agreement and not from VA01.

The logic you have sited is for billing documents related to the sales cycle, where accruals are created, cumulated in a rebate agreement.

TW

Former Member
0 Kudos

Dear Typwriter

Thanks for the instant reply,

yes , you are totally correct about the logic. In VBRK I can use agreement number to find out all CMR relevant invoices. They are not generated from VA01 or VF01

but how can I find those invoices created from VA01 - Vl01n - VF01 , and then calculated for accruals. Because now I have on one side, the CMR, or relevant invoice for that. on the other side, those normal invoices as basis for accruals calcuation, But how can I link these 2 parts/ sides together.... ???

Regards

former_member182378
Active Contributor
0 Kudos

on the other side, those normal invoices as basis for accruals calcuation, But how can I link these 2 parts/ sides together.... ???

Recke,

Linking is done by SAP in the rebate agreement. VBO3, VBO2

Verification level has sales invoices and accruals, at condition record level

Rebate settlement > Rebate documents have the partial, final etc. rebate settlement documents.

If you want to get this from table level, then it is from the "several steps" you have described. I don't think there is any simpler/less steps way.

You need to go to condition record no. level and there you will find the rebate agreement no.

TW

addition: after getting condition record number (VBRK-VBELN > KONV-KNUMH, you can put it in either KONH or KONP to get the KNUMA_BO rebate agreement no. I prefer to use KONH rather than KONP)

Message was edited by: TW Typewriter

Former Member
0 Kudos

Hi,

I think maybe I addressed my question not very precisely,

as said, steps i mentioned or you mentioned only helps to find relevant agreement. However, this agreement was used by different invoices/orders. And the settlement was created based on that.

Example

Agreement ABC

via VA01 - VF01 : - order 1- invoice1; order2 - invoice 2; order 3- invoice 3

via VB(7  :  one CMR1 ( Rebate Credit Memo ) is created for these 3 invoices above.

via VF01 : create invoice100  for this CMR

via VA01 - VF01 : - order 4- invoice4; order5 - invoice 5; order 6- invoice 6

via VB(7  :  one CMR2 ( Rebate Credit Memo ) is created for these 3 invoices above.

via VF01 : create invoice200  for this CMR

Now, my question is, from the last invoice100 , how can I find invoices 1, 2, 3 by jumping from table to table. Because we need some special information of orders/ invoices 1,2,3 to be printed on the Rebateinvoice ( invoice 100 ) .

based on the steps  I mentioned, or you mentioned, I can only find from invoice100 to find agreement ABC, or from agreement ABC, all relevant invoices 1,2,3,4,5,6,

but i can not build up the linkage invoice 100 to invoice 1,2,3, and 200 to 4, 5,6.

Acutally, I am not looking for an "easier" way, but THE right way to find all relevant invoices / orders from a CMR invoice.

* by the way, do we have a rebate split setting in sap to split the rebate settlement according to some criteria, e.g. sold-to ???

Thanks!

former_member182378
Active Contributor
0 Kudos

Recke,

What you explain is one of the wishes of clients of SAP the world over, for a long time now.

You cannot link the sales (invoice 1, 2, 3 etc.) with the settlement (invoice 100, 200 etc.) processes, in a rebate agreements.

These two processes are "stand alone".

If you specifically devise your rebate setup to link both these processes - sales and settlement, then maybe you can link. For example:

EACH rebate condition type has ONLY one condition record. Then you can search for rebate agreement no. and rebate condition type in both billing documents of both processes.

Generally speaking, rebate functionality is not built for linking sales and settlement processes, at condition record level, in a rebate agreement.

TW

former_member182378
Active Contributor
0 Kudos

* by the way, do we have a rebate split setting in sap to split the rebate settlement according to some criteria, e.g. sold-to ???

Recke,

Invoice combining and splitting can be done in copy control, at item category level, VTFA, field Date VBRK/VBRP. Just as you do splitting for any process (OTC, LF > F2 or Credit memo CR > G2) similarly you can do for rebate settlement process too.

TW

Former Member
0 Kudos

Hi TW,

actually I dont want to link these 2 processes,

the requirement is easy, in the rebate document , customer need to know based on what volumn/ value the rebate is created. Thus in the final invoice for rebate credit memo, the condition ,e.g. 2 euro per TO and the volumn of TO as calculation basis need to be printed.

However in the credit memo, no such info is transferred from the sales process. thus, confronting the issue....

regards

former_member182378
Active Contributor
0 Kudos
but i can not build up the linkage invoice 100 to invoice 1,2,3, and 200 to 4, 5,6.

However in the credit memo, no such info is transferred from the sales process. 

Recke,

Sorry to say but you are mentioning linkage and then saying that you don't want to link.

I think you want to bring some information from the sales invoices onto the rebate credit note. And that is not possible.

TW

Former Member
0 Kudos

Hi TW,

sorry to confuse you. I mean , linkage is a method I try to use, the purpose is to bring some information from sales document to the rebate credit memo/ invoice.

If it is as you said, there is no way to bring info from sales document. Do you know, if this information can be found in the agreement ? maybe there is a way to find e.g. the calculate base on which the accural will be calculated ???

I know Vistex is a product to provide enhanced solutions regarding this, but it would be not possible to persuade customer to use this ....

regards