Reg : Context-switching for built-in functions -

Hi Experts,
Asking this question just out of curiosity to know the internal concepts.
In a SQL query often we use the in-built Oracle functions like LOWER, UPPER, etc.
In this case, does context-switch happen?
Will I be able to look into the code of these functions after logging into SYS schema as SYSDBA?
FYI - I've Oracle XE 11.2 installed in my home pc (currently in office, so don't have access to it).
Help much appreciated!
Thanks,
Ranit

ranit B wrote:
Hi Experts,
Asking this question just out of curiosity to know the internal concepts.
In a SQL query often we use the in-built Oracle functions like LOWER, UPPER, etc.
In this case, does context-switch happen?No, because many of these functions are compiled at low level (C language) into the SQL and the PL/SQL engines, so each has their own 'copy' (in theory) to execute without having to context switch to the other engine.
Will I be able to look into the code of these functions after logging into SYS schema as SYSDBA?No, they are written in C and compiled into the engines.
In terms of the supplied packages (rather than built in functions), many of those are wrapped by oracle so you can only see the public interface, not the actual body code.

Similar Messages

  • Overhead of SQL to PL/SQL context switch using an inline function

    Hi,
    We have a bit of sql in a third party application that uses an inline pl/sql function to do some security checks.
    These security checks are redundant in our system - we don't use the functionality so the result is always true, but the function is always called for each line of output, which is over a thousand for a lot of records.
    The function itself is fairly lightweight in our environment - the tables it uses are empty so each iteration of the function is quite quick (about .1 of a second per query in total, vs 12-15 seconds for the 'main' query). What I was wondering if there is any way of measuring the overhead of just doing the function calls.
    If I do a trace of the session I see the timings and cost of the 'main' sql query, and the breakdown of the 2 sql statements that have been called in the function (with over 1000 executions each) but is there any way to measure how much of the time to execute the main query is spent doing the context switch?
    Regards,
    Carl

    You could knock up some example to show the timings and measure it...
    The following shows an example using context switching from PL/SQL to SQL and back in a loop, which gives an idea of the performance difference...
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2    v_sysdate DATE;
      3  begin
      4    v_sysdate := SYSDATE;
      5    INSERT INTO mytable SELECT rownum FROM DUAL CONNECT BY ROWNUM <= 1000000;
      6    DBMS_OUTPUT.PUT_LINE('Single Transaction: Time Taken: '||ROUND(((SYSDATE-v_sysdate)*(24*60*60)),0));
      7    EXECUTE IMMEDIATE 'TRUNCATE TABLE mytable';
      8    v_sysdate := SYSDATE;
      9    FOR i IN 1..1000000
    10    LOOP
    11      INSERT INTO mytable (x) VALUES (i);
    12    END LOOP;
    13    DBMS_OUTPUT.PUT_LINE('Multi Transaction: Time Taken: '||ROUND(((SYSDATE-v_sysdate)*(24*60*60)),0));
    14    EXECUTE IMMEDIATE 'TRUNCATE TABLE mytable';
    15* end;
    SQL> /
    Single Transaction: Time Taken: 1
    Multi Transaction: Time Taken: 37
    PL/SQL procedure successfully completed.
    SQL>Likewise you could time a query with X number of rows calling a PL/SQL function and not calling a PL/SQL function to see the difference. The more rows you do, the better idea you'll get of the difference.
    ;)

  • High thread context switching for java web application

    We have been load testing our java web application and observe high cpu usage with 50 users (which doesn't seem practical). The CPU shoots up above 80%. While profiling it with java flight recording (JFR) we see that the context switch rate is 8400 per second (as seen in the Hot threads tab on java mission control). Analyzing the hot threads in jfr, it seems the cpu usage is distributed across the application threads with each thread using less than 3% cpu.
    Increasing the user load to 100, 150 or 200 users we see the cpu shooting up above 90%, the throughput (transactions per second) remaining constant (as seen for 50 users load) while the response time crosses the acceptable threshold values (3 sec). Decreasing the user load to 20 users shows the cpu usage averages out to be above 55%. It certainly isn't true that the application threads are using up the cpu since our application is not a CPU bound application. The Hot Packages tab under Code tab group confirms this by showing that most of the time the application spends in is executing database queries.
    We use glassfish 3.1.2.2 as our application server where the max thread pool is configured to be of 100. Oracle Linux Server release 6.4 is our operating system with linux kernel version as 2.6.39-400.214.4.el6uek.x86_64. I tried executing linux commands namely "watch -n0.5 pidstat -w -I -p " and "watch -n.5 grep ctxt /proc//status" to see the voluntary and involuntary thread context switching at OS level but they don't give any results.
    Suspecting that high context switching could be causing the cpu to shoot up, do you have guidelines on what could be done to confirm that thread context switching is the cause of high cpu and what are there ways to tune the jvm or the application if that's the cause?
    Thanks!

    Kelum -
    We just saw this issue today for the first time. Have you been able to find a cause?
    We upgraded our 32bit Windows operating systems this weekend to use the /3GB flag. Since then, we have seen that our servers have ample heap space, but are dangerously low in PTE memory.
    But when we've been diagnosing the state of the server that produced this error (we run 2 nodes on 3 different computers; only 1 produced this error; the other 5 are working normally), everything looked fine. The server was reporting sufficient PTE availablility, plenty of heap space, and around 172 threads (we expect to be able to run many more than that).
    When we restarted the node, it came up fine and everything appeared to be working normally.
    So I'm looking for any clue as to the root cause, and what kind of resolution to explore. Any clues or pointers would be greatly appreciated.
    Paul Christmann

  • How to find built-in functions for PL/SQL

    Hi everyone,
    Please can someone help me, I am running version 8i, and I am trying to find out how I can access all the built-in functions for PL/SQL.
    I am new in ORACLE environment and I just want to know all the built-in functions and their usage.
    Thanks
    Maikiki1
    null

    Use the 'Documentation' selection on the left side of the OTN page.
    All of the documentation for Oracle is available.
    You can also purchase the documentation CD-ROM from the Oracle Store.
    The functions are explained in the SQL reference manual.
    null

  • Built-in functions to check for numeric or string

    Hi,
    Is there any built-in functions in java for checking if the value is numeric or is a string ?
    tks & rdgs

    Hi,
    I have a string og such value "1 testing" that i will be using stringtokenzier to get the individual parts but i do not want to return "1" but only "testing" so i'll need to check whether if the parts can be converted to numeric if so , then i don't return else return the value
    tks & rdgs

  • Built-in functions for Forms in Oracle AS 10g

    Hi,
    We have recently installed form and report services for AS10g.
    Altough we have successfully converted and deployed static 6i forms to the server, the built in functions (like CALL FORM etc.) doesn't work.
    For instance a form is diplayed and is able to retrieve data but it does actually nothing when a button is pressed with underlying CALL_FORM, SET_WINDOW_PROPERTY functions.
    In our developer's devSuite these functions work fine, so I wonder if some service to be added to the server side.
    Any help will be appreciated,
    Thanks,
    Guney Hanedan

    If your development and target systems are different make sure you regenerate the FMX files...also make sure you have the correct case....in windows CALL_FORM('FormA') is will call a form called FORMA or ForMA or FORma..if you are deployed on unix or linux this will fail .
    REgards
    Grant Ronald
    Oracle Product Management

  • FORALL context switching .. how it works ?

    hi guys,
    in the asktom link over here
    <u>http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:17483288166654#17514276298239 </u>
    it was said that
    <i>
    forall i in 1 .. z_tab.count
    insert
    does this:
    a) gather up inpus to insert (the entire z_tab)
    b) perform context switch from PLSQL to SQL
    c) execute insert N-times
    d) perform context switch back from SQL to PLSQL
    </i>
    my question is does FORALL statement loops ?
    does it do this ?
    <b>Example 1</b>
    loop 1
    gather data to insert
    loop 2
    gather data to insert
    loop 3
    gather data to insert
    loop finish
    context switch to sql engine
    perform insert 1 by 1
    or
    <b>Example 2</b>
    loop 1 or no loop at all
    gather all data required for insert
    loop finish
    context switch to sql engine
    perform insert 1 by 1
    my guess is example 1 is the correct answer
    Advices gurus ?
    Regards,
    Noob

    At what level are you asking the question?
    In the context of PL/SQL, there is no loop. But if you pull back the layers and look at the intermediate language the procedure is compiled into, how the PL/SQL VM happens to implement those intermediate language instructions, how Oracle's C code happens to implement the VM, etc. it wouldn't shock me if there was some sort of loop-like construct in at least some level in some version of Oracle in some situation. Particularly depending on what you want to count as a loop at that level (somewhere in the SQL engine's C code, for example, Oracle might well have a loop when you're doing a full table scan, though it's probably not particularly useful to talk about a full table scan being in a loop)
    In addition, why are you asking the question? I cannot envision a functionality or performance difference between the two approaches, so it doesn't seem like something that would have any influence on how you use a particular PL/SQL construct.
    Justin

  • A replacement for the Quicksort function in the C++ library

    Hi every one,
    I'd like to introduce and share a new Triple State Quicksort algorithm which was the result of my research in sorting algorithms during the last few years. The new algorithm reduces the number of swaps to about two thirds (2/3) of classical Quicksort. A multitude
    of other improvements are implemented. Test results against the std::sort() function shows an average of 43% improvement in speed throughout various input array types. It does this by trading space for performance at the price of n/2 temporary extra spaces.
    The extra space is allocated automatically and efficiently in a way that reduces memory fragmentation and optimizes performance.
    Triple State Algorithm
    The classical way of doing Quicksort is as follows:
    - Choose one element p. Called pivot. Try to make it close to the median.
    - Divide the array into two parts. A lower (left) part that is all less than p. And a higher (right) part that is all greater than p.
    - Recursively sort the left and right parts using the same method above.
    - Stop recursion when a part reaches a size that can be trivially sorted.
     The difference between the various implementations is in how they choose the pivot p, and where equal elements to the pivot are placed. There are several schemes as follows:
    [ <=p | ? | >=p ]
    [ <p | >=p | ? ]
    [ <=p | =p | ? | >p ]
    [ =p | <p | ? | >p ]  Then swap = part to middle at the end
    [ =p | <p | ? | >p | =p ]  Then swap = parts to middle at the end
    Where the goal (or the ideal goal) of the above schemes (at the end of a recursive stage) is to reach the following:
    [ <p | =p | >p ]
    The above would allow exclusion of the =p part from further recursive calls thus reducing the number of comparisons. However, there is a difficulty in reaching the above scheme with minimal swaps. All previous implementation of Quicksort could not immediately
    put =p elements in the middle using minimal swaps, first because p might not be in the perfect middle (i.e. median), second because we don’t know how many elements are in the =p part until we finish the current recursive stage.
    The new Triple State method first enters a monitoring state 1 while comparing and swapping. Elements equal to p are immediately copied to the middle if they are not already there, following this scheme:
    [ <p | ? | =p | ? | >p ]
    Then when either the left (<p) part or the right (>p) part meet the middle (=p) part, the algorithm will jump to one of two specialized states. One state handles the case for a relatively small =p part. And the other state handles the case for a relatively
    large =p part. This method adapts to the nature of the input array better than the ordinary classical Quicksort.
    Further reducing number of swaps
    A typical quicksort loop scans from left, then scans from right. Then swaps. As follows:
    while (l<=r)
    while (ar[l]<p)
    l++;
    while (ar[r]>p)
    r--;
    if (l<r)
    { Swap(ar[l],ar[r]);
    l++; r--;
    else if (l==r)
    { l++; r--; break;
    The Swap macro above does three copy operations:
    Temp=ar[l]; ar[l]=ar[r]; ar[r]=temp;
    There exists another method that will almost eliminate the need for that third temporary variable copy operation. By copying only the first ar[r] that is less than or equal to p, to the temp variable, we create an empty space in the array. Then we proceed scanning
    from left to find the first ar[l] that is greater than or equal to p. Then copy ar[r]=ar[l]. Now the empty space is at ar[l]. We scan from right again then copy ar[l]=ar[r] and continue as such. As long as the temp variable hasn’t been copied back to the array,
    the empty space will remain there juggling left and right. The following code snippet explains.
    // Pre-scan from the right
    while (ar[r]>p)
    r--;
    temp = ar[r];
    // Main loop
    while (l<r)
    while (l<r && ar[l]<p)
    l++;
    if (l<r) ar[r--] = ar[l];
    while (l<r && ar[r]>p)
    r--;
    if (l<r) ar[l++] = ar[r];
    // After loop finishes, copy temp to left side
    ar[r] = temp; l++;
    if (temp==p) r--;
    (For simplicity, the code above does not handle equal values efficiently. Refer to the complete code for the elaborate version).
    This method is not new, a similar method has been used before (read: http://www.azillionmonkeys.com/qed/sort.html)
    However it has a negative side effect on some common cases like nearly sorted or nearly reversed arrays causing undesirable shifting that renders it less efficient in those cases. However, when used with the Triple State algorithm combined with further common
    cases handling, it eventually proves more efficient than the classical swapping approach.
    Run time tests
    Here are some test results, done on an i5 2.9Ghz with 6Gb of RAM. Sorting a random array of integers. Each test is repeated 5000 times. Times shown in milliseconds.
    size std::sort() Triple State QuickSort
    5000 2039 1609
    6000 2412 1900
    7000 2733 2220
    8000 2993 2484
    9000 3361 2778
    10000 3591 3093
    It gets even faster when used with other types of input or when the size of each element is large. The following test is done for random large arrays of up to 1000000 elements where each element size is 56 bytes. Test is repeated 25 times.
    size std::sort() Triple State QuickSort
    100000 1607 424
    200000 3165 845
    300000 4534 1287
    400000 6461 1700
    500000 7668 2123
    600000 9794 2548
    700000 10745 3001
    800000 12343 3425
    900000 13790 3865
    1000000 15663 4348
    Further extensive tests has been done following Jon Bentley’s framework of tests for the following input array types:
    sawtooth: ar[i] = i % arange
    random: ar[i] = GenRand() % arange + 1
    stagger: ar[i] = (i* arange + i) % n
    plateau: ar[i] = min(i, arange)
    shuffle: ar[i] = rand()%arange? (j+=2): (k+=2)
    I also add the following two input types, just to add a little torture:
    Hill: ar[i] = min(i<(size>>1)? i:size-i,arange);
    Organ Pipes: (see full code for details)
    Where each case above is sorted then reordered in 6 deferent ways then sorted again after each reorder as follows:
    Sorted, reversed, front half reversed, back half reversed, dithered, fort.
    Note: GenRand() above is a certified random number generator based on Park-Miller method. This is to avoid any non-uniform behavior in C++ rand().
    The complete test results can be found here:
    http://solostuff.net/tsqsort/Tests_Percentage_Improvement_VC++.xls
    or:
    https://docs.google.com/spreadsheets/d/1wxNOAcuWT8CgFfaZzvjoX8x_WpusYQAlg0bXGWlLbzk/edit?usp=sharing
    Theoretical Analysis
    A Classical Quicksort algorithm performs less than 2n*ln(n) comparisons on the average (check JACEK CICHON’s paper) and less than 0.333n*ln(n) swaps on the average (check Wild and Nebel’s paper). Triple state will perform about the same number of comparisons
    but with less swaps of about 0.222n*ln(n) in theory. In practice however, Triple State Quicksort will perform even less comparisons in large arrays because of a new 5 stage pivot selection algorithm that is used. Here is the detailed theoretical analysis:
    http://solostuff.net/tsqsort/Asymptotic_analysis_of_Triple_State_Quicksort.pdf
    Using SSE2 instruction set
    SSE2 uses the 128bit sized XMM registers that can do memory copy operations in parallel since there are 8 registers of them. SSE2 is primarily used in speeding up copying large memory blocks in real-time graphics demanding applications.
    In order to use SSE2, copied memory blocks have to be 16byte aligned. Triple State Quicksort will automatically detect if element size and the array starting address are 16byte aligned and if so, will switch to using SSE2 instructions for extra speedup. This
    decision is made only once when the function is called so it has minor overhead.
    Few other notes
    - The standard C++ sorting function in almost all platforms religiously takes a “call back pointer” to a comparison function that the user/programmer provides. This is obviously for flexibility and to allow closed sourced libraries. Triple State
    defaults to using a call back function. However, call back functions have bad overhead when called millions of times. Using inline/operator or macro based comparisons will greatly improve performance. An improvement of about 30% to 40% can be expected. Thus,
    I seriously advise against using a call back function when ever possible. You can disable the call back function in my code by #undefining CALL_BACK precompiler directive.
    - Like most other efficient implementations, Triple State switches to insertion sort for tiny arrays, whenever the size of a sub-part of the array is less than TINY_THRESH directive. This threshold is empirically chosen. I set it to 15. Increasing this
    threshold will improve the speed when sorting nearly sorted and reversed arrays, or arrays that are concatenations of both cases (which are common). But will slow down sorting random or other types of arrays. To remedy this, I provide a dual threshold method
    that can be enabled by #defining DUAL_THRESH directive. Once enabled, another threshold TINY_THRESH2 will be used which should be set lower than TINY_THRESH. I set it to 9. The algorithm is able to “guess” if the array or sub part of the array is already sorted
    or reversed, and if so will use TINY_THRESH as it’s threshold, otherwise it will use the smaller threshold TINY_THRESH2. Notice that the “guessing” here is NOT fool proof, it can miss. So set both thresholds wisely.
    - You can #define the RANDOM_SAMPLES precompiler directive to add randomness to the pivoting system to lower the chances of the worst case happening at a minor performance hit.
    -When element size is very large (320 bytes or more). The function/algorithm uses a new “late swapping” method. This will auto create an internal array of pointers, sort the pointers array, then swap the original array elements to sorted order using minimal
    swaps for a maximum of n/2 swaps. You can change the 320 bytes threshold with the LATE_SWAP_THRESH directive.
    - The function provided here is optimized to the bone for performance. It is one monolithic piece of complex code that is ugly, and almost unreadable. Sorry about that, but inorder to achieve improved speed, I had to ignore common and good coding standards
    a little. I don’t advise anyone to code like this, and I my self don’t. This is really a special case for sorting only. So please don’t trip if you see weird code, most of it have a good reason.
    Finally, I would like to present the new function to Microsoft and the community for further investigation and possibly, inclusion in VC++ or any C++ library as a replacement for the sorting function.
    You can find the complete VC++ project/code along with a minimal test program here:
    http://solostuff.net/tsqsort/
    Important: To fairly compare two sorting functions, both should either use or NOT use a call back function. If one uses and another doesn’t, then you will get unfair results, the one that doesn’t use a call back function will most likely win no matter how bad
    it is!!
    Ammar Muqaddas

    Thanks for your interest.
    Excuse my ignorance as I'm not sure what you meant by "1 of 5" optimization. Did you mean median of 5 ?
    Regarding swapping pointers, yes it is common sense and rather common among programmers to swap pointers instead of swapping large data types, at the small price of indirect access to the actual data through the pointers.
    However, there is a rather unobvious and quite terrible side effect of using this trick. After the pointer array is sorted, sequential (sorted) access to the actual data throughout the remaining of the program will suffer heavily because of cache misses.
    Memory is being accessed randomly because the pointers still point to the unsorted data causing many many cache misses, which will render the program itself slow, although the sort was fast!!.
    Multi-threaded qsort is a good idea in principle and easy to implement obviously because qsort itself is recursive. The thing is Multi-threaded qsort is actually just stealing CPU time from other cores that might be busy running other apps, this might slow
    down other apps, which might not be ideal for servers. The thing researchers usually try to do is to do the improvement in the algorithm it self.
    I Will try to look at your sorting code, lets see if I can compile it.

  • How to use a mysql built-in function with dataprovider

    hi.
    I want to use a mysql built-in function, for example, MD5() on a column when updating a table with dataprovider.
    Something like this doesn't work:
    MyDataProviderOne.setValue("tablename.field_name", "MD5('some text')");
    How should it be done?
    thanks.
    Mike.

    hi.
    thanks. this helped, but I'd like to use also different functions, that's why, I'd rather do it by MySQL built-in functions with dataprovider... Is there any way to do that?
    best regards.
    Mike.

  • SSMS 2012: Import XML File to SQL Table - 'value' is not a recognized built-in function name!!??

    Hi all,
    I have the following xml file (books1.xml):
    <bookstore>
    <book>
    <BookID>1</BookID>
    <title>Everyday Italian</title>
    <author>Giada De Laurentiis</author>
    <year>2005</year>
    <price>30.00</price>
    </book>
    <book>
    <BookID>2<BookID>
    <title>Harry Potter</title>
    <author>J K. Rowling</author>
    <year>2005</year>
    <price>29.99</price>
    </book>
    <book>
    <BookID>3<BookID>
    <title>XQuery Kick Start</title>
    <author>James McGovern</author>
    <year>2003</year>
    <price>49.99</price>
    </book>
    <book>
    <BookID>4<BookID>
    <title>Learning XML</title>
    <author>Erik T. Ray</author>
    <year>2003</year>
    <price>39.95</price>
    </book>
    </bookstore>
    In my Microsoft SQL Server 2012 Management Studio, I executed the following SQL Query code:
    --XQuery w3schools example using books1.xml in C:\Temp folder
    ---SQL Query W3books Title
    ---9 March 2015
    USE XML_XQUERY
    GO
    CREATE TABLE W3Books(
    BookID INt Primary Key,
    Title VARCHAR(30));
    INSERT INTO W3Books (BookID, Title)
    SELECT x.book.query('BookID'), value('.', 'INT'),
    x.book.query('title'), value('.', 'VARCHAR(30)')
    FROM (
    SELECT CAST(x AS XML)
    FROM OPENROWSET(
    BULK 'C:\Temp\books1.xml',
    SINGLE_BLOB) AS T(x)
    ) AS T(x)
    CROSS APPLY x.nodes('W3Books/book') AS x(book);
    SELECT BookID, Title
    FROM W3Books;
    I got the following error messages:
    Msg 195, Level 15, State 10, Line 7
    'value' is not a recognized built-in function name.
    Msg 156, Level 15, State 1, Line 16
    Incorrect syntax near the keyword 'AS'.
    I don't know why I got the error of 'value' is not a recognized built-in function name. Please kindly help and tell me what is wrong in my code and how to correct the error.
    Thanks, Scott Chang
    P. S.
    (1) I mimicked the xml file and SQL Qeury code of Import XML File to SQL Table in
    http://pratchev.blogspot.com/2008/11/import-xml-file-to-sql-table.html. The xml file and the code of this sample worked in my SSMS 2012 program.
    (2) I am learning the "CAST" and "CROSS APPLY" in the Create Instances of XML Data of Microsoft MSDN - it is very abstract to me.

    Hi Stan210, Thanks for your nice response.
    I corrected my xml file as you pointed out.
    I made some changes in some code statements of my SQLQueryW3BookTitle.sql as you instructed:
    --XQuery w3schools example using books1.xml in C:\Temp folder
    ---SQL Query W3books Title
    ---10 March 2015
    USE XML_XQUERY
    GO
    CREATE TABLE W3Books(
    BookID INt Primary Key,
    Title VARCHAR(30));
    INSERT INTO W3Books (BookID, Title)
    SELECT x.book.value('/BookID[1]', 'INT'),
    x.book.value('/title[1]', 'VARCHAR(30)')
    FROM (
    SELECT CAST(x AS XML)
    FROM OPENROWSET(
    BULK 'C:\Temp\books1.xml',SINGLE_BLOB) AS T(x)
    ) AS T(x)
    CROSS APPLY x.nodes('bookstore/book') AS x(book);
    SELECT BookID, Title
    FROM W3Books;
    I executed my revised sql and I got the following Message and Results:
    Msg 515, Level 16, State 2, Line 6
    Cannot insert the value NULL into column 'BookID', table 'XML_XQUERY.dbo.W3Books'; column does not allow nulls. INSERT fails.
    The statement has been terminated.
    (0 row(s) affected)
    Results:
    BookID    Title
    I don't know why I just got the names of columns in Results and the "Cannot insert the value NULL into column 'BookID', table 'XML_XQUERY.dbo.W3Books'; column does not allow nulls, insert fails." in Messages.  Please kindly help, advise me
    how to correct the errors and respond again.
    Many Thanks again,
    Scott Chang

  • Issue in creating web service for a ABAP Function Module

    Hi,
    now i'm learning how to create web service for a ABAP Function Module. I used the following steps.
    1. select the Function Module, named "zws_test".
    2. in the context menu, select "create->proxy object". so we enter into wizard.
    3. in the wizard, press the radio button "Service Provider".
    4. in the next page, press the radio button "Existing ABAP Objects(Inside Out)".
    5. In the next page, Enter the "zws_test_prvider" as Service Definition and select "Function Module" as Endpoint Type.
    6. in the next page, enter "zws_test" as Function Module and mark the "Mapping der Namen" button
    7. in the next page,select "PRF_DT_IF_SEC_LOW" as Profile and mark "Deploy Service".
    8. Save in the local package.
    9. then it will pop up a window with title "WSDL Source". i selected "URL/HTTP Destination" and press "OK".
    10.in the next page, i enter the URL as "http://hostname:portnumber/", and press "OK".
    11. then it will pop up a window with title "Display logs". A record with error message "HTTP error(return code 404, message "Not found")" appears.
    12. i press "ok" and a service provider with name "zws_test_prvider" appears in my local package.
    13. i use "zws_test_prvider"'s URL to create a service consumer "ZCO_WS_TEST_CONSUMER" and logic portal "LP1".
    14. But when i test my service consumer "ZCO_WS_TEST_CONSUMER", it will throw an exception "cx_ai_system_fault" with errortext "SOAP:14 Unexpected element -el=definitions ns=http://schemas.xmlsoap.org/wsdl/".
    15. I use t-code SM59 to test connection  and get the following info.
          Status HTTP Response     200
          Status Text                      OK
          Duration Test Call             328 ms.
    who can give me the reasons about item 11 and 14, and explain me how to create service provider and service consumer for a Function Module.
    Thanks in advance
    Johnney

    have you seen this weblog
    /people/thomas.jung3/blog/2004/11/15/bsp-150-a-developer146s-journal-part-xiii-developing-abap-webservices

  • How to call the built in functions from flex?

    I want to use some of the Built in functions like the twelvesprints.getActivityOwnerId() in flex. From the java example i could make out that we needed to import some classes to do this but was unable to find them for flex.

    You can download the SWC file for Flex Method app here:
    https://sandbox.12sprints.com/FlashMethodLib.swc
    Java samples are located at
    https://streamwork.com/api/Java.zip
    Method exaples are available at:
    https://streamwork.com/api/methods/com.streamwork.hello_world.zip
    https://streamwork.com/api/methods/com.streamwork.constants.zip
    https://streamwork.com/api/methods/com.streamwork.using_arrays.zip
    com.streamwork.testFlash

  • What are the Built-In-Functions in XSLT mapping?

    what are the Built-In-Functions in XSLT mapping?

    hi praveen
    check the below blogs
    XSLT MAPPING                                   
    Step u2013 By u2013 Step Simple Approach for XSLT Mapping                                   
    Step – By – Step Simple Approach for XSLT Mapping                                   
    XSLT mapping for multiple segments of XML                                   
    XSLT mapping for multiple segments of XML                                   
    IF - ELSE IF and XSLT - A Better work around ?                                   
    IF - ELSE IF and XSLT - A Better work around ?                                   
    Calling instance (object) method of ABAP Class into xslt mapping by using SAP: CALL-EXTERNAL                                             
    Calling instance (object) method of ABAP Class into xslt mapping by using SAP: CALL-EXTERNAL                                             
    xpath functions in xslt mapping                                             
    xpath functions in xslt mapping                                             
    Using XSLT Mapping within the J2EE Adapter Framework                                             
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3823 [original link is broken] [original link is broken] [original link is broken]                                             
    EDIFACT to XML - Stylus Studio Solution                                             
    EDIFACT to XML - Stylus Studio Solution                                             
    Running NetWeaver's XSLT processor from XMLSpy                                             
    Running NetWeaver's XSLT processor from XMLSpy                                             
    generic xslt mapping part 1                                             
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb983c1                                             
    generic xslt mapping part 1          part2                                   
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9692eb84-0601-0010-5ca0-923b4fb8674a                                             
    xslt recursive templates                                             
    XSLT: Recursive Templates                                             
    Generating Generic XML / HTML files without using XSLT Mappings                                                       
    Generating Generic XML / HTML files without using XSLT Mappings                                                       
    regards
    kummari

  • List of built-in Functions in SAP system

    Hi,
    I am trying to find the complete list of built-in function available in SAP system. I searched in SAP help but could not find a comprehensive list at all. I am wondering if anyone can help me locate the list.
    Thank you in advance,
    Sunny

    Hi Sunny,
    in my system are already 77.197 transaction codes defined. OK, some are customer development, but on the other hand we are fare away from having all modules installed.
    I'm not sure, if you are looking for all transactions, all function modules, all BAPIs, all interfaces...
    ...but be sure, no one can EVER go through a whole list.
    You have to restrict your search: to a specific topic (e.g. only material master), specific technics (e.g. only IDOCs) - then you can successfully browse through the possibilities.
    Regards,
    Christian

  • Decode Vs Case:  context switching?

    So I was told recently that among other reasons, CASE is "better" than Decode in SQL statements because Decode context switches to PL/SQL to perform the checks.
    I can't find anything in the documentation to support this.
    this site here:
    http://www.dba-oracle.com/oracle_news/2005_11_23_case_decode_machinations.htm
    mentions that one of the disadvantages of decode is that it's post-retrieval, but it also seems to mention that so is CASE.
    anyone have any idea where someone may have got the "context switching" idea from?

    have often wondered why you would use CASE in PL/SQL when it has IF THEN control structures. Yes, you could, however readability would suffer. But what is more important CASE has a form where expression is evaluated only once:
    SQL> SET SERVEROUTPUT ON
    SQL> DECLARE
      2      X NUMBER;
      3  BEGIN
      4      PKG1.CNT := 2;
      5      X := CASE PKG1.F1
      6             WHEN 1 THEN 1
      7             WHEN 2 THEN 2
      8             WHEN 3 THEN 3
      9           END;
    10      DBMS_OUTPUT.PUT_LINE('X = ' || X);
    11      DBMS_OUTPUT.PUT_LINE('PKG1.CNT = ' || PKG1.CNT);
    12  END;
    13  /
    Call to PKG1.F1
    X = 3
    PKG1.CNT = 3
    PL/SQL procedure successfully completed.
    SQL> DECLARE
      2      X NUMBER;
      3  BEGIN
      4      PKG1.CNT := 2;
      5      IF PKG1.F1 = 1
      6        THEN X := 1;
      7      ELSIF PKG1.F1 = 2
      8        THEN X := 2;
      9      ELSIF PKG1.F1 = 3
    10        THEN X := 3;
    11      END IF;
    12      DBMS_OUTPUT.PUT_LINE('X = ' || X);
    13      DBMS_OUTPUT.PUT_LINE('PKG1.CNT = ' || PKG1.CNT);
    14  END;
    15  /
    Call to PKG1.F1
    Call to PKG1.F1
    Call to PKG1.F1
    X =
    PKG1.CNT = 5
    PL/SQL procedure successfully completed.
    SQL> In such case you would have to introduce a temp variable:
    SQL> CREATE OR REPLACE
      2  PACKAGE PKG1
      3  IS
      4  CNT NUMBER;
      5  FUNCTION F1 RETURN NUMBER;
      6  END;
      7  /
    Package created.
    SQL> CREATE OR REPLACE
      2  PACKAGE BODY PKG1
      3  IS
      4  FUNCTION F1 RETURN NUMBER
      5  IS
      6  BEGIN
      7  DBMS_OUTPUT.PUT_LINE('Call to PKG1.F1');
      8  CNT := CNT + 1;
      9  RETURN CNT;
    10  END;
    11  END;
    12  /
    Package body created.
    SQL> SET SERVEROUTPUT ON
    SQL> DECLARE
      2      X NUMBER;
      3  BEGIN
      4      PKG1.CNT := 2;
      5      X := CASE PKG1.F1
      6             WHEN 1 THEN 1
      7             WHEN 2 THEN 2
      8             WHEN 3 THEN 3
      9           END;
    10      DBMS_OUTPUT.PUT_LINE('X = ' || X);
    11      DBMS_OUTPUT.PUT_LINE('PKG1.CNT = ' || PKG1.CNT);
    12  END;
    13  /
    Call to PKG1.F1
    X = 3
    PKG1.CNT = 3
    PL/SQL procedure successfully completed.
    SQL> DECLARE
      2      X NUMBER;
      3      TMP NUMBER;
      4  BEGIN
      5      PKG1.CNT := 2;
      6      TMP := PKG1.F1;
      7      IF TMP = 1
      8        THEN X := 1;
      9      ELSIF TMP = 2
    10        THEN X := 2;
    11      ELSIF TMP = 3
    12        THEN X := 3;
    13      END IF;
    14      DBMS_OUTPUT.PUT_LINE('X = ' || X);
    15      DBMS_OUTPUT.PUT_LINE('PKG1.CNT = ' || PKG1.CNT);
    16  END;
    17  /
    Call to PKG1.F1
    X = 3
    PKG1.CNT = 3
    PL/SQL procedure successfully completed.
    SQL> SY.

Maybe you are looking for

  • Filling an object ArrayList from a text file

    Hi all, I am developing a project (for university) which has a class named "SupplierAgent", which is required to keep database of custom objects of type "InventoryItem". Basically these consist of a String (for the name of the item), an int represent

  • Arobat Reader XI and Windows 8.1 Problems

    I am having two problems whcih may be related.  I can no longer update and re-save .PDF files on my computer that I previously commented on and saved.  The second problem is that I can no longer delete .PDFs on on computer as I get a message stating

  • Printing Error Message

    Hi. I'm new to Aperture, mostly loving it, but having a bear of a time doing something that's probably very simple. I'm most likely just an idiot for missing the obvious, but: I'm running Aperture on a 24" iMac with max'ed memory, connected to an HP

  • Drop down menu or combo box in jtable

    Hi there I nee urgent help I have a jtable and I am collecting information to populate the table dynamically, the problem is I some of the strings that populate certain cells is longer the the width of the cell in a particular column, I thought I cou

  • IMac 21.5, which one ?

    Hi guys, I'm going to buy my first iMac after several years as a Windows user. I was thinking to get the 21.5 model (the 27 is too big for me) but I was a little bit confused about the integrated video adapter (Nvidia 9400M) which seems to be an entr