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)
Similar Messages
-
How to get the name of currently logged in user in the network
Hi all,
I want to know if there's a way to get the name of the currently logged in user in the network.
SYS_CONTEXT('USERENV','OS_USER') won't work for me because our users do not loggin in portal.
Any ideas?
Thanks in advance.
BrettHello, I had the same problem. Here is a smaller version to find the Group of the current User.
The VI get the members of a Group and match it with the Username.
Note :
If the User belongs to multiple Groups the the VI returns only the 1st Groupname
If the User belongs to no Group then the VI returns "unknown Group"
The VI is written with LabVIEW 2010 and TestStand 4.2.1
Attachments:
current user group.vi 20 KB
TestStand get Group of current User.PNG 43 KB -
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 footage's current frame number in expression?
There are 2 layers.One is text layer,one is sequence layer.
Footage has begun from the 20th frame.
Therefore, the number of composition's current frame number and footage's frame number has shifted.
I want to show footage's frame number in text layer . not composition's frame number.
How to get the footage's current frame number in expression?
Tatsuya>Footage has begun from the 20th frame.
Do you mean that the footage layer has been trimmed (so that the start of the footage lines up with the start of the comp, but the first 19 frames are not visible), or moved to the left (so that frame 20 lines up with the comp's frame 0), or that the sequence actually begins with the 20th frame (at frame 0 of the comp), or something else?
Are the frame rates of the comp and the footage the same?
Dan -
How to get the name of the city and state of the current location of the user
Hi all
i need to get the name of the city and state (full address) of the current location of the user.
need help.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) -
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 of the currently used display variant
Dear all,
I found the user-exit EXIT_SAPLGRAP_001 for programming download authorization.
With us no standard user is allowd to download data from R/3. With the user-exit it would be possible to allow certain downloads. one problem i solved already.
For programming the second authorization i need the name of the currently used display variant in RKPEP000. Where can i get the name. I tried user-exits for RKPEP000, but i didn't find the name. I didn't find it in SYST either.
Thanks and reargs
MonikaFirst you need to enter those names. Right-click the songs (Windows) or go to File>Get Info (All Platforms), then go to the second tab from the left to insert the information.
-
How to get the name of the class which is currently in use
Hi all,
I have two classes Mother and Child, and I use this code to print the name of the class in use
DATA m TYPE REF TO zmother.
DATA class_name type string VALUE 'CHILD'.
CREATE OBJECT m TYPE (class_name).
CALL METHOD m->PrintName .
So, what is the source code that I have to put in the PrintName methode?
Thanks.Ok, but how can I get the name of the object class that calls the methode!
REPORT ztest_method.
* CLASS c1 DEFINITION
CLASS c1 DEFINITION.
PUBLIC SECTION.
METHODS: get_data.
ENDCLASS. "c1 DEFINITION
* CLASS c1 IMPLEMENTATION
CLASS c1 IMPLEMENTATION.
METHOD get_data.
****** What is the code to put here to know the name of this Class?*
ENDMETHOD. "get_data
ENDCLASS. "c1 IMPLEMENTATION
DATA oref TYPE REF TO object.
DATA: method TYPE string.
DATA: cla_name(20).
START-OF-SELECTION.
cla_name = 'C1'.
CREATE OBJECT oref TYPE (cla_name).
BREAK-POINT.
CALL METHOD oref->(method). -
How to get the guid of currently opened page programatically
Hi,
Can any one of you please let me know how to get the guid of a page at database level which is opened currently?
The requirement is I need to grab the url of a page which is currently opened by the user.
Is there any way to get it from accessing the tables like wwv_things or wwpob_page$.
Please suggest me how to get it.
Thanks,
Ravi.Hi Ravi,
You may wanna explore the two API's (wwsbr_all_folders and wwsbr_all_items) and make a bridge to get the name of the portlets that appear on the page.
something of the following nature should be enough to take you where you want to go. here c.name is the GUID of the item you are looking for.
SELECT DISTINCT c.display_name,c.name,c.updatedate
FROM portal.wwsbr_all_folders a, portal.wwsbr_all_items c
WHERE a.LANGUAGE = 'us'
AND a.id = c.folder_id
AND a.caid = c.caid
AND c.itemtype = 'baseportletinstance'
AND a.Name LIKE 'MY_PAGE_NAME'
order by 3 desc
this will work in the portal but not in the sqlplus or any querying tool. for that purpose, it will work once you establish the context of user.
hope that helps!
AMN -
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 number of current active external modes?
hi all,
I need to get the number of currently active external modes. This can be done by calling function THUSRINFO. But this only works propperly, if you are logged on only once. If you are logged on more than one time then the function returns several entries in the parameter USR_TABLE. The entries mainly differ in the first parameter TID (type UTID, INT4) "terminal-identification" but how can I know which is the valid one for my current session. Functions TERMINAL_ID_GET, SPH_TERMINAL_IDENTIFY and SPH_TERMINAL_ID_GET dont work.
Or is there another way to get the number of active external sessions?
Thanks in advance,
MichaelHi,
tables: usr02, usr41.
data: OPCODE_MODE_COUNT(1) TYPE X VALUE 3,
modes like sy-index,
u_MODES LIKE MODES.
select * from usr02.
select * from usr41 where BNAME = usr02-bname.
CALL 'ThUsrInfo' ID 'OPCODE' FIELD OPCODE_MODE_COUNT
ID 'TID' FIELD usr41-TERMID
ID 'MODES' FIELD MODES.
IF SY-SUBRC = 0.
u_MODES = u_MODES + MODES.
ENDIF.
endselect.
if sy-subrc = 0.
write:/ usr02-bname, u_MODES.
endif.
clear u_modes.
endselect. -
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 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 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
Maybe you are looking for
-
I have used windows live mail for over a year worked fine. Now it has stopped working?
I have used windows live mail on my mac for over a year worked fine. Now it has stopped working?
-
Cannot drop undo tablespace with Active extents but no active sessions
Hi all, I am running on 10gr2 oracle database in a Linux 32 bit environment. I have a corrupted undo datafile. I've been able to recover the datafile but still the alert logs is still showing that it is corrupted. Now what I'm trying to do is to drop
-
Apache service reset config on reboot
Hi to all, i upgraded one of my servers from SnowLeopard Server (10.6.8) to 10.9.4 Mavericks Server, all services migrated fine except for Web Service, in this case i needed to rewrite in every virtual host file <mod_rewrite> and <Directory> sections
-
Question about Performance Operators
Hello friends... I have a doubt, can anyone help me? whats the bes operator for good performance ? select... from... where ID IN (a,b) or select... from... where ID =a or id=b Tks
-
Custom login module with 10.1.3
Hello all, I've been trying out Frank N's custom login module (http://www.oracle.com/technology/products/jdev/howtos/10g/jaassec/index.htm) with JDev 10.1.3/OC4J 10.1.3 and am not having much luck. Whenever I add <property name="role.mapping.dynamic"