cancel
Showing results for 
Search instead for 
Did you mean: 

Logic for getting DZ type values for customer

Former Member
0 Kudos

Hi,

I need to display the total values of RZ type.

i wrote some logic based on customer number, company code and document type(uz, rz, sk)

using tables bsid, bsad.

It works fine for one customers, who has only one flat.

Suppose if the same customer has more than one flat it is not working fine.

it is giving all the values of that customer for multiple flats he has.

I am getting billing doucment numbers of that customer from vbrk of that sales order.

now i have all the billing document numbers of that customer of a particular flate.

Now can anyone give the suggestion how can i fetch amount of particular document type using those

billing doucment numbers.

Here i don't have the functional people, who are having that much sap knowledge.

i am thankful to you if anyone help me.

Edited by: anurag.radha on Dec 6, 2011 1:14 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

Lakshmipathi
Active Contributor
0 Kudos
how can i fetch amount of particular document type using
   those billing doucment numbers.

Since you have already billing document numbers, just pass it in VBRP so that you will get the corresponding values.

G. Lakshmipathi

Former Member
0 Kudos

Dear Lakshmipathi,

I need cleared amount of those billing documents.

I vbrk we get only billing amount not cleared amount.

I want all the dz/uz/sk accounting documents(which are cleared amounts) amounts.

those we get from bsid and bsad tables.

but how can i link those vbrk-vblen with the bsid and bsad tables for getting all the cleared amounts.

I hope now you are cleared.

Lakshmipathi
Active Contributor
0 Kudos

The link between VBRK and BSID are BURKS, ZUONR, BELNR, XBLNR etc., You can achieve this in SQVI by table joining.

G. Lakshmipathi

former_member217082
Active Contributor
0 Kudos

Hi

Use SQVI and in SQVI, include the tablesVBRK,VBRP,BSEG,BSED and BSID tables.

Regards

Srinath

jpfriends079
Active Contributor
0 Kudos

Use Table-Field as BSEG-REBZG.

Provide REBZG-Invoice ref. = Invoice Number (SD) ( VBRK-VBELN ).

Please note, this will work if payments are sales invoice specific, i.e., the incoming payments are cleared (posting keys 15 or 17) against the invoices.

Regards

JP