Personalizations example with functionality?

Hi,
I am new to OA Framework and I am trying to learn how to achieve some customizations through personalization.
So, suppose I add a new textbox on a page (MessageTextInput). Can someone give me an example of how I can put some functionality behind this textbox? Can I alter the default business logic behind the OA page to take into consideration the value in the textbox? Or if this is not possible, then do I need to write my own controller? Do I need to place a new button on the page to invoke my controller?
It would be great if you could give me some simple advice to get me started.
Thanks in advance!

Hi,
Refer the sample code in this link,
http://www.sapnet.ru/viewtopic.php?t=289
and also the link below,
Sample code for using BAPI 'BAPI_DELIVERYPROCESSING_EXEC'
Edited by: Tharani on Feb 3, 2009 5:57 AM

Similar Messages

  • Bug with function "resume 0x****"  of jdb

    One problem with the function of jdb occured when I tried to use it to
    pilot the processor with differents threads. In fact, I use a simple example with 2 threads.
    I stop the two threads with two breakpoint, and I want to resume one or the other (with the function "resume 0x****"), the one wich I resumed stop again on the breackpoint and I decide again to resume one or the other. All of that to obtain a tree of execution.
    I give you the code of the class and the code of jdb.
    CLASS: (it's just a object Room with a variable degre that I increment and decrement with two threads increase and decrease)
    public class Test{
          public static void main(String[] args){
               Room r = new Room();
               decrease de = new decrease(r);
               increase in = new increase(r);
               de.start();
               in.start();
    class Room {
         private volatile int degre=20;
         public void more(){
            degre += 4;
         public void less(){      
           degre -= 3;     
    class decrease extends Thread{
       private Room room;
       public decrease(Room r){
                 room =r;
       public void run(){
        try{ 
         while (!interrupted()){ 
                    room.less();  
          catch(InterruptedException e) {}
    class increase extends Thread{
       private Room room;
       public increase(Room r){
            room =r;
       public void run(){ 
            try{ 
                 while (!interrupted()){
                      room.more();
           catch(InterruptedException e) {}
    JDB:
    Initializing jdb ...
    stop at Test:7Deferring breakpoint Test:7.
    It will be set after the class is loaded.
    runrun Test
    Set uncaught java.lang.Throwable
    Set deferred uncaught java.lang.Throwable
    >
    VM Started: Set deferred breakpoint Test:7
    Breakpoint hit: "thread=main", Test.main(), line=7 bci=30
    7 in.start();
    main[1] stop at room:16
    Set breakpoint room:16
    main[1] stop at room:20
    Set breakpoint room:20
    main[1] resume
    All threads resumed.
    >
    Breakpoint hit: "thread=Thread-0", room.less(), line=20 bci=0
    20 degre -= 3;
    Thread-0[1] threads
    Group system:
    (java.lang.ref.Reference$ReferenceHandler)0x10d Reference Handler cond. waiting
    (java.lang.ref.Finalizer$FinalizerThread)0x10c Finalizer cond. waiting
    (java.lang.Thread)0x10b Signal Dispatcher running
    Group main:
    (decrease)0x146 Thread-0 running (at breakpoint)
    (increase)0x147 Thread-1 running (at breakpoint)
    (java.lang.Thread)0x148 DestroyJavaVM running
    Thread-0[1] resume 0x147
    Thread-0[1]
    Breakpoint hit: "thread=Thread-1", room.more(), line=16 bci=0
    16 degre += 4;
    Thread-1[1] resume 0x147
    Thread-1[1]
    Breakpoint hit: "thread=Thread-1", room.more(), line=16 bci=0
    16 degre += 4;
    Thread-1[1] print degre
    degre = 24
    Thread-1[1] resume 0x146 //It's here the problem, thread 0x146 have to stop on the //next breakpoint of decrease but nothing happen
    Thread-1[1] resume 0x147
    Thread-1[1]
    Breakpoint hit: "thread=Thread-1", room.more(), line=16 bci=0
    16 degre += 4;
    Thread-1[1] clear
    Breakpoints set:
    breakpoint Test:7
    breakpoint room:16
    breakpoint room:20
    PS: I tried many other examples with other class and other kind of breakpoints, but, in any cases, on thread doesn't manage to resume. When I try with general resume (no specification of the thread), It works but it isn't interresting for me because I want to decide wich thread continue his execution.

    Looks like a memory clearing problem in the function. Best to post this problem in an OSS message, or look through the OSS notes to see if the problem has been identified before.
    Michael.

  • Forms Personalization for multiple Functions

    Hello, I am looking to make a forms personalization to the FORM FNDRSRUN (The standard Submit/View Request Form). This is generally no problem to set up the personalization itself, however FNDRSRUN is referenced as many different FUNCTIONS. It's my understanding that Forms Personalization only operates on FUNCTIONS. I am looking for a way to apply my personalization to every function who's form is FNDRSRUN. Is this possible (without typing the information into each individual function)?
    Thanks
    Brent

    If the above does not work, you can try this -
    1. Enable the necessary personalization at the function level.
    2. Download the personalization using FNDLOAD to an ldt file.
    3. Edit the function name in the ldt file and replace it with the desired function name.
    4. Upload the ldt file back using FNDLOAD
    5. Repeat steps (3) and (4) as many times as necessary (for each function)
    I have not tested this process (will do so tomorrow when I have access to an instance and post the results here).
    HTH
    Srini

  • How we will implement SAPUI5 Routing ? Provide Example with DataModel and Screen Shots

    Hi,
          I am working on Routing and have seen one example in Blog : SAPUI5 & Netweaver Gateway CodeJam Antwerp 
    which is good, but there is no clarity on data model and screen shots of the functionality.
    As i am working this Routing on high priority, Can you please provide example with all the details?
    Thanks,
    seshu

    I would say that that SAPUI5 & Netweaver Gateway CodeJam Antwerp is enough to understand how SAPUI5 Routing is working, to see functionality just copy/paste the code to correct place.
    Another option to see SAPUI5 routing functionality is to check SAPUI5 demokit 'sap.m.SplitApp' Demo Application
    when you select item from the menu, you can see that actually url is changed
    https://sapui5.netweaver.ondemand.com/sdk/test-resources/sap/m/demokit/splitapp/index.html#/mail/item1
    Please feel free to check the source of SplitApp.

  • Example for Functional Area Master Data in Private Company

    Hi Expert
    From my ERP experience with the State Enterprises, there are obvious dimensions to segregate the Functional Area Master Data of each Fund.
    Such as the School Business, sometime they use Functional Area to divide the fund to use with Education Activity, Research Activity and Other Social Services Activity. This dimension oftenly have the direction from the government to be divided.
    Could you please advice for example of Functional Area Master Data to be applied with the Private Company? I need to provide more example for my client to apply the Functional Area to use with, due to they are the independent firm that would like to use Functional Area.
    Rgds,
    Ton

    Hi,
    In private sector you might have similar segregation. For example, I was involved in the project where functional area was used to distinguish R&D expenses from operational expenses on the same fund. I.e. if you can always look at this as additional dimension in your budget management framework, if other dimensions are not sufficient for the efficient reporting. However, you should also bear in mind, that functtional area has other functions (sorry for tautology) which lie more in financial and not budgetary domain.
    Regards,
    Eli

  • Webdynpro ABAP & JAVA step by step example with screen shots

    hi experts,
    i am new in webdynpro. i want to learn webdynpro so any one plz help me how to create,how to install,connect,and how to execute plz send any documents for webdynpro ABAP & JAVA step by step examples with screen shots.it's really helpful for my carrier.
    thanks and regards,
    sapbbm.

    hi bala,
      check out this URL you have 41 sample codes and PDF of Webdynpro for JAVA.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d
    Thanks
    Gopi

  • PDF Documents with Functional Buttons - Works for IE and FireFox but not for Chrome and Safari

    To all,
    Good morning.  Our institution developed a PDF document with functional buttons for printing and e-mailing.  When the document is viewed via Internet Explorer and Firefox, the functional buttons work as expected.  However if the document is viewed via Chrome and Safari, the functional buttons do not work.  The workaround for those who are using Chrome and Safari, the PDF document needs to be saved to their local drive before the functional buttons work.
    Has anyone experienced this issue before?  If yes, what was your solution other than the workaround.
    Thanks.
    Babylon5

    Here's how to configure your browser to run Adobe Reader: http://helpx.adobe.com/acrobat/using/display-pdf-browser-acrobat-xi.html

  • Scaleability with Functions in SQL queries

    Hi,
    In one of our applications we have many views that use a packaged function in the where clause to filter data. This function uses a SYS_CONTEXT() to set and get values. There are couple of issues while using this approach:
    1/ The deterministic function doesn't allow any scability with PQ-server.
    2/ Another issue with this function and also the SYS_CONTEXT-function, they manuipulate the estimated CBO-statistics.
      CREATE TABLE TAB_I
      COLUMN1 NUMBER(16, 0) NOT NULL
    , COLUMN2 VARCHAR2(20)
    , CONSTRAINT TAB_I_PK PRIMARY KEY
        COLUMN1
      ENABLE
    CREATE TABLE TAB_V
        I_COL1     NUMBER(16,0) NOT NULL ENABLE,
        VERSION_ID NUMBER(16,0) NOT NULL ENABLE,
        CRE_DATIM TIMESTAMP (6) NOT NULL ENABLE,
        TERM_DATIM TIMESTAMP (6) NOT NULL ENABLE,
        VERSION_VALID_FROM DATE NOT NULL ENABLE,
        VERSION_VALID_TILL DATE NOT NULL ENABLE,
        CONSTRAINT TAB_V_PK PRIMARY KEY (I_COL1, VERSION_ID) USING INDEX NOCOMPRESS LOGGING ENABLE,
        CONSTRAINT COL1_FK FOREIGN KEY (I_COL1) REFERENCES TAB_I (COLUMN1) ENABLE
    CREATE OR REPLACE
    PACKAGE      app_bitemporal_rules IS
    FUNCTION f_knowledge_time RETURN TIMESTAMP DETERMINISTIC;
    END app_bitemporal_rules;
    create or replace
    PACKAGE BODY      app_bitemporal_rules IS
    FUNCTION f_knowledge_time RETURN TIMESTAMP DETERMINISTIC IS
    BEGIN
         RETURN TO_TIMESTAMP(SYS_CONTEXT ('APP_USR_CTX', 'KNOWLEDGE_TIME'),'DD.MM.YYYY HH24.MI.SSXFF');
    END f_knowledge_time;
    END app_bitemporal_rules;
    explain plan for select *
    FROM tab_i
    JOIN tab_v
    ON tab_i.column1 = tab_v.i_col1
    AND           app_bitemporal_rules.f_knowledge_time BETWEEN tab_v.CRE_DATIM AND tab_v.TERM_DATIM
    where tab_i.column1 = 11111;
    select * from table(dbms_xplan.display);
    Plan hash value: 621902595
    | Id  | Operation                    | Name     | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |          |     1 |    95 |     5   (0)| 00:00:06 |
    |   1 |  NESTED LOOPS                |          |     1 |    95 |     5   (0)| 00:00:06 |
    |   2 |   TABLE ACCESS BY INDEX ROWID| TAB_I    |     1 |    25 |     1   (0)| 00:00:02 |
    |*  3 |    INDEX UNIQUE SCAN         | TAB_I_PK |     1 |       |     1   (0)| 00:00:02 |
    |*  4 |   TABLE ACCESS FULL          | TAB_V    |     1 |    70 |     4   (0)| 00:00:05 |
    Predicate Information (identified by operation id):
       3 - access("TAB_I"."COLUMN1"=11111)
       4 - filter("TAB_V"."I_COL1"=11111 AND
                  "TAB_V"."CRE_DATIM"<="APP_BITEMPORAL_RULES"."F_KNOWLEDGE_TIME"() AND
                  "TAB_V"."TERM_DATIM">="APP_BITEMPORAL_RULES"."F_KNOWLEDGE_TIME"())
    Note
       - 'PLAN_TABLE' is old version
       - dynamic sampling used for this statement (level=2)
    explain plan for select *
    FROM tab_i
    JOIN tab_v
    ON tab_i.column1 = tab_v.i_col1
    AND           '10-OCT-2011' BETWEEN tab_v.CRE_DATIM AND tab_v.TERM_DATIM
    where tab_i.column1 = 11111;
    select * from table(dbms_xplan.display);  
    Plan hash value: 621902595
    | Id  | Operation                    | Name     | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |          |   256 | 24320 |     5   (0)| 00:00:06 |
    |   1 |  NESTED LOOPS                |          |   256 | 24320 |     5   (0)| 00:00:06 |
    |   2 |   TABLE ACCESS BY INDEX ROWID| TAB_I    |     1 |    25 |     1   (0)| 00:00:02 |
    |*  3 |    INDEX UNIQUE SCAN         | TAB_I_PK |     1 |       |     1   (0)| 00:00:02 |
    |*  4 |   TABLE ACCESS FULL          | TAB_V    |   256 | 17920 |     4   (0)| 00:00:05 |
    Predicate Information (identified by operation id):
       3 - access("TAB_I"."COLUMN1"=11111)
       4 - filter("TAB_V"."I_COL1"=11111 AND "TAB_V"."CRE_DATIM"<=TIMESTAMP'
                  2011-10-10 00:00:00.000000000' AND "TAB_V"."TERM_DATIM">=TIMESTAMP' 2011-10-10
                  00:00:00.000000000')
    Note
       - 'PLAN_TABLE' is old version
       - dynamic sampling used for this statement (level=2)   As can be seen in the second plan the cardinality has been guessed correctly, but not in the first case.
    I have also tried with:
    ASSOCIATE STATISTICS WITH packages app_bitemporal_rules DEFAULT COST (1000000/*246919*/,1000,0) DEFAULT SELECTIVITY 50;
    But, this just leads to a increased cost, but no change in cardinality.
    The (1) problem gets solved if I directly use "TO_TIMESTAMP(SYS_CONTEXT ('APP_USR_CTX', 'KNOWLEDGE_TIME'),'DD.MM.YYYY HH24.MI.SSXFF')" in the where clause. But am not able to find a solution for the (2) issue.
    Can you please help.
    Regards,
    Vikram R

    Hi Vikram,
    On the subject of using [url http://download.oracle.com/docs/cd/E11882_01/server.112/e26088/statements_4006.htm#i2115932]ASSOCIATE STATISTICS, having done a little investigation on 11.2.0.2, I'm having trouble adjusting selectivity via "associate statististics ... default selectivity" but no problems with adjusting default cost.
    I've also tried to do the same using an interface type and am running into other issues.
    It's not functionality that I'm overly familiar with as I try to avoid/eliminate using functions in predicates.
    Further analysis/investigation required.
    Including test case of what I've done so far in case anyone else wants to chip in.
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE    11.2.0.2.0      Production
    TNS for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    SQL> drop table t1;
    Table dropped.
    SQL>
    SQL> create table t1
      2  as
      3  select rownum col1
      4  from   dual
      5  connect by rownum <= 100000;
    Table created.
    SQL>
    SQL> exec dbms_stats.gather_table_stats(USER,'T1');
    PL/SQL procedure successfully completed.
    SQL>
    SQL> create or replace function f1
      2  return number
      3  as
      4  begin
      5   return 1;
      6  end;
      7  /
    Function created.
    SQL>
    SQL> create or replace function f2 (
      2   i_col1 in number
      3  )
      4  return number
      5  as
      6  begin
      7   return 1;
      8  end;
      9  /
    Function created.
    SQL> Created one table with 100000 rows.
    Two functions - one without arguments, one with (for later).
    With no associations:
    SQL> select * from user_associations;
    no rows selected
    SQL> Run a statement that uses the function:
    SQL> select count(*) from t1 where col1 >= f1;
      COUNT(*)
        100000
    SQL> select * from table(dbms_xplan.display_cursor);
    PLAN_TABLE_OUTPUT
    SQL_ID  gm7ppkbzut114, child number 0
    select count(*) from t1 where col1 >= f1
    Plan hash value: 3724264953
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |       |       |   139 (100)|          |
    |   1 |  SORT AGGREGATE    |      |     1 |     5 |            |          |
    |*  2 |   TABLE ACCESS FULL| T1   |  5000 | 25000 |   139  (62)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - filter("COL1">="F1"())
    19 rows selected.
    SQL> Shows that default selectivity of 5% for an equality predicate against function.
    Let's try to adjust the selectivity using associate statistics - the argument for selectivity should be a percentage between 0 and 100:
    (turning off cardinality feedback for clarity/simplicity)
    SQL> alter session set "_optimizer_use_feedback" = false;
    Session altered.
    SQL>
    SQL> ASSOCIATE STATISTICS WITH FUNCTIONS f1 default selectivity 100;
    Statistics associated.
    SQL> select count(*) from t1 where col1 >= f1;
      COUNT(*)
        100000
    SQL> select * from table(dbms_xplan.display_cursor);
    PLAN_TABLE_OUTPUT
    SQL_ID  gm7ppkbzut114, child number 1
    select count(*) from t1 where col1 >= f1
    Plan hash value: 3724264953
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |       |       |   139 (100)|          |
    |   1 |  SORT AGGREGATE    |      |     1 |     5 |            |          |
    |*  2 |   TABLE ACCESS FULL| T1   |  5000 | 25000 |   139  (62)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - filter("COL1">="F1"())
    19 rows selected.
    SQL> Didn't make any difference to selectivity.
    An excerpt from a 10053 trace file had the following:
    ** Performing dynamic sampling initial checks. **
    ** Dynamic sampling initial checks returning FALSE.
      No statistics type defined for function F1
      No default cost defined for function F1So, crucially what's missing here is a clause saying:
    No default selectivity defined for function F1But there's no other information that I could see to indicate why it should be discarded.
    Moving on, adjusting the cost does happen:
    SQL>exec spflush;
    PL/SQL procedure successfully completed.
    SQL> disassociate statistics from functions f1;
    Statistics disassociated.
    SQL>
    SQL> ASSOCIATE STATISTICS WITH FUNCTIONS f1 default selectivity 100 default cost (100,5,0);
    Statistics associated.
    SQL> select count(*) from t1 where col1 >= f1;
      COUNT(*)
        100000
    SQL> select * from table(dbms_xplan.display_cursor);
    PLAN_TABLE_OUTPUT
    SQL_ID  gm7ppkbzut114, child number 0
    select count(*) from t1 where col1 >= f1
    Plan hash value: 3724264953
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |       |       |   500K(100)|          |
    |   1 |  SORT AGGREGATE    |      |     1 |     5 |            |          |
    |*  2 |   TABLE ACCESS FULL| T1   |  5000 | 25000 |   500K  (1)| 00:41:41 |
    Predicate Information (identified by operation id):
       2 - filter("COL1">="F1"())
    19 rows selected.
    SQL> And we see the following in a 10053:
      No statistics type defined for function F1
      Default costs for function F1 CPU: 100, I/O: 5So, confirmation that default costs for function were found and applied but nothing else about selectivity again.
    I wondered whether the lack of arguments for function F1 made any difference, hence function F2.
    Didn't seem to:
    Vanilla:
    SQL> select count(*) from t1 where col1 >= f2(col1);
      COUNT(*)
        100000
    SQL>
    SQL> select * from table(dbms_xplan.display_cursor);
    PLAN_TABLE_OUTPUT
    SQL_ID  2wxw32wadgc1v, child number 0
    select count(*) from t1 where col1 >= f2(col1)
    Plan hash value: 3724264953
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |       |       |   139 (100)|          |
    |   1 |  SORT AGGREGATE    |      |     1 |     5 |            |          |
    |*  2 |   TABLE ACCESS FULL| T1   |  5000 | 25000 |   139  (62)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - filter("COL1">="F2"("COL1"))
    19 rows selected.
    SQL> Plus association:
    SQL>exec spflush;
    PL/SQL procedure successfully completed.
    SQL>
    SQL> associate statistics with functions f2 default selectivity 90 default cost (100,5,0);
    Statistics associated.
    SQL> select count(*) from t1 where col1 >= f2(col1);
      COUNT(*)
        100000
    SQL>
    SQL> select * from table(dbms_xplan.display_cursor);
    PLAN_TABLE_OUTPUT
    SQL_ID  2wxw32wadgc1v, child number 0
    select count(*) from t1 where col1 >= f2(col1)
    Plan hash value: 3724264953
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |       |       |   500K(100)|          |
    |   1 |  SORT AGGREGATE    |      |     1 |     5 |            |          |
    |*  2 |   TABLE ACCESS FULL| T1   |  5000 | 25000 |   500K  (1)| 00:41:41 |
    Predicate Information (identified by operation id):
       2 - filter("COL1">="F2"("COL1"))
    19 rows selected.
    SQL> Just to confirm associations:
    SQL> select * from user_associations;
    OBJECT_OWNER                   OBJECT_NAME                    COLUMN_NAME                    OBJECT_TY
    STATSTYPE_SCHEMA               STATSTYPE_NAME                 DEF_SELECTIVITY DEF_CPU_COST DEF_IO_COST DEF_NET_COST
    INTERFACE_VERSION MAINTENANCE_TY
    RIMS                           F2                                                            FUNCTION
                                                                               90          100           5
                    0 USER_MANAGED
    RIMS                           F1                                                            FUNCTION
                                                                              100          100           5
                    0 USER_MANAGED
    SQL> So.... started thinking about whether using an interface type would help?
    SQL> CREATE OR REPLACE TYPE test_stats_ot AS OBJECT
      2  (dummy_attribute NUMBER
      3  ,STATIC FUNCTION ODCIGetInterfaces (
      4     ifclist                OUT SYS.ODCIObjectList
      5   ) RETURN NUMBER
      6  ,STATIC FUNCTION ODCIStatsSelectivity (
      7      pred                   IN  SYS.ODCIPredInfo,
      8      sel                    OUT NUMBER,
      9      args                   IN  SYS.ODCIArgDescList,
    10      strt                   IN  NUMBER,
    11      stop                   IN  NUMBER,
    12      --i_col1                 in  NUMBER,
    13      env                    IN  SYS.ODCIEnv
    14   ) RETURN NUMBER
    15  --,STATIC FUNCTION ODCIStatsFunctionCost (
    16  --    func                   IN  SYS.ODCIPredInfo,
    17  --    cost                   OUT SYS.ODCICost,
    18  --    args                   IN  SYS.ODCIArgDescList,
    19  --    i_col1                 in  NUMBER,
    20  --    env                    IN  SYS.ODCIEnv
    21  -- ) RETURN NUMBER
    22  );
    23  /
    Type created.
    SQL> CREATE OR REPLACE TYPE BODY test_stats_ot
      2  AS
      3   STATIC FUNCTION ODCIGetInterfaces (
      4    ifclist                OUT SYS.ODCIObjectList
      5   ) RETURN NUMBER
      6   IS
      7   BEGIN
      8    ifclist := sys.odciobjectlist(sys.odciobject('SYS','ODCISTATS2'));
      9    RETURN odciconst.success;
    10   END;
    11   STATIC FUNCTION ODCIStatsSelectivity
    12   (pred                   IN  SYS.ODCIPredInfo,
    13    sel                    OUT NUMBER,
    14    args                   IN  SYS.ODCIArgDescList,
    15    strt                   IN  NUMBER,
    16    stop                   IN  NUMBER,
    17    --i_col1                 in  NUMBER,
    18    env                    IN  SYS.ODCIEnv)
    19   RETURN NUMBER
    20   IS
    21   BEGIN
    22     sel := 90;
    23     RETURN odciconst.success;
    24   END;
    25  -- STATIC FUNCTION ODCIStatsFunctionCost (
    26  --  func                   IN  SYS.ODCIPredInfo,
    27  --  cost                   OUT SYS.ODCICost,
    28  --  args                   IN  SYS.ODCIArgDescList,
    29  --  i_col1                 in  NUMBER,
    30  --  env                    IN  SYS.ODCIEnv
    31  -- ) RETURN NUMBER
    32  -- IS
    33  -- BEGIN
    34  --  cost := sys.ODCICost(10000,5,0,0);
    35  --  RETURN odciconst.success;
    36  -- END;
    37  END;
    38  /
    Type body created.
    SQL> But this approach is not happy - perhaps not liking the function with no arguments?
    SQL> disassociate statistics from functions f1;
    Statistics disassociated.
    SQL> ASSOCIATE STATISTICS WITH FUNCTIONS f1 USING test_stats_ot;
    Statistics associated.
    SQL> select count(*) from t1 where col1 >= f1;
    select count(*) from t1 where col1 >= f1
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-06550: line 12, column 22:
    PLS-00103: Encountered the symbol "ÀÄ" when expecting one of the following:
    ) , * & = - + < / > at in is mod remainder not rem =>
    <an exponent (**)> <> or != or ~= >= <= <> and or like like2
    like4 likec between || multiset member submultiset
    SQL> So, back to F2 again (uncommenting argument i_col1 in ODCIStatsSelectivity):
    SQL> disassociate statistics from functions f1;
    Statistics disassociated.
    SQL> disassociate statistics from functions f2;
    Statistics disassociated.
    SQL> ASSOCIATE STATISTICS WITH FUNCTIONS f2 USING test_stats_ot;
    Statistics associated.
    SQL> select count(*) from t1 where col1 >= f2(col1);
      COUNT(*)
        100000
    SQL> select * from table(dbms_xplan.display_cursor);
    PLAN_TABLE_OUTPUT
    SQL_ID  2wxw32wadgc1v, child number 0
    select count(*) from t1 where col1 >= f2(col1)
    Plan hash value: 3724264953
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |       |       |   139 (100)|          |
    |   1 |  SORT AGGREGATE    |      |     1 |     5 |            |          |
    |*  2 |   TABLE ACCESS FULL| T1   |  5000 | 25000 |   139  (62)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - filter("COL1">="F2"("COL1"))
    19 rows selected.
    SQL> Nothing obviously happening.
    You'll note also in my interface type implementation that I commented out a declaration of ODCIStatsFunctionCost.
    This post is probably already too long already so I've skipped some of the detail.
    But when ODCIStatsFunctionCost was used with function F2, I presume I've made a mistake in the implementation because I had an error in the 10053 trace as follows:
      Calling user-defined function cost function...
        predicate: "RIMS"."F2"("T1"."COL1")
      declare
         cost sys.ODCICost := sys.ODCICost(NULL, NULL, NULL, NULL);
         arg0 NUMBER := null;
        begin
          :1 := "RIMS"."TEST_STATS_OT".ODCIStatsFunctionCost(
                         sys.ODCIFuncInfo('RIMS',
                                'F2',
                                NULL,
                                1),
                         cost,
                         sys.ODCIARGDESCLIST(sys.ODCIARGDESC(2, 'T1', 'RIMS', '"COL1"', NULL, NULL, NULL))
                         , arg0,
                         sys.ODCIENV(:5,:6,:7,:8));
          if cost.CPUCost IS NULL then
            :2 := -1.0;
          else
            :2 := cost.CPUCost;
          end if;
          if cost.IOCost IS NULL then
            :3 := -1.0;
          else
            :3 := cost.IOCost;
          end if;
          if cost.NetworkCost IS NULL then
            :4 := -1.0;
          else
            :4 := cost.NetworkCost;
          end if;
          exception
            when others then
              raise;
        end;
    ODCIEnv Bind :5 Value 0
    ODCIEnv Bind :6 Value 0
    ODCIEnv Bind :7 Value 0
    ODCIEnv Bind :8 Value 4
      ORA-6550 received when calling RIMS.TEST_STATS_OT.ODCIStatsFunctionCost -- method ignoredThere was never any such feedback about ODCIStatsSelectivity.
    So, in summary, more questions than answers.
    I'll try to have another look later.

  • Seqment shrink with function based indexes - 10.2.0.3

    I see 10g Rel 2 limiation with function based index while doing segment shrink. Is their a workaround? I tried to drop the function based index before shrink, still shrink is taking several hrs to complete.
    Any help is appreciated.
    Thanks,
    Siva

    Hi,
    Analogy: suppose you have 1 million barrels filled with water near 85% maybe less, now you spilled ...say 40% the total water, maybe you have 400,000 empty barrels or the equivalent (here comes the overhead) you are going to concentrate the water in 600,000 barrels and return the empty ones to the "Oracle Server" store, just to reclaim them gradually until you have the starting 1 million barrel.
    Our advise: keep the objects as they are, both table and index. Oracle will use released space as efficiently as he can, which is (at that level) better than us.
    You're worried about the index space? much better leave it now, that's the structure which may cause the major part of overhead.
    Regards
    Ignacio
    http://oracledisect.blogspot.com

  • Financial statement with Functional Area

    Dear Experts,
    We recently implemented SAP in our company.
    One problem we have is that our Financial statements are just on GL, our Management wants to see the Financial statement break up by departments (Cost centers) & Projects.
    I beleive that this is possible through Functional areas concept, but I don't know completely on how to configure & maintain Functional areas in order to get the Financial statements with Functional area.
    Please guide me a complete configuration step.
    Many Thanks.
    Sunil.

    Thanks Alice, but I partially disagree with your input.
    What is the benefit of maintaining Functional area in the Cost center master data then.
    I have seen some slides of Financial statements with Functional are break up by Cost center categories.
    Please give more idea on this.
    Thanks
    Sunil

  • To update Employee Data with Function module

    Hi
    CRM employee master and HR employee master need to be mapped
    for the labor cost posting function to work.
    In BP transaction (Change in BP role : Employee),
    I could update "Personnel number" and "User Name"
    under Identification Tab
    now I need to do same job with Function module in report program.
    Anybody knows that what Function module should I use ?
    I tryed to do it with Function "CRMXIF_PARTNER_SAVE"
    but I only succesed to update imformations under Adress tab in BP transaction.
    thank you.

    Use FM BAPI_BUPA_CREATE_FROM_DATA.
    Rg,
    Harshit

  • Personal recruitment How to do new measure with function call Update IT4000

    Hi out there and happy new year to forum,
    i want to update to implement a recruitment measure (Transaction PB40). I did it already with batch input, but i guess it's much more comfortable to do with funtion module, bapi or calsses.
    After choosing the measure, the infogroup will be processed. So i guess, i just have to use the corresponding function modules to update the infotypes in a given sequence. is this suggestion right?
    What are these function modules? How to update f.e. IT4000? Does anyone has a coding snippet?
    Is it HR_INFOTYPE_OPERATION? 
    In our Infogroup there are also customer specific infotypes f.e. 9***. Can I use the sap standard function modules for "own implemented" infotypes?
    I also appreciate an abap oo pattern or any similar....
    Best regards,
    T

    Andy Goris wrote:
    But I don't think that it's possible to hire an application completly with function modules (there is no PERNR in the beginning so I would keep the BIM).
    The applicants already exists in system, i just want to implement a measure with exact one click!
    Otherwise there is a BAPI for applicant_create.
    I'm not very expierienced focussing the implementation in pa-recruiting. I'm really looking for a good documentation or anything like that f.e. sap press.
    Andy Goris wrote:
    ... but why would you use the old recruiting database? This is hardly used anymore.
    What are the alternatives to it. (I'm not looking forward to upgrade releases or using wd4a or webgui). we are on ecc 6.0 There is already a lot of z-coding in recruitment. We are also using an self implemented e-recruiting approach
    Edited by: Timo Ehl on Jan 3, 2012 2:30 PM

  • How to copy a generic extractor with function module into a new system?

    Dear Gurus,
    i would like to know how i can copy a gneric datasource with function module from one system to the target system.
    Thank you
    Cheers

    Hi Anesh,
    thank you for replying.
    Since the Datasource will have a new new in the new system, i will create a new one.
    Create a generic datasource base on the table is not the problem.
    My problem is how could i copy the FM in the new system?
    If you can help me on that, it will be fine.
    Thanks

  • Queuename cannot be build with function(while creating invoice VF01) IDoc

    Hi all,
    I had a problem while posting an invoice with reference to the delivery document . we had configured partner profile with INVOIC02 and extension for that. and maintained Transfer IDocs immediately. queue processing is enabled . before implementing OSS notes it is working fine. after implementing these notes we are getting update termination message and the invoice document is not getting saved.  the notes are 0001019483 and 0001280898 .
    After implementing notes rule is enabled and in that rule we had given IDOC_QUEUE_SUS_MM. and we had done cofig for that in we85.
    the message is like this.
    Update was terminated
    System ID....   R1Q
    Client.......   100
    User.....   ABOSE
    Transaction..   VF01
    Update key...   4DF9276AC53F16E6E100800082180442
    Generated....   16.06.2011, 12:43:49
    Completed....   16.06.2011, 12:43:50
    Error Info...   B1 519: Queuename cannot be build with function:
    Please helpme out
    Thanks & regards
    sreehari p

    Dear Reddy,
    This may due to two reasons
    1.Itemcategory settings
    2.Copy control settings at item level between your sales document type and your billing type ZF3.So fallow these steps you can rectify the issue.
    -->You go to the VOV7 transaction then select item category ZAPT TAP then go in to the details of that here you can find the field Billing Relevance maintain this field "B" or "C" if you are doing order related billing.
    -->Go to VTFA transaction click on change icon (Top Left Corner)then select your billing type ZF3 and sales order type then click on the item here you select the itemcategory ZAPT TAP then go in to the details screen here you need to enter the copying requirement routines.
    Standard routine is 002-item/order related in the Copying requirements field.
    Standard routine is 001-Inv.split (sample) in the Data VBRK/VBRP field.
    And also check the Header level copy control settings
    Maintain these settings then try
    I hope it will help you
    Regards,
    Murali.

  • A grid (2*2 for example) with a circle in a selected place

    Dear Forum members,
    Please tell me how to make (in swing , but NOT applet) a grid (2*2 for example) with a circle in a selected place (in one or more of the 4 cells). I want to be able to turn on and off (circle or no circle) any cell in the grid.
    Thanks
    Eran

    Doubleposted,
    http://forum.java.sun.com/thread.jsp?forum=54&thread=477343&tstart=0&trange=15

Maybe you are looking for