Order of tables in the form clause influences query performance? (ora 9i)

Hi,
I have a SQL select with 5 tables in the 'from' clause. On Oracle 9i (and 8i too) if I user a certain table order (bigger tables first, smaller tables last) the query executes fast. If I change the order, then it executes in slow motion. I use cost based optimizing.
I thought it was just Oracle 8i where I had to take into account such things when writing a query. Does some one know the cause for this? I
Regards,
Tamas Szecsy

And, even in 10GR2, if the optimizer_mode is changed to CHOOSE (the default is ALL_ROWS), the optimizer defaults to RULE based:
SQL> show parameter optimizer_mode
NAME                                 TYPE        VALUE
optimizer_mode                       string      ALL_ROWS
SQL> alter session set optimizer_mode = choose ;
Session altered.
SQL> show parameter optimizer_mode
NAME                                 TYPE        VALUE
optimizer_mode                       string      CHOOSE
SQL> analyze table emp delete statistics ;
Table analyzed.
SQL> analyze table dept delete statistics ;
Table analyzed.
SQL> set autotrace traceonly explain
SQL> select e.*, d.* from emp e, dept d where d.deptno = e.deptno (+) ;
Execution Plan
Plan hash value: 748780195
| Id  | Operation                    | Name           |
|   0 | SELECT STATEMENT             |                |
|   1 |  NESTED LOOPS OUTER          |                |
|   2 |   TABLE ACCESS FULL          | DEPT           |
|   3 |   TABLE ACCESS BY INDEX ROWID| EMP            |
|*  4 |    INDEX RANGE SCAN          | IDX_EMP_DEPTNO |
Predicate Information (identified by operation id):
   4 - access("D"."DEPTNO"="E"."DEPTNO"(+))
Note
   - rule based optimizer used (consider using cbo)
SQL> analyze table emp compute statistics for table for all indexes for all indexed columns ;
Table analyzed.
SQL> analyze table dept compute statistics for table for all indexes for all indexed columns ;
Table analyzed.
SQL> select e.*, d.* from emp e, dept d where d.deptno = e.deptno (+) ;
Execution Plan
Plan hash value: 748780195
| Id  | Operation                    | Name           | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT             |                |    14 |   826 |     4   (0)| 00:00:01 |
|   1 |  NESTED LOOPS OUTER          |                |    14 |   826 |     4   (0)| 00:00:01 |
|   2 |   TABLE ACCESS FULL          | DEPT           |     4 |    76 |     3   (0)| 00:00:01 |
|   3 |   TABLE ACCESS BY INDEX ROWID| EMP            |     4 |   160 |     1   (0)| 00:00:01 |
|*  4 |    INDEX RANGE SCAN          | IDX_EMP_DEPTNO |     5 |       |     0   (0)| 00:00:01 |
Predicate Information (identified by operation id):
   4 - access("D"."DEPTNO"="E"."DEPTNO"(+))
SQL> alter session set optimizer_mode = rule ;
Session altered.
SQL> select e.*, d.* from emp e, dept d where d.deptno = e.deptno (+) ;
Execution Plan
Plan hash value: 748780195
| Id  | Operation                    | Name           |
|   0 | SELECT STATEMENT             |                |
|   1 |  NESTED LOOPS OUTER          |                |
|   2 |   TABLE ACCESS FULL          | DEPT           |
|   3 |   TABLE ACCESS BY INDEX ROWID| EMP            |
|*  4 |    INDEX RANGE SCAN          | IDX_EMP_DEPTNO |
Predicate Information (identified by operation id):
   4 - access("D"."DEPTNO"="E"."DEPTNO"(+))
Note
   - rule based optimizer used (consider using cbo)
SQL> disconnect
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL>

Similar Messages

  • Is it possible to create a view where table in the From clause changes name

    is it possible to create a view from a from a table like this
    create view my_view as select id, col1, col2, result from <<my_latest_cacahe_table>>;
    the table in the from clause changes the name .
    I have another table which indicates the the latest name of my cache tables. Always there are two records there. The latest one and previous one.
    select * from cache_table_def
    table_name cache_table_name refresh_date
    my_table cache_table245 1/23/2012
    my_table cache_table235 1/22/2012
    create table cache_table_def (table_name varchar2(25), cache_table_name varchar2(25), refresh_date date);
    insert into cache_table_def values( 'my_table','cache_table245','23-jan-2012');
    insert into cache_table_def values ( 'my_table','cache_table546','22-jan-2012');
    create table cache_table245 (id number, col1 varchar2(50), col2 varchar2(20), result number);
    insert into cache_table245 values(1, 'test123', 'test345',12.12);
    insert into cache_table245 values (2, 'test223', 'test245',112.12);
    create table cache_table235 (id number, col1 varchar2(50), col2 varchar2(20), result number);
    insert into cache_table235 values (1, 'test123', 'test345',92.12);
    insert into cache_table235 values (2, 'test223', 'test245',222.12);
    what I need to do is find the latest cache_table name for my_table and use that in my view defintion
    When user select from the the view it always reurns the data from the latest cache_table
    is it possible to do something like this in oracle 11g?
    I have no control on the cache tables names. that is why I need to use the latest name from the table.
    Any ideas really appreciated.

    I've worked up an example that does what you ask. It uses the SCOTT schema EMP table. Make two copies of the EMP table, EMP1 and EMP2. I deleted dept 20 from emp1 and deleted dept 30 from emp2 so I could see that the result set really came from a different table.
    -- create a context to hold an environment variable - this will be the table name we want the view to query from
    create or replace context VIEW_CTX using SET_VIEW_FLAG;
    -- create the procedure specified for the context
    - we will pass in the name of the table to query from
    create or replace procedure SET_VIEW_FLAG ( p_table_name in varchar2 default 'EMP')
      as
      begin
          dbms_session.set_context( 'VIEW_CTX', 'TABLE_NAME', upper(p_table_name));
      end;
    -- these are the three queries - one for each table - none of them will return data until you set the context variable.
    select * from emp where 'EMP' = sys_context( 'VIEW_CTX', 'TABLE_NAME' );
    select * from emp1 where 'EMP1' = sys_context( 'VIEW_CTX', 'TABLE_NAME' );
    select * from emp2 where 'EMP2' =  sys_context( 'VIEW_CTX', 'TABLE_NAME' )
    -- this is how you set the context variable depending on the table you want the view to query
    exec set_view_flag( p_table_name => 'EMP' );
    exec set_view_flag( p_table_name => 'EMP1' );
    exec set_view_flag( p_table_name => 'EMP2');
    -- this will show you the current value of the context variable
    SELECT sys_context( 'VIEW_CTX', 'TABLE_NAME' ) FROM DUAL
    -- this is the view definition - it does a UNION ALL of the three queries but only one will actually return data
    CREATE VIEW THREE_TABLE_EMP_VIEW AS
    select * from emp where 'EMP' = sys_context( 'VIEW_CTX', 'TABLE_NAME' )
    union all
    select * from emp1 where 'EMP1' = sys_context( 'VIEW_CTX', 'TABLE_NAME' )
    union all
    select * from emp2 where 'EMP2' =  sys_context( 'VIEW_CTX', 'TABLE_NAME' )
    -- first time - no data since context variable hasn't been set yet
    SELECT * FROM THREE_TABLE_EMP_VIEW
    -- get data from the EMP table
    exec set_view_flag( p_table_name => 'EMP' );
    SELECT * FROM THREE_TABLE_EMP_VIEW
    -- get data from the EMP2 table
    exec set_view_flag( p_table_name => 'EMP2');
    SELECT * FROM THREE_TABLE_EMP_VIEW
    For your use case you just have to call the context procedure whenever you want to switch tables. You can union all as many queries as you want and can even put WHERE clause conditions based on other filtering criteria if you want. I have used this approach with report views so that one view can be used to roll up report data different ways or for different regions, report periods (weekly, quarterly, etc). I usually use this in a stored procedure that returns a REF CURSOR to the client. The client requests a weekly report and provides a date, the procedure calculates the START/END date based on the one date provided and sets context variables that the view uses in the WHERE clause for filtering.
    For reporting it works great!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • I want to get the data of a table inside the Form but it is not passed

    I want to get the data of a table inside the Form but it is not passed to the form by tables parameters.
    How can I do this.
    Regards

    If there is a problem with defining it globaly, you can define a field symbol globably and point to it. For example.  It would probably be better to define your table globably.
    report zrich_0003 .
    field-symbols: <imarc> type marc_upl_tt.
    start-of-selection.
      perform get_data.
    *       FORM get_data                                                 *
    form get_data.
      data: imarc type table of marc with header line.
      select * from marc into table imarc up to 10 rows.
      assign imarc[] to <imarc>.
      perform write_data.
    endform.
    *       FORM write_data                                               *
    form write_data.
      data: xmarc type marc.
      loop at <imarc> into xmarc.
        write: / xmarc-matnr, xmarc-werks.
      endloop.
    endform.
    Regards,
    Rich Heilman

  • How to specify the type of table in the form parameters

    How to specify the type of table in the form parameters. for example, how to specify the type of table "vacancies".
    FORM getcertainday
                       USING
                       vacancies TYPE STANDARD TABLE
                       efirstday LIKE hrp9200-zfirst_day
                       lfristday LIKE hrp9200-zfirst_day.

    Hi
    Are you asking about subroutine program to declare a variable for perform statement etc
    if it so check this coding
    DATA: NUM1 TYPE I,
    NUM2 TYPE I,
    SUM TYPE I.
    NUM1 = 2. NUM2 = 4.
    PERFORM ADDIT USING NUM1 NUM2 CHANGING SUM.
    NUM1 = 7. NUM2 = 11.
    PERFORM ADDIT USING NUM1 NUM2 CHANGING SUM.
    FORM ADDIT
           USING ADD_NUM1
                 ADD_NUM2
           CHANGING ADD_SUM.
      ADD_SUM = ADD_NUM1 + ADD_NUM2.
      PERFORM OUT USING ADD_NUM1 ADD_NUM2 ADD_SUM.
    ENDFORM.
    FORM OUT
           USING OUT_NUM1
                 OUT_NUM2
                 OUT_SUM.
      WRITE: / 'Sum of', OUT_NUM1, 'and', OUT_NUM2, 'is', OUT_SUM.
    ENDFORM.
    If your issue is some other can u explain me clearly
    Regards
    Pavan

  • Forms Designer - Unable to remove Child Table from the form

    Hello,
    While testing adding additional attributes, I have assigned an additional child table to the form. However I am not able to remove it. I get an error message: "This version has been made active. Add/Update/Delete not allowed."
    I tried creating new version and making it active to remove 'active' status from the form I modified, but still getting the same error. What am I doing wrong? Thank you in advance.

    creating new version and making it active to remove 'active+'
    Make new version then remove child form and then make version active..
    You are making version active b4 removing child table.
    Don't change the sequence which I have written above.

  • Possible to find the Table behind the form

    My question is Is it possible for the DBA to find the table behind the form.
    actually when i input the data from front end i want to know how can i found which table as updated.

    behind the form.Form as in front-end GUI sort of thing? Most DBAs of my acquaintance wouldn't know whether to laugh or cry at such a request. Seeing as how it confirms all the prejudices at the cluelessness of developers.
    The short answer is No. That's why we are supposed to document our applications. However, if you get a sympathetic DBA they might be prepared to track your session and find out what SQL you're issuing. It's then a question of co-ordinating your Form usage with what they see in the database.
    Cheers, APC

  • UPDATE using a second table for the Where Clause

    Hi There,
    Hoep someone can help me!
    I am attempting to update a field in Tbl.1 to a known value. However, i want to use another table to specify WHICH records to update.
    in this case i want to use table early_provider to obtain the value 'HCR' then pass that to the UPDATE clause in order to SET early_provisions.type_name = 'HOMC'
    I hope this makes sense.
    UPDATE EARLY_PROVISIONS eps
    SET TYPE_NAME = (SELECT *
    FROM EARLY_PROVIDER ep
    WHERE PROVIDER_TYPE = 'HCR'
    WHERE EP.PROVIDER_ID = EPS.PROVIDER_ID);
    I need to be able to include the field value 'HOMC in this statement but am not sure how, or if i am barking up the wrong tree.
    Much appreciated in advance
    PFG

    PFGMcAvoy wrote:
    Karthick_Arp
    Thanks. this seems to only update 15 rows of which already exist in the table early_provisions and filed type_name!
    I should be selecting about 200 recordsd from early_provider that have the provider_type = 'HCR'
    ??I don't know your data. So i cant answer that. But for what you asked i think thats the correct UPDATE statement. So i think you have to investigate your data to find what is going on.

  • Purchase Order : printing table in the SAPScript.

    Hi all,
            I want to print taxes in the PO . I have created SAPScript from the standard Script MEDRUCK & also attached it to the Appln - EF, in the T-Code : NACT.
            To pass the taxes i have written a code and that program i have called from the script. But, it is only the last entry in the internal table (it_out). I want to print all the taxes for the respective PO. And, the only last one tax entry in the it_out ,  it is showing in the print preview for 'Domestic PO', and, for 'Import PO', it is not showing any entry.
            Plz, try to solve this problem.... if anybody could give me the proper solution of this problem, i will definitely reward the points to him.
            I am giving the code that i have used in the report & in Script.
    Code in the SAP Script...
    /E  ITEM_CONDITIONS
    /:   PROTECT
    /:   DEFINE &TYPE& = ' '
    /:   DEFINE &TEXT& = ' '
    /:   DEFINE &PER& = ' '
    /:   PERFORM GET_TAX IN PROGRAM ZMM_PO
    /:   USING &EKKO-EBELN&
    /:   CHANGING &TYPE&
    /:   CHANGING &TEXT&
    /:   CHANGING &PER&
    /:   ENDPERFORM
    IN  ,,&TEXT&,,&PER&
    /:   ENDPROTECT
    Respective code in the Report
    *&      Form  GET_TAX
          text
         -->IN_PAR     text
         -->OUT_PAR    text
    FORM GET_TAX TABLES IN_PAR STRUCTURE ITCSY
                        OUT_PAR STRUCTURE ITCSY.
      TABLES : EKKO,         "Purchasing Document Header
                      KONV,         "Conditions (Transaction Data)
                     T685T.        "Conditions: Types: Texts
      DATA : BEGIN OF ITAB OCCURS 10.
      DATA :   EBELN LIKE EKKO-EBELN.
      DATA :   KNUMV LIKE EKKO-KNUMV.
      DATA : END OF ITAB.
      DATA : BEGIN OF ITAB1 OCCURS 10.
      DATA :   EBELN LIKE EKKO-EBELN.
      DATA :   KNUMV LIKE KONV-KNUMV.
      DATA :   KPOSN LIKE KONV-KPOSN.
      DATA :   KSCHL LIKE KONV-KSCHL.
      DATA :   VTEXT LIKE T685T-VTEXT.
      DATA :   KBETR LIKE KONV-kbetr.
      DATA :   WAERS LIKE KONV-waers.
      DATA :   KWERT LIKE KONV-kwert.
      DATA : END OF ITAB1.
      DATA : BEGIN OF IT_OUT OCCURS 10.
      DATA :   KSCHL LIKE KONV-KSCHL.
      DATA :   VTEXT LIKE T685T-VTEXT.
      DATA :   KBETR LIKE KONV-KBETR.
      DATA :   KWERT LIKE KONV-KWERT.
      DATA : END OF IT_OUT.
      DATA : PONO LIKE EKKO-EBELN.
      DATA : NO LIKE KONV-KPOSN.
      READ TABLE IN_PAR WITH KEY 'EKKO-EBELN'.
      IF SY-SUBRC = 0.
        PONO = IN_PAR-VALUE.
        SELECT EBELN KNUMV
                FROM EKKO
                INTO TABLE ITAB
               WHERE EBELN = PONO.
       READ TABLE IN_PAR WITH KEY 'KONV-KPOSN'.
        IF SY-SUBRC = 0.
         NO = IN_PAR-VALUE.
          LOOP AT ITAB.
            MOVE ITAB-KNUMV TO ITAB1-KNUMV.
            SELECT KNUMV KPOSN KSCHL KBETR WAERS KWERT
                  FROM KONV
                  INTO CORRESPONDING FIELDS OF ITAB1
                WHERE KNUMV = ITAB-KNUMV
                AND KAPPL = 'M'.
              ITAB1-KBETR = ( ITAB1-KBETR / 10 ) .
              APPEND ITAB1.
            ENDSELECT.
          ENDLOOP.
          SORT ITAB1 BY KPOSN kschl.
          LOOP AT ITAB1.
            IF ITAB1-KPOSN <> ''.
              SELECT *
                        FROM T685T
                       WHERE KSCHL = ITAB1-KSCHL
                       AND KAPPL = 'M'
                       AND SPRAS = 'EN'.
                IT_OUT-VTEXT = T685T-VTEXT.
                IT_OUT-KSCHL = ITAB1-KSCHL.
                IT_OUT-KBETR = ITAB1-KBETR.
                IT_OUT-KWERT = ITAB1-KWERT.
                APPEND IT_OUT.
              ENDSELECT.
            ENDIF.
          ENDLOOP.
          SORT IT_OUT BY KSCHL.
          DELETE ADJACENT DUPLICATES FROM it_out COMPARING KSCHL.
          LOOP AT IT_OUT.
            IF
                  ( IT_OUT-KSCHL = 'JADC'
                 OR IT_OUT-KSCHL = 'JCDB'
                 OR IT_OUT-KSCHL = 'JCV1'
                 OR IT_OUT-KSCHL = 'JECV'
                 OR IT_OUT-KSCHL = 'J1CV'
                 OR IT_OUT-KSCHL = 'JSDB'
                 OR IT_OUT-KSCHL = 'JEXC'
                 OR IT_OUT-KSCHL = 'JEXS'
                 OR IT_OUT-KSCHL = 'FRC1').
              AT NEW KSCHL.
                CLEAR out_par.
                CLEAR out_par[].
               LOOP AT OUT_PAR.
                  READ TABLE IT_OUT INDEX SY-TABIX.
                  SUM.
                  WRITE:/ IT_OUT-KSCHL,IT_OUT-VTEXT,IT_OUT-KBETR.
                  OUT_PAR-NAME = 'TYPE'.
                  OUT_PAR-VALUE = IT_OUT-KSCHL.
                  APPEND OUT_PAR.
                  OUT_PAR-NAME = 'TEXT'.
                  OUT_PAR-VALUE = IT_OUT-VTEXT.
                  APPEND OUT_PAR.
                  OUT_PAR-NAME = 'PER'.
               OUT_PAR-VALUE = IT_OUT-KBETR.
                  APPEND OUT_PAR.
               ENDLOOP.
              ENDAT.
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDIF.
    ENDFORM.                    "GET_TAX
    Plz, help me by giving the solution...
    Thanks,
    Ajit

    Hi,
    System will not display the Purchase order item details in the first screen. First enter the data on the Item overview like Material or short text then only it will display the Item details.
    I think you are checking with out entering the data on Item overview .
    Check by entering the material/short text.
    rgds
    Chidanand

  • Updating large table using the WITH CLAUSE or PLSQL

    I tried to perform an update on a table with over 15million records using the merge statement below but it's very slow.
    Can someone help me re-writting this statement using the WITH CLAUSE or a PLSQL statement that will make it run faster?
    my merge statemet:
    MERGE INTO voter dst
    USING (
    SELECT voterid,
    pollingstation || CASE
    WHEN ROW_NUMBER () OVER ( PARTITION BY pollingstation
    ORDER BY surname, firstnames
    ) <= 1000
    THEN 'A'
    WHEN ROW_NUMBER () OVER ( PARTITION BY pollingstation
    ORDER BY surname, firstnames
    ) BETWEEN 1000 AND 2000
    THEN 'B'
    ELSE 'C'
    END AS new_pollingstation
    FROM voter
    ) src
    ON (src.voterid = dst.voterid)
    WHEN MATCHED THEN UPDATE
    SET dst.new_pollingstation = src.new_pollingstation
    the with clause approach:http://www.dba-oracle.com/t_with_clause.htm
    thanks.

    Well, here's your query formatted for people to read...
    MERGE INTO voter dst
    USING (SELECT voterid,
                  pollingstation || CASE WHEN ROW_NUMBER () OVER ( PARTITION BY pollingstation ORDER BY surname, firstnames) <= 1000
                                           THEN 'A'
                                         WHEN ROW_NUMBER () OVER ( PARTITION BY pollingstation ORDER BY surname, firstnames) BETWEEN 1000 AND 2000
                                           THEN 'B'
                                         ELSE 'C'
                                    END AS new_pollingstation
           FROM voter) src
    ON (src.voterid = dst.voterid)
    WHEN MATCHED THEN
    UPDATE SET dst.new_pollingstation = src.new_pollingstation
    ;In future, please read {message:id=9360002} and post relevant details.
    What do you mean when you say it's "slow"? How have you measured this? Have you examined the explain plan?
    Take a read of the threads linked to by the FAQ post: {message:id=9360003} for details of what you need to provide to get help with performance issues.

  • JSP, DataWebBean: How to dynamically set the where clause of query and display record

    Hi,
    I am reposting this question as per suggestions made by Mr. Dwight.
    I have used ViewCurrentRecord web bean to display records from EMP table. I have to use the Dept_Id_FK from the current
    record of the EMP table to display corresponding records of Dept table. I have a view object called DeptView in my Business
    Components which selects all the records from the Dept table.
    How do I get the value of Dept_Id_FK and use it to display the required records of the Dept table?
    I tried to declare a variable and get the value of Dept_Id_FK but it did not work. My code is as follows:
    <%! String m_DeptId = null; %>
    <jsp:useBean id="RowViewer" class="oracle.jbo.html.databeans.ViewCurrentRecord" scope="request">
    <%
    RowViewer.initialize(pageContext, "EMPApp_EMP_EMPAppModule.EMPView1");
    RowViewer.setReleaseApplicationResources(false);
    RowViewer.getRowSet().next();
    m_DeptId = (String)RowViewer.getRowSet().getCurrentRow().getAttribute("DeptIdFk");
    %>
    </jsp:useBean>
    Thanks.
    null

    First of all, Thank you very much for making use of the new topic format. It is very much appreciated.
    As for your question, I think there are several different ways to accomplish what I think you want to do.
    1. Create a view object that includes both Emp and Dept entities and join them there. In this case, your query would look something like this:
    Select e.empno,e.name,...,d.dname,d.loc from emp e, dept d
    where e.deptno = d.deptno
    You should be able to create a JSP off of this view object that contains both the employee and department information. In this case, BC4J takes care of the foreign key to primary key coordination.
    2. In order to set a dynamic where clause for a view, you need to do the following in your usebean tag:
    rsn.initialize(application,session, request,response,out,"DeptView");
    rsn.getRowSet().getViewObject().setWhereClause("deptno=" &#0124; &#0124; m_DeptId);
    rsn.getRowSet().getViewObject().executeQuery();
    rsn.getRowSet().first();
    You will need to do this in a separate usebean tag from the EmpView, since the usebean can only initialize one view object.
    In other words, you would have your ViewCurrentRecord bean tag for the EmpView, then a separate one for the DeptView where you use the above code to set the where clause to display just the information for the department you want.
    Another option, but one I'm not sure would work as well, is to create a master-detail JSP to do this for you. Usually a master-detail is a one-to-many (one department to many employees). Your request appears to be the reverse, but might still be doable using the same mechanism.
    You set up relationships between views in your BC4J project using View Links. If you used the BC4J project wizard and created default views, some of these links may have been created for you. They are created when BC4J detects a foreign key to primary key relationship in the database.
    You can create your own View Links using the View Link wizard. Select your BC4J project node and choose Create View Link... from the context menu. You will be asked to select a source view (Emp), and a target view (Dept), then select the attribute in each view that related the two of them (deptno).
    Next, you need to reflect this new relationship setting in your application module. Select your app module and choose Edit from the context menu. On the data model page, select the EmpView node in the Selected list. Now select the DeptView node in the available list and shuttle it over. You should see DeptView1 via yourlink appear indented under the EmpView node. Save and rebuild your BC4J project to reflect the changes.
    In your JSP project, you can now have the wizard create a master-detail form for you based on DeptView1.
    Let me know if the above answers your question, or if I have misunderstood what it is you wanted to do.
    null

  • Printing a Table in the Form

    Hi Experts..
    I would like to print the box below like this in a Form..
    Plz any one can help me clearly with coding.
    Service
    Person
    Rate
    Amount
    |----
    7.6cm
    1.4cm
    -1.7cm-
    -- 2.3 cm -
    Headings height -- 0.5 cm
    Body of table height --  9 cm
    I am Trying to print with ‘WRITE_FORM’ WITH  Element
    But it is taking too much space & it is not printing all the fields in the same line & not printing the box.
    Even I want to print the boxes exactly like above in form layout.. plz send me the code ASAP
    Thanks & Regards
    Rajendra

    hi
    Use the BOX command
    Syntax:
    /: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
    Effect: draws a box of the specified size at the specified position.
    Parameters: For each parameter (XPOS, YPOS, WIDTH, HEIGHT and FRAME), both a measurement and a unit of measure must be specified. The INTENSITY parameter should be entered as a percentage between 0 and 100.
    •&#61472;XPOS, YPOS: Upper left corner of the box, relative to the values of the POSITION command.
    Default: Values specified in the POSITION command.
    The following calculation is performed internally to determine the absolute output position of a box on the page:
    X(abs) = XORIGIN + XPOS
    Y(abs) = YORIGIN + YPOS
    WIDTH: Width of the box.
    Default: WIDTH value of the SIZE command.
    HEIGHT: Height of the box.
    Default: HEIGHT value of the SIZE command.
    FRAME: Thickness of frame.
    Default: 0 (no frame).
    INTENSITY: Grayscale of box contents as %.
    Default: 100 (full black)
    Measurements: Decimal numbers must be specified as literal values (like ABAP/4 numeric constants) by being enclosed in inverted commas. The period should be used as the decimal point character. See also the examples listed below.
    this is a very time consuming task. well, hope this will help you
    /E   HEADING                                                                
    /:   BOX XPOS 0 CM YPOS 0 CM WIDTH '1.5' CM HEIGHT 10 CM FRAME 10 TW        
    /:   BOX XPOS '1.5' CM YPOS 0 CM WIDTH  4 CM HEIGHT 10 CM FRAME 10 TW       
    /:   BOX XPOS '5.5' CM YPOS 0 CM WIDTH '3.5' CM HEIGHT 10 CM FRAME 10 TW    
    /:   BOX XPOS  9 CM YPOS 0 CM WIDTH '2.5' CM HEIGHT 10 CM FRAME 10 TW       
    /:   BOX XPOS '11.5' CM YPOS 0 CM WIDTH '3.5' CM HEIGHT 10 CM FRAME 10 TW   
    /:   BOX XPOS 15 CM YPOS 0 CM WIDTH '1.5' CM HEIGHT 10 CM FRAME 10 TW       
    /E  
    DETAILS                                                                
       &IT_FINAL-WERKS&,,&IT_FINAL-NAME1&,,&IT_FINAL-PSTAT&,, &IT_FINAL-PRCTR&
    =    ,,&IT_FINAL-MINLS&,,&IT_FINAL-MAXLS&                                   
    Regards,
    Richa

  • How do I create a dynamic table in the form for auto field detection?

    I am new to Acrobat. We need to create a form template that contains dynamic table control so that it can be populated using auto field detection.
    Our dynamic table contains reimbusement information, the rows vary from one claim to another.
    Please help. We are having Acrobat 9 Pro.
    Thanks
    Prasadh

    A lot is possible. There is a scripting language which should fill the gaps of missing features. There is data merge, there is XML, there is InCopy. Read everything about it and you will surely find what you need.

  • I want to save updated record only in stage table from the form..

    I have created form with two block
    1...criteria base block
    2....details block....(This database block i.e. on stage table).
    I am inserting data into detail block (i.e. stage table )with no commit through find button.
    data is showing there with status 'FRESH'
    suppose i changed item cost, now status goes change to 'NEW'
    now when i am saving it is saving all data into stage but i want to save only data with 'NEW' status.
    Please Help me
    I tried it by deleting data from stage where status ='FRESH' on post_update trigger but is not supporting.
    Edited by: ManojT on Sep 3, 2009 6:52 AM

    Hi I am using this procedure in find button to get data on detail block
    PROCEDURE GET_ITEM_DATA IS
    i number :=0;
    L_COUNT NUMBER;
    S_COUNT NUMBER;
    CURSOR GET_DTL IS
    (SELECT MSI.SEGMENT1 AS "ITEM" ,
    MSI.ITEM_TYPE,
    MICV.CATEGORY_SET_NAME,
    XXCAVM_GET_ITEM_COST_PKG.CAVM_GET_COST_DATE(MSI.INVENTORY_ITEM_ID,ORG.ORGANIZATION_ID,3) "LAST_UPDATE_DATE",
    XXCAVM_GET_ITEM_COST_PKG.CAVM_GET_ITEM_COST(MSI.INVENTORY_ITEM_ID,ORG.ORGANIZATION_ID,1) "ITEM_COST_F",
    XXCAVM_GET_ITEM_COST_PKG.CAVM_GET_ITEM_COST(MSI.INVENTORY_ITEM_ID,ORG.ORGANIZATION_ID,3) "ITEM_COST_P",
    MSI.INVENTORY_ITEM_ID,
    ORG.ORGANIZATION_ID,
    ORG.ORGANIZATION_CODE
    FROM
    (SELECT ORGANIZATION_CODE,ORGANIZATION_ID
    FROM ORG_ORGANIZATION_DEFINITIONS ) ORG,
    MTL_SYSTEM_ITEMS_FVL MSI,
    MTL_ITEM_CATEGORIES_V MICV
    WHERE CATEGORY_SET_NAME LIKE 'Product'
    AND MSI.INVENTORY_ITEM_ID =MICV.INVENTORY_ITEM_ID
    AND MSI.ORGANIZATION_ID = MICV.ORGANIZATION_ID
    AND ORG.ORGANIZATION_ID = MSI.ORGANIZATION_ID
    AND ORG.ORGANIZATION_ID = MICV.ORGANIZATION_ID
    AND MSI.INVENTORY_ITEM_STATUS_CODE = 'Active'
    AND MSI.SEGMENT1 =NVL(:CTRL_BLK.INV_ITEM,MSI.SEGMENT1)
    AND MICV.CATEGORY_SET_NAME = NVL(:CTRL_BLK.ITEM_FAMILY,MICV.CATEGORY_SET_NAME)
    AND MSI.ITEM_TYPE = NVL(:CTRL_BLK.ITEM_TYPE,MSI.ITEM_TYPE)
    AND ORG.ORGANIZATION_CODE = NVL(:CTRL_BLK.ORGANIZATION,ORG.ORGANIZATION_CODE));
    --AND MSI.INVENTORY_ITEM_ID = 8063
    --AND MSI.ORGANIZATION_ID=204);
    BEGIN
    FOR GRD IN GET_DTL LOOP
         SELECT COUNT(*) INTO S_COUNT FROM XXCAVIUM_ITEM_CST_STG
         WHERE ITEM = GRD.ITEM
         AND ORG = GRD.ORGANIZATION_CODE
         AND ITEM_TYPE = GRD.ITEM_TYPE
         AND CATEGORY_SET_NAME = GRD.CATEGORY_SET_NAME;
              IF S_COUNT >0 THEN                         
                                            NULL;
                        ELSE
                        INSERT INTO XXCAVIUM_ITEM_CST_STG
                             (ORG,CATEGORY_SET_NAME,ITEM,COST_PENDING,
                             COST_FROZEN,ITEM_TYPE,LAST_UPDATE_DATE,
                             COST_TYPE_ID,ORGANIZATION_ID,
                             INVENTORY_ITEM_ID,COST_ELEMENT,STATUS)
                             VALUES(GRD.ORGANIZATION_CODE,GRD.CATEGORY_SET_NAME,GRD.ITEM,GRD.ITEM_COST_P,GRD.ITEM_COST_F      ,
                             GRD.ITEM_TYPE,GRD.LAST_UPDATE_DATE,3,GRD.ORGANIZATION_ID,GRD.INVENTORY_ITEM_ID,'Material','FRESH');
                        END IF;
    END LOOP;
    GO_BLOCK('XXCAVIUM_DTL_BLK');
    EXECUTE_QUERY;
    EXCEPTION
    WHEN OTHERS THEN
    FND_MESSAGE.DEBUG('Exception occured during the process. Error Message: '||SQLERRM);
    END;
    Please suggest if any

  • Page count in the footer of a table in the form layout

    hi friends,
    I just want to print the page number detaisl in the footer of the SMARTFORM .
    I just dragged the values from the system folder and use it as usual.
    But the values are displayed in such a manner
    for sy-page of sy-printpage
    gives 1 of *
    2 of *
    9 of *
    10 of 31
    11 of 31
    31 of 31
    But when i give the same values in a separate or in a separate text , i can get an expected result as
    1 of 31
    2 of 31
    31 of 31
    can somebody help me to solve this problem.
    why it happens so , only in the footer of an table, and why the values are not printing only upto 9?
    tell me some possible ways of solving this problem

    Hi Kumar,
      Use final window type and put your sfsy variables in that window then it will work.
    Reward if helpful.
    Regards,
    Kalyan.

  • Select statement having internal table in the wher clause...

    Hi,
    will all the entry from the internal i_crhd will be pased to the next select statement in the sample code below without looping? Thanks  a lot!
    REFRESH i_crhd.
       SELECT objid vgwts
         FROM crhd INTO CORRESPONDING FIELDS OF TABLE i_crhd
         WHERE arbpl IN s_arbpl.
    pulling the cost centre linked to the resource
       IF sy-subrc EQ 0 AND i_crhd[] IS NOT INITIAL.
         REFRESH i_crco.
         SELECT kostl FROM crco
           INTO CORRESPONDING FIELDS OF TABLE i_crco
           FOR ALL ENTRIES IN i_crhd
           WHERE objid = i_crhd-objid.
         IF sy-subrc EQ 0.
          do nothing.
         ENDIF.
       ENDIF.

    Hi,
    The code looks fine..u can very well go ahead with the code...
    Wht all other ABAPers said about FOR ALL ENTRIES is absolutely rite.
    But i have a small suggestion...
    Why cant u use a INNNER JOIN for those 2 queries...
    like...
    SELECT cr~objid
                 cr~vgwts
                 co~kostl
    FROM crhd AS cr INNER JOIN
              crco AS co
    ON  crobjid = coobjid
    INTO TABLE i_crco
    WHERE cr~arbpl IN s_arbpl.
    Now in i_crco 3 fields will be thr
    objid, vgwts, kostl.....this one can change as u wish...
    Why i suggest not to ue FOR ALL ENTRIES is sometimes it is a performanc killer....in this code i feel this will do fine...
    Please let me know if u feel not ok with this code...
    Reward if found useful...
    Regards,
    ABAPer 007.

Maybe you are looking for

  • How to take back up of my XI scenraios ( namespaces and Objects )

    Hi I have done some scenarios on XI sytem which has been crashed. Present it is not working . J2ee Engine is not starting. Now we have installed new XI system. I want to take backup of my old scenarios and i need to import it into new XI system. How

  • Shadow on scanned image

    HP Photosmart C6180 All-in-One. When scanning or copying, the output image has a soft-edged, grey shadow, about one inch wide and three inches long, running from the top edge of the page and centered about 2.5 inches from the right-hand edge of the p

  • Assign T-Code for WDA

    Dear All Gurus, I have assigned a T-Code for a webdynpro program created as per below instructions (URL). Tcode is working fine but I need to RE-ENTER user name and password every time when I enter T-Code. Can you advice on this. http://wiki.scn.sap.

  • RightsManagement web service

    I have successfully installed a turnkey LiveCycle (WebLogic) server and have written a couple test methods in C# (as proof of concepts). One method I have invokes the rights management web service to apply a policy to a PDF. It appears to work fine,

  • Changes to LogConfigurator not persistent

    Every time I make a change in the LogConfigurator (through the Visual Admin, Services->Log Configurator), e.g. add a destination to a location, the changes are lost when I restart Visual Admin. ( I did save the change by clicking the floppy ("Apply t