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!

How to export Current POV data from BefImoprt Event Script

ORAHYPFDMFeb 20 2016 — edited Feb 23 2016

How to export Current POV data from BefImoprt Event Script

Hello Experts,

I am importing data from SWL DB tables to HFM. In order to achieve this, I am Open Interface Adapter and trying to populate AIF table using BefImport Script.

When I am trying to load data for period APR15, data for MAY15, JUN15, JUL15 and so on(all periods) getting populated in AIF table. Because of this, when I export it, data for all periods getting loaded into HFM.

May I know How to achieve this purpose? I want to load only current POV data to HFM.

I am writing following script:

if (fdmContext["LOCNAME"] == "LOC_OIA_EXCHG_CLO"):

insertStmt = """

INSERT INTO AIF_OPEN_INTERFACE (

BATCH_NAME

,YEAR

,PERIOD

,PERIOD_NUM

,CURRENCY

,COL07

,COL08

,COL09

,AMOUNT

) VALUES (

?

,?

,?

,?

,?

,?

,?

,?

,?

)

"""

sourceConn = sql.DriverManager.getConnection("jdbc:oracle:thin:@dsad.dsde.com:1541:trt", "apps", "apps");

selectStmt = "select UG_HFM_GL_DAILY_RATES_T1.year,UG_HFM_GL_DAILY_RATES_T1.period_name,UG_HFM_GL_DAILY_RATES_T1.period_num,'[None]' AS CURRENCY,'Rate_Clo' AS SEGMENTN,UG_HFM_GL_DAILY_RATES_T1.from_currency, UG_HFM_GL_DAILY_RATES_T1.to_currency, UG_HFM_GL_DAILY_RATES_T1.conversion_rate from UG_HFM_GL_DAILY_RATES_T1 union all select UG_HFM_GL_DAILY_RATES_T1.year,UG_HFM_GL_DAILY_RATES_T1.period_name,UG_HFM_GL_DAILY_RATES_T1.period_num,'[None]' AS CURRENCY,'Rate_Avg' AS SEGMENTN,UG_HFM_GL_DAILY_RATES_T1.from_currency, UG_HFM_GL_DAILY_RATES_T1.to_currency, UG_HFM_GL_DAILY_RATES_T1.avg_rate from UG_HFM_GL_DAILY_RATES_T1"

stmt = sourceConn.prepareStatement(selectStmt)

stmtRS = stmt.executeQuery()

batchName = "Batch_" + str(fdmContext["LOCNAME"])

while(stmtRS.next()):

  params = [ batchName, stmtRS.getString("YEAR"),

stmtRS.getString("PERIOD_NAME"),

stmtRS.getString("PERIOD_NUM"),

stmtRS.getString("CURRENCY"),

stmtRS.getString("FROM_CURRENCY"),

stmtRS.getString("TO_CURRENCY"),

stmtRS.getString("SEGMENTN"),

stmtRS.getBigDecimal("CONVERSION_RATE")]

  fdmAPI.executeDML(insertStmt, params, False)

  fdmAPI.commitTransaction()

stmtRS.close()

stmt.close()

sourceConn.close()

Comments

User_XPEES

Any comments please?

User_XPEES

any recommendations or comments please?

1 - 2
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Mar 22 2016
Added on Feb 20 2016
2 comments
646 views