Skip to Content
0
Former Member
May 08, 2013 at 02:04 PM

Issue with Debit/Credit calculation

78 Views

Dear experts,

I am working on SAP BI 7.3 FI/CO extractors. The data are extracted from ECC system using the standard extractor 0FI_GL_10. After 2 levels of DSO the data is loaded into a CUBE X. On this cube I have also a planning application.

The problem that I have is on the derivation of DEBIT and CREDIT. This derivation is done via function module via IP (transaction RSPC).

In order to distinguish the data coming from SAP I have a characteristic with value “SAP” (for the data coming from sap) and “BI” (for the data coming from the adjustments)

The problem is in reporting where after adjustments I get 0GL_ACCOUNT = #, AMOUNT = 0, Credit = Value , Debit = Value. This is due to the planning function that I have.

Notice also that I can’t insert the 0GL_ACCOUNT into the aggregation levels.

Below you can find the detailed function module.

IF AMOUNT < 0.

0CREDIT = (-1)*AMOUNT.

0DEBIT = 0.

ELSEIF AMOUNT > 0.

0DEBIT = AMOUNT.

0CREDIT = 0.

ELSE.

0CREDIT= 0.

0DEBIT = 0.

ENDIF.

When the function module is lunched 0amount, debit, credit has the value form SAP.

Ex:

SAP Amount = 200 Credit = 2000 Debit = 1000

After the adjustment if the Amount > 0 Debit = Amount and Credit = 0. So on the line generated by the fox formula with “BI” value

BI Amount = 0 Credit = -2000 Debit = -800 (this line is wrong for reporting)

Do you have any idea on how to solve this problem ?

Thanks in advance for your feedback.