Mapping Query by OS PID
All,
How do we find the query that is run by a session by looking at the PID from Unix terminal. It is possible to find all the query that is run by a particular session by mapping PADDR column of V$SESSION and ADDR column of V$PROCESS. SPID of V$PROCESS is Unix PID. Can we still narrow down to a particular query, rather than all the queries run by a session? This will help isolate query that is consuming more CPU.
Thanks,
...
Hi,
v$session has the following information:
SQL_ADDRESS RAW(4 | 8) Used with SQL_HASH_VALUE to identify the SQL statement that is currently being executed
SQL_HASH_VALUE NUMBER Used with SQL_ADDRESS to identify the SQL statement that is currently being executed
SQL_ID VARCHAR2(13) SQL identifier of the SQL statement that is currently being executed
SQL_CHILD_NUMBER NUMBER Child number of the SQL statement that is currently being executed isn't it enough to nail down the query ?
--romas
Similar Messages
-
Hi Experts,
I have a mapping query in SAP PI. Actually I am mapping the source and target fields, now the problem is.
The sender filed is subnode of the main node, and I have mapped the two main nodes in the sender and receiver together.
Now, whether the sender main node comes all the subnode values will come or do we need to do something else for it.
Both the sender and target main nodes and subnodes can have multiple repetations.
I think One to One mapping wont do in this case. What needs to be done please help??
Thanks and regards,
AniruddhaHi Vijay,
Thanks a lot.I will try this out. Can you help me in another mapping problem, the req. is that i need to map the source and the target.
The condition basically is :
If no value in LIFEX use VBELN to map to a single target field.
But I wont use UDF in this case.
Please help.
Regards,
Aniruddha -
How to map query data to workbook
Hi Freinds,
Hoping you have goodday, please let me know how to create workbook
and how to map query data to it.
Thanks
Chandan KumarHello,
Execute a BEx Query and in the BEx toolbar you can see SAVE button, click that as select SAVE as Workbook.
If you want to insert more queries then first place the cursor where you want to insert the query, then Goto BEX toolbar, Select the Tool Icon and you can see a menu called Insert Query.
Thanks
Chandran -
Hi Experts,
I have a query regarding creating Output XML in SAP PI 7.1. I am using the below command
out.getOutputPayload().getOutputStream().write(outDoc.toString().getBytes("UTF-8"));
Where out is the TransformationOutput parameter and outDoc is an output XML not the String.So, I have used toString() here.
But, when we have imported it in PI7.1 the output is not creating but the entire program is running successfully.
Th error to create output XML in PI7.1 is as below.
Unable to display tree view; Error when parsing an XML document (Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 5b, 23, 64 (:main:, row:1, col:3))
Kindly let me know.
Regards,
AniruddhaHi Ninad,
Thanks for your interest in the post, it is a file to mdm scenario, where the entire mapping is wriiten in Java map.
We have tested the Java program in NWDS with main() and it has worked successfully.But, when I changed the main with transform and tested it in PI7.1 with the required changes I am getting that error
Unable to display tree view; Error when parsing an XML document (Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 5b, 23, 64 (:main:, row:1, col:3))
But, I have addeed trace in different level and all are coming means the program is running, only in case of
getTrace().addInfo("Before passing XML to String");
out.getOutputPayload().getOutputStream().write(outDoc.toString().getBytes("UTF-8"));
getTrace().addInfo("After passing XML to String");
Both the getTrace() is showing in PI7.1.
Trace Output:
Records Created - 1
Before passing XML to String
After passing XML to String
END APPLICATION TRACE ***
Java mapping hcl/com/XmlValidation completed. (executeStep() of hcl.com.XmlValidation).
Execution of mapping on server took 564 milliseconds Executed successfully
only the changed syntax is I am using toString() on outDoc as outDoc is an Document type not the String Type.Actaully, I have manipulate the input as an XML not as a String or Stream.
Regards,
Aniruddha -
Mapping query result to excel sheet
Hi Experts,
i have a requirement where in i need to map the result into particular cellls of the excel sheet, because the excel sheet acts as front end which has graphs and by just putting the result in particular cells of excel the graph is automatically generated, so is there any way where i can map the result cells into particulat cells in excel?
Thank you.Hi Shetty,
You might have stopped reading this thread since you have the answer you need for now. From experience, let me tell you what might happen next.
If the query definition is ever changed ... say, a new characteristic is added because a different user has a slightly different need ... the result table will move down by a few rows and your equation no longer works.
If you think this might happen, let me tell you a very easy way to get around it.
1. Name the range(s) you will use. If the first result is in cell B31 on Sheet1, then go to cell B31 on Sheet1 and Select Insert>>Name>>Define. Call it something you will remember, like "LastMonthSales" (no spaces, but underline is OK)
2. use the range name in your formula. This happens automatically, in fact. If you press = then click on cell B31, Excel will automatically use the range name instead of the range address. Excel LIKES names.
3. now, go to the Visual Basic Editor (Tools >> Macro >> Visual Basic Editor; or, Alt+F11). In your workbook, there should be a subroutine as follows:
Sub SAPBEXonRefresh(queryID As String, resultArea As Range)
If you do not find it, add it. This probably also means that you are using Excel 2002 or later and have not set your Macro security to "trust access to Visual Basic Project"; so, change that security setting (Tools >> Options >> Security >> Macro Settings).
The visual basic code is very simple. For each result that you need to map you will want one line of code like this one:
resultArea.Cells(4, 2).Name = "LastMonthSales"
The Cells(4, 2) are counted from the top left of the result table. So, in this case if B31 = Cells(4,2), then the top left of my result table must have been in cell A28 in Excel.
This subroutine will be run automatically every time that the query is refreshed. So, if the result table moves, the names will move with it. One less thing to worry about.
If you do not think you need to do this today, don't! No sense in doing work that is not necessary. But, save this. I suspect that some day you will need it.
- Pete -
Hi Sdn,
I am new to ABAP mapping in XI, can you please help me out by answering the below questons.
1. When is an ABAP mapping being used?
2. How to write an ABAP mapping?
3. Some examples of ABAP mapping?
Suitable links will also do?
Thanks and regards,
Aniruddha BhattacharyaHi Aniruddha,
Few Links from my collection;)
[ABAP Mapping Steps |https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/abap%252bmapping%252bsteps]
http://help.sap.com/saphelp_nw04/helpdata/en/47/b5413acdb62f70e10000000a114084/frameset.htm
collection of all related Blogs and [http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=79955426|]Wikis
The best one http://www.sdn.sap.com/irj/scn/advancedsearch?query=abap+mapping.
Regards,
Srinivas
Edited by: Srinivas on Apr 22, 2010 8:47 PM -
Hello,
I can't map string Display Name to the string property, on the User prompts tab I set prompt with type Query Result, on the Configure Prompts I configure this query by selecting AD User of Group -> Display Name, now I have Prompt Output called DisplayName
(string). On the Map prompts I can't map this prompt to the string property, why? I just want to choose one user from AD and put it on the form as string.You will never get "simple values" from a query result. The option "3. Display Columns" are the properties on the class that you display on the portal. You will not be able to map a query result anywhere. You must attach it somehow to the request (in the
last tab "4. Options").
So even though the prompt output says "DisplayName (string)" you are still getting an object out of it. This makes more sense if you select more properties in 3.
http://codebeaver.blogspot.dk/
Thanks fro info, I have a script which reads custom string property of my custom service request class and translates it to 'AD user class' and makes it as Reviewer in the Review Activity. But instead of textbox field on the portal I need to use query,
how can I get info from this service request about query to create AD user in my script?
I placed query form on the portal to test, it shows only 2000 objects by default, is it possisble to show members of some OU or group in this field? -
Hi Java Team
For a calling a servlet from a HTML form that is placed inside a folder name HTML in the webcontent we need to map the welcome file as
<welcome-file>HTML\Home.html</welcome-file>
In my application I am reading an Excel file to update database
but when i am creating the input stream object i am currently giving the entire path like
FileInputStream f = new FileInputStream("E://sample1/sample1/WebContent/Files/Book10.xls")
is there any mapping which we can do in web.xml by which i need to give only the file name like
FileInputStream f = new FileInputStream ("Book10.xls")
Thanks
SanthoshHi Mark,
I don't think it is possible to nest the XML mapping.
This is because your table data will be just two-dimentional. Through your table return several keywords for each template, the query result will look something like:
template_key id ver keyword
tkey1 INSTLP0001a 1.2 key 1 v1.2
tkey1 INSTLP0001a 1.2 key 2 v1.2
tkey1 INSTLP0001a 1.2 key 3 v1.2
Look at the above exhibit. all the column except keyword are repeated.
So, you can achieve this in two ways.
1. Change your schema to have a one level data mapping.
2. Split your schema into three so that you will have three xml files.
Hope this may help you!
Nith -
PL/SQL to map query results to a column?
Is there a programmatic way to map the query result to a value in a table?
I have table A. There's a column with a carat-delimited string 0^0^1^ that I can parse with substr/instr functions. So, query that table/column for a 5th digit that sits between 5th and 6th ^ character.
There's table B. It has a 'position' column and 'key' column. How do I let the table A know that when I query table A for 5th digit, it needs to map to table B's where position=5?
thanks,Did you try to run those statements? Please do so next time.
Also the creation of table C (or is it D) and E are missing.
However, the tricky part is in deciphering table A to make up for the flawed design.
I hope this piece of SQL is helpful for you, because you could join the outcome to your other tables:
SQL> create table a
2 ( visitor_id number(*,0),
3 adate date,
4 carat varchar2(4000 byte),
5 ip_address varchar2(4000 byte),
6 state varchar2(4000 byte),
7 city varchar2(4000 byte),
8 id number(*,0) not null enable,
9 constraint "a" primary key (id)
10 )
11 /
Tabel is aangemaakt.
SQL> insert into A
2 (VISITOR_ID,ADATE,CARAT,IP_ADDRESS,STATE,city,id) VALUES(194296532,TO_DATE('2007-06-26.00.01.46',''),'-1^1^2^0^3^85741^3^0^176^0^1
^-1^41^-1^-1^US^0^-1^2^0^1^^^^^^^','71.226.9.44','az','tucson',1);
1 rij is aangemaakt.
SQL> insert into A
2 (VISITOR_ID,ADATE,CARAT,IP_ADDRESS,STATE,city,id) VALUES(37482918,TO_DATE('2007-06-26.00.01.46',''),'0^1^2^5^^78154^3^7^184^0^1^2^
17^2^1^US^1^0^1^0^0^^^^^^^','70.163.196.111','tx','san antonio',2);
1 rij is aangemaakt.
SQL> select id
2 , visitor_id
3 , i position
4 , c value
5 from a
6 model
7 return updated rows
8 partition by (id, visitor_id)
9 dimension by (0 i)
10 measures ('^' || carat || '^' c)
11 rules
12 ( c[for i from 1 to length(regexp_replace(c[0],'[^\^]'))-1 increment 1]
13 = regexp_substr(c[0],'[^\^]+',1,cv(i))
14 )
15 order by id
16 , position
17 /
ID VISITOR_ID POSITION VALUE
1 194296532 1 -1
1 194296532 2 1
1 194296532 3 2
1 194296532 4 0
1 194296532 5 3
1 194296532 6 85741
1 194296532 7 3
1 194296532 8 0
1 194296532 9 176
1 194296532 10 0
1 194296532 11 1
1 194296532 12 -1
1 194296532 13 41
1 194296532 14 -1
1 194296532 15 -1
1 194296532 16 US
1 194296532 17 0
1 194296532 18 -1
1 194296532 19 2
1 194296532 20 0
1 194296532 21 1
1 194296532 22
1 194296532 23
1 194296532 24
1 194296532 25
1 194296532 26
1 194296532 27
1 194296532 28
2 37482918 1 0
2 37482918 2 1
2 37482918 3 2
2 37482918 4 5
2 37482918 5 78154
2 37482918 6 3
2 37482918 7 7
2 37482918 8 184
2 37482918 9 0
2 37482918 10 1
2 37482918 11 2
2 37482918 12 17
2 37482918 13 2
2 37482918 14 1
2 37482918 15 US
2 37482918 16 1
2 37482918 17 0
2 37482918 18 1
2 37482918 19 0
2 37482918 20 0
2 37482918 21
2 37482918 22
2 37482918 23
2 37482918 24
2 37482918 25
2 37482918 26
2 37482918 27
2 37482918 28
56 rijen zijn geselecteerd.Regards,
Rob. -
Other way to Map query transform in given scenario.
Hi Experts,
I am doing a scenario where i need to map target from 3 sources.
In source there is a field of Purchase date.
1.)I have to map Purchase date(source) to column1(Target) when purchase date < '2013-04-01'.
2.)Map Purchase date(source) to column2(Target) when purchase date >'2013-03-31'.
I have done this through query transform.
I am attaching a screenshot for better explanation.
I am using where clause in both the query transform.
Is there any other way to do this activity??
Regards,
Neha KhetanYou can easily do this in one join of your 3 tables. use the built-in ifthenelse function in the mapping of both your target columns:
column1= ifthenelse(purchase_date < '2013-04-01', purchase_date, null)
column2= ifthenelse(purchase_date >'2013-03-31', purchase_date, null) -
Hi All
I have done a XSLT mapping to map a flat file structure to a hierarchical structure. But my 3rd level node is getting repeated for 2nd level node. Please find the details below
Source Structure - flat file
Header - 1
Record - 1....unbound
Forecast - 1....unbound
Target Structure
level1 - MessageHeader - 1
level1 - ProductActivity - 1
level 2 Record - 1...unbound
level 3 Forecast - 1...unbound
*Sample Format of Source file*
Header
Record1
Forecast1.1
Forecast1.2
Record2
Forecast 2.1
Forecast 2.2
Now after execution of XSLT mapping the output I am getting contains all Forecast nodes for every record. For example output of above mentioned format is
*Sample Format of target structure*
MessageHeader
ProductActivity
Record1
Forecast1.1
Forecast1.2
Forecast2.1
Forecast2.2
Record2
Forecast1.1
Forecast1.2
Forecast2.1
Forecast2.2
Expected Output
MessageHeader
ProductActivity
Record1
Forecast1.1
Forecast1.2
Record2
Forecast2.1
Forecast2.2
Here is code for forcast row
<!-- TimeSeries: Net demand forecast(Dynamic replenishment) and Planned Receipt (SNI)-->
<xsl:if test="$ProcessFlag= 'SM'">
<OrderForecastTimeSeries>
<xsl:for-each select="//Forecast">
<Item>
<ValidityPeriod>
<StartDateTime><xsl:value-of select="substring(./ForecastDate, 1,4)"/>
<xsl:text>-</xsl:text>
<xsl:value-of select="substring(./ForecastDate,5,2)"/>
<xsl:text>-</xsl:text>
<xsl:value-of select="substring(./ForecastDate,7,2)"/>
<xsl:text>T</xsl:text>
<xsl:text>00:00:00</xsl:text>
</StartDateTime>
<EndDateTime>
<xsl:value-of select="substring(./ForecastDate, 1,4)"/>
<xsl:text>-</xsl:text>
<xsl:value-of select="substring(./ForecastDate,5,2)"/>
<xsl:text>-</xsl:text>
<xsl:value-of select="substring(./ForecastDate,7,2)"/>
<xsl:text>T</xsl:text>
<xsl:text>00:00:00</xsl:text>
</EndDateTime>
</ValidityPeriod>
<Quantity>
<xsl:attribute name="unitCode"><xsl:value-of select="Unit"/></xsl:attribute>
<xsl:value-of select="Quantity"/>
</Quantity>
</Item>
</xsl:for-each>
</OrderForecastTimeSeries>
</xsl:if>
Edited by: Amol on Jul 21, 2009 3:26 AMHi Amol,
Try the below mentioned and see if can achieve this:
Hi Amol,
Try to do it this way and see if it works:
In side loop for <xsl:for-each select = "/Record">
Dont use for-each for ForeCast.
Take the count of "ForeCast" by using the Count() function. Now use it as a predicate for ForeCast.
EG: /ForeCast [CountValue - (CountValue-i)]
Here i should be 1 and every time the loop is incremented, i should also increment by one.
Just try if you can achieve this.
Regards,
Anshul
Warm Regards,
Anshul -
IDOC Generation Using XSLT Mapping[Query]
Hi,
I am working on File to IDOC scenario. I have used XSLT mapping. It is necessary to generate EDI_DC40 segment for IDOC in XSLT?
-KavitaHi Kavita,
please take a look at note: 728792
(Fields of the IDoc control record )
it describes your scenario
Regards,
michal -
Hi Experts,
I have two mapping queries:
1. In which field A maps with field B.
For a E-Mail address coming from field A I have to check whether @ and . are available or not.
2. In which field A maps with field B.
The value coming from filed A will be: Only Numerics, Should Migrate Upto 2 decimal places (Ex: 34.21), Ignore the rest if any.
Please let me know.
Regards,
Aniruddhachk the UDF given by Satish:
mapping help-- Number format
>>For a E-Mail address coming from field A I have to check whether @ and . are available or not.
u can use standard functions for the same
A-------------
-----------indexOf-----greater(constant(0) ----2nd input)
Constant(.)---
----------------------AND----IfWithoutElse(A----THEN)-----Target
A-------------
------------indexOf-----greater(constant(0) ----2nd input)
Constant(@)--- -
Hi Experts
I have facing some confusion when i am doing mapping for my scenario FILE to IDOC.
The IDOC Structure is as follows
HeaderRecord 0-1
DataRecord1 0-unbounded
(Subnode)DataRecord2 0-unbounded
(Subnode)DataRecord4 0-unbounded
DataRecord5 0-unbounded
(subnode) DataRecord6 0-unbounded
TrailerRecord 0-1
when the DataRecord1 is executed, an idoc is generated and all the DataRecord2,DataRecord4,DataRecord6 shld come under that particular Idoc. And when another Idoc is generated,all the DataRecord2,DataRecord5,DataRecord6 shld come under that particular Idoc.
How to achieve mapping for this??
please help me out.
Edited by: vemuganti naga phalguna on Oct 27, 2010 7:56 AM
Edited by: vemuganti naga phalguna on Oct 27, 2010 7:59 AMHi
1) Source file is Text File.
sample source data.
A|20101006142345|SAPQMP|40|
B|5999|R00003D||N|20072008|Unknown|
C|T0014|M1556||colourless Pale yellow||Receipt-Bulk|1|Yes|Y|Text||
C|T0001|M1556||Limpid liquid ||Receipt-Bulk|1|Yes|Y|Text||
C|T1379|M1398|18||23|Receipt-Bulk|1|Yes|Y|Number|mm²/s|
B|5998|R00014A||N|20072008|Unknown|
C|T0014|M0211||2.0||CoA|1|No|Y|Text||
C|T0014|M0211||2.0||Receipt-Bulk|1|No|Y|Text||
C|T0014|M0211||2.0||Transfer|1|No|Y|Text||
C|T0051|M0271|97|||CoA|1|No|Y|Number|None|
C|T0073|M1356|Pass|||Receipt-Bulk|1|No|Y|||
C|T0073|M1356|Pass|||Transfer|1|No|Y|||
C|T0025|M0331||0.880||CoA|1|No|Y||g/ml|
C|T0025|M0331||0.880||Receipt-Bulk|1|No|Y||g/ml|
C|T0025|M0331||0.880||Transfer|1|No|Y||g/ml|
C|T0001|M1556||Clear & Bright ||CoA|1|No|Y|Text||
C|T0049|M0341|28.0||32.0|CoA|1|No|Y|Number|mm²/s|
C|T0049|M0341|28.0||32.0|Receipt-Bulk|1|No|Y|Number|mm²/s|
C|T0049|M0341|28.0||32.0|Transfer|1|No|Y|Number|mm²/s|
C|T0042|M0422|||-15|CoA|1|No|Y||°C|
C|T0092|M0578|||16|CoA|1|No|Y|Number|% Loss|
C|T0021|M0199||||CoA|1|No|Y||minutes|
C|T0039|M1453|Mktble|||CoA|1|No|Y|||
C|T0050|M0341||5.1||CoA|1|No|Y|Number|mm²/s|
C|T0050|M0341||5.1||Receipt-Bulk|1|No|Y|Number|mm²/s|
C|T0050|M0341||5.1||Transfer|1|No|Y|Number|mm²/s|
C|T0026|M0412|210|||CoA|1|No|Y|Number|°C|
Z|20101006142355|SAPQMP|40|
where Records A indicate File Header, Z indicates File Trailer
Recodrs B indicateds Material header and Would be repeating multiple times
No. of B Records = No. of Idocs generated with corresponding C records data which indicates Component Rows (multiple)
i.e as many B records file contains, that many Idoc will be created
For Mapping I require B and C Records. Field Separator is Pipe | symbol
I need to Ignore A B C Z
How to define the source structure and the respective FCC Parameters
please help me out -
Hi,
I have (xml)file to idoc scenario where the xml xsd has following structure.Its is PO posting
batch
header
item
now in batch i have a feild total po which i need to validate with the total number of po in the file and if the two are not matching then i need to send a error xml file back to same ftp server (insted of sending it to R3 for idoc posting), so my receiver will change based on this check.
Can anyone let me know how to do this.Yes ,
Certainly , You can do this without BPM.
There may be few other ways also , i am explaining you one out of them .
Message Mapping . Create three message Mapping .
i. ) File sender to IDOC Receiver
ii.) file sender to file receiver (with error information).
iii.)file sender to receivers ( Message type :Receivers namespace : http://sap.com/xi/XI/System) : This one will be used to choose receiver dynamicaly.
at target Message type :Receivers the element Service Populate with the value of buisness system based on your condition.
like in your case : IDoc receiver Buisness system if counts matches, else File Receiver buisness system if count doesnt matches.
Operation Mapping . Create three Operation Mapping .
i. ) File sender OUTB to IDOC Receiver INB
ii.) file sender OUTB to file receiver (with error information) INB.
iii.)file sender OUTB to ReceiverDetermination INB
( target service interface :ReceiverDetermination namespace : http://sap.com/xi/XI/System) : This one will be used to choose receiver dynamicaly.
Rest is same in ESR Side.
Now let us come to Key points in ID.
1. Receiver Determination.
It would be extended : Here choose third Type Operation mapping : iii.)file sender OUTB to ReceiverDetermination INB
this will deside, Receiver Dynamically.
2. Interface Determination.
now for each buisness system , create interface determination and choose appropriate operation mapping.
Rest steps would be same ....
Do ask if found any problem .
Regards
Dragon
Maybe you are looking for
-
Tell how to deployee the EJB 3.0 program in JBoss(netbean5.5 IDE)
my error when i compile =============================================================================== JBoss Bootstrap Environment JBOSS_HOME: C:\Program Files\jboss-4.0.5.GA\bin\\.. JAVA: C:\Program Files\Java\jdk1.5.0_11\bin\java JAVA_OPTS: -Dhttp
-
Can I save a filled out form in adobe reader
How do I save a filled out form in adobe reader?
-
Reg: Adding Country Group 99 for Infotype 9
Hello Guru's, Can anyone help me with adding a New Country to Infotype 0009 (Bank Details). 1. In Component FPM_OVP_COMPONENT - Application HRESS_A_PERSINFO - Created a Application Configuration(AC) 2. Started the AC and gave Component Configuration(
-
My updates say pages is updated, but the documents say i need to update to a new version
i cant seem to update pages to the new version, my updater says it is updated, but when i click documents, it says i need the latest version
-
Top n analysis without analytical function or rownum
Hi I am working on Oracle 9i and i have the following query. My data is like as Year Type Total 1996 A 23 1996 B 34 1996 C 19 1996 D 11 1996 E 45 1996 F 32 1997 A 12 1997 B 11 1997 C 34 1997 D 45 1997 E 67 1997 F 11 My requirement is to get the top 4