Skip to Main Content

Analytics Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Write to file in HFM rules

981699Aug 26 2015 — edited Aug 30 2015

Hello,

I'm trying to use the "writetofile("")" subroutine in order to see what the system does during translation.

I was asked by Oracle support to place the subroutine before and after the translation rule as follows:

Sub calculate()

Call WriteToFile("Translation:" & Hs.scenario.Member & " " & Hs.year.Member & " " & Hs.entity.Member)

End sub

Sub WriteToFile(txtStringToWrite)

         On Error Resume Next

          Const ForReading = 1, ForWriting = 2, ForAppending = 8

         Dim fso, f

         Set fso = CreateObject("Scripting.FileSystemObject")

         Set f = fso.OpenTextFile("C:\RuleTestDIR\RulesLog.txt", ForAppending, True)

         f.WriteLine txtStringToWrite & " " & Now()

         f.Close

        On Error GoTo 0

End Sub

  

Sub Translate()

hs.trans "A#22208000","A#22208000","A#AVR",""

hs.transperiodic "A#22209000","A#PL","A#EOP","A#AVR"

End sub

Sub WriteToFile(txtStringToWrite)

         On Error Resume Next

          Const ForReading = 1, ForWriting = 2, ForAppending = 8

         Dim fso, f

         Set fso = CreateObject("Scripting.FileSystemObject")

         Set f = fso.OpenTextFile("C:\RuleTestDIR\RulesLog.txt", ForAppending, True)

         f.WriteLine txtStringToWrite & " " & Now()

         f.Close

        On Error GoTo 0

End Sub

BUT I'm not sure what I should enter within the parenthesis (in red) Call WriteToFile("Translation:" & Hs.scenario.Member & " " & Hs.year.Member & " " & Hs.entity.Member) in order to see the rates the system is using and the actual result of the translation.

Please assist.

Thanks

Laila

This post has been answered by ericerikson on Aug 27 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 27 2015
Added on Aug 26 2015
4 comments
1,536 views