Reading data from dynamically from different file.
Is there any function moudle or class to read data from a file in application layer, whoes structure is changing dynamically.
Urgent....... Can any one help me out in this......
Thanks in advance....
Thanks,
feroz.
Hi Feroz,
Do u mean that structure of the file on the application server is changing dynamically.
The following is the FM to read data from a file on Application Server.
OPEN DATASET FNAME FOR INPUT in text mode encoding default.
LOOP AT TAB INTO WA.
READ DATASET FNAME INTO WA.
IF SY-SUBRC 0.
EXIT.
ENDIF.
WRITE: / WA-COLUMN1, WA-COLUMN2.
ENDLOOP.
This is the FM to search the file on Application Server.
F4_DXFILENAME_TOPRECURSION
Regards,
Sai
Edited by: Sai Krishna Kowluri on Jul 15, 2008 9:45 AM
Similar Messages
-
How to read data simultaneo​usly from different cdaq modules?
Is there a way to synchronize input from separate cdaq modules?
I need to read a voltage on an NI-9219 analog input channel and a
frequency on an NI-9211 channel. As far as I can tell a single "task" can
only read input from channels on one module. Is there a way to build a task that reads data from multiple modules?
Seems to me that buffered input is useless when multiple tasks are employed. With multiple tasks you get arrays of data that are sequential, not simultaneous. Is this correct? I'm thinking that the only way to
get synchronized readings is to read each channel individually inside a
loop. But this restricts the program to low speed data
acquisition with measurements that are spaced unevenly. Right?
I want to create a data file with three columns: time, voltage,
frequency. What's the best way to get these readings at the same
instant?
Referrence to a help document or tutorial would be great.
thanks!Synchronizing measurements of different types using separate cDAQ modules can be done by making sure that the physical channels for each module IO control are selected (and separated by commas). Please review the following Developer Zone article illustrating how this can be accomplished. Cheers
1. NI-DAQmx: NI CompactDAQ Module Synchronization: http://zone.ni.com/devzone/cda/epd/p/id/5259
Regards,
Ali M
Applications Engineer
National Instruments -
How to read data using SQLGetData from a block, forward-only cursor (ODBC)
Hi there. I am trying to read data a small number of rows of data from either a Microsoft Access or Microsoft SQL Server (whichever is being used) as quickly as possible. I have connected to the database using the ODBC API's and have run a select
statement using a forward-only, read-only cursor. I can use either SQLFetch or SQLExtendedFetch (with a rowset size of 1) to retrieve each successive row and then use SQLGetData to retrieve the data from each column into my local variables. This
all works fine.
My goal is to see if I can improve performance incrementally by using SQLExtendedFetch with a rowset size greater than 1 (block cursor). However, I cannot figure out how to move to the first of the rowset returned so that I can call SQLGetData to retrieve
each column. If I were using a cursor type that was not forward-only, I would use SQLSetPos to do this. However, using those other cursor types are slower and the whole point of the exercise is to see how fast I can read this data. I can
successfully read the data using a block forward only cursor if I bind each column to an array in advance of the call to SQLExtendedFetch. However, that has several drawbacks and is documented to be slower for small numbers of rows. I really
want to see what kind of speed I can achieve using a block, forward-only, read-only cursor using SQLGetData to get each column.
Here is the test stub that I created:
' Create a SELECT statement to retrieve the entire collection.
selectString = "SELECT [Year] FROM REAssessmentRolls"
' Create a result set using the existing read/write connection. The read/write connection is used rather than
' the read-only connection because it will reflect the most recent changes made to the database by this running
' instance of the application without having to call RefreshReadCache.
If (clsODBCDatabase.HandleDbcError(SQLAllocStmt(gDatabase.ReadWriteDbc, selectStmt), gDatabase.ReadWriteDbc, errorBoxTitle) <> enumODBCSQLAPIResult.SQL_SUCCESS) Then
GoTo LoadExit
End If
Call clsODBCDatabase.HandleStmtError(SQLSetStmtOption(selectStmt, SQL_CONCURRENCY, SQL_CONCUR_READ_ONLY), selectStmt, errorBoxTitle)
Call clsODBCDatabase.HandleStmtError(SQLSetStmtOption(selectStmt, SQL_CURSOR_TYPE, SQL_CURSOR_FORWARD_ONLY), selectStmt, errorBoxTitle)
Call clsODBCDatabase.HandleStmtError(SQLSetStmtOption(selectStmt, SQL_ROWSET_SIZE, MAX_ROWSET_SIZE), selectStmt, errorBoxTitle)
If (clsODBCDatabase.HandleStmtError(SQLExecDirect(selectStmt, selectString, Len(selectString)), selectStmt, errorBoxTitle) <> enumODBCSQLAPIResult.SQL_SUCCESS) Then
GoTo LoadExit
End If
' Cursor through result set. Each time we fetch data we get a SET of rows.
sqlResult = clsODBCDatabase.HandleStmtError(SQLExtendedFetch(selectStmt, SQL_FETCH_NEXT, 0, rowsFetched, rowStatus(0)), selectStmt, errorBoxTitle)
Do While (sqlResult = enumODBCSQLAPIResult.SQL_SUCCESS)
' Read all rows in the row set
For row = 1 To rowsFetched
If rowStatus(row - 1) = SQL_ROW_SUCCESS Then
sqlResult = clsODBCDatabase.HandleStmtError(SQLSetPos(selectStmt, row, SQL_POSITION, SQL_LOCK_NO_CHANGE), selectStmt, errorBoxTitle)
Call clsODBCDatabase.SQLGetShortField(selectStmt, 1, assessmentRollYear(row - 1))
Console.WriteLine(assessmentRollYear(row - 1).ToString)
End If
Next
' If the rowset we just retrieved contains the maximum number of rows allowed, there could be more data.
If rowsFetched = MAX_ROWSET_SIZE Then ' there could be more data
sqlResult = clsODBCDatabase.HandleStmtError(SQLExtendedFetch(selectStmt, SQL_FETCH_NEXT, 0, rowsFetched, rowStatus(0)), selectStmt, errorBoxTitle)
Else
Exit Do ' no more rowsets
End If
Loop ' Do While (sqlResult = enumODBCSQLAPIResult.SQL_SUCCESS)
The test fails on the call to SQLSetPos. The error message I get is "Invalid cursor position; no keyset defined". I have tried passing SET_POSITION and also SET_REFRESH. Same error. There has to be a way to do this!
Thank you for your help!
Thank You! - AndyHi Apelkey,
Thank you for your question.
I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.
Thank you for your understanding and support.
Regards,
Charlie Liao
TechNet Community Support -
Email notification from Dynamic 'From' address
Hi,
Can we send emails using Email activity from a dynamic 'From' address? i.e. based on value of a BPEL variable?
I have tried this but always taking from the default From account defined in the Workflow Notification Properties under SOA-Infra-> SOA Admin in Eneterprise Manager.
All receipients (To, cc, Bcc) are working fine as dynamic. but not this 'From'.
Please let me know if we can't send email from a dynamic From Address?
Regards,
Sam
Edited by: Sam on Mar 13, 2012 5:58 AMSam,
I don't think we can do that.
I have tried it in the latest version too, but there is no scope to send any email dynamically.
The only thing we can do is chande manually, else tweak the WebLogic portal Java Api and get it changed.
Later one is a bit complex.
Thanks,
TIrumala Dixit. -
Reading date/time type from Microsoft Access in LabWindows 7.1
Hi,
I'm afraid I'm having some trouble reading some date information from an MS Access table. I assume it's returned as a string (and this may be my first mistake) but when I use DBBindColChar I just get garbage information. This is the code I'm using:
sprintf(queryString, "SELECT date_time, type, serial_number, Voltage_at_G5_V, Voltage_at_G6_V \
FROM gain \
WHERE serial_number=%lf \
ORDER by date_time", *serialNumber);
followed by...
queryHandle = DBActivateSQL (pmtDataHandle, queryString);
and....
resCode = DBBindColChar (queryHandle, 1, 22, internal_date, &dateStatus, "");
resCode = DBBindColChar (queryHandle, 2, 4, internal_type, &typeStatus, "");
resCode = DBBindColDouble (queryHandle, 3, internalSerialNumber, &serialNumberStatus);
resCode = DBBindColDouble (queryHandle, 4, &g5VRead, &g5VStatus);
resCode = DBBindColDouble (queryHandle, 5, &g6VRead, &g6VStatus);
Is there anything special about the type date/time that I am not taking care of? All of the other columns read back fine....
Thanks in advance
Message Edited by acrmartin on 02-23-2006 02:59 PMHello,
Just copy and paste the contents to a new post - that will do it
Best Regards,
JLS
Best,
JLS
Sixclear -
Read data with spreadsheet in different formats
Hi all,
I have to read these data table using the VI Read From Spreadsheet File of .dat file:
377.88 6.326826E+03 2.024894E+03 253.794
377.89 6.328341E+03 2.026409E+03 253.984
377.90 6.329855E+03 2.027923E+03 254.173
377.91 6.331370E+03 2.029438E+03 254.363
377.88 6.326826E+03 2.024894E+03 253.794
377.89 6.328341E+03 2.026409E+03 253.984
377.90 6.329855E+03 2.027923E+03 254.173
377.91 6.331370E+03 2.029438E+03 254.363
Note that we have two differents formats: float and scientific notation, then i tried with %#g for example, but i can' t read, only i read the first colum.
Could u help me plz?
CésarNot sure, but it may be the delimiters you are using in your file. Can you attach part of one of your data files? What are you using as a "delimiter" between the values? If you copy the text and paste in to a string control or indicator you can then right click on it and select "\" Codes Display to see what characters are used. Also the end of line character needs to be examined. The "Read from spreadsheet" expects carriage return, newline displayed as \r\n in the above way. It (the read from spreadsheet vi) does have a terminal that allows you to specify the EOL as well as the "delimiter". It expects tabs "\t" so if you have spaces "\s" it won't differentiate between groups on a line, which would give you only the first column.
Putnam
Certified LabVIEW Developer
Senior Test Engineer
Currently using LV 6.1-LabVIEW 2012, RT8.5
LabVIEW Champion -
Why some columns are not read into Power Pivot when reading data from a SQL query
I have this SQL query that I want to use to read data to PowerPivot from:
SELECT Score.FieldCount as fieldcount, Score.Record.GetAt(0) as predicted_gender, Score.Record.GetAt(1) as probability_of_gender, Score.Record.GetAt(2)
as probability_of_m,
Score.Record.GetAt(3) as probability_of_f, Score.Record.GetAt(4) as customerkey
FROM
SELECT * FROM dbo.myCLR1(
dbo.MyCLR2('c:\fILES\MLSM.xml'),
'SELECT * FROM [dbo].[Customer]') Input
) Score
After I click 'Finish' in "Table Import Wizard", I can only get 1 column (FieldCount) in Power Pivot window. Why don't I get the other 4 columns? If I save the result to a table I do get all columns but my goal is to dynamically present the result
so that's not an option. Can anyone shed some light?
Thanks,
Chu
-- Predict everything. http://www.predixionsoftware.comIf I only pass in query as
SELECT * FROM dbo.myCLR1(
dbo.MyCLR2('c:\fILES\MLSM.xml'),
'SELECT * FROM [dbo].[Customer]') Input
I do get 2 columns (FieldCount and Record as shown below)
-- Predict everything. http://www.predixionsoftware.com -
Read and write Values from Configuration File in BizTalk
There is a requirement where Biz talk orchestration read the value dynamically from Config Store.After some process updating the value in config store.
I though to use SQL Server and create one table with single column.Biztalk will call the Storeproc to get the value and similary for update system will call another SP.
Instead of using SQL Server DB is there option to implement this requirement like app.config,BTSsvcxxexe.config ,SSO Config store etc.
If multi-users access the value from Config store and try to update ,how to handle lock mechanism.Hi BizQ,
Refrain from using BTSConfig file or any custom config file if you have a requirement to update the data. Modifying a
configuration file at runtime can cause some nasty, unexpected behavior inside your application if it's not managed properly.
I would suggest you to use Custom DB or SSO Database in this case.
Both have their Pros and Cons.
SSO Database:
You get out of the box encryption
It is a central store which will service all BizTalk servers within your group
SSO implements a caching mechanism internally for the data
Custom DB:
By storing the configuration in the database you don’t have to worry about consistency of data across servers like you would with a config file.
Cache needs to be implemented by program to avoid delays in reading from physical file.
In your case I recommend to go with SSO DB as in terms of storing custom configuration data in SSO for End Point/Application
specific information and credentials and potentially configuration information which you also need to write and update at runtime from your code or via an administrator.
You can use Richard Seroter's tool to store values as "Config Store" in SSO database and then write a .net helper
utility to retrieve it using SSOConfigStore class. It has method GetConfigInfo and you need to pass application name with other parameters. It returns ConfigurationPropertyBag from where you can read property name and values.
http://seroter.wordpress.com/2007/09/21/biztalk-sso-configuration-data-storage-tool/
http://blogs.msdn.com/b/teekamg/archive/2009/08/19/sso-configuration-application-mmc-snap-in.aspx.
Rachit
Please mark as answer or vote as helpful if my reply does -
Reading data from DLL in ABAP ?
Hi PPl,
Is it possible to read data in ABAP from DLL , if yes how??
thanks ,
sachinsee whether this can help u
Re: How to call a FrontEnd DLL in ABAP Program -
hi all,
i want to read data of mkpf from a remote client (clnt 1) any idea how to do tht?
points would be rewarded.
rgdsSure, just use an RFC destination, and the function module in this example. If the client would be in the same instance, then you could simply do SELECT and specify the MANDT in the WHERE clause, but if you are going across systems, then this function will help. You can create RFC destinations in SM59, but you should probably get with your basis people before doing so.
report zrich_0001.
data: opt type table of rfc_db_opt with header line.
data: fld type table of rfc_db_fld with header line.
data: tab type table of tab512 with header line.
parameters: p_matnr type mard-matnr,
p_werks type mard-werks,
p_lgort type mard-lgort.
fld-fieldname = 'LABST'.
append fld.
concatenate 'MATNR' '=' p_matnr into opt-text separated by space.
append opt.
concatenate 'and' 'WERKS' '=' p_werks into opt-text separated by space.
append opt.
concatenate 'and' 'LGORT' '=' p_lgort into opt-text separated by space.
append opt.
call function 'RFC_READ_TABLE'
exporting
query_table = 'MARD'
* DELIMITER = ' '
* NO_DATA = ' '
* ROWSKIPS = 0
* ROWCOUNT = 0
tables
options = opt
fields = fld
data = tab
exceptions
table_not_available = 1
table_without_data = 2
option_not_valid = 3
field_not_valid = 4
not_authorized = 5
data_buffer_exceeded = 6
others = 7.
write:/ tab.
Regards,
Rich Heilman -
Write data to SharePoint from embeded Flex swf
I am trying to integrate Flex 3 applications into SharePoint 2007 environment which would allow our users to read/write/delete data from SharePoint using an embeded Flex app inside SharePoint. While the article from matthew.meier on "Adding Event Driven Flex Components to Microsoft Sharepoint 2007" is great and another article by Serge van den Oever on "Use Flex to retrieve data from a SharePoint list" is fantastic, they neither touch the topics of writing or inserting data into SharePoint. My goal is to create a two-way communication between Flex and SharePoint to dynamically pull (read) data into Flex from SharePoint lists, etc via GUID or other method AND to also write or update SharePoint from a front-end Flex inside SharePoint.
I have been working on a solution which appears like it would work, but I am getting errors. The source code and examples are found on Code Project http://www.codeproject.com/KB/aspnet/FlexASPWebService.aspx?msg=3270246#xx3270246xx This Flex/ASP example uses a web service to communicate to a SQL database. Flex makes a web service call to the .asmx file via WSDL and the magic happens. I am running into a roadblock as I receive an error that the app cannot find the WSDL. I have tried to run the same WSDL URL in a browser and I get an server application error.
I also tried a solution found at http://shardulbartwal.wordpress.com/2008/03/20/import-web-servicewsdl-wizard-in-flex-30/ to load the WSDL file directly into Flex, but I ran into another roadblock. When I get to this step below Flex gives an error that it cannot find the WSDL file either…
Here is the WebService call from Flex…
The files from Code Project contain a directory structure as such:
TestWebService\Service.asmx
TestWebService\Web.config
TestWebService\App_Code
TestWebService\App_Code\Service.cs
TestWebService\App_Data
The Service.cs file is inside the App_Code directory and is referenced from the Service.asmx file with this code:
My Flex file calls the Service.asmx?WSDL which then calls the file Service.cs and then it breaks.
The Code for the Flex file is as follows…
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
private function init():void {
// Get Data from WebService and fill datagrid when you fist invoke the application
ws.GetEmployees();
private function GetEmployees(event:ResultEvent):void {
// Databind data from webservice to datagrid
datagrid.dataProvider = event.result;
private function SaveEmployee(event:ResultEvent):void {
// To Refresh DataGrid;
ws.GetEmployees();
Alert.show("Saved Successfully");
private function AddRecord(event:MouseEvent):void {
// Save a record using a WebService method
ws.SaveEmployee(txtEmpId.text, txtEmpName.text, txtEmpEmail.text); //
private function fault(event:FaultEvent):void {
// Oppps some error occured
Alert.show(event.toString());
]]>
</mx:Script>
<!-- WebService definition -->
<mx:WebService id="ws" wsdl="http://localhost/TestWebService/Service.asmx?WSDL" fault="fault(event)">
<mx:operation
name="GetEmployees"
resultFormat="object"
result="GetEmployees(event)"
/>
<mx:operation
name="SaveEmployee"
resultFormat="object"
result="SaveEmployee(event)"
/>
</mx:WebService>
<mx:Panel x="41.5" y="66" width="714.5" height="237" layout="absolute" title="ASP.NET WebService + Flex Demonstration">
<mx:HBox height="95%" width="95%" horizontalCenter="0" verticalCenter="0">
<mx:DataGrid id="datagrid" width="465" height="100%">
<mx:columns>
<mx:DataGridColumn headerText="Emp Id" dataField="EmpId"/>
<mx:DataGridColumn headerText="Emp Name" dataField="EmpName"/>
<mx:DataGridColumn headerText="Emp Email" dataField="EmpEmail"/>
</mx:columns>
</mx:DataGrid>
<mx:Form x="608" y="74" width="100%" height="100%" borderStyle="solid">
<mx:FormItem label="EmpId">
<mx:TextInput width="106" id="txtEmpId"/>
</mx:FormItem>
<mx:FormItem label="EmpName">
<mx:TextInput width="106" id="txtEmpName"/>
</mx:FormItem>
<mx:FormItem label="EmpEmail">
<mx:TextInput width="106" id="txtEmpEmail"/>
</mx:FormItem>
<mx:FormItem width="156" horizontalAlign="right">
<mx:Button label="Add" id="btnAdd" click="AddRecord(event)"/>
</mx:FormItem>
</mx:Form>
</mx:HBox>
</mx:Panel>
</mx:Application>
The Flex app error states it cannot locate the WSDL. Any ideas?
I don’t know what I am doing wrong… -
Mail values from dynamic dropdown
Hi all,
need your help to solve a problem.
With LCD, I create a form with a dropdown listbox and a send button.
If I maintain the values directly in LCD, everything works fine. The mail contains an XML with the chosen value.
I've also find out, how to read the value dynamically from an XML.
But when I do both, the XML contains the entire list instead of the selected value.
Does anybody have a solution?
Thanks and regards
MartinHi
This should provide you the clue.
Eg;
*// Call the function module to send mail notification
CALL FUNCTION 'ZHR_EMAIL_SEND_NOTIFCATION' IN BACKGROUND TASK AS SEPARATE UNIT
EXPORTING
im_pernr = ipspar-pernr
im_massn = ipspar-massn
im_massg = ipspar-massg
im_begda = ipspar-begda
im_endda = ipspar-endda.
In this example, the preparation and sending the mail is done in the FM which is called in SEPERATE UNIT (different logical unit of work), so that, dynamic actions and mail sending are seperated and work in different space.
Regards
Raj -
Lsmw error 'Specify Files first' while executing option 'Read Data'.
Hi All,
while trying to create mass users through LSMW, i am gettign the error 'Specify Files first' while executing option 'Read Data'.
I have specified file (.txt), manually created (with'1 tab space' between each term). i have used option 'On the PC(Frontend)'. No error while saving.
Next- i have executed 'Assign Files', where the file appeared automatically.
Next- Here, when i try to execute 'Read Data', i get the error 'Specify Files first'.
Can anyone help in resolving this error.Hello Plaban,
What is your purpose? Are you tring to upload the data with more file variant?
There are two possibilities to make file names more variable:
1.If you choose system dependent file names by setting the according flag (in the first step 'Maintain object attributes'), you can define file names for each system in step 'Specify files' by assigning the files to a specific system ID (with a double-click on the specified file).
2.You can use wildcards in the file names where you can assign several values.
I hope this helps you.
Regards,
Blanca -
Reading Dates and Timestamps created by PL/SQL
Hello,
This is probably a FAQ (or stating the obvious) but I want to make sure I've got the right idea about things...
I recently noticed that our Java app reads dates/timestamps incorrectly from the database. Any date set using 'SYSDATE' in PL/SQL is an hour out when read by Java. This is because we are now in BST and the object read back by the JDBC driver thinks the timezone is GMT.
From reading around it seems that the DATE and TIMESTAMP types in Oracle don't persist timezone information. Fair enough, but to me this makes it dangerous to use SYSDATE at all in PL/SQL procedures.
Previously I've never relied on the database itself to generate timestamps so dates have always been stored as UTC. I'm currently using SYS_EXTRACT_UTC(SYSTIMESTAMP) when inserting data in to tables and basically wondering if this is the common way of achieving accuracy.
(using types such as "TIMESTAMP WITH LOCAL TIME ZONE" seem to have their own annoyances in JDBC so I've opted to avoid those)
Thanks.Tom,
This may be helpful...
http://www.javaworld.com/javaworld/jw-10-2003/jw-1003-time.html
Good Luck,
Avi. -
Dynamic Internal Table for reading data from external file
Hello All,
The task was to create a internal table with dynamic columns,
Actually this is my first task in the WebAS 6.20, my program is based on input file provided by user with certain effort. this file can have different effort for a one yr to five year frame..
I needed to read the raw data from file, based on months create a internal table to hold the data, after this i need to validate the data...
I have browsed thru dynamic internal table topic, but couldn't find any dynamic appending structure, the dynamic structure would contains 12 month fileds.
can any one help me in getting my task completed..
Thanks
KumarHi,
I see that you posted the same question a couple of days ago at Dynamic Internal Table for reading data from external file Didn't Charles's response address your problem?
Regards
Maybe you are looking for
-
IPod Touch 3G won't turn on or enter recovery mode, but is recognized by iT
I recently put new songs on my ipod touch 3rd gen and they started skipping when I was listening to them so I decided to Restore it. So I went through the whole process and it went through I guess what they call a "Recovery Loop". So it keeps Restori
-
We are in the midst of changing over from Excel 2003 to Excel 2007. We are seeing an issue in Excel 2007 with the use of the Microsoft Excel View option from the ALV output. When the Excel view comes up, the Send button is grayed out. The users have
-
What are all the Various Business Scenarios that we can think off in the Accounts Payable Module? What are all the Major Master data that needs to be in Place for AP? Thanks J
-
RFC to WebService Receiver Determination Problem
Hi, I am doing RFC to WebService with the help of this weblog /people/shabarish.vijayakumar/blog/2006/03/28/rfc--xi--webservice--a-complete-walkthrough-part-2 In Interface Determination - when picking Inbound interface is coming as No objects fo
-
Data Execution Prevention and IE8 ? Data Execution Prevention and IE8 ? Hi Me too have the same problem.I did every thing as you told.but still i have the problem. Im using Forms 10g(10.1.2), db 11g & Windows Xp SP3 in Internet Explorer 8 In Firefox