Help needed for SAP Tables Relationships

Hi All,
I am new to ERP and need help regarding standard SAP Tables.
Please share the document that contains the details of SAP Tables and Standard SAP FM that are provided by SAP.
All helpful answers will be rewarded.
Regards,
Udaya.

Hi,
Please go to the following link.
http://www.erpgenie.com/abap/tables.htm
http://www.erpgenie.com/abap/tables_sd.htm
http://www.erpgenie.com/abap/tables_mm.htm
http://www.erpgenie.com/abap/tables_fi.htm
Regards
Jean

Similar Messages

  • Pagination query help needed for large table - force a different index

    I'm using a slight modification of the pagination query from over at Ask Tom's: [http://www.oracle.com/technology/oramag/oracle/07-jan/o17asktom.html]
    Mine looks like this when fetching the first 100 rows of all members with last name Smith, ordered by join date:
    SELECT members.*
    FROM members,
        SELECT RID, rownum rnum
        FROM
            SELECT rowid as RID
            FROM members
            WHERE last_name = 'Smith'
            ORDER BY joindate
        WHERE rownum <= 100
    WHERE rnum >= 1
             and RID = members.rowidThe difference between this and the one at Ask Tom's is that my innermost query just returns the ROWID. Then in the outermost query we join the ROWIDs returned to the members table, after we have pruned the ROWIDs down to only the chunk of 100 we want. This makes it MUCH faster (verifiably) on our large tables, as it is able to use the index on the innermost query (well... read on).
    The problem I have is this:
    SELECT rowid as RID
    FROM members
    WHERE last_name = 'Smith'
    ORDER BY joindateThis will use the index for the predicate column (last_name) instead of the unique index I have defined for the joindate column (joindate, sequence). (Verifiable with explain plan). It is much slower this way on a large table. So I can hint it using either of the following methods:
    SELECT /*+ index(members, joindate_idx) */ rowid as RID
    FROM members
    WHERE last_name = 'Smith'
    ORDER BY joindate
    SELECT /*+ first_rows(100) */ rowid as RID
    FROM members
    WHERE last_name = 'Smith'
    ORDER BY joindateEither way, it now uses the index of the ORDER BY column (joindate_idx), so now it is much faster as it does not have to do a sort (remember, VERY large table, millions of records). So that seems good. But now, on my outermost query, I join the rowid with the meaningful columns of data from the members table, as commented below:
    SELECT members.*      -- Select all data from members table
    FROM members,           -- members table added to FROM clause
        SELECT RID, rownum rnum
        FROM
            SELECT /*+ index(members, joindate_idx) */ rowid as RID   -- Hint is ignored now that I am joining in the outer query
            FROM members
            WHERE last_name = 'Smith'
            ORDER BY joindate
        WHERE rownum <= 100
    WHERE rnum >= 1
            and RID = members.rowid           -- Merge the members table on the rowid we pulled from the inner queriesOnce I do this join, it goes back to using the predicate index (last_name) and has to perform the sort once it finds all matching values (which can be a lot in this table, there is high cardinality on some columns).
    So my question is, in the full query above, is there any way I can get it to use the ORDER BY column for indexing to prevent it from having to do a sort? The join is what causes it to revert back to using the predicate index, even with hints. Remove the join and just return the ROWIDs for those 100 records and it flies, even on 10 million records.
    It'd be great if there was some generic hint that could accomplish this, such that if we change the table/columns/indexes, we don't need to change the hint (the FIRST_ROWS hint is a good example of this, while the INDEX hint is the opposite), but any help would be appreciated. I can provide explain plans for any of the above if needed.
    Thanks!

    Lakmal Rajapakse wrote:
    OK here is an example to illustrate the advantage:
    SQL> set autot traceonly
    SQL> select * from (
    2  select a.*, rownum x  from
    3  (
    4  select a.* from aoswf.events a
    5  order by EVENT_DATETIME
    6  ) a
    7  where rownum <= 1200
    8  )
    9  where x >= 1100
    10  /
    101 rows selected.
    Execution Plan
    Plan hash value: 3711662397
    | Id  | Operation                      | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT               |            |  1200 |   521K|   192   (0)| 00:00:03 |
    |*  1 |  VIEW                          |            |  1200 |   521K|   192   (0)| 00:00:03 |
    |*  2 |   COUNT STOPKEY                |            |       |       |            |          |
    |   3 |    VIEW                        |            |  1200 |   506K|   192   (0)| 00:00:03 |
    |   4 |     TABLE ACCESS BY INDEX ROWID| EVENTS     |   253M|    34G|   192   (0)| 00:00:03 |
    |   5 |      INDEX FULL SCAN           | EVEN_IDX02 |  1200 |       |     2   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    1 - filter("X">=1100)
    2 - filter(ROWNUM<=1200)
    Statistics
    0  recursive calls
    0  db block gets
    443  consistent gets
    0  physical reads
    0  redo size
    25203  bytes sent via SQL*Net to client
    281  bytes received via SQL*Net from client
    8  SQL*Net roundtrips to/from client
    0  sorts (memory)
    0  sorts (disk)
    101  rows processed
    SQL>
    SQL>
    SQL> select * from aoswf.events a, (
    2  select rid, rownum x  from
    3  (
    4  select rowid rid from aoswf.events a
    5  order by EVENT_DATETIME
    6  ) a
    7  where rownum <= 1200
    8  ) b
    9  where x >= 1100
    10  and a.rowid = rid
    11  /
    101 rows selected.
    Execution Plan
    Plan hash value: 2308864810
    | Id  | Operation                   | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT            |            |  1200 |   201K|   261K  (1)| 00:52:21 |
    |   1 |  NESTED LOOPS               |            |  1200 |   201K|   261K  (1)| 00:52:21 |
    |*  2 |   VIEW                      |            |  1200 | 30000 |   260K  (1)| 00:52:06 |
    |*  3 |    COUNT STOPKEY            |            |       |       |            |          |
    |   4 |     VIEW                    |            |   253M|  2895M|   260K  (1)| 00:52:06 |
    |   5 |      INDEX FULL SCAN        | EVEN_IDX02 |   253M|  4826M|   260K  (1)| 00:52:06 |
    |   6 |   TABLE ACCESS BY USER ROWID| EVENTS     |     1 |   147 |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    2 - filter("X">=1100)
    3 - filter(ROWNUM<=1200)
    Statistics
    8  recursive calls
    0  db block gets
    117  consistent gets
    0  physical reads
    0  redo size
    27539  bytes sent via SQL*Net to client
    281  bytes received via SQL*Net from client
    8  SQL*Net roundtrips to/from client
    0  sorts (memory)
    0  sorts (disk)
    101  rows processed
    Lakmal (and OP),
    Not sure what advantage you are trying to show here. But considering that we are talking about pagination query here and order of records is important, your 2 queries will not always generate output in same order. Here is the test case:
    SQL> select * from v$version ;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE     10.2.0.1.0     Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    SQL> show parameter optimizer
    NAME                                 TYPE        VALUE
    optimizer_dynamic_sampling           integer     2
    optimizer_features_enable            string      10.2.0.1
    optimizer_index_caching              integer     0
    optimizer_index_cost_adj             integer     100
    optimizer_mode                       string      ALL_ROWS
    optimizer_secure_view_merging        boolean     TRUE
    SQL> show parameter pga
    NAME                                 TYPE        VALUE
    pga_aggregate_target                 big integer 103M
    SQL> create table t nologging as select * from all_objects where 1 = 2 ;
    Table created.
    SQL> create index t_idx on t(last_ddl_time) nologging ;
    Index created.
    SQL> insert /*+ APPEND */ into t (owner, object_name, object_id, created, last_ddl_time) select owner, object_name, object_id, created, sysdate - dbms_random.value(1, 100) from all_objects order by dbms_random.random;
    40617 rows created.
    SQL> commit ;
    Commit complete.
    SQL> exec dbms_stats.gather_table_stats(user, 'T', cascade=>true);
    PL/SQL procedure successfully completed.
    SQL> select object_id, object_name, created from t, (select rid, rownum rn from (select rowid rid from t order by created desc) where rownum <= 1200) t1 where rn >= 1190 and t.rowid = t1.rid ;
    OBJECT_ID OBJECT_NAME                    CREATED
         47686 ALL$OLAP2_JOIN_KEY_COLUMN_USES 28-JUL-2009 08:08:39
         47672 ALL$OLAP2_CUBE_DIM_USES        28-JUL-2009 08:08:39
         47681 ALL$OLAP2_CUBE_MEASURE_MAPS    28-JUL-2009 08:08:39
         47682 ALL$OLAP2_FACT_LEVEL_USES      28-JUL-2009 08:08:39
         47685 ALL$OLAP2_AGGREGATION_USES     28-JUL-2009 08:08:39
         47692 ALL$OLAP2_CATALOGS             28-JUL-2009 08:08:39
         47665 ALL$OLAPMR_FACTTBLKEYMAPS      28-JUL-2009 08:08:39
         47688 ALL$OLAP2_DIM_LEVEL_ATTR_MAPS  28-JUL-2009 08:08:39
         47689 ALL$OLAP2_DIM_LEVELS_KEYMAPS   28-JUL-2009 08:08:39
         47669 ALL$OLAP9I2_HIER_DIMENSIONS    28-JUL-2009 08:08:39
         47666 ALL$OLAP9I1_HIER_DIMENSIONS    28-JUL-2009 08:08:39
    11 rows selected.
    SQL> select object_id, object_name, last_ddl_time from t, (select rid, rownum rn from (select rowid rid from t order by last_ddl_time desc) where rownum <= 1200) t1 where rn >= 1190 and t.rowid = t1.rid ;
    OBJECT_ID OBJECT_NAME                    LAST_DDL_TIME
         11749 /b9fe5b99_OraRTStatementComman 06-FEB-2010 03:43:49
         13133 oracle/jdbc/driver/OracleLog$3 06-FEB-2010 03:45:44
         37534 com/sun/mail/smtp/SMTPMessage  06-FEB-2010 03:46:14
         36145 /4e492b6f_SerProfileToClassErr 06-FEB-2010 03:11:09
         26815 /7a628fb8_DefaultHSBChooserPan 06-FEB-2010 03:26:55
         16695 /2940a364_RepIdDelegator_1_3   06-FEB-2010 03:38:17
         36539 sun/io/ByteToCharMacHebrew     06-FEB-2010 03:28:57
         14044 /d29b81e1_OldHeaders           06-FEB-2010 03:12:12
         12920 /25f8f3a5_BasicSplitPaneUI     06-FEB-2010 03:11:06
         42266 SI_GETCLRHSTGRFTR              06-FEB-2010 03:40:20
         15752 /2f494dce_JDWPThreadReference  06-FEB-2010 03:09:31
    11 rows selected.
    SQL> select object_id, object_name, last_ddl_time from (select t1.*, rownum rn from (select * from t order by last_ddl_time desc) t1 where rownum <= 1200) where rn >= 1190 ;
    OBJECT_ID OBJECT_NAME                    LAST_DDL_TIME
         37534 com/sun/mail/smtp/SMTPMessage  06-FEB-2010 03:46:14
         13133 oracle/jdbc/driver/OracleLog$3 06-FEB-2010 03:45:44
         11749 /b9fe5b99_OraRTStatementComman 06-FEB-2010 03:43:49
         42266 SI_GETCLRHSTGRFTR              06-FEB-2010 03:40:20
         16695 /2940a364_RepIdDelegator_1_3   06-FEB-2010 03:38:17
         36539 sun/io/ByteToCharMacHebrew     06-FEB-2010 03:28:57
         26815 /7a628fb8_DefaultHSBChooserPan 06-FEB-2010 03:26:55
         14044 /d29b81e1_OldHeaders           06-FEB-2010 03:12:12
         36145 /4e492b6f_SerProfileToClassErr 06-FEB-2010 03:11:09
         12920 /25f8f3a5_BasicSplitPaneUI     06-FEB-2010 03:11:06
         15752 /2f494dce_JDWPThreadReference  06-FEB-2010 03:09:31
    11 rows selected.
    SQL> select object_id, object_name, last_ddl_time from t, (select rid, rownum rn from (select rowid rid from t order by last_ddl_time desc) where rownum <= 1200) t1 where rn >= 1190 and t.rowid = t1.rid order by last_ddl_time desc ;
    OBJECT_ID OBJECT_NAME                    LAST_DDL_TIME
         37534 com/sun/mail/smtp/SMTPMessage  06-FEB-2010 03:46:14
         13133 oracle/jdbc/driver/OracleLog$3 06-FEB-2010 03:45:44
         11749 /b9fe5b99_OraRTStatementComman 06-FEB-2010 03:43:49
         42266 SI_GETCLRHSTGRFTR              06-FEB-2010 03:40:20
         16695 /2940a364_RepIdDelegator_1_3   06-FEB-2010 03:38:17
         36539 sun/io/ByteToCharMacHebrew     06-FEB-2010 03:28:57
         26815 /7a628fb8_DefaultHSBChooserPan 06-FEB-2010 03:26:55
         14044 /d29b81e1_OldHeaders           06-FEB-2010 03:12:12
         36145 /4e492b6f_SerProfileToClassErr 06-FEB-2010 03:11:09
         12920 /25f8f3a5_BasicSplitPaneUI     06-FEB-2010 03:11:06
         15752 /2f494dce_JDWPThreadReference  06-FEB-2010 03:09:31
    11 rows selected.
    SQL> set autotrace traceonly
    SQL> select object_id, object_name, last_ddl_time from t, (select rid, rownum rn from (select rowid rid from t order by last_ddl_time desc) where rownum <= 1200) t1 where rn >= 1190 and t.rowid = t1.rid order by last_ddl_time desc
      2  ;
    11 rows selected.
    Execution Plan
    Plan hash value: 44968669
    | Id  | Operation                       | Name  | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                |       |  1200 | 91200 |   180   (2)| 00:00:03 |
    |   1 |  SORT ORDER BY                  |       |  1200 | 91200 |   180   (2)| 00:00:03 |
    |*  2 |   HASH JOIN                     |       |  1200 | 91200 |   179   (2)| 00:00:03 |
    |*  3 |    VIEW                         |       |  1200 | 30000 |    98   (0)| 00:00:02 |
    |*  4 |     COUNT STOPKEY               |       |       |       |            |          |
    |   5 |      VIEW                       |       | 40617 |   475K|    98   (0)| 00:00:02 |
    |   6 |       INDEX FULL SCAN DESCENDING| T_IDX | 40617 |   793K|    98   (0)| 00:00:02 |
    |   7 |    TABLE ACCESS FULL            | T     | 40617 |  2022K|    80   (2)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - access("T".ROWID="T1"."RID")
       3 - filter("RN">=1190)
       4 - filter(ROWNUM<=1200)
    Statistics
              1  recursive calls
              0  db block gets
            348  consistent gets
              0  physical reads
              0  redo size
           1063  bytes sent via SQL*Net to client
            385  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              1  sorts (memory)
              0  sorts (disk)
             11  rows processed
    SQL> select object_id, object_name, last_ddl_time from (select t1.*, rownum rn from (select * from t order by last_ddl_time desc) t1 where rownum <= 1200) where rn >= 1190 ;
    11 rows selected.
    Execution Plan
    Plan hash value: 882605040
    | Id  | Operation                | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT         |      |  1200 | 62400 |    80   (2)| 00:00:01 |
    |*  1 |  VIEW                    |      |  1200 | 62400 |    80   (2)| 00:00:01 |
    |*  2 |   COUNT STOPKEY          |      |       |       |            |          |
    |   3 |    VIEW                  |      | 40617 |  1546K|    80   (2)| 00:00:01 |
    |*  4 |     SORT ORDER BY STOPKEY|      | 40617 |  2062K|    80   (2)| 00:00:01 |
    |   5 |      TABLE ACCESS FULL   | T    | 40617 |  2062K|    80   (2)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter("RN">=1190)
       2 - filter(ROWNUM<=1200)
       4 - filter(ROWNUM<=1200)
    Statistics
              0  recursive calls
              0  db block gets
            343  consistent gets
              0  physical reads
              0  redo size
           1063  bytes sent via SQL*Net to client
            385  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              1  sorts (memory)
              0  sorts (disk)
             11  rows processed
    SQL> select object_id, object_name, last_ddl_time from t, (select rid, rownum rn from (select rowid rid from t order by last_ddl_time desc) where rownum <= 1200) t1 where rn >= 1190 and t.rowid = t1.rid ;
    11 rows selected.
    Execution Plan
    Plan hash value: 168880862
    | Id  | Operation                      | Name  | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT               |       |  1200 | 91200 |   179   (2)| 00:00:03 |
    |*  1 |  HASH JOIN                     |       |  1200 | 91200 |   179   (2)| 00:00:03 |
    |*  2 |   VIEW                         |       |  1200 | 30000 |    98   (0)| 00:00:02 |
    |*  3 |    COUNT STOPKEY               |       |       |       |            |          |
    |   4 |     VIEW                       |       | 40617 |   475K|    98   (0)| 00:00:02 |
    |   5 |      INDEX FULL SCAN DESCENDING| T_IDX | 40617 |   793K|    98   (0)| 00:00:02 |
    |   6 |   TABLE ACCESS FULL            | T     | 40617 |  2022K|    80   (2)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - access("T".ROWID="T1"."RID")
       2 - filter("RN">=1190)
       3 - filter(ROWNUM<=1200)
    Statistics
              0  recursive calls
              0  db block gets
            349  consistent gets
              0  physical reads
              0  redo size
           1063  bytes sent via SQL*Net to client
            385  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
             11  rows processed
    SQL> select object_id, object_name, last_ddl_time from (select t1.*, rownum rn from (select * from t order by last_ddl_time desc) t1 where rownum <= 1200) where rn >= 1190 order by last_ddl_time desc ;
    11 rows selected.
    Execution Plan
    Plan hash value: 882605040
    | Id  | Operation           | Name | Rows     | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT      |     |  1200 | 62400 |    80   (2)| 00:00:01 |
    |*  1 |  VIEW                |     |  1200 | 62400 |    80   (2)| 00:00:01 |
    |*  2 |   COUNT STOPKEY       |     |     |     |          |          |
    |   3 |    VIEW            |     | 40617 |  1546K|    80   (2)| 00:00:01 |
    |*  4 |     SORT ORDER BY STOPKEY|     | 40617 |  2062K|    80   (2)| 00:00:01 |
    |   5 |      TABLE ACCESS FULL      | T     | 40617 |  2062K|    80   (2)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter("RN">=1190)
       2 - filter(ROWNUM<=1200)
       4 - filter(ROWNUM<=1200)
    Statistics
         175  recursive calls
           0  db block gets
         388  consistent gets
           0  physical reads
           0  redo size
           1063  bytes sent via SQL*Net to client
         385  bytes received via SQL*Net from client
           2  SQL*Net roundtrips to/from client
           4  sorts (memory)
           0  sorts (disk)
          11  rows processed
    SQL> set autotrace off
    SQL> spool offAs you will see, the join query here has to have an ORDER BY clause at the end to ensure that records are correctly sorted. You can not rely on optimizer choosing NESTED LOOP join method and, as above example shows, when optimizer chooses HASH JOIN, oracle is free to return rows in no particular order.
    The query that does not involve join always returns rows in the desired order. Adding an ORDER BY does add a step in the plan for the query using join but does not affect the other query.

  • Help needed on SAP tables

    I have a Report in BEx ...It has information related to Vendor & total openitems for him.
    i need to verfiy this data in ECC.
    In which table i can find this information??
    Thanks
    Nilesh

    Hi
    It has related to MM.
    So please find the below link it will provide the Source tables for all MM DS.
    http://wiki.sdn.sap.com/wiki/display/BI/BWSDMMFIDATASOURCES
    Regards
    Ram.

  • Help needed for SAP modules

    Hi all
    I want to learn the SAP modules...like MM, SD, PP, FICO, SCM etc...
    where from shall i get the help?
    plz give me some references.
    Thanx in advance,
    Yours
    Ramu

    Hi Ram,
    Pl refer the following site which will give u helpful pdf files.all modules are available in this easy market place site.
    it is better to concentrate on any one module which ur background and interest supports.
    For MM:
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PSMAT/PSMAT.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CAARCMM/CAARCMM.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/MYSAP/SR_MM.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/MYSAP/SR_MM.pdf
    For PP:
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/MYSAP/SR_PP.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CAARCPP/CAARCPP.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMPP/BCBMTWFMPP.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PPBDBOM/PPBDBOM.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PPCRP/PPCRP.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PPPDC/PPPDC.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PPKAB/PPKAB.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PPPIPCS/PPPIPCS.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PPSFC/PPSFC.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PPBDWKC/PPBDWKC.pdf
    D.K.VIJAYABHASKAR

  • Help Need for External Table

    Gurus,
    While i reading the data from CSV using External Table in some columns the records having the special symbol like 'new line feed'.
    How can i trim that one.
    please help in this issue.

    Hi,
    Use Substr or Replace functions on them.

  • Update sql help needed for hierarchy table

    I am trying update the gross qty field based on each unit qty. This is how the table looks.
    slevel | manager | seller |unit_qty | gross qty
    0 | mary | mary | 1 | 1
    .1 | mary | lynn| 3 | null
    .1 | mary | betty | 2 | null
    .1 | mary | alice | 2 | null
    ..2 | alice | susan | 1 | null
    .1 | mary | amy | 4 | null
    I would the table to look like this after the update, with the values
    slevel | manager| seller | unit_qty | gross qty
    0 | mary | mary | 1 | 1
    .1 | mary | lynn| 3 | 3*1 ={color:#ff0000}3{color}
    .1 | mary | betty | 2 | 2*1 ={color:#ff0000}2{color}
    .1 | mary | alice | 2 | {color:#008000}2*1{color} ={color:#ff0000}2{color}
    ..2 | alice | susan | {color:#0000ff}1{color} | {color:#008000}2*1{color}{color:#0000ff}*1{color} ={color:#ff0000}2{color}
    .1 | mary | amy | 4 | 4*1 = {color:#ff0000}4
    {color}
    This is the sql statement I tried to use without sucess.
    update table set gross_qty = unit_qty * ({color:#ff0000}select gross_qty from table{color}
    {color:#ff0000}where manager=seller{color})
    where slevel &gt;0

    Perhaps the old EXP (SUM (LN (n))) trick for calculating the product.
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> CREATE TABLE seller (
      2     manager VARCHAR2 (5),
      3     seller VARCHAR2 (5),
      4     unit_qty NUMBER,
      5     gross_qty NUMBER);
    Table created.
    SQL> INSERT INTO seller (manager, seller, unit_qty) VALUES (NULL, 'mary', 1);
    1 row created.
    SQL> INSERT INTO seller (manager, seller, unit_qty) VALUES ('mary', 'lynn', 3);
    1 row created.
    SQL> INSERT INTO seller (manager, seller, unit_qty) VALUES ('mary', 'betty', 2);
    1 row created.
    SQL> INSERT INTO seller (manager, seller, unit_qty) VALUES ('mary', 'alice', 2);
    1 row created.
    SQL> INSERT INTO seller (manager, seller, unit_qty) VALUES ('alice', 'susan', 1);
    1 row created.
    SQL> INSERT INTO seller (manager, seller, unit_qty) VALUES ('mary', 'amy', 4);
    1 row created.
    SQL> COMMIT;
    Commit complete.
    SQL> SELECT manager, seller, unit_qty, gross_qty
      2  FROM   seller;
    MANAG SELLE   UNIT_QTY  GROSS_QTY
          mary           1
    mary  lynn           3
    mary  betty          2
    mary  alice          2
    alice susan          1
    mary  amy            4
    6 rows selected.
    SQL> UPDATE seller s1
      2  SET    s1.gross_qty = (SELECT EXP (SUM (LN (s2.unit_qty)))
      3                         FROM   seller s2
      4                         START WITH s2.seller = s1.seller
      5                         CONNECT BY s2.seller = PRIOR s2.manager);
    6 rows updated.
    SQL> SELECT manager, seller, unit_qty, gross_qty
      2  FROM   seller;
    MANAG SELLE   UNIT_QTY  GROSS_QTY
          mary           1          1
    mary  lynn           3          3
    mary  betty          2          2
    mary  alice          2          2
    alice susan          1          2
    mary  amy            4          4
    6 rows selected.
    SQL>

  • Help needed  for nested  table

    Hi ,
    I have a function which returns nested table as result .The nested table can sometimes be null.So when i reference the first and last value for a loop, when table is null , then i am getting numeric value error .So i added a check on the nested table as below
    if n_table is empty then
    exit;
    end if;
    for i in n_table.first ..n_table.last
    loop
    select count(1) into_count
    from x where rate=n_table(i);
    end loop;
    Now iam getting a message as" DANGLING NOT NULL OF".Though it gets compiled .iam getting everytime when i first compile it .Please let me know what should i add to prevent this

    Null and empty are two different things. Also please post the complete error message.
    Notice the difference between
    DECLARE
        v_tab INTEGER_TT;
    BEGIN
        IF v_tab IS NOT NULL THEN
            FOR i IN v_tab.FIRST..v_tab.LAST LOOP
                DBMS_OUTPUT.PUT_LINE('Loop iteration ' || i);
            END LOOP;
        END IF;
    END;and
    DECLARE
        v_tab INTEGER_TT := INTEGER_TT();
    BEGIN
        IF v_tab IS NOT EMPTY THEN
            FOR i IN v_tab.FIRST..v_tab.LAST LOOP
                DBMS_OUTPUT.PUT_LINE('Loop iteration ' || i);
            END LOOP;
        END IF;
    END;

  • Help needed for writing query

    help needed for writing query
    i have the following tables(with data) as mentioned below
    FK*-foregin key (SUBJECTS)
    FK**-foregin key (COMBINATION)
    1)SUBJECTS(table name)     
    SUB_ID(NUMBER) SUB_CODE(VARCHAR2) SUB_NAME (VARCHAR2)
    2           02           Computer Science
    3           03           Physics
    4           04           Chemistry
    5           05           Mathematics
    7           07           Commerce
    8           08           Computer Applications
    9           09           Biology
    2)COMBINATION
    COMB_ID(NUMBER) COMB_NAME(VARCHAR2) SUB_ID1(NUMBER(FK*)) SUB_ID2(NUMBER(FK*)) SUB_ID3(NUMBER(FK*)) SUBJ_ID4(NUMBER(FK*))
    383           S1      9           4           2           3
    384           S2      4           2           5           3
    ---------I actually designed the ABOVE table also like this
    3) a)COMBINATION
    COMB_ID(NUMBER) COMB_NAME(VARCHAR2)
    383           S1
    384           S2
    b)COMBINATION_DET
    COMBDET_ID(NUMBER) COMB_ID(FK**) SUB_ID(FK*)
    1               383          9
    2               383          4
    3               383          2
    4               383          3
    5               384          4
    6               384          2          
    7               384          5
    8               384          3
    Business rule: a combination consists of a maximum of 4 subjects (must contain)
    and the user is less relevant to a COMB_NAME(name of combinations) but user need
    the subjects contained in combinations
    i need the following output
    COMB_ID COMB_NAME SUBJECT1 SUBJECT2      SUBJECT3      SUBJECT4
    383     S1     Biology Chemistry      Computer Science Physics
    384     S2     Chemistry Computer Science Mathematics Physics
    or even this is enough(what i actually needed)
    COMB_ID     subjects
    383           Biology,Chemistry,Computer Science,Physics
    384           Chemistry,Computer Science,Mathematics,Physics
    you can use any of the COMBINATION table(either (2) or (3))
    and i want to know
    1)which design is good in this case
    (i think SUB_ID1,SUB_ID2,SUB_ID3,SUB_ID4 is not a
    good method to link with same table but if 4 subjects only(and must) comes
    detail table is not neccessary )
    now i am achieving the result by program-coding in C# after getting the rows from oracle
    i am using oracle 9i (also ODP.NET)
    i want to know how can i get the result in the stored procedure itsef.
    2)how it could be designed in any other way.
    any help/suggestion is welcome
    thanks for your time --Pradeesh

    Well I forgot the table-alias, here now with:
    SELECT C.COMB_ID
    , C.COMB_NAME
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID1) AS SUBJECT_NAME1
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID2) AS SUBJECT_NAME2
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID3) AS SUBJECT_NAME3
    , (SELECT SUB_NAME
    FROM SUBJECTS
    WHERE SUB_ID = C.SUB_ID4) AS SUBJECT_NAME4
    FROM COMBINATION C;
    As you need exactly 4 subjects, the columns-solution is just fine I would say.

  • Color management help needed for adobe CS5 and Epson printer 1400-Prints coming out too dark with re

    Color management help needed for adobe CS5 and Epson printer 1400-Prints coming out too dark with reddish cast and loss of detail
    System: Windows 7
    Adobe CS5
    Printer: Epson Stylus Photo 1400
    Paper: Inkjet matte presentation paper with slight luster
    Installed latest patch for Adobe CS5
    Epson driver up to date
    After reading solutions online and trying them for my settings for 2 days I am still unable to print what I am seeing on my screen in Adobe CS5. I calibrated my monitor, but am not sure once calibration is saved if I somehow use this setting in Photoshop’s color management.
    The files I am printing are photographs of dogs with lots of detail  I digitally painted with my Wacom tablet in Photoshop CS5 and then printed with Epson Stylus 1400 on inkjet paper 20lb with slight luster.
    My Printed images lose a lot of the detail & come out way to dark with a reddish cast and loss of detail when I used these settings in the printing window:
    Color Handling: Photoshop manages color, Color management -ICM, OFF no color adjustment.
    When I change to these settings in printer window: Color Handling:  Printer manages color.  Color management- Color Controls, 1.8 Gamma and choose Epson Standard it prints lighter, but with reddish cast and very little detail and this is the best setting I have used so far.
    Based on what I have read on line, I think the issue is mainly to do with what controls are set in the Photoshop Color Settings window and the Epson Printer preferences. I have screen images attached of these windows and would appreciate knowing what you recommend I enter for each choice.
    Also I am confused as to what ICM color management system to use with this printer and CS5:
    What is the best ICM to use with PS CS5 & the Epson 1400 printer? Should I use the same ICM for both?
    Do I embed the ICM I choose into the new files I create? 
    Do I view all files in the CS5 workspace in this default ICM?
    Do I set my monitor setting to the same ICM?
    If new file opens in CS5 workspace and it has a different embedded profile than my workspace, do I convert it?
    Do I set my printer, Monitor and PS CS5 color settings to the same ICM?
    Is using the same ICM for all devices what is called a consistent workflow?
    I appreciate any and all advice that can be sent my way on this complicated issue. Thank you in advance for your time and kind help.

    It may be possible to figure out by watching a Dr.Brown video on the subject of color printing. Adobe tv
    I hope this may help...............

  • File missing (file\BCD error code 0Xc0000034 help need for work!

    file missing (file\BCD  error code 0Xc0000034 help need for work!    what can i do?
    have an p 2000 notebook pc

     Hi bobkunkle, welcome to the HP Forums. I understand you cannot boot passed the error you are receiving.
    What is the model or product number of your notebook? What version of Windows is installed?
    Guide to finding your product number
    Which Windows operating system am I running?
    TwoPointOh
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom to say “Thanks” for helping!

  • Help need for force to signout All session ! how...

    hi
         help need for force to  signout All session !  how ??
    Solved!
    Go to Solution.

    Hi and welcome to the Skype Community,
    To force a signout of all instances your Skype is signed into please change your password: https://support.skype.com/en/faq/FA95/how-do-i-change-my-password
    Follow the latest Skype Community News
    ↓ Did my reply answer your question? Accept it as a solution to help others, Thanks. ↓

  • Help  need to generate table table maintainance for one table

    Dear SAP Gurus,
       Am not a ABAP consultant, currently we have some requirement to maintain some values for custmized table "ZXXXtable", when i checked in SM30 this table is not supporting to maintain.
      Now We are trying to gerenate for table maintaince using  in SE11 --> Utilties --> Table maintainace Generatore and
    but in this screen it is asking function group and packge.
    What is this function group and packge,
    How to maintain this gunction group and package (or) how can I check for this table function group and package is maintained.
    (or) shall we use other function group  and package which is already existing in the system.
    Please help me to solve this isse.
    Thanks & Regards,
    MK

    Hi PXG,
      this is production system we cannot able to create, shall we use the existing one which is already available under same package, I have checked 4 function groups are available in the same packing , but that function groups belongs to some other table or i don't know some other purpose.
    Please help to how can i maintain the table with out creating new function group.
    First could please explaing what is the use of function group?
    Thanks & Regards,
    MK

  • Query help needed for querybuilder to use with lcm cli

    Hi,
    I had set up several queries to run with the lcm cli in order to back up personal folders, inboxes, etc. to lcmbiar files to use as backups.  I have seen a few posts that are similar, but I have a specific question/concern.
    I just recently had to reference one of these back ups only to find it was incomplete.  Does the query used by the lcm cli also only pull the first 1000 rows? Is there a way to change this limit somwhere?
    Also, since when importing this lcmbiar file for something 'generic' like 'all personal folders', pulls in WAY too much stuff, is there a better way to limit this? I am open to suggestions, but it would almost be better if I could create individual lcmbiar output files on a per user basis.  This way, when/if I need to restore someone's personal folder contents, for example, I could find them by username and import just that lcmbiar file, as opposed to all 3000 of our users.  I am not quite sure how to accomplish this...
    Currently, with my limited windows scripting knowledge, I have set up a bat script to run each morning, that creates a 'runtime' properties file from a template, such that the lcmbiar file gets named uniquely for that day and its content.  Then I call the lcm_cli using the proper command.  The query within the properties file is currently very straightforward - select * from CI_INFOOBJECTS WHERE SI_ANCESTOR = 18.
    To do what I want to do...
    1) I'd first need a current list of usernames in a text file, that could be read (?) in and parsed to single out each user (remember we are talking about 3000) - not sure the best way to get this.
    2) Then instead of just updating the the lcmbiar file name with a unique name as I do currently, I would also update the query (which would be different altogether):  SELECT * from CI_INFOOBJECTS where SI_OWNER = '<username>' AND SI_ANCESTOR = 18.
    In theory, that would grab everything owned by that user in their personal folder - right? and write it to its own lcmbiar file to a location I specify.
    I just think chunking something like this is more effective and BO has no built in back up capability that already does this.  We are on BO 4.0 SP7 right now, move to 4.1 SP4 over the summer.
    Any thoughts on this would be much appreciated.
    thanks,
    Missy

    Just wanted to pass along that SAP Support pointed me to KBA 1969259 which had some good example queries in it (they were helping me with a concern I had over the lcmbiar file output, not with query design).  I was able to tweak one of the sample queries in this KBA to give me more of what I was after...
    SELECT TOP 10000 static, relationships, SI_PARENT_FOLDER_CUID, SI_OWNER, SI_PATH FROM CI_INFOOBJECTS,CI_APPOBJECTS,CI_SYSTEMOBJECTS WHERE (DESCENDENTS ("si_name='Folder Hierarchy'","si_name='<username>'"))
    This exports inboxes, personal folders, categories, and roles, which is more than I was after, but still necessary to back up.. so in a way, it is actually better because I have one lcmbiar file per user - contains all their 'personal' objects.
    So between narrowing down my set of users to only those who actually have saved things to their personal folder and now having a query that actually returns what I expect it to return, along with the help below for a job to clean up these excessive amounts of promotion jobs I am now creating... I am all set!
    Hopefully this can help someone else too!
    Thanks,
    missy

  • KPI's for SAP-Table entries.

    Hi Guys,
    I am eager to know whether there are some tools in SAP to check the KPI's of SAP-Tables. Let us say we are having a Table where we insert in every 3 seconds 10 entries in this Table and delete them in every 3 minutes and it can also happen that these entries also remain in the table untill the errors are rectified. It means we insert entires and once they are sucessfull a batch job deletes them and when they fail to process sucessfully then they remain in the table.
    So I would like to know where there is way or tool to find out how many entries are inserted resp. how many are sucessfully deleted in this table in a day and how many entires remain failure ?
    Cheers
    Sanjeev

    Hi Sanjeev,
    >
    Sanjeev Kumar Kedarshetty wrote:
    > Hi,
    >
    > Thanks for your input, but this is not really what I am searching for.  I am searching for how many entires are totally inserted into a table in a day.
    > Sanjeev.
    On SAP level we have some stats like nr. of changes per table... .
    On DB02 you can analyze how much space a table allocates...
    On database level (e.g. on ORACLE) one can analyze the nr. of INSERTS / UPDATES / DELETES per table... .
    And the database statistics will not help as well since they are not updated daily...
    If you really need that information you have to do something on your own.... .
    Kind regards,
    Hermann

  • Table taht store SAP tables relationship

    Hi,
    I am wondering if anyone can tell me which table in SAP that stores constraint relationship between SAP tables for example, the primary key and foreign keys in related tables. I would appreciate if anyone can help me with this.
    Sunny

    Thank you for your help. However, when I fetch data from DD05S, it
    appears that TABNAME and FORTABLE have the same name most of the time.
    This doesn't make sense.
    For example, for the following query:
    SELECT TABNAME, FIELDNAME, FORTABLE, FORKEY FROM DD05S WHERE DD05S.TABNAME = 'MARA'
    the data I get is:
    MARA     STOFF     *     
    MARA     TAKLV     *     
    MARA     BEHVO     MARA     MANDT
    MARA     BEHVO     MARA     BEHVO
    MARA     BMATN     MARA     BMATN
    MARA     BSTME     MARA     MANDT
    MARA     BSTME     MARA     BSTME
    MARA     BWSCL     MARA     BWSCL
    MARA     COMPL     MARA     MANDT
    MARA     COMPL     MARA     COMPL
    MARA     EKWSL     MARA     MANDT
    MARA     EKWSL     MARA     EKWSL
    MARA     ERGEI     MARA     MANDT
    MARA     ERGEI     MARA     ERGEI
    MARA     ERVOE     MARA     MANDT
    MARA     ERVOE     MARA     ERVOE
    MARA     ETIAG     MARA     ETIAG
    MARA     ETIAR     MARA     MANDT
    MARA     ETIAR     MARA     ETIAR
    MARA     ETIFO     MARA     MANDT
    MARA     ETIFO     MARA     ETIFO
    MARA     EXTWG     MARA     MANDT
    MARA     EXTWG     MARA     EXTWG
    MARA     GENNR     MARA     GENNR
    MARA     GEWEI     MARA     MANDT
    MARA     GEWEI     MARA     GEWEI
    MARA     INHME     MARA     INHME
    MARA     KOSCH     MARA     KOSCH
    MARA     KUNNR     MARA     MANDT
    MARA     KUNNR     MARA     KUNNR
    MARA     LABOR     MARA     MANDT
    MARA     LABOR     MARA     LABOR
    MARA     MAGRV     MARA     MAGRV
    MARA     MANDT     MARA     MANDT
    MARA     MATKL     MARA     MANDT
    MARA     MATKL     MARA     MATKL
    MARA     MBRSH     MARA     MANDT
    MARA     MBRSH     MARA     MBRSH
    MARA     MEABM     MARA     MANDT
    MARA     MEABM     MARA     MEABM
    MARA     MEINS     MARA     MANDT
    MARA     MEINS     MARA     MEINS
    MARA     MFRNR     MARA     MFRNR
    MARA     MPROF     MARA     MPROF
    MARA     MSTAE     MARA     MSTAE
    MARA     MSTAV     MARA     MSTAV
    MARA     MTART     MARA     MANDT
    MARA     MTART     MARA     MTART
    MARA     MTPOS_MARA     MARA     MTPOS_MARA
    MARA     NUMTP     MARA     MANDT
    MARA     NUMTP     MARA     NUMTP
    MARA     PLGTP     MARA     PLGTP
    MARA     PMATA     MARA     PMATA
    MARA     PRDHA     MARA     MANDT
    MARA     PRDHA     MARA     PRDHA
    MARA     PROFL     MARA     PROFL
    MARA     RAUBE     MARA     MANDT
    MARA     RAUBE     MARA     RAUBE
    MARA     RBNRM     MARA     RBNRM
    MARA     RMATP     MARA     RMATP
    MARA     SAISO     MARA     MANDT
    MARA     SAISO     MARA     SAISO
    MARA     SAITY     MARA     SAITY
    MARA     SATNR     MARA     SATNR
    MARA     SPART     MARA     MANDT
    MARA     SPART     MARA     SPART
    MARA     STOFF     MARA     STOFF
    MARA     TAKLV     MARA     TAKLV
    MARA     TEMPB     MARA     MANDT
    MARA     TEMPB     MARA     TEMPB
    MARA     TRAGR     MARA     MANDT
    MARA     TRAGR     MARA     TRAGR
    MARA     VHART     MARA     VHART
    MARA     VOLEH     MARA     MANDT
    MARA     VOLEH     MARA     VOLEH
    MARA     WRKST     MARA     WRKST
    MARA     BWSCL     SY     MANDT
    MARA     ETIAG     SY     MANDT
    MARA     INHME     SY     MANDT
    MARA     MSTAE     SY     MANDT
    MARA     MSTAV     SY     MANDT
    MARA     PLGTP     SY     MANDT
    MARA     PMATA     SY     MANDT
    MARA     RBNRM     SY     MANDT
    MARA     SATNR     SY     MANDT
    MARA     STOFF     SY     MANDT
    MARA     TAKLV     SY     MANDT
    MARA     BMATN     SYST     MANDT
    MARA     GENNR     SYST     MANDT
    MARA     KOSCH     SYST     MANDT
    MARA     MAGRV     SYST     MANDT
    MARA     MFRNR     SYST     MANDT
    MARA     MPROF     SYST     MANDT
    MARA     MTPOS_MARA     SYST     MANDT
    MARA     PROFL     SYST     MANDT
    MARA     RMATP     SYST     MANDT
    MARA     SAITY     SYST     MANDT
    MARA     VHART     SYST     MANDT
    MARA     WRKST     SYST     MANDT
    I expect MARA must have join information with many other M* tables such as MAKT, etc. However, I don't see
    this information.
    Is there a different table I must be looking at?
    Thank you in advance for your help.

Maybe you are looking for

  • Batch determination at sales order level

    Dear All, We are using my sap erp ecc 6.0.We are using the batch determination at sales order level.We had a problem whenever customer requested deliver date is beyond the RLT date then all the old batches which are already assigned and dispatched wi

  • MessageBody.txt file instead of actual message body when attachment="true"

    Hi guys, Using XMLP 5.6.3 with EBS (with patch 5968876 applied) Trying to send out a PDF report via email using the bursting engine. We need the report to be attached but the message body to show in the actual message body window of the client. Right

  • Blue ? instead of pictures

    Hii, i have a 15inch macbook pro (latest one available), and in my email and safari certain pictures dont appear but what does is a little blue question mark. ive had this laptop since february and i've done all the updates. this is really starting t

  • Use of robots.txt to disallow system/secure domain names?

    I've got a client who's system and secure domains are ranking very high on google.  My SEO advisor has mentioned that a key way to eliminate these URLs from google is through the use of disallowing content through robots.txt.  Given BC's unique natur

  • Adding an asterix(*) in the standard field in the shopping cart screen.

    Hi all,       In the Delivery address of the shopping cart screen, I need to add (*) in a field text, saying that it is mandatory field. So, I need information that can help me change the standard field text, to add(*) in prefix.  can you please help