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!

Issue retrieving data through HFM JAPI

User_YZQL2Sep 11 2018 — edited Oct 1 2018

Hi All,

I am trying to retrieve data across a certain POV from HFM, using HFM JAPI. I am using the following code, but the same isn't working. The dataOM.getCellInfo(pov1), returns the following HFMException

CellInfo1 = dataOM.getCellInfo(pov1)

HFMException: oracle.epm.fm.common.exception.HFMException: EPMHFM-3037: Invalid Item ID.

while, listCelltext = dataOM.getCellTextAndAttachmentsUsingPov(pov1), returns empty string.

Kindly, help with, where I might be going wrong. I guess, something wrong with the POV, but am not able to figure out what. Is there a format that I need to adhere to ??

<CODE>

import sys
from java.util import Locale
from java.lang import System

# Import the HFM API objects we need in this script
from oracle.epm.fm.hssservice import HSSUtilManager
from oracle.epm.fm.domainobject.application import SessionOM
from oracle.epm.fm.domainobject.data import DataOM
from oracle.epm.fm.common.datatype.transport import WEBOMDATAGRIDTASKMASKENUM
from oracle.epm.fm.common.exception import HFMException

# Set the required EPM environment variables
System.setProperty("EPM_ORACLE_HOME", r'D:\Oracle\Middleware\EPMSystem11R1')
System.setProperty("EPM_ORACLE_INSTANCE", r'D:\Oracle\Middleware\user_projects\epmsystem1')

# Target HFM connection properties
clusterName = "HFMD"
userName = "user"
password = "password"
#password = "xyz"
application = "HFM_APP"

pov1 = "S#Actual.Y#2018.P#May.W#YTD.E#Entity_Top.V#<Entity Currency>.I#[ICP Top].O#Custom1.P#Custom2.C#Custom3.D#All_DataTypes.F#Custom4.S#Custom5.A#Top_Account";

ssoToken = HSSUtilManager.getSecurityManager().authenticateUser(userName,password)
sessionOM = SessionOM()
hfmsession = sessionOM.createSession(ssoToken, Locale.ENGLISH,clusterName,application)

dataOM = DataOM(hfmsession)

povs = []
povs.append(pov1)

fdmAPI.logDebug("POV is : %s" % povs)

#listCelltext = dataOM.getCellTextAndAttachmentsUsingPov(povs)
listCelltext = dataOM.getCellTextAndAttachmentsUsingPov(pov1)
CellInfo1 = dataOM.getCellInfo(pov1)

fdmAPI.logDebug("Cell texts extracted: %s" % listCelltext)
fdmAPI.logDebug("Cell texts extracted: %s" % CellInfo1)

for listCellTextInfo in listCelltext:
for cellTextInfo in listCellTextInfo:
  cellTextlabel = cellTextInfo.getlabel()
  cellTextValue = cellTextInfo.getText()
 
  fdmAPI.logInfo("Label: %s -> %s" (cellTextLabel, cellTextValue))

sessionOM.closeSession(hfmsession)

</CODE>

Thanks,

Dev

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 29 2018
Added on Sep 11 2018
1 comment
798 views