cancel
Showing results for 
Search instead for 
Did you mean: 

Calculate Amount of cleared items from DFKKOP

0 Kudos
1,036

Dear Experts,

I am currently working on calculating the correct amount from the DFKKOP table by performing a query that involves joining three tables: DFKKKO and DFKKOP. My goal is to calculate the payment document amount from the cleared documents' amount present in the DFKKOP table. However, I have noticed that the calculated amount is incorrect due to the presence of statistical items.

To obtain the correct amount, I have summed the values in DFKKOP-FDWBT. However, I have ignored cases where both DFKKOP-ASTKZ and DFKKOP-STAKZ are null. Could you please confirm whether my approach is correct or not?

Thank you once again.

Best regards.

Abdelbasset benchekroun krimi

Accepted Solutions (0)

Answers (1)

Answers (1)

AmlanBanerjee
Active Contributor
0 Kudos

Hi Abdelbasset,

You dont need to go through DFKKOP and DFKKKO for finding a payment.

There is a standard SAP FM,FKK_READ_LAST_PAYMENTS, which you can use for the purpose of fetching the payment amount.

This is quite flexible, it takes BP/CA as input with other relevant input and give you the total information of the payments, like the posting date, Payment source, amount etc.

Hope it helps.

Cheers,

AB