Categories
- All Categories
- 4 Oracle Analytics Sharing Center
- 12 Oracle Analytics Lounge
- 189 Oracle Analytics News
- 41 Oracle Analytics Videos
- 15.4K Oracle Analytics Forums
- 5.9K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 65 Oracle Analytics Trainings
- 14 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
Issue while using SUM & DECODE functions together in HASH TOTAL in ETEXT template PaymentFormat

Hi Team,
Requirement is to Prefix the Payee Bank account number with different digits based on Bank Account Type (If Bank Account Type is 'SAVINGS', then prefix the Bank account number with 1 , If it is 'CHECKING' then prefix with 4 else prefix with 2) and then sum this concatenated Bank Account Numbers of all payments n a batch payment and display it as HASH total in Trailer record.
Logic used in etext template:-
SUM((DECODE(OutboundPayment/PayeeBankAccount/BankAccountType/Code, 'SAVINGS' , 1 ,'CHECKING', 4, 2)||(OutboundPayment/PayeeBankAccount/BankAccountNumber)))
But logic with the above functions is not working as expected.
Attaching the etext template with P80 record block having HASH total calculation(from 49 to 59 positions) and also attaching the payment output file where HASH TOTAL is wrongly calculated.
Expected value is "430550401" (411521031+19029370)
But output value is "0020550401"
Please let us know if you require any other information from our end.
Thank you.