cancel
Showing results for 
Search instead for 
Did you mean: 

BPC 10.1 : loading transaction data into different accounts according to its value

Former Member
0 Kudos

Hi BPC experts,

I would like to know if it is possible to load Transaction Data into 2 different accounts according to its positive or negative value from BW.

For instance :

In BW, account 400000 has a value of +100,00 and -50,00.

In BPC, there are 2 accounts : 400000D and 400000C (D = Debit and C = Credit).

Transaction data will be recorded as +100,00 for 400000D and -50,00 for 400000C.

I read in some posts that it is possible to develop this kind of logic in BW but the client does not want a solution done in BW.

Is it possible to write an *IF condition in the transformation file or a javascript in the conversion file ? Or is there another possibility ?

Thank you in advance,

Dat

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

If you load data from BW only to "D" accounts, then script will be:

*WHEN ACCOUNT.BALANCE
*IS D // only for "D" accounts
*REC(EXPRESSION=%VALUE%<0 ? %VALUE% : 0,ACCOUNT=ACCOUNT.COUNTERPART) // copy to "C" if <0
*REC(EXPRESSION=%VALUE%<0 ? 0 : %VALUE%) // clear "D" if <0
*ENDWHEN

It's also better to restrict this adjustment only for AUDITTRAIL - from BW

Former Member
0 Kudos

Thank you Vadim !

Answers (3)

Answers (3)

former_member186338
Active Contributor
0 Kudos

Your script is strange...

What account is used to load data from BW?

400000 -> 400000D or 400000C? or it will load to temporay account 400000?

Former Member
0 Kudos

The transformation file should just define to load the data from 400000 (in BW) to 400000D (in BPC) and other accounts with the same logic (to be handled through a conversion).

400000D would have the property BALANCE "D" and COUNTERPART "400000C".

Once this part is done, the DEFAULT.LGF handles the rest. The script may not even need to consider accounts with "C" BALANCE property in this case.

If there is a flaw in the script or process logic, please tell me as I am not very familiar with logic script.

rishi4892
Participant
0 Kudos

you can try *IF condition

acc, signeddata {Source Column Name}

ACCOUNT=*IF( signeddata > 0 then acc+*str(D) ; acc+*str(C))

former_member186338
Active Contributor
0 Kudos

Have you tested you proposal yourself?

Former Member
0 Kudos

Hello Rishi,

SIGNEDDATA > 0 doesn't work in transformation file, I did try this solution before writing a post about this issue 😞

former_member186338
Active Contributor
0 Kudos

I can recommend you to load value to one account and the run script logic to move value to another account depending on sign.

Former Member
0 Kudos

Thank you Vadim.

I'll try to write the logic script.

Former Member
0 Kudos

There is surely something more simple to write but here is my logic script in DEFAULT.LGF (tested with an input form) :

*WHEN ACCOUNT.BALANCE

*IS D

*REC(EXPRESSION=%VALUE%<0 ? %VALUE%*1:0,ACCOUNT=ACCOUNT.COUNTERPART)

*REC(EXPRESSION=%VALUE%<0 ? %VALUE%*0:0)

*REC(EXPRESSION=%VALUE%>0 ? %VALUE%*1:0)

*ENDWHEN

*WHEN ACCOUNT.BALANCE

*IS C

*REC(EXPRESSION=%VALUE%>0 ? %VALUE%*1:0,ACCOUNT=ACCOUNT.COUNTERPART)

*REC(EXPRESSION=%VALUE%>0 ? %VALUE%*0:0)

*REC(EXPRESSION=%VALUE%<0 ? %VALUE%*1:0)

*ENDWHEN

I also refer to 2 properties :

- BALANCE which defines that 400000D is a Debit (D) account and 400000C a Credit (C) account.

- COUNTERPART which gives the target account if the condition is met.