Defining a Variable in Data Flow
Hello, all.
I'm in the process of relearning SSIS after a year-long hiatus and I was in the process of learning back then.
I'm trying to streamline a SQL stored procedure and I need to define a variable for use in a Derived Column task. Unfortunately, I haven't a clue how to do it. I've searched online, but I've yet to find anything that gels into something clear in my head.
Anyway, the variable definition is;
DECLARE @PreviousInputDate DATETIME
SELECT
@PreviousInputDate = Max([Input Date])
FROM
Staging2
I need to create the variable so that its scope includes all tasks in the data flow.
I'll keep digging around, but thanx in advance for any help!
You can create the variable at data flow scope. Select data flow task (dont double click!) and click on variables in menu to open variables window on left. Then create your new variable. use it in ResultSet tab of above execute sql task after setting ResultSet
option to Single Row. The sql statement can just be this
SELECT
PreviousInputDate = Max([Input Date])
FROM
Staging2
Then in resultset tab map PreviousInputDate to your variable.
Then inside derived column you can fetch it from variables collection like below.
Just drag the variable to expression area to access it
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
Similar Messages
-
SQL Query using a Variable in Data Flow Task
I have a Data Flow task that I created. THe source query is in this file "LPSreason.sql" and is stored in a shared drive such as
\\servername\scripts\LPSreason.sql
How can I use this .sql file as a SOURCE in my Data Flow task? I guess I can use SQL Command as Access Mode. But not sure how to do that?Hi Desigal59,
You can use a Flat File Source adapter to get the query statement from the .sql file. When creating the Flat File Connection Manager, set the Row delimiter to a character that won’t be in the SQL statement such as “Vertical Bar {|}”. In this way, the Flat
File Source outputs only one row with one column. If necessary, you can set the data type of the column from DT_STR to DT_TEXT so that the Flat File Source can handle SQL statement which has more than 8000 characters.
After that, connect the Flat File Source to a Recordset Destination, so that we store the column to a SSIS object variable (supposing the variable name is varQuery).
In the Control Flow, we can use one of the following two methods to pass the value of the Object type variable varQuery to a String type variable QueryStr which can be used in an OLE DB Source directly.
Method 1: via Script Task
Add a Script Task under the Data Flow Task and connect them.
Add User::varQuery as ReadOnlyVariables, User::QueryStr as ReadWriteVariables
Edit the script as follows:
public void Main()
// TODO: Add your code here
System.Data.OleDb.OleDbDataAdapter da = new System.Data.OleDb.OleDbDataAdapter();
DataTable dt = new DataTable();
da.Fill(dt, Dts.Variables["User::varQuery"].Value);
Dts.Variables["QueryStr2"].Value = dt.Rows[0].ItemArray[0];
Dts.TaskResult = (int)ScriptResults.Success;
4. Add another Data Folw Task under the Script Task, and join them. In the Data Flow Task, add an OLE DB Source, set its Data access mode to “SQL command from variable”, and select the variable User::QueryStr.
Method 2: via Foreach Loop Container
Add a Foreach Loop Container under the Data Flow Task, and join them.
Set the enumerator of the Foreach Loop Container to Foreach ADO Enumerator, and select the ADO object source variable as User::varQuery.
In the Variable Mappings tab, map the collection value of the Script Task to User::QueryStr, and Index to 0.
Inside the Foreach Loop Container, add a Data Flow Task like step 4 in method 1.
Regards,
Mike Yin
TechNet Community Support -
I am trying to compare a DB2 date format to a date variable from SSIS. I have tried to set the variable as datetime and string. I have also casted the SQL date as date in the data flow task. I have tried a number of combinations of date formats, but no luck
yet. Does anyone have any insights on how to set a date (without the time) variable and be able to use it in the data flow task SQL? It has to be an easy way to accomplish that. I get the following error below:
An invalid datetime format was detected; that is, an invalid string representation or value was specified. SQLSTATE=22007".
Thanks!Hi Marcel,
Based on my research, in DB2, we use the following function to convert a string value to a date value:
Date(To_Date(‘String’, ‘DD/MM/YYYY’))
So, you can set the variable type to String in the package, and try the following query:
ACCOUNT_DATE BETWEEN '11/30/2013' AND Date(To_Date(?, ‘DD/MM/YYYY’))
References:
http://stackoverflow.com/questions/4852139/converting-a-string-to-a-date-in-db2
http://www.dbforums.com/db2/1678158-how-convert-string-time.html
Regards,
Mike Yin
TechNet Community Support -
How can you add data from a variable into a column in a data flow?
I need to populate a table with data from a variable. The data type of the variable is String. I'm running into issues doing it the way I am. I have variable
User:VariableName = "Some moderately sized string of data"
When I try to use a Derived Column Transformation Editor to insert the variable into the data flow as a new column, SSIS forces the Data Type to be Unicode String[DT_WSTR] and I can't change it. Additionally the length is 0 and I also can't change that.
When I run the package it errors with a truncation error. If the length is 0 then that makes sense but then why can't I change it to something that makes more sense?
What is the correct way to go about this?Use advanced editor to change data type and length.
http://www.sureshjoshi.com/development/ssis-string-variables-in-derived-columns/ -
In my control flow, I set up a variable for the table name, enumerated by SMO, following the instructions from the link here:
http://www.bidn.com/blogs/mikedavis/ssis/156/using-a-for-each-loop-on-tables-ssis
Now, I put a data flow task inside the foreach. I selected the OLE DB connection manger for my database, set the Data access mode to "Table name or view name variable", and selected my variable name from the drop down. So far so good. When I click on OK,
it gives me an error 0x80040E37, basically saying it can't open the rowset for "my variable", Check that the object exists in the database.
So, I assume I won't be able to do this "that' easily, and I will need to build a "SQL command from variable" or some such thing. Any advice on how to build this Source editor to dynamically name my columns from the variable?
Thanks in advance!
mpleafHi mpleaf,
Please try to set "ValidateExternalData" to False in your OLE DB Source Properties and "DelayValidation" property to TRUE, please refer to similar threads:
http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/620557d9-41bc-4a40-86d5-0a8d2f910d8c/
http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/456f2201-447c-41b3-bf27-b3ba47e6b737
Thanks,
Eileen
Eileen Zhao
TechNet Community Support -
Key Date- Can i define 2 variables
Hi Guru's,
I have a requirement to define 2 variables in Bex- Key date.
I am thankfull for any inputs of how to go about.
Thanks
HariHi,
Here you should have 2 - valid to and 2 - valid from fields in the datatarget .One set of Valid to and valid from fields for Characterstics ZA and another set ofValid to and valid from fields for Characterstics ZB. And then you can use RKF concept to get the required output .
But it is not at all possible throygh Key date as you exepecting. If I remeber correctly Thats what I suggested you in one of the previous threads.
With rgds,
Anil Kumar Sharma .P -
BODI: Is it possible to pass parameter/variable value out of a data flow?
Hi All,
Is it possible to pass parameter value out of a data flow?
I've created a custom function in my query transform to get row count, this value would be used outside the data flow to perform another logic. It looks like I'm unable to modify the output schema at the function in the query transform to explicitly map it to a particular global/local variable.
Any ideas?
Thanks.Any ideas?
-
COMM_SRTUCTURE is uknown when migrating data flow bw 3.x to 7.4
Dear ALL,
2LIS_13_VDHDR data flow migrating 3.x to 7.x , ABAP syntax error COMM_STRUCTURE is unknown infosoure transformation level, present we are using 7.4 sp5 . after migration ABAP code
TYPES:
BEGIN OF _ty_s_TG_1_full,
* InfoObject: 0CHNGID Change Run ID.
CHNGID TYPE /BI0/OICHNGID,
* InfoObject: 0RECORDTP Record type.
RECORDTP TYPE /BI0/OIRECORDTP,
* InfoObject: 0REQUID Request ID.
REQUID TYPE /BI0/OIREQUID,
* InfoObject: 0CALDAY Calendar Day.
CALDAY TYPE /BI0/OICALDAY,
* InfoObject: 0CALMONTH Calendar Year/Month.
CALMONTH TYPE /BI0/OICALMONTH,
* InfoObject: 0CALWEEK Calendar year / week.
CALWEEK TYPE /BI0/OICALWEEK,
* InfoObject: 0FISCPER Fiscal year / period.
FISCPER TYPE /BI0/OIFISCPER,
* InfoObject: 0FISCVARNT Fiscal year variant.
FISCVARNT TYPE /BI0/OIFISCVARNT,
* InfoObject: 0BILLTOPRTY Bill-to party.
BILLTOPRTY TYPE /BI0/OIBILLTOPRTY,
* InfoObject: 0COMP_CODE Company code.
COMP_CODE TYPE /BI0/OICOMP_CODE,
* InfoObject: 0DISTR_CHAN Distribution Channel.
DISTR_CHAN TYPE /BI0/OIDISTR_CHAN,
* InfoObject: 0DOC_CATEG Sales Document Category.
DOC_CATEG TYPE /BI0/OIDOC_CATEG,
* InfoObject: 0PLANT Plant.
PLANT TYPE /BI0/OIPLANT,
* InfoObject: 0SALESORG Sales Organization.
SALESORG TYPE /BI0/OISALESORG,
* InfoObject: 0SALES_GRP Sales group.
SALES_GRP TYPE /BI0/OISALES_GRP,
* InfoObject: 0SALES_OFF Sales Office.
SALES_OFF TYPE /BI0/OISALES_OFF,
* InfoObject: 0SHIP_TO Ship-To Party.
SHIP_TO TYPE /BI0/OISHIP_TO,
* InfoObject: 0SOLD_TO Sold-to party.
SOLD_TO TYPE /BI0/OISOLD_TO,
* InfoObject: 0VERSION Version.
VERSION TYPE /BI0/OIVERSION,
* InfoObject: 0VTYPE Value Type for Reporting.
VTYPE TYPE /BI0/OIVTYPE,
* InfoObject: 0DIVISION Division.
DIVISION TYPE /BI0/OIDIVISION,
* InfoObject: 0MATERIAL Material.
MATERIAL TYPE /BI0/OIMATERIAL,
* InfoObject: 0SHIP_POINT Shipping point.
SHIP_POINT TYPE /BI0/OISHIP_POINT,
* InfoObject: 0PAYER Payer.
PAYER TYPE /BI0/OIPAYER,
* InfoObject: 0DOC_CLASS Document category /Quotation/Order/Deliver
*y/Invoice.
DOC_CLASS TYPE /BI0/OIDOC_CLASS,
* InfoObject: 0DEB_CRED Credit/debit posting (C/D).
DEB_CRED TYPE /BI0/OIDEB_CRED,
* InfoObject: 0SALESEMPLY Sales Representative.
SALESEMPLY TYPE /BI0/OISALESEMPLY,
* InfoObject: 0SUBTOT_1S Subtotal 1 from pricing proced. for condit
*ion in stat. curr..
SUBTOT_1S TYPE /BI0/OISUBTOT_1S,
* InfoObject: 0SUBTOT_2S Subtotal 2 from pricing proced. for condit
*ion in stat. curr..
SUBTOT_2S TYPE /BI0/OISUBTOT_2S,
* InfoObject: 0SUBTOT_3S Subtotal 3 from pricing proced.for conditi
*on in stat. curr..
SUBTOT_3S TYPE /BI0/OISUBTOT_3S,
* InfoObject: 0SUBTOT_4S Subtotal 4 from pricing proced. for condit
*ion in stat. curr..
SUBTOT_4S TYPE /BI0/OISUBTOT_4S,
* InfoObject: 0SUBTOT_5S Subtotal 5 from pricing proced. for condit
*ion in stat. curr..
SUBTOT_5S TYPE /BI0/OISUBTOT_5S,
* InfoObject: 0SUBTOT_6S Subtotal 6 from pricing proced. for condit
*ion in stat. curr..
SUBTOT_6S TYPE /BI0/OISUBTOT_6S,
* InfoObject: 0OPORDQTYBM Open orders quantity in base unit of meas
*ure.
OPORDQTYBM TYPE /BI0/OIOPORDQTYBM,
* InfoObject: 0OPORDVALSC Net value of open orders in statistics cu
*rrency.
OPORDVALSC TYPE /BI0/OIOPORDVALSC,
* InfoObject: 0QUANT_B Quantity in base units of measure.
QUANT_B TYPE /BI0/OIQUANT_B,
* InfoObject: 0DOCUMENTS No. of docs.
DOCUMENTS TYPE /BI0/OIDOCUMENTS,
* InfoObject: 0DOC_ITEMS Number of Document Items.
DOC_ITEMS TYPE /BI0/OIDOC_ITEMS,
* InfoObject: 0NET_VAL_S Net value in statistics currency.
NET_VAL_S TYPE /BI0/OINET_VAL_S,
* InfoObject: 0COST_VAL_S Cost in statistics currency.
COST_VAL_S TYPE /BI0/OICOST_VAL_S,
* InfoObject: 0GR_WT_KG Gross weight in kilograms.
GR_WT_KG TYPE /BI0/OIGR_WT_KG,
* InfoObject: 0NT_WT_KG Net weight in kilograms.
NT_WT_KG TYPE /BI0/OINT_WT_KG,
* InfoObject: 0VOLUME_CDM Volume in cubic decimeters.
VOLUME_CDM TYPE /BI0/OIVOLUME_CDM,
* InfoObject: 0HDCNT_LAST Number of Employees.
HDCNT_LAST TYPE /BI0/OIHDCNT_LAST,
* InfoObject: 0CRM_PROD Product.
CRM_PROD TYPE /BI0/OICRM_PROD,
* InfoObject: 0CP_CATEG Category.
CP_CATEG TYPE /BI0/OICP_CATEG,
* InfoObject: 0FISCYEAR Fiscal year.
FISCYEAR TYPE /BI0/OIFISCYEAR,
* InfoObject: 0BP_GRP BP: Business Partner Group (from Hierarchy).
BP_GRP TYPE /BI0/OIBP_GRP,
* InfoObject: 0STAT_CURR Statistics Currency.
STAT_CURR TYPE /BI0/OISTAT_CURR,
* InfoObject: 0BASE_UOM Base Unit of Measure.
BASE_UOM TYPE /BI0/OIBASE_UOM,
* InfoObject: 0PROD_CATEG Product Category.
PROD_CATEG TYPE /BI0/OIPROD_CATEG,
* InfoObject: 0VOLUME Volume.
VOLUME TYPE /BI0/OIVOLUME,
* InfoObject: 0VOLUMEUNIT Volume unit.
VOLUMEUNIT TYPE /BI0/OIVOLUMEUNIT,
* InfoObject: 0FISCPER3 Posting period.
FISCPER3 TYPE /BI0/OIFISCPER3,
* InfoObject: 0SALES_DIST Sales District.
SALES_DIST TYPE /BI0/OISALES_DIST,
* InfoObject: 0BILL_TYPE Billing type.
BILL_TYPE TYPE /BI0/OIBILL_TYPE,
* InfoObject: 0MOVE_PLANT Receiving Plant/Issuing Plant.
MOVE_PLANT TYPE /BI0/OIMOVE_PLANT,
* InfoObject: 0SHIP_COND Shipping conditions.
SHIP_COND TYPE /BI0/OISHIP_COND,
* InfoObject: 0AB_RFBSK Status for Transfer to Accounting.
AB_RFBSK TYPE /BI0/OIAB_RFBSK,
* InfoObject: 0AB_FKSTO Indicator: Document Is Cancelled.
AB_FKSTO TYPE /BI0/OIAB_FKSTO,
* InfoObject: 0CUST_GRP5 Customer Group 5.
CUST_GRP5 TYPE /BI0/OICUST_GRP5,
* InfoObject: ZCU_COND1 Constomer Condition Group 1.
/BIC/ZCU_COND1 TYPE /BIC/OIZCU_COND1,
* InfoObject: ZCU_COND2 Customer Condition Group 2.
/BIC/ZCU_COND2 TYPE /BIC/OIZCU_COND2,
* InfoObject: ZBATCHCD Batch Code.
/BIC/ZBATCHCD TYPE /BIC/OIZBATCHCD,
* InfoObject: 0BATCH Batch number.
BATCH TYPE /BI0/OIBATCH,
* InfoObject: ZBATCH Batch number.
/BIC/ZBATCH TYPE /BIC/OIZBATCH,
* Field: RECORD Data record number.
RECORD TYPE RSARECORD,
END OF _ty_s_TG_1_full.
* Additional declaration for update rule interface
DATA:
MONITOR type standard table of rsmonitor WITH HEADER LINE,
MONITOR_RECNO type standard table of rsmonitors WITH HEADER LINE,
RECORD_NO LIKE SY-TABIX,
RECORD_ALL LIKE SY-TABIX,
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS.
* global definitions from update rules
* TABLES: ...
DATA: IN TYPE F,
OUT TYPE F,
DENOM TYPE F,
NUMER TYPE F.
* Def. of 'credit-documents': following doc.categ. are 'credit docs'
* reversal invoice (N)
* credit memo (O)
* internal credit memo (6)
* Credit-documents are delivered with negative sign. Sign is switched
* to positive to provide positive key-figures in the cube.
* The combination of characteristics DE_CRED and DOC-CLASS provides
* a comfortable way to distinguisch e.g. positive incoming orders or
* order returns.
* Def. der 'Soll-Dokumente': folgende Belegtypen sind 'Soll-Belege'
* Storno Rechnung (N)
* Gutschrift (O)
* Interne Verrechn. Gutschr. (6)
* Soll-Dokumente werden mit negativem Vorzeichen geliefert. Um die Kenn-
* zahlen positiv in den Cube zu schreiben, wird das Vorzeich. gedreht
* Die Kombination der Merkmale DEB_CRED und DOC-CLASS gibt Ihnen die
* Möglichkeit schnell z.B. zwischen Auftrags-Eingang oder Retouren zu
* unterscheiden.
DATA: DEB_CRED(3) TYPE C VALUE 'NO6'.
FORM routine_0002
TABLES
P_MONITOR structure rsmonitor
CHANGING
RESULT TYPE _ty_s_TG_1_full-DOCUMENTS
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.
* init variables
* fill the internal table "MONITOR", to make monitor entries
CLEAR RESULT.
RESULT = COMM_STRUCTURE-NO_INV.
IF COMM_STRUCTURE-DOC_CATEG CA DEB_CRED.
RESULT = RESULT * ( -1 ).
ENDIF.
RETURNCODE = 0.
p_monitor[] = MONITOR[].
CLEAR:
MONITOR[].
ENDFORM. "routine_0002
FORM routine_0003
TABLES
P_MONITOR structure rsmonitor
CHANGING
RESULT TYPE _ty_s_TG_1_full-DEB_CRED
RETURNCODE LIKE sy-subrc
ABORT LIKE sy-subrc
RAISING
cx_sy_arithmetic_error
cx_sy_conversion_error.
* init variables
* fill the internal table "MONITOR", to make monitor entries
IF COMM_STRUCTURE-DOC_CATEG CA DEB_CRED.
RESULT = 'C'.
ELSE.
RESULT = 'D'.
ENDIF.
RETURNCODE = 0.
p_monitor[] = MONITOR[].
CLEAR:
MONITOR[].
ENDFORM.
Error:
E:Field "COMM_STRUCTURE-NO_INV" is unknown. It is neither in one of the
specified tables nor defined by a "DATA" statement. "DATA" statement.
communication structure chaged to sours fields but no uses , please suggest how can i proceed , Thanks in Advance immediate replay
Thanks & Regards
Ramesh GHi Gareth,
You have two options:
1. Transport from BW 3.1 to BI 7.0. You'll need to create a transport route between both systems. This may cause you some troubles in the future when you want to modify the objects you transported.
2. As there are few objects, you can use XML export utility from Transport connection. There, you make an XML file with the objects you need to transport. One thing that you may take care of, in this option, is that the business content objects you are exporting need to be activated in the destination system. Another problem is that querys are not exported.
Since it's only a cube, maybe you can create the objects manually. Look that in BI 7.0 there are several new functionalities, i don't know how transport or xml export would work.
Hope this helps.
Regards,
Diego -
While working on my current project, a problem came to mind.
On past projects in SSIS, I was taking data from an Excel or csv source and converting for use in SSMS. Straightforward and fairly simple, as I became more and more acquainted with SSIS.
But, the stored procedure I'm working on now raised a question on how data flows through a project.
The procedure updates a couple of tables using SQL's UPDATE command. So, it does a direct modification of a table.
However, in duplicating that in SSIS - using Derived Column tools - I started to wonder what the data was doing as the flow progressed through the various steps in the Control and Data flows.
Here's my Control Flow so far;
In Step 1, the SQL table, sh1, has all records that meet the WHERE criteria of the embedded SQL code deleted, but leaving the rest of the table intact.
In Step 2, I define a variable for use in the project using an embedded SQL query.
In Step 3, I encounter the first update task;
This flow terminates in the lower right corner with Update sh1, Pass 4. Here is where I have my question.
When this flow terminates, does it return to the Control Flow with the table sh1 updated as required by the
Update sh1 Data Flow? In other words, does it enter Control Flow Step 4 with the updates, or does the next update task (one in which the stored procedure uses the modified table, sh1) simply reload sh1 from the server, without any updates?
If the former, then no worries, as that's how I was proceeding until a little bug in my ear said, "Whoa, buckwheat! Maybe the changes aren't stored."
If the latter, then I'm guessing that I need to have a Data Flow Destination tool dragged to the workspace and connected up to the output of the
Update sh1, Pass 4 tool.
Fine, I thought, I'll direct the output to the sh1 table.
But, that will put all of sh1 into the table, not just the updated rows. I'd have to TRUNCATE sh1 first. But, sh1 is active in the Data Flow. If I truncate it, there'll be nothing to update. Or, if I truncate it after the
Update sh1, Pass 4 tool, it'll lose all the updates - and everything else.
I figured that, in the latter case, I'd have to have some sort of interim table to hold the results of the
Update sh1 Data Flow, truncate sh1 and then put the contents of the interim table into the, now empty, sh1 before returning control back to the Control Flow.
I'd like to avoid an interim table, if at all possible, but if I have to have one, I have to.
Or, is there another way?
Thanx in advance for any help!You can always use a Record-Set Destination to hold the results from your first Data Flow Transformation. The record set variable is retained in memory and available within the context of your package
Object Variables Recordsets
But then you need to modify your package to read from the record set. you can either use a script task , or loop through each record in your record set and process the updates for each row
Shredding Record Set
While these are possible options, i do not think they are the best way to go about things.
I would like to know what you are doing in the Update Sh2 Step. You can keep adding data flows that follows Update sh1 Pass 4 and then finally update the table through an OLE DB Command transformation. then you do not have to store anything in memory. but
you might probably end up with a complex data flow transformation.
The design will depend on the volume of records, the number of transformations you want the data to go through.
You can avoid transformations by writing queries that retrieve results in the way you want. Example Sorting the results by adding an Order by in your Source query, as opposed to adding a sort transformation
Regards, Dinesh -
Display Data Flow - Short Dump
Hi all,
When i select display data flow of any cube...it is going for a short dump.
I have searched for the answer in previous Forum questions. I could find only for previous BW versions but not for for BI7.
Could you please let me know the solution for this issue.
Thanks & Regards,
EswariHi All,
Thank you very much for all of your responces.....
I am working on Support Package 10.
Here is the detailed description of the short dump.
Short text
The current application triggered a termination with a short dump.
What happened?
The current application program detected a situation which really
should not occur. Therefore, a termination with a short dump was
triggered on purpose by the key word MESSAGE (type X).
What can you do?
Note down which actions and inputs caused the error.
To process the problem further, contact you SAP system
administrator.
Using Transaction ST22 for ABAP Dump Analysis, you can look
at and manage termination messages, and you can also
keep them for a long time.
Error analysis
Short text of error message:
GP: Control Framework returned an error; contact system administrator
Long text of error message:
Diagnosis
The Graphical Framework is based on the basis technology known as
the Control Framework. A method in the Control Framework returned
an error.
Procedure
It probably involves a programming error. You should contact your
system administrator.
Procedure for System Administration
Check the programming of the graphics proxy especially for the
parameters that were sent and, if necessary, correct your program.
Technical information about the message:
Message class....... "APPLG"
Number.............. 229
Variable 1.......... " "
Variable 2.......... " "
Variable 3.......... " "
Variable 4.......... " "
How to correct the error
Probably the only way to eliminate the error is to correct the program.
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"MESSAGE_TYPE_X" " "
"CL_AWB_OBJECT_NET_SAPGUI======CP" or "CL_AWB_OBJECT_NET_SAPGUI======CM005"
"PBO"
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".
4. Details about the conditions under which the error occurred or which
actions and input led to the error.
Thanks,
Eswari. -
Data flow fails on packed decimal field moving iSeries DB2 data from one iSeries DB to another
I' trying to use SSIS to move table content from one iSeries DB2 database to another. I'm using the .Net providers for OleDb\IBM DB2 for i5/OS IBMDA400 OLE DB Provider in the connection managers for the source and destination and the test connection
works fine. When I try to run the data flow task however it fails on the first packed decimal field it encounters with the exceptions ...
[select from hydro520 hydroweb2 blpmstr [16]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "component "select from hydro520 hydroweb2 blpmstr" (16)" failed because error code 0x80004002 occurred, and the error
row disposition on "output column "MSPRIB" (55)" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.
[select from hydro520 hydroweb2 blpmstr [16]] Error: The component "select from hydro520 hydroweb2 blpmstr" (16) was unable to process the data. Pipeline component has returned HRESULT error code 0xC0209029 from a method call.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "select from hydro520 hydroweb2 blpmstr" (16) returned error code 0xC02090F5. The component returned a failure code when the pipeline
engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.
...in the progress tab. Can someone kindly tell me what I need to do to get the connection manager to work with DB2 packed decimal fields? Or is it a different issue all together? Thanks tonnes for any help, RoscoeHi rpfinn,
From the Data Types mapping rules between SSIS and DB2, we can see that both the NUMERIC and DECIMAL data types in DB2 are mapped to DT_NUMBERIC data type in SSIS. Now that the source data in your DB2 database is NUMERIC data type, changing the DT_NUMBRIC
data type to DT_DECIMAL is invalid. Besides, if we check the data types of the target External column and Output column from the Advanced Editor for ADO NET Source adapter, the data type should be defined as DT_NUMERIC with Precision as 9 and Scale as 2. I
am not clear where you see the DT_NUMBERIC(9,0) e.g. DT_NUMERIC with Precision as 9 and Scale as 0, but it may be the cause of the issue. You need to make sure the DT_NUMERIC data type also has Scale 2 instead of 0.
If you don’t know how to modify the data type, please elaborate the Data Flow Task of the package so that we can make further analysis. Besides, the error messages you posted are incomplete, it will be helpful if you post the complete error message.
Regards,
Mike Yin
If you have any feedback on our support, please click
here
Mike Yin
TechNet Community Support -
I have created a execut sql task -
In that, i have a created a 'empidvar' variable of string type and put sqlstatement = 'select distinct empid from emp'
Resultset=resultname=0 and variablename=empidvar
I have added data flow task of ole db type and I put this sql statement under sql command - exec emp_sp @empidvar=?
I am getting an error.
[OLE DB Source [1]] Error: A rowset based on the SQL command was not returned by the OLE DB provider.
[SSIS.Pipeline] Error: component "OLE DB Source" (1) failed the pre-execute phase and returned error code 0xC02092B4.shouldnt setting be Result
Set=Full Resultset as your query returns a resultset? also i think variable to be mapped should be of object type.
Then for data flow task also you need to put it inside a ForEachLoop based on ADO.NET recordset and map your earlier variable inside it so as to iterate for every value the sql task returns.
Also if using SP in oledb source make sure you read this
http://consultingblogs.emc.com/jamiethomson/archive/2006/12/20/SSIS_3A00_-Using-stored-procedures-inside-an-OLE-DB-Source-component.aspx
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
How can I fix consistent TCP timeout and make data flow simpler?
Hi!
I'm acquiring data from a Scanivalve Digital Scanning Array through a TCP/IP connection. I'm having problems with the connection timing out regularly. It will run fine if you take data several times in a row, but if the VI sits for several minutes (while looking at previous data runs or adjusting test setup) the connection will timeout the next time you try to take data. The subVIs (reading the tcp connection, processing the data pakcet, etc) were provided by the manufacturer several years ago. The midlevel VI were written by another engineer, and I adapted them to run with the top level VI that I needed for this test. The data flow in the VIs are convoluted and while I can follow the ones t
hat I wrote, I'm not sure how to troubleshoot the others.
I posted a question on an unrelated problem and the responses mentioned that race conditions were going to be a problem b/c of all of the global variables.
Please be patient with my lack of knowledge in some areas. Any help would be appreciated.
Thanks so much!
-Sarah
Engineering intern
Techsburg, Inc.
Attachments:
DSA_Acquistion_VIs.zip 253 KBI'm not positive about the best solution in this situation, but there is lots of information available regarding error 56 when using TCP/IP communication.
You might find some of these useful:
Error 56 Occurred at TCP Open: Windows XP Fails as TCP/IP Server with LabVIEW 6.1.
Error 56 Occurs When Using TCP Listen.vi
TCP/IP Error Codes and Related Time-out Issues in LabVIEW -
Foreach Loop Container with a Data Flow Task looking for file from Connection Manager
So I have a Data Flow Task within a Foreach Loop Container. The Foreach Loop Container has a Variable Mapping of User:FileName to pass to the Data Flow Task.
The Data Flow Task has a Flat File Source since we're looking to process .csv Files. And the Flat File Source has a Flat File Connection Manager where I specified the File name when I created it. I thought you needed to do this even though it won't really
use it since it should be getting its File name from the Foreach Loop Container. But when attempting to execute, it is blowing up because it seems to be looking for my test file name that I indicated in the Flat File Connection Manager rather than the file
it should be trying to process in User:FileName from the Foreach Loop Container.
What am I doing wrong here??? I thought you needed to indicate a File name within the Flat File Connection Manager even though it really won't be using it.
Thanks for your review...I hope I've been clear...and am hopeful for a reply.
PSULionRPThe Flat File Connection manager's Connection String needs to be set to reference the variable used in the ForEach Loop:
Arthur My Blog -
SSIS Data Flow task using SharePoint List Adapter Setting SiteUrl won't work with an expression
Hi,
I'm trying to populate the SiteUrl from a variable that has been set based on a query to a SQL table that has a URL field. Here are the steps I've taken and the result.
Created a table with a url in it to reference a SharePoint Task List.
Created a Execute SQL Task to grab the url putting the result set in a variable called SharePointUrl
Created a For Each container and within the collection I use the SharePointUrl as the ADO object source variable and select rows in the first table.
Still in the For Each container within the Variable mappings I have another Package Variable called PassSiteUrl2 and I set that to Index 0 or the value of the result set.
I created a script task to then display the PassSiteUrl2 variable and it works great I see my url
This is where it starts to suck eggs!!!!
I insert a Data Flow Task into my foreach loop.
I Insert a SharePoint List Adapter into my Data Flow
Within my SharePoint List Adapter I set my list to be "Tasks", My list view to be "All Tasks" and then I set the url to be another SharePoint site that has a task list just so there is some default value to start with.
Now within my Data Flow I create an expression and set the [SharePoint List Source].[SiteUrl] equal to my variable @[User::PassSiteUrl2].
I save everything and run my SSIS package and it overlays the default [SharePoint List Source].[SiteUrl] with blanks in the SharePoint List Adapter then throws the error that its missing a url
So here is my question. Why if my package variable displays fine in my Control Flow is it now not seen or seen as blanks in the Data Flow Expression. Anyone have any ideas???
Thanks
Donald R. LandryThanks Arthur,
The scope of the variable is at a package level and when I check to see if it can be moved Package level is the highest level. The evaluateasexpression property is set to True. Any other ideas?
I also tried to do the following. Take the variable that has the URL in it and just assign it to the description of the data flow task to see if it would show up there (the idea being the value of my @[User::PassSiteUrl] should just show in the
description field when the package is run. That also shows up blank.
So i'm thinking its my expression. All I do in the expression is set [SharePoint List Source].[SiteUrl] equal to @[User::PassSiteUrl] by dragging and dropping the variable into the expression box. Maybe the expression should be something
else or is their a way to say @[User::PassSiteUrl] = Dts.Variables("User::PassSiteUrl2").Value.ToString()
In my script task I use Dts.Variables("User::PassSiteUrl2").Value.ToString() to display
the value in the message box and that works fine.
Donald R. Landry
Maybe you are looking for
-
I can, connect my ipad to get mail
I can't configure my ipad to work with yahoo mail
-
Modify the content of a table inside function module
if line_bill-cust_no = line_cust-cust_no. line_cust-tot_amt = line_cust-tot_amt + line_bill-bill_amt. MODIFY it_cust1 FROM line_cust transporting tot_amt WHERE cust_no = line_bill-cust_no. inside the function module in se 37 i am getting an
-
Issue with site load time when exported as HTML. Addressed?
Has the issue with website load time been addressed? I believe the site attempts to load the entire image content at the initial visit - meaning any galleries with numerous pictures are all included when first getting to the site. This is causing a H
-
Diffrence between exit_command and user_command
hi all. can any one tell me the diffrence between MODULE exit_command_100 AT EXIT-COMMAND. and MODULE user_command_100.
-
Hi, It would be great if the Discussion Forum software is able to send a notification/mail once a new topic is posted in a particular forum. It reduces the need to traverse the forums and check each forum for new topics. Elango.