on 2022 Sep 12 8:24 PM
Hi ,
I have written the below code in BPC script logic
Account Master Data
11204040 --> AST
11204040L --> LEQ
Requirement : 11204040 example has been taken into consideration for explaining the requirement:
When GL Account 11204040 has transaction data value less than 0 or negative balance then copy the balance of the account to Liability account 11204040L; else leave the balance in the account 11204040
*XDIM_MEMBERSET ACCOUNT AS %ACCT_VAR% = BAS(ASSET)
*WHEN ACCOUNT.ACCTYPE
*IS AST
*REC(EXPRESSION = %VALUE% < 0 ? ACCOUNT = %ACCT_VAR%&"L" : ACCOUNT = %ACCT_VAR%, AUDITTRAIL = LOAD)
*ENDWHEN
*ENDWHEN
Validation of the logic script shows an error in the REC statement line : Unknown Dimension Name in Keyword: "11202000:
rohit.padala
Ternary syntax is as below
A > B ? C : D
I would suggest you add a property in ACCOUNT dimension and maintain Liability Account ID's against Asset Accounts
Now try this below code. Please add relevant *XDIM_MEMBERSET for other dimensions. I think *XDIM_MEMBERSET AUDITTRAIL = should be there
*XDIM_MEMBERSET ACCOUNT = BAS(ASSET)
*WHEN ACCOUNT
*IS *
*REC(EXPRESSION = %VALUE% < 0 ? %VALUE% : 0, ACCOUNT = ACCOUNT.LIABACCOUNT, AUDITTRAIL = LOAD)
*REC(EXPRESSION = %VALUE% > 0 ? %VALUE% : 0,AUDITTRAIL = LOAD)
*ENDWHEN
Please accept/upvote if this helps
Nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
5 | |
5 | |
4 | |
3 | |
2 | |
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.