Skip to Content
0

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

Jul 03, 2017 at 09:14 AM

151

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
Vadim Kalinin Jul 10, 2017 at 09:47 AM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thank you Vadim !

0
avatar image
Former Member Jul 04, 2017 at 11:25 AM
0

you can try *IF condition

acc, signeddata {Source Column Name}

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

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Have you tested you proposal yourself?

0
Former Member

Hello Rishi,

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

0
Vadim Kalinin Jul 03, 2017 at 06:37 PM
0

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

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thank you Vadim.

I'll try to write the logic script.

0
Former Member

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.

0
Vadim Kalinin Jul 08, 2017 at 12:30 PM
0

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?

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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.

0