Import Integration Script
Hello Guys,
I want to pull the specific data from two different tables from oracle database . what should i do ? is it possible to import data from two different tables using import integration script or i need to write SQL query for this ?
Any one have sample script for same issue ?
Hi Vnm,
See page 91 of the FDM Admin guide at:
http://docs.oracle.com/cd/E17236_01/epm.1112/fdm_admin.pdf
Yes you can access multiple sources from an integration script and yes as you are hitting a database you will need to execute a SQL statement as part of the integration script.
The example on 91 does use SQL which is typical for integration scripts.
Regards,
John A. Booth
http://www.metavero.com
Similar Messages
-
Issue with FDM Import Integration script
Hi,
I need to pull records from Oracle DB and load in FDM. have created Import Integration script for this. But,I reciev 'Data access error' when I execute the script.
The line of error is Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)+ .When I review log, I see 'strWorkTableName' is Invalid table name.
ERROR:
Code............................................. -2147467259
Description...................................... ORA-00903: invalid table name
Procedure........................................ clsDataAccess.farsTable
Component........................................ upsWDataWindowDM
Below is the script:*
Dim cnSS 'ADODB.Connection
Dim strSQL 'SQL string
Dim rs 'Recordset
Dim rsAppend 'tTB table append rs object
'Initialize objects
Set cnSS = CreateObject("ADODB.Connection")
Set rs = CreateObject("ADODB.Recordset")
Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)
'Connect to Oracle database
cnss.open "Provider=OraOLEDB.Oracle.1;Data Source= FDMDB;Database= FDMDB;User ID= FDM;Password= xxxx"
'Create query string
strSQL = "Select ACCOUNT,ENTITY,AMOUNT FROM BALANCES"
'Get data
rs.Open strSQL, cnSS
'Check for data
If rs.bof And rs.eof Then
RES.PlngActionType = 2
RES.PstrActionValue = "No Records to load!"
Exit Function
End If
'Loop through records and append to tTB table in location’s DB
If Not rs.bof And Not rs.eof Then
Do While Not rs.eof
rsAppend.AddNew
rsAppend.Fields("PartitionKey") = RES.PlngLocKey
rsAppend.Fields("CatKey") = RES.PlngCatKey
rsAppend.Fields("PeriodKey") = RES.PdtePerKey
rsAppend.Fields("DataView") = "YTD"
rsAppend.Fields("CalcAcctType") = 9
rsAppend.Fields("Account") = rs.fields("Account").Value
rsAppend.Fields("Entity") = rs.fields("Entity").Value
rsAppend.Fields("Amount") = rs.fields("Amount").Value
rsAppend.Update
rs.movenext
Loop
End If
'Records loaded
RES.PlngActionType = 6
RES.PstrActionValue = "Import successful!"
'Assign Return value
SQLIntegration = True
End Function
===========================
Also, Is the below string correct to connect to Oracle DB:
cnss.open "Provider=OraOLEDB.Oracle.1;Data Source= FDMDB;Database= FDMDB;User ID= FDM;Password= xxxx"+
Thanks in advance
Edited by: 995155 on Mar 20, 2013 12:45 PMI am assuming you originally tried to run the script in workbench. for these type of scripts this is not possible as you get the error you highlighted.
If it ran successfully (albeit without pulling any data,) then it might just be the SQL string that is incorrect.
What i would try is:
1. Add some error handling after the connection to the DB and display the error if it occurs
2. display the SQL string you are using to make the Selection on, to ensure the format is ok.
Edited by: user10757003 on 21-Mar-2013 01:34 -
Calling Functions From Import Integration Script
I've got an import integration script that runs fine, however I also have several DataPump scripts that are used in FDM to change specific columns as they come in. I can take the code from the scripts and add to the Import Integration script, but I would rather just call those other functions from the VBScript. I don't see any docs on this, and I'm just wondering if anyone has done this or can describe how I can do it.
Is it possible? Since the standard import scripts reference the strField and the strRecord, can these functions be called from the import integration script?strField and strRecord are arguments passed by the application to the import function. The represent the field as defined by the import format and the record that is being processed during the import.
Given that, I'm not sure how to answer your question. -
Import Integration Script Needed for Oracle DB
Hi All!
Anybody can give me import integration script for Oracle DB if i want to import data directly from DB where i dont need to extract or make Flat file and to keep at specific location location on fdm directory.
A script which integrates if new location is created in set of books of accounts or any entity will be created in Oracle Apps. and stored in specific db. From where i have staging area where relevent DB with req feilds and records.
Thanks in Advance
RegardsHello,
If you review the FDM Workbench Admin Guide there is a sample one already.
There are only a few differences between Oracle and SQL:
1. The provider string (which can be generated by looking at a .UDL file in a text editor)
2. Oracle DB's are case sensitive, and by default everything non-quoted is pushed to uppercase (which is pretty much everything for FDM)
Thank you. -
Automate Import integration script
Hi,
We have import integration script using which we are loading data to FDM.
I want to know if there is any way to automate load through Integration script. As of now, we are changing POV for all periods and running script to load data to specific periods.
Do we have any way where in we can automate this so that data gets loaded to all periods for a specific location at once.
Thanks in advanceHi,
batch loader will help you to automate FDM workflow.
If you want to automate integration script you will have to create an empty batch file.
I suggest you make your SQL query dynamic so period extracted is defined based on FDM POV period.
Hope that helps
Regards -
ODBC Driver for Import Integration Script?
My understanding is that for the Import Integration Script to work with an Oracle database we need to install the Oracle client and an ODBC driver on the FDM server. Since I don't have access to the server, and I'm not the one installing anything, I need to tell the installation group where to find the correct driver. I've seen the DataDirect/Merant driver used in the past. Is that the only odbc driver that works? Does that come with FDM? Where can I find the right driver to install?
Hello,
As you know FDM is VB compliant. With that being said most anything that can be done inside of VBScripting can be done inside of FDM. Unfortunately it is not the responsibility of FDM to package/compile all drivers and information ... it probably would just be too large to accomidate.
If you want to leverage a technology/connection/etc then the respected technology must be installed. So if you are trying to connect to an Oracle DB then the correct software, setup and configuration files must be in place to make that happen.
In your instance, if you are going to connect to the Oracle DB you have two options:
1. Native drivers (OLE DB Provider Drivers)
2. Standard drivers (ODBC Drivers)
In either situation they must be able to actively and validly connect to the database. You can test the connections to your database by leveraging a test .UDL file and stepping through the connection pieces manually. Once you have determined a connection that will suit your needs you can then save the .UDL file and open it a text-editor to retrieve your connection string.
Thank you, -
"Import Failed" when trying to run a import (Integration) script from FDM
Backgroud about the Issue : My source system for data is Oracle Orion and the Destination is HFM.Trying to import data fom orion to HFM through FDM via ODBC connectivity.
Modified the "Integration Script Example" in fdm_admin guide and with this i am able to import data from the Orion to the FDM staging table "tDataSegX" however i am not abel to see any data in the FDM (Import Module) and thats when i get this error "Import Failed".
Posisble casue according to my knowledge : My Import script only includes code to 1.Connect to ODBC data source 2. copies all the values from the Source table to the staging table.
I am not sure if i am missing some attributes in the script ??!!
can some one help me in checking if my imoport scritp is correct ??!!!
Here is my script
Function Import_int(strLoc, lngCatKey, dblPerKey, strWorkTableName)
Dim objSS 'ADODB.Connection
Dim strOra 'Ora string
Dim rs ' As New ADODB.Recordset
Dim rsAppend 'tTB table append rs object
Set cnSS = CreateObject("ADODB.Connection")
Set rs = CreateObject("ADODB.Recordset")
Set rsAppend = DW.DataAccess.farsTableAppend("TDATASEG7")
Dim strconn
strconn="Provider=msdaora;Data Source=<<Data Source Name>>;User Id=<<Username>>;Password=<<Password>>;"
cnSS.open strConn
strOra = "Select * "
strOra = strOra & "FROM <<Oracle View>>"
'Get data
rs.Open strOra, cnSS
If rs.bof And rs.eof Then
RES.PlngActionType = 2
RES.PstrActionValue = "No Records to load!"
Exit Function
End If
'Loop through records and append to tTB table in location's DB
If Not rs.bof And Not rs.eof Then
Do While Not rs.eof
rsAppend.AddNew
rsAppend.Fields("PartitionKey") = RES.PlngLocKey
rsAppend.Fields("CatKey") = RES.PlngCatKey
rsAppend.Fields("PeriodKey") = RES.PdtePerKey
rsAppend.Fields("DataView") = "YTD"
rsAppend.Fields("CalcAcctType") = 9
'write conditions to eliminate null
rsAppend.Fields("Amount") = rs.fields("YTD").Value
rsAppend.Fields("Desc1") = test 'rs.fields("txtAcctDes").Value
rsAppend.Fields("Account") = rs.fields("MAIN_AC_CODE").Value
rsAppend.Fields("Entity") = rs.fields("COMPANY_CODE").Value
rs.movenext
Loop
End If
'Records loaded
RES.PlngActionType = 6
RES.PstrActionValue = "ODBC Import successful!"
'Assign Return value
SQLIntegration = True
rs.close
End FunctionHI,
I first changed the table name to "strWorkTableName" and tried executing only the script from the Workbench client and got error as bellow
Financial Data Management Workbench
-2147467259 - Data access error.
At Line: 20
OK
For some reason i am not ok with running the code in the workbench client (even for checking the syntax) because for the reason that i am not sure if all the parameter required by the funciton will be passed by donig just "Run script."So even with this error in the Work bench client i proceded to the Workflow module in the web interface and run the import and here is what i have now.
Error: An error occurred importing the file.
Detail: Invalid procedure call or argument
here is the error message from the "View Erro Log"
ERROR:
Code............................................. 5
Description...................................... Invalid procedure call or argument
Procedure........................................ clsImpProcessMgr.fExecuteImpScript
Component........................................ upsWObjectsDM
Version.......................................... 1112
Thread........................................... 15676
IDENTIFICATION:
User............................................. admin
Computer Name.................................... <<ComputerName>>
App Name......................................... <<ApplicationName>>
Client App....................................... WebClient
CONNECTION:
Provider......................................... ORAOLEDB.ORACLE
Data Server......................................
Database Name.................................... HYPTDB
Trusted Connect.................................. False
Connect Status.. Connection Open
GLOBALS:
Location......................................... ORION
Location ID...................................... 750
Location Seg..................................... 4
Category......................................... WLCAT
Category ID...................................... 12
Period........................................... Feb - 2011
Period ID........................................ 2/28/2011
POV Local........................................ False
Language......................................... 1033
User Level....................................... 1
All Partitions................................... True
Is Auditor....................................... False
** Begin FDM Runtime Error Log Entry [2011-03-21 14:43:42] **
ERROR:
Code............................................. 5
Description...................................... Invalid procedure call or argument
Procedure........................................ clsImpProcessMgr.fLoadAndProcessFile
Component........................................ upsWObjectsDM
Version.......................................... 1112
Thread........................................... 15676
IDENTIFICATION:
User............................................. admin
Computer Name.................................... <<ComputerName>>
App Name......................................... <<ApplicationName>>
Client App....................................... WebClient
CONNECTION:
Provider......................................... ORAOLEDB.ORACLE
Data Server......................................
Database Name.................................... HYPTDB
Trusted Connect.................................. False
Connect Status.. Connection Open
GLOBALS:
Location......................................... ORION
Location ID...................................... 750
Location Seg..................................... 4
Category......................................... WLCAT
Category ID...................................... 12
Period........................................... Feb - 2011
Period ID........................................ 2/28/2011
POV Local........................................ False
Language......................................... 1033
User Level....................................... 1
All Partitions................................... True
Is Auditor....................................... False
** Begin FDM Runtime Error Log Entry [2011-03-21 14:44:05] **
ERROR:
Code............................................. 70
Description...................................... Permission denied
Procedure........................................ clsArchiveMgr.fArchiveSupercededDelete
Component........................................ upsWObjectsDM
Version.......................................... 1112
Thread........................................... 7180
IDENTIFICATION:
User............................................. admin
Computer Name.................................... <<ComputerName>>
App Name......................................... <<ApplicationName>>
Client App....................................... WebClient
CONNECTION:
Provider......................................... ORAOLEDB.ORACLE
Data Server......................................
Database Name.................................... HYPTDB
Trusted Connect.................................. False
Connect Status.. Connection Open
GLOBALS:
Location......................................... SAMPLE
Location ID...................................... 748
Location Seg..................................... 2
Category......................................... WLCAT
Category ID...................................... 12
Period........................................... Feb - 2011
Period ID........................................ 2/28/2011
POV Local........................................ False
Language......................................... 1033
User Level....................................... 1
All Partitions................................... True
Is Auditor....................................... False
** Begin FDM Runtime Error Log Entry [2011-03-21 14:44:05] **
ERROR:
Code............................................. 70
Description...................................... Permission denied
Procedure........................................ clsArchiveMgr.fArchiveSupercededFlag
Component........................................ upsWObjectsDM
Version.......................................... 1112
Thread........................................... 7180
IDENTIFICATION:
User............................................. admin
Computer Name.................................... <<ComputerName>>
App Name......................................... <<ApplicationName>>
Client App....................................... WebClient
CONNECTION:
Provider......................................... ORAOLEDB.ORACLE
Data Server......................................
Database Name.................................... HYPTDB
Trusted Connect.................................. False
Connect Status.. Connection Open
GLOBALS:
Location......................................... SAMPLE
Location ID...................................... 748
Location Seg..................................... 2
Category......................................... WLCAT
Category ID...................................... 12
Period........................................... Feb - 2011
Period ID........................................ 2/28/2011
POV Local........................................ False
Language......................................... 1033
User Level....................................... 1
All Partitions................................... True
Is Auditor....................................... False
** Begin FDM Runtime Error Log Entry [2011-03-21 14:44:05] **
ERROR:
Code............................................. 70
Description...................................... Permission denied
Procedure........................................ clsImpProcessMgr.fClearData
Component........................................ upsWObjectsDM
Version.......................................... 1112
Thread........................................... 7180
IDENTIFICATION:
User............................................. admin
Computer Name.................................... <<ComputerName>>
App Name......................................... <<ApplicationName>>
Client App....................................... WebClient
CONNECTION:
Provider......................................... ORAOLEDB.ORACLE
Data Server......................................
Database Name.................................... HYPTDB
Trusted Connect.................................. False
Connect Status.. Connection Open
GLOBALS:
Location......................................... SAMPLE
Location ID...................................... 748
Location Seg..................................... 2
Category......................................... WLCAT
Category ID...................................... 12
Period........................................... Feb - 2011
Period ID........................................ 2/28/2011
POV Local........................................ False
Language......................................... 1033
User Level....................................... 1
All Partitions................................... True
Is Auditor....................................... False
** Begin FDM Runtime Error Log Entry [2011-03-21 14:44:05] **
ERROR:
Code............................................. 70
Description...................................... Permission denied
Procedure........................................ clsImpProcessMgr.fLoadAndProcessFile
Component........................................ upsWObjectsDM
Version.......................................... 1112
Thread........................................... 7180
IDENTIFICATION:
User............................................. admin
Computer Name.................................... <<ComputerName>>
App Name......................................... <<ApplicationName>>
Client App....................................... WebClient
CONNECTION:
Provider......................................... ORAOLEDB.ORACLE
Data Server......................................
Database Name.................................... HYPTDB
Trusted Connect.................................. False
Connect Status.. Connection Open
GLOBALS:
Location......................................... SAMPLE
Location ID...................................... 748
Location Seg..................................... 2
Category......................................... WLCAT
Category ID...................................... 12
Period........................................... Feb - 2011
Period ID........................................ 2/28/2011
POV Local........................................ False
Language......................................... 1033
User Level....................................... 1
All Partitions................................... True
Is Auditor....................................... False -
Automate FDM Import Integration Scripts
I have several FDM location with an associated unique integration import script that pulls data from a SQL Server. Is there a way to automate the execution of the scripts? Much like batch processing so I can control when they load at certain points? Is this possible and if so how? I would hate to create extract files and then use the batch loader as the integration script is so much cleaner and it makes it easier for the end users to manually load outside of the forced loads I would like to do. Is this possible? Thanks in advance for any help.
Yes, you can do this. you need to create empty batch files with the name in the correct format (as with the normal flat file batch process). Generally i expect you would know the location and Category to be used in creating the empty file name so these could be hard-coded. the issue is the Period to be used, and there are various options. If you are using the 'Global' POV setting then you could use the global period setting, which would have to updated each period by the administrator. Another option might be to maintain a seperate file with the current period held in it. Another option might be to utilise a filed on the locaiton which again would need maintaining. Another option might be that the period is held in the SQL table holding the data you are importing so you could do a read of the table first to get the period
-
Minimum How many dimension required for FDM integration Script
Hi Gurus
I have only 2 dimensions in my SQL Table name dbo.ABC (Example: 1.Entity 2.Account and amount(data value)
Example:
USA, SALES, 50000
(Including value its total 3 dimensions)
How to export this data to Target HFM Application.
Integration Script got success when i click on validation it is shows only 2 dimension 1.Account 2.Entity. i have mapped correctly. but validation screen not showing anything. i got gold fish for validation button and Export is also showing success and got goldfish. but no data is exported to HFM application.
in FDM outbox its created a file which is containing only *!data* text. There is no record in this file.
I want to load the data with rest of the dimensions with [None] member combination as i don't have the additional dimensions in my source file.
Minimum how many dimension required to export the data from FDM to HFM?
regards
TaruniHi,
I came to know, at least one member from the source file should be there in the integration script then only we can assign at least [None] member or any member for the target dimensions.
My source file having only 3 dimensions ( USA,Sales,Amount)
1.USA,2.Sales,3.$50000
Import Screen Dimensions:
1.Source-FM-Entity
2.Source-FDM-Account
3.Account Description
4.SourceICP
5.SourceCustom1
6.SourceCustom2
7.SourceCustom3
8.SourceCustom4
9.Amount
In the integration script its taking the values as
Source-FM-Entity(0)
Source-FDM-Account(1)
Account Description
SourceICP
SourceCustom1
SourceCustom2
SourceCustom3
SourceCustom4
Amount(2)
above it shows only 0,1,2 numbers are assigned to source dimensions.
As my source file having only 3 Dimension so it is taking only 3 dimensions shown below. rest of the dimensions it is not showing in the import screen.
*0.Source-FM-Entity,1.Source-FDM-Account,2.Amount*
If i assign any values(3-9) to next dimensions or if I left blank rs.fields("txtAcctDes") with its showing below error messages:
Error: An error occurred importing the file.
Detail: Item cannot be found in the collection corresponding to the requested name or ordinal.
At line: (39 and 42-46)
So i have assigned Source-FDM-Account Number<font color="Blue">(rs.fields(1) </font>Value to rest of the dimensions in my integration script.
<font color="Blue">rsAppend.Fields("Account") = rs.fields(1).Value</font>
rsAppend.Fields("Desc1") = rs.fields(1).Value
rsAppend.Fields("ICP") = rs.fields(1).Value
rsAppend.Fields("UD1") = rs.fields(1).Value
rsAppend.Fields("UD2") = rs.fields(1).Value
rsAppend.Fields("UD3") = rs.fields(1).Value
rsAppend.Fields("UD4") = rs.fields(1).Value
Now am able to import the data into import screen, And i found all the above member names as Sales as i assigned Account dimension number(1) to these members temporarily to succeed the import process . Then i have mapped to Target dimensions with [None] member combination as these members are not in original source file. Then rest of the process Export and Check is done perfectly.
*<font color="red">1.Am i right?? Please suggest me the correct process?</font>*
*<font color="red">2.Can we use blank values in Integration Script as mentioned below??</font>*
rsAppend.Fields("Desc1") = rs.fields("txtAcctDes").Value
rsAppend.Fields("Account") = rs.fields("txtAcct").Value
rsAppend.Fields("Entity") = rs.fields("txtCenter").Value
*1.Added value*
Example: rsAppend.Fields("Desc1") = rs.fields("1").Value
*2.Blank Value*
rsAppend.Fields("Desc1") = rs.fields("txtAcctDes").Value
*<font color="red">3.As per my observation system is not accepting blank values in integration script. Please correct me??</font>*
Here is my Integration Script
1 Function Integration(strLoc, lngCatKey, dblPerKey, strWorkTableName)
2 '------------------------------------------------------------------
3 'Oracle Hyperion FDM IMPORT Integration Script:
4 Created By: admin
5 Date Created: 2012-11-20-07:55:20
6 'Purpose:
7 '------------------------------------------------------------------
8 Dim objSS 'ADODB.Connection
9 Dim strSQL 'SQL String
10 Dim rs 'Recordset
11 Dim rsAppend 'tTB table append rs Object
12 'Initialize objects
13 Set cnSS = CreateObject("ADODB.Connection")
14 Set rs = CreateObject("ADODB.Recordset")
15 Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)
16 'Connect To SQL Server database
17 cnss.open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=TEST;Data Source=localhost;"
18 strSQL = "Select * "
19 strSQL = strSQL & "FROM ABC"
20 'Get data
21 rs.Open strSQL, cnSS
22 'Check For data
23 If rs.bof And rs.eof Then
24 RES.PlngActionType = 2
25 RES.PstrActionValue = "No Records To load!"
26 FirstImportVB = False ' Assign return value of function
27 Exit Function
28 End If
29 'Loop through records And append To tTB table In location’s DB
30 If Not rs.bof And Not rs.eof Then
31 Do While Not rs.eof
32 rsAppend.AddNew
33 rsAppend.Fields("PartitionKey") = RES.PlngLocKey
34 rsAppend.Fields("catKey") = lngCatKey
35 rsAppend.Fields("PeriodKey") =dblPerKey
36 rsAppend.Fields("DataView") = "YTD"
37 rsAppend.Fields("CalcAcctType") = 9
38 rsAppend.Fields("Amount") = rs.fields(2).Value
39 rsAppend.Fields("Desc1") = rs.fields(1).Value
40 rsAppend.Fields("Account") = rs.fields(1).Value
41 rsAppend.Fields("Entity") = rs.fields(0).Value
42 rsAppend.Fields("ICP") = rs.fields(1).Value
43 rsAppend.Fields("UD1") = rs.fields(1).Value
44 rsAppend.Fields("UD2") = rs.fields(1).Value
45 rsAppend.Fields("UD3") = rs.fields(1).Value
46 rsAppend.Fields("UD4") = rs.fields(1).Value
47 rsAppend.Update
48 rs.movenext
49 Loop
50 End If
51 'Records loaded
52 RES.PlngActionType = 2
53 RES.PstrActionValue = "SQL Import successful!"
54 'Assign Return value
55 Integration = True
56 End Function
Regards
Taruni -
Multiple Columns in Integration Script
Hi All
I am looking at data integration from R12 to HFM, my client has decided not to use ERPi and instead is opting for custom built processes culminating in an FDM integration script to pull data from an ODI staging table / view (please don't comment on that bit I have tried to advise them!)
My issue is that when loading their TB data they want to do so in both entered and functional currency (members on the Custom4 dimension in HFM). What I am not sure about and would like some advice on is whether or not it is possible to have a multi-load style integration script with two data columns as I would be able to for file imports or whether I am limited to only 1 data column?
If limited I assume I can amend my integration script to loop through the recordset twice and pick up different data columns each time to create the second record?
Any help will be greatly appreciated :-)
Regards
Stui know your request is old but you can use the pivot unpivot function to transpose your multiple columns into lines in a temporary table. I do that for debit/credit/balance situations :-)
-
Hi Guru's
When i want to pull the data from SQL table using below integration Script from admin guide, its showing <font color="red">-2147217865 Data access Error at line15 (Line 15:Set rsAppend = DW.DataAccess.farsTable(strWorkTableName) </font>
I tried with both web client and workbench. i got same error message.
(FYI: UDL test connection is succeeded)
Please help me.
SQL server name: DEV
Database name: FDM
Sql Table name: SDR
SDR Table contains Below Data Example:
Entity Account ICP Custom1 Custom2 Custom3 Custom4 Amount
India, Extsales, [Icp None], Nocc, No Cust, None, None, 50000
India, rent, [Icp None], Nocc, No Cust, None, None, 20000
Intigration Script:
Function SQLIntegration(strLoc, lngCatKey, dblPerKey, strWorkTableName)
'Hyperion FDM Integration Import Script:
'Created By: admin
'Date Created: 04/19/2012 2:18:39 PM
'Purpose: Pull data directly from SQL DB
Dim objSS 'ADODB.Connection
Dim strSQL 'SQL String
Dim rs 'Recordset
Dim rsAppend 'tTB table append rs Object
'Initialize objects
Set cnSS = CreateObject("ADODB.Connection")
Set rs = CreateObject("ADODB.Recordset")
Set rsAppend = DW.DataAccess.farsTable(strWorkTableName)
'Connect To SQL Server database
cnss.open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=FDM;Data Source=DEV;"
'Create query String
strSQL = "Select * "
strSQL = strSQL & "FROM SDR "
'Get data
rs.Open strSQL, cnSS
'Check For data
If rs.bof And rs.eof Then
RES.PlngActionType = 2
RES.PstrActionValue = "No Records To load!"
Exit Function
End If
'Loop through records And append To tTB table In location’s DB
If Not rs.bof And Not rs.eof Then
Do While Not rs.eof
rsAppend.AddNew
rsAppend.Fields("PartitionKey") = RES.PlngLocKey
rsAppend.Fields("CatKey") = RES.PlngCatKey
rsAppend.Fields("PeriodKey") = RES.PdtePerKey
rsAppend.Fields("DataView") = "YTD"
rsAppend.Fields("CalcAcctType") = 9
rsAppend.Fields("Amount") = rs.fields("dblAmt").Value
rsAppend.Fields("Desc1") = rs.fields("txtAcctDes").Value
rsAppend.Fields("Account") = rs.fields("txtAcct").Value
rsAppend.Fields("Entity") = rs.fields("txtCenter").Value
rsAppend.Update
rs.movenext
Loop
End If
'Records loaded
RES.PlngActionType = 6
RES.PstrActionValue = "SQL Import successful!"
'Assign Return value
SQLIntegration = True
End Function
<font color="red"> BELOW IS THE ERROR LOG </font>
Error Log:
** Begin FDM Runtime Error Log Entry [2012-07-16-01:57:58] **
ERROR:
Code............................................. -2147217865
Description...................................... Table does not exist.
Procedure........................................ clsDataAccess.farsTable
Component........................................ upsWDataWindowDM
Version.......................................... 1111
Thread........................................... 8252
IDENTIFICATION:
User............................................. admin
Computer Name....................................xxxx
App Name......................................... xxxxx
Client App....................................... WorkBench
CONNECTION:
Provider......................................... SQLOLEDB
Data Server...................................... xxxxx
Database Name.................................... xxxxx
Trusted Connect.................................. False
Connect Status.. Connection Open
GLOBALS:
Location......................................... India
Location ID...................................... 751
Location Seg..................................... 4
Category......................................... actual
Category ID...................................... 13
Period........................................... Jan - 2012
Period ID........................................ 1/31/2012
POV Local........................................ False
Language......................................... 1033
User Level....................................... 1
All Partitions................................... True
Is Auditor....................................... False
regards
SarillaHi Sarilla
I assume you ran the script from the editor.
You HAVE TO run it from the normal FDM workflow "Import".
Otherwise "Data access error"
Hope this helps
BR -
Hi,
How to create an output file by using an integration script to view the source files ?
Thanks,
Ravi.Hi Sh,
Thanks for the reply.
If we are using an integration script the data willl load into FDQM tables directly we can't view the source file.
Is there any way to generate an output file (i.e. source file by using an integration script) to view the source file.
If the user clicks on import it should generate a file and import into FDM.
Thanks,
Ravi. -
FDM integration script for multiple locations
Hi,
I have a slight problem with FDM integration script (SQL integration).
From what I've understood and tested within one FDM-application (tablespace) I'm not able to have multiple integration scripts. This because the integration script needs to be named SQLIntegration.uss, otherwise there will be an error.
I have multiple locations within one FDM-application where I would like to use an integration script. Due to the above mentioned naming "bug", I need to include all my locations' integration information in one script. As imagined this is not a solution that easy to maintain or easy to read.
- Is there a workaround for the name-bug?
- Can I call a function within the main function? I tried without any success, but maybe you would have a solution.
Any input would be beneficialuser10757003 wrote:
Not sure what you mean when you say you rename the file and you get the error.
Is this a new integration script you have created and cut / pasted the existing integration script contents? If so, did you remember to change the SQLINTEGRATION = TRUE statement at the end of the script to the new integration script name? this might be the reason why you get the 'Import Successful' popup and the Import error dropdown.What I mean is that scripts are name xxx.uss abc.uss. This should be fairly clear.
Now I have the SQLIntegration.uss, if I change the name of the script to SQLIntegration1.uss or any name. The script will not work. And I receive one error and one success message as stated above.
Note: I'm not changing the content or anything else inside the script. -
Automating FDM Integration Script in Task Manager
Hi everyone
I have created an Integration Script that copies data from a SQL table to FDM, and is now attempting to automate a daily run in Task Manager.
To do this it seems I need to create a Custom Script to run the following Integration Script:
Function LedgerTrans(strLoc, lngCatKey, dblPerKey, strWorkTableName) I am unable to figure out what to write in the Custom Script to trigger the Integration Script. Can anyone explain or give a sample?
Best regards
FrederikYou don't need a custom script, you can just use the batch process to trigger the import for the POV. You would create a standard batch script using the Batch GUI in the workbench (Tools > Batch processing) and then put empty source files in the OpenBatch folder with the POV for the file name to trigger the import script for the POV.
-
hi experts,
through program "RSTXSCRP" we can export or import the script to hard disk.
my doubt is in the selection screen: we have "control parameters for file operation" what is the purpose of them.
one more is we have "control of language version" what is the language vector field? how it is useful here.
can anyone plz help me.
thanks in advance.Hi Mytri
The "Contrl Parameters for file operation" is generally when u want to save the file in to LAH server(application server) or at the place in which u want (i.e form/frontend option).
The "control of language versions" helps in to save the form in different languages.More over there is one more option to upload and save it original box too(see the check box u had)
Maybe you are looking for
-
"PDB file does not contain provider information" Win8.1 - Error when using traceview
We have been attempting to manage a Windows 8.1 machine by using the Enterprise Device Management Protocol. We are encountering a failure during the process and would like to inspect what is going wrong on the Client Side. Used the "Windows 8.1 Enter
-
How to call partial trigger on JSFF component from separate managed bean?
Guys and Gals, Using JDev 11.1.1.2.0. Looked on the forums and google. Initial results aren't so great. Is it possible to call a PPR on a JSFF component from a separate managed bean? It seems calling the FacesContext in this instance calls the root J
-
What are the steps to debugging in FORMS 6i? I am receiving the following message: FRM-40735 ON-ERROR ORA-6508. Thanks. Jaffee
-
Illustrator 64 bit will not open
Cannot open Illustrator 64bit. It says it cannot oppen.
-
Docking station 2009 compatible with Pro Book 640 G1?
I intend to buy a Pro Book 640 G1. I still have a 2009 docking station and hope to use it with the new notebook. Can I or do I need to buy the 2012 docking station?