How to get the name of file was read from file adapter ?
Hello!
I make a pooling into one directory to read all *.fat files in this directory, and I want the name of this file
is it possible ?
God bless all!
it is mentioned in the sample code.. look at the pdf guide inthe sample code document for file adapter.
you need to define a variable of message type of the file adapter inbound header message type and assign the variable to the apapters tab in the receive activity..
the variable will have file name now
Similar Messages
-
How to get the name of tag or variable
Hi everyone,
I am a newbie, I have problem on getting the name or tag of the variable from OLE for Processing Control(OPC) server, could anyone tell me how I can get the name of tag or variable from writting vb codes or please direct me to any helpful information. Here are
my codes,
Dim ItemsDef(NBR_ITEMS) As String
Dim DeviceAddress As String
Dim IndItem As Long
DeviceAddress = "MBT:152.160.178.60"
'Preparing the Handles for "AddItems"
For IndItem = 1 To NBR_ITEMS
ItemsDef(IndItem) = DeviceAddress & "!40000" & Format(IndItem) '40000 is the memory location of variable in the OPC, how can I get the variable name, what is the code or syntax?
Next
blah...
Thank you,
CalvinHi Calvin,
If you are looking for general information and examples about OPC, then we have lots of places for you to browse!
Here is a small list, and you can probably find other links within these documents:
**If you have Measurement Studio from National Instruments, then you can look at the "Measurement Studio Reference" help file. Search for OPC and in the overview you will find the methods for accessing the items on an OPC server.
**Elsewhere in the help file, you can find a link to this Application Note on our developer zone
http://zone.ni.com/devzone/devzoneweb.nsf/opendoc?openagent&F4921B34CA8F4A9786256874005BE3F7&cat=7CDA3E51FEFC4AA2862568B80071A1E2
**One more resource is http://www.ni.com/opc
**Probably the most useful will be the examples yo
u can find on our web site. You can go to http://www.ni.com/support and in Option 3 search the Example Code database for "opc".
In the first example program (Controlling OPC Servers with the OPC Automation API in Visual Basic) that you should get when searching for "opc" in the example programs database, look for the line with this code: "browser.GetItemID(leaf)". There you can see the way the program creates an OPCBrowser from the server instance, and then gets the servers available items for use by the client. This sounds like the specific information you are looking for with the variable name.
If you aren't able to find out your answer here or in the various help resources, then please feel free to contact us at National Instruments at http://www.ni.com/ask
Regards,
John N
Applications Engineer
National Instruments -
How to get the name of the current tab.
Hi Experts,
I have two tabs in my tab strip and a button common to both the tabs.Can you please let me know how to get the name of the current tab in the event method of the push button.
Thanks in advance.
Regards,
Arun1.Declare an Action for OnSelect event of Tabstrip. This event is triggered whenever any change in tab occurs.
2. Declare an Import Parameter in this method
Tab type String.
3. This parameter has value of the selected TAB.
4. You can set this value in some Attribute in Attribute Tab in this event only (OnSelect):
wd_this->Att = Tab.
Att is the attribute created by you in Attributes Tab of View. ( of type String)
5. Now the selected Tab ID is stored in this Attribute Att.
6. In the Onaction of Button , retrieve the selected tab value from this attribute using :
Data : lv type string.
lv = wd_this->Att
Now lv has your selected TAB ID.
I hope it would help you.
Edited by: Saurav Mago on Oct 13, 2009 2:22 PM -
How to get the name of a Data Element of a generic Table!
Hi guys!
In my function i have the following import paramenter
i_outtab type standard table
now i import a table and i want to get the dataelement of the fields.
is there a way to do this??Hello Thomas
Perhaps the following sample report may be useful for you.
*& Report ZUS_SDN_RTTI_STRUCT_COMPONENTS
*& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1145711"></a>
*& Thread: How to get the name of a Data Element of a generic Table!
REPORT zus_sdn_rtti_struct_components.
TYPE-POOLS: abap.
TYPES: BEGIN OF ty_s_outtab.
TYPES: bukrs TYPE bukrs.
TYPES: kunnr TYPE kunnr.
TYPES: END OF ty_s_outtab.
DATA: gdo_data TYPE REF TO data.
DATA: gs_outtab TYPE ty_s_outtab.
DATA: go_typedescr TYPE REF TO cl_abap_typedescr,
go_structdescr TYPE REF TO cl_abap_structdescr,
go_datadescr type ref to cl_abap_datadescr.
DATA: gs_comp TYPE abap_compdescr,
gd_dtel type string,
gt_dfies type ddfields.
FIELD-SYMBOLS:
<gs_struct> TYPE ANY.
START-OF-SELECTION.
BREAK-POINT.
GET REFERENCE OF gs_outtab INTO gdo_data.
ASSIGN gdo_data->* TO <gs_struct>.
go_typedescr = cl_abap_typedescr=>describe_by_data( <gs_struct> ).
go_structdescr ?= go_typedescr.
BREAK-POINT.
LOOP AT go_structdescr->components INTO gs_comp.
go_datadescr = GO_STRUCTDESCR->GET_COMPONENT_TYPE( gs_comp-name ).
gd_dtel = go_datadescr->get_relative_name( ).
write: / syst-tabix, 'Data element =', gd_dtel.
ENDLOOP.
END-OF-SELECTION.
Regards
Uwe -
How to get the form reference in .js page from .jsp page
hi
i have written one form in jsp page omething like:-
<html:form action="/shopping" onsubmit="return false;">
can anybody tell me,how to get the form reference in .js page from .jsp page ,
i have tried:-
var formRef = document.forms[0];
butits not working.
Thanks.Its very simple......y cant u prefer google...Bad
c this example...
function submit()
alert("textbox"+ document.forms[0].name.value);//to get textbox value in js
document.forms[0].submit();//to submit jsp page using js
<html:html>
<html:form action="/shopping" onsubmit="submit()">
<html:text property=name>
learn to search in google..
</html:form>
</html:html> -
How to get the name of the file parent
Hi,
i have a file in this location
File file = new File(MyFile.doc)
file.getParent(); returns
C:\Documents and Settings\Administrator\xyz
now from the string obtained i just want to get the value "xyz".i.e. i want to get the name of the parent directory.
how is it possibleYou may use String.indexOf()if(file.getParent().indexOf("/myProject/myPackage") != -1) {
...Or you might use regular expressions and Matcher class (or String.matches()) in case of higher complexity. -
How to get the name of a duplicated control or created control and add a callback to it
Hi All,
Depending on how many input points I need, I am duplicating a numeric or string input with the DuplicateCtrl function. My question is, how do I get the name and id of the control that was just created, and how can i assign a callback to it? Alternately, would it be better to create a fresh ctrl instead of duplicating?
Thanks in advance!
Solved!
Go to Solution.Hi TurboMetrologist,
why are you trying to get the control constant name? Keep in mind that you cannot use that name to address the control; control names are actually simply macros in the include file associated to the UIR, that is, the compiler preprocesses the code and wherever it finds PANEL_CONTROL names substitutes the corresponding numeric value as parameters to the functions (and consequently 'control' parameter is an int and not a char*)
That is why NewCtrl () or DuplicateCtrl () functions return a control ID: it is the handle to the new object, our only way to manipulate it. You will need to store this handle into a non-volatile memory so that you can access it durng program life.
Additionally, there are other ways to assign some particular meaning to a control than swiching on the control constant name. You could for example use the callbackData parameter to differentiate between different copies of a control.
Let me explain with an example. You told that you need several inputs (dynamically created as you don't know in advance how many of them to use); a clean solution could be to:
Design a master copy of one control in the UIR editor, where it is easy to customize it; assign also a callback function, if it has to be common to all copies of the control
Programmatically assign a callbackData value to that control, e.g. SetCtrlAttribute (..., ..., ATTR_CALLBACK_DATA, (void *)1);
Duplicate the control and then assign a different callbackData
for (i = 2; i < 5; i++) {
handle = DuplicateCtrl (...);
SetCtrlAttribute (..., handle, ATTR_CALLBACK_DATA, (void *)i);
By operating this way, every time the control callback is fired by any control it will receive the assigned callbackData, and you will be able to differentiate your code by a simple switch:
switch ((int)callbackData) {
case 1: // The master control
break;
case 2: // The first duplicated control
break;
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos? -
How to get the name of the attachment in Sender Mail Adaper?
hi mates,
I've scenario a where in I need to pick up a mail with an attachment and change its extension and send it to target system using file adapter.
I'm able to pick up the mail with attachment using sender mail adapter but not able to get the name of the attachment so that I can use it in mapping or on the adapter configuration. How do I read the name of the attachment and manupulate it?
I looked at the thread sender mail adapter - attachment name But the solution is not described. I think Stefan is talking about the SP!2 for PI 7.0. I'm on XI 3.0 what is the equivalent SP for that, SP20? Stefan, can you please throw me more light on it?
I appreciate your valuable inputs
thx in adv
praveenThanks Aamir.
Earlier I replied to that thread asking for more details...but did not see the response...
anyways, thanks for your quick help..
but I wonder abt the PI SP12/ XI SP20 pre-requisite. We can have adapter modules on SPs lower than PI SP12/XI SP20 as well, can we not?
thanks
praveen -
How to get the name of a method?
How can I get the name of a method, before measure its time of execution?
[url
http://java.sun.com/developer/JDCTechTips/2003/tt0318.
html#2]DISCOVERING THE CALLING METHOD NAMEThis article uses Throwable.getStackTrace() which has been around longer than the one I mentioned (Thread.getStackTrace()):
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Throwable.html#getStackTrace()
I actually meant to show Throwable.getStackTrace() in my original post but when I did a search on it Thread's was the first one I came across. -
How to get the names of people currently logged into the system?
Hi,
How do we get the names of people who are currently logged in to the system at any point of time...i know that we can get the history of people logged in using "wwv_flow_user_activity_log" but is there a way to know who are the currently logged in people ...
regards
Naveenhi Sergio,
well that might not work correct all times as some user might have logged in and logged out but the log file will still contain his name...The primary reason why we want to know this is , say suddenly we want to bring down our application for maintainnace purposes, so incase if any body is logged in at that time we want to send them mails that the system is going to be taken down in next 30 mins so and stuff....
Is there any other alternative ...
regards
Naveen -
How to get the name and value of an attribute on a node/element that is not a child
Hello,
Can someone shed some wisdom on how I can compare 2 xml nodes for differences.
My main challenge is I need to use the attributes/values of 'ProductDescription' and 'Features' as 'key' to identify the same node in
another doc with the same layout, but different content.
I am having trouble getting the name of the attribute on the node, 'ProductDescription' and 'Features'. I can only seem to get the node names, but not the attributes on the node. I need the name, because it can be different from doc to doc, so
I can't hardcode this.
Can someone please help with how to retrieve an attribute name/value on a node that is not a child. Here's an example of what
my xml looks like:
DECLARE
@myDoc1 xml
,@mydoc2 xml
DECLARE
@ProdID int
SET @myDoc1 ='<ProductDescription ProductID="1" ProductName="Road Bike">
<Features featureID = "1" featureName = "body">
<Warranty>1 year parts and labor</Warranty>
<Maintenance>3 year parts and labor extended maintenance is available</Maintenance>
</Features>
<features featureID = "2" featureName = "seat">
<Warranty>1 year parts and labor</Warranty>
<Maintenance>2 year parts and labor extended maintenance is available</Maintenance>
</Features>
</ProductDescription>
SET @myDoc2 ='<ProductDescription ProductID="1" ProductName="Road Bike">
<Features featureID = "1" featureName = "body">
<Warranty>2 year parts and labor</Warranty>
<Maintenance>3 year parts and labor extended maintenance is available</Maintenance>
</Features>
<features featureID = "2" featureName = "wheel">
<Warranty>1 year parts and labor</Warranty>
<Maintenance>2 year parts and labor extended maintenance is available</Maintenance>
</Features>
</ProductDescription>
I need to compare the attributes of 'ProductDescription' and 'Features' from @mydoc1 against @mydoc2 to see if they are the same based on those 2 nodes first. If they are, then i want to show the difference in the child elements.
This will eventually be an outer join to give me the differences betw the 2 docs based on those key values (node attributes).
I used node('//*') for the path, and value('local-name(../.)', 'varchar(50)') as element
,value('.[not(@xsi:nil = "true")]','VARCHAR(255)') AS new_value
...etc...
but that only gives me the node names, and the child elements. It does not give me back the attribute names and values from the node itself.
Thanks in advance for your help.
ceeAre you looking for something like this:
DECLARE @myDoc1 xml
SET @myDoc1 ='<ProductDescription ProductID="1" ProductName="Road Bike">
<Features featureID = "1" featureName = "body">
<Warranty>1 year parts and labor</Warranty>
<Maintenance>3 year parts and labor extended maintenance is available</Maintenance>
</Features>
<Features featureID = "2" featureName = "seat">
<Warranty>1 year parts and labor</Warranty>
<Maintenance>2 year parts and labor extended maintenance is available</Maintenance>
</Features>
</ProductDescription>'
SELECT T.c.value('local-name(.)', 'nvarchar(50)') AS name,
T.c.value('.', 'nvarchar(50)') AS value
FROM @myDoc1.nodes('ProductDescription/@*') AS T(c)
Erland Sommarskog, SQL Server MVP, [email protected] -
How to get the name of current monitor?
I have a script which is used to get some application data. The script take parameters such as "LOB" so it can query data for different department. When it found something, it raise an event in event log.
Therefore this script is used by several different monitors. Each monitor calls the script by passing different parameters. To better understand the event was created by which monitor, I want the script can get the name of monitor which calling it and they
list it in the event log too.
Currently, I am passing $MPElement$ as one script parameter so I can get the monitor's GUID. Then get the name by running powershell command. Is there an easier way to get the monitor name? Thanks!The best way to do this is to put the monitor name as a property bag in the script and pass that to your event details. Otherwise, we're looking at querying the database each time the monitor generates an event, and this is overhead that is really not
necessary. The other option, which is just even worse in terms of performance, is to use powershell to query the SDK for the monitor name. Both of these options are not going to be a good solution, because now you need to implement action accounts that can
either query the database or the sdk.
Jonathan Almquist | SCOMskills, LLC (http://scomskills.com) -
9I: How can get the names of all objects in a package header? [RESOLVED]
Is there a way to get the names fo all objects (function, procedures) from package header
select * from user_objects only gives the the header name, I need the object in the header.
John
Message was edited by:
johnminkjanHere is an example with dbms_output package!
SQL> select owner, object_name,procedure_name from all_procedures
2 where object_name='DBMS_OUTPUT';
OWNER OBJECT_NAME PROCEDURE_NAME
SYS DBMS_OUTPUT GET_LINES
SYS DBMS_OUTPUT GET_LINE
SYS DBMS_OUTPUT NEW_LINE
SYS DBMS_OUTPUT PUT_LINE
SYS DBMS_OUTPUT PUT_LINE
SYS DBMS_OUTPUT PUT
SYS DBMS_OUTPUT PUT
SYS DBMS_OUTPUT DISABLE
SYS DBMS_OUTPUT ENABLE
9 rows selected.
"or"
SQL> desc dbms_output -
How to get the name before @ in an email id
Hi All,
How can i get the name before '@' in an email id, for example if i have [email protected], how do i get 'abc' in my query result.
Thanksthinkingeye wrote:
Hi All,
How can i get the name before '@' in an email id, for example if i have [email protected], how do i get 'abc' in my query result.
Thankscombine INSTR() & SUBSTR() functions -
How to get the name of a previous test?
Hi,
The top level of my sequence is a list of subsequences, each one being a sub-test.
While inside one particular sub-test I would like to know the name of the sub-test which was executed before the one I'm in at the moment. Obviously this is relevant only when I run selected sub-tests.
example:
MyTest.seq
sub-test1
sub-test2
sub-test3
I'm inside sub-test3 (in the setup or main sequence), and would like to know the name of the sub-test which was executed before sub-test3. It is possible that no sub-test ran before sub-test3.
Thanks
RK
Solved!
Go to Solution.Hi Rafi,
Just in case you are using an earlier version of TestStand than 4.0, you might consider using the NameOf() function since you wouldn't be able to directly access the TestStand API through expressions. Here are a couple articles to look into.
Getting the Name of Any TestStand Property Programmatically in TestStand
Storing Step Names of a Sequence in a Local Variable
Let me know whether the suggestions above point you to a solution.
Rod T.
Maybe you are looking for
-
Satellite L750 will not open path
I have a new Satellite L750. I am trying to do a course on my computer which I have purchased the disc for. The course has paths to click on that are to link up with the files downloaded from the disc supplied to a folder in WINDOWS (C:) Program File
-
Hi Friends, I am basically from Java background. Currently working in Java, XSLT, XML technologies in mobile application development in UK. Recently i was trained in SAP XI/PI 7.0 in SAP UK(classroom training) 6 modules. Also i CERTIFIED as SAP NETWE
-
I have a AV - RCA Cable that goes into the earphone socket, but it just comes up blank.
-
Hello, I'm trying to backup script (*.ICMS) with schedule task, do you now if it's possible? I find the manual export in script editor but do it one by one ... I need your help Thanks a lot
-
I am trying to alter the date on a batch of photos but leave the time taken the same. Using batch change won't allow me to achieve desired results