on 07-03-2017 10:14 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
you can try *IF condition
acc, signeddata {Source Column Name}
ACCOUNT=*IF( signeddata > 0 then acc+*str(D) ; acc+*str(C))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I can recommend you to load value to one account and the run script logic to move value to another account depending on sign.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
User | Count |
---|---|
16 | |
4 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.