Hi frnds...im new 2 BI can some one explain me basics in BI...

HI frnds..
  I jst started BW/Bi training..can someone explain me basics in BW.. like
what are dimesion id's n surrogate id's??
what is extended schema???
what is master data??
how master data is stored??
what is datasource,infosource,infopackage,application component,transfer rules,update rules....have much confusion..
please can some one clear it...

First of all this is not the correct forum for your questions. This forum handles questions regarding the BusinessObjects on Demand offering.
Secondly it is not realistic to expect an answer to ALL those questions in a forum. I would suggest either to buy book about SAP Netweaver/BW (Beginner's level) or search for the keywords you are refering to either in SDN or in the Internet. There are some SAP BW tutorilas available out there.
eg.
Step By Step BW Exercise
http://searchsap.techtarget.com/tutorial/SAP-NetWeaver-BI-training-tutorial
Regards,
Stratos

Similar Messages

  • Can some one explain me on Exchange server / CAL licesing & where I can find current cost information?

    Can some one explain me on Exchange server / CAL licesing & where I can find current cost information?

    Hi,
    As far as I know, every user need a license to use Exchange server and we can choose User CAL or Device CAL.
    For more information about license, you can refer to the following articles:
    Licensing Basics: What are CALs (Client Access Licenses):
    http://blogs.msdn.com/b/mssmallbiz/archive/2007/11/06/5942350.aspx
    Exchange Server 2013 licensing:
    http://office.microsoft.com/en-001/exchange/microsoft-exchange-server-licensing-licensing-overview-FX103746915.aspx
    Exchange Licensing FAQ:
    http://office.microsoft.com/en-001/exchange/microsoft-exchange-licensing-faq-email-for-business-FX103934581.aspx
    For the cost issue, I recommend you call Microsoft Licensing for useful information. And they will be able to give you an estimate based on your requirement.
    http://www.microsoft.com/licensing/
    If you have any question, please feel free to let me know.
    Best regards,
    Angela Shi
    TechNet Community Support

  • How come extend is the physical structure ? Can some one explain.

    How come extend is the physical structure ? Can some one explain.
    thanks
    siva

    "Tablespaces physically group schema objects for administration convenience. They bridge physical structures, such as datafiles or extents, and logical structures, such as tables and indexes. Tablespaces can store zero or more segments. Segments are schema objects that require storage outside the data dictionary. Tables and indexes are examples of segments. Constraints and sequences are examples of schema objects that do not store data outside the data dictionary and are therefore not segments." - Study Guide.
    Read above, it reads "physical structures, such as datafiles or extents", this is where I got confused ?
    thanks
    siva

  • Can some one explain each line of this abap code

    Hi..
      I got this code from a document, where they try to add account group (LFA1-KTOKK) to 0VENDOR_ATTR. I have no idea of ABAP syntax. Can some one tell me the meaning of each line of code.
    Tables:  LFA1.          "vendor master data table
    data:    l_tabix      like sy-tabix.
    case i_CHABASNM.
    *Enhancement of Vendor Master Record
         WHEN '0VENDOR'.
           case i_datasource.
             WHEN '0VENDOR_ATTR'.
               data:  l_s_BIW_LFA1_S like BIW_LFA1_S.
               loop at i_t_data into l_s_BIW_LFA1_S.
                 l_tabix = sy-tabix.
                 select single * from lfa1 where LIFNR = l_s_BIW_LFA1_S-LIFNR.
                 if sy-subrc = 0.
                   l_s_BIW_lfa1_s-ZZacctgrp = lfa1-ktokk.
                   modify i_t_data from l_s_BIW_lfa1_s index l_tabix.
                 endif.
               endloop.
           endcase.
       endcase.
    Thanks in advance.

    Hi
    Tables: LFA1. "vendor master data table
    <b>"here by saying Tables they have delcared the LFA1 table for further use in the program"</b>data: l_tabix like sy-tabix.
    <b>"here they have defined own table index by copying the structure of system index"</b>case i_CHABASNM.
    <b>"when character"</b>
    *Enhancement of Vendor Master Record
    WHEN '0VENDOR'.
    <b>"here it says that its 0vendor"</b>case i_datasource.
    <b>"when this datasource"</b>
    WHEN '0VENDOR_ATTR'.
    <b>"when datasource 0vendor_attr"</b>
    data: l_s_BIW_LFA1_S like BIW_LFA1_S.
    <b>"here we are declaring an internal table like BW internal table"</b>loop at i_t_data into l_s_BIW_LFA1_S.
    <b>"here looping at i_t_data table data into l_s_BIW_LFA1_S".</b>l_tabix = sy-tabix.
    <b>"here we are saying that our defined table index is equal to system index"</b>select single * from lfa1 where LIFNR = l_s_BIW_LFA1_S-LIFNR.
    <b>"selecting single rows from table lfa1 where lifnr is equal to l_s_biw_lfa1 field s-lifnr"</b>
    if sy-subrc = 0.
    <b>"if system field returns 0 that means the above line has been executed"</b>
    l_s_BIW_lfa1_s-ZZacctgrp = lfa1-ktokk.
    "internal table field is equal to lfa1 field."
    modify i_t_data from l_s_BIW_lfa1_s index l_tabix.
    <b>"changing the internal table data as per i_t_data"</b>endif.
    endloop.
    endcase.
    endcase.
    THIS IS MY UNDERSTANDING PLEASE KINDLY CORRECT ME IF I AM WRONG.
    thanks
    harish

  • Deadlock - can some one explain pls?

    public class Lazy {
         private static boolean initialized = false;
         static {
              Thread t = new Thread(new Runnable() {
                   public void run() {
                        initialized = true; // Deadlocks here
              t.start();
              try {
                   t.join();
              } catch(InterruptedException e) {
                   throw new AssertionError(e);
         public static void main(String[] args) {
              System.out.println(initialized);
    }The above given program deadlocks at the point specified in comment. Can someone explain the reason for this? Thanks in advance

    Sounds reasonable. But I do also expect some voodoo
    magic to be involved since the posted code isn't
    synchronized.If I understand the few lines of the VM Spec correctly, the above would lead to:
    public class Lazy {
         private static boolean initialized = false;
         static {
              Thread t = new Thread(new Runnable() {
                   public void run() {
                                    // <VM>
                                    if( !Lazy.class.ready() ) {
                                         synchronize( Lazy.class ) {
                                                 // Do Lazy init
                                    // </VM>
                        initialized = true; // Deadlocks here
              t.start();
              try {
                   t.join();
              } catch(InterruptedException e) {
                   throw new AssertionError(e);
         public static void main(String[] args) {
              // <VM>
                    if( !Lazy.class.ready() ) {
                   synchronize( Lazy.class ) {
                              Do Lazy init
              // </VM>
              System.out.println(initialized);
    VM Spec (squiggly thing)2.17.5 Detailed Initialization Procedure
    Message was edited by:
    mlk

  • Can some one explain me oracle MVC configuration or point me to a guide

    I use oracle MVC in my application. cle20.jar is used for it. The application was working fine and now all of sudden I get a null pointer exception in my code where i use this line of code: "ProcessInfo info = (ProcessInfo)getInfo(aKey);" where getInfo is from the oracle.cle.process.GenericProcess and aKey is not null.
    Any help or direction will help. I debugged the application and see that getInfo is always returning null value for all values of aKey.
    Error Message is as follow:
    ERROR [STDERR] java.lang.NullPointerException
    15:23:32,752 ERROR [STDERR]      at myapp.application.process.GetData.persist(GetData.java:302)
    15:23:32,752 ERROR [STDERR]      at oracle.cle.process.PersistingProcess.start(PersistingProcess.java:83)
    15:23:32,752 ERROR [STDERR]      at oracle.cle.process.CLEStateMachine.start(CLEStateMachine.java:61)
    15:23:32,752 ERROR [STDERR]      at oracle.cle.process.Process.start(Process.java:108)
    15:23:32,752 ERROR [STDERR]      at oracle.cle.process.GenericProcess.start(GenericProcess.java:84)
    15:23:32,752 ERROR [STDERR]      at oracle.cle.process.ParentProcess.start(ParentProcess.java:226)
    15:23:32,752 ERROR [STDERR]      at oracle.cle.process.DisplayGroup.start(DisplayGroup.java:75)
    15:23:32,752 ERROR [STDERR]      at oracle.cle.process.CLEStateMachine.start(CLEStateMachine.java:61)
    15:23:32,752 ERROR [STDERR]      at oracle.cle.process.Service.start(Service.java:389)
    15:23:32,752 ERROR [STDERR]      at oracle.clex.process.controller.HttpServletController.doPost(HttpServletController.java:422)
    15:23:32,752 ERROR [STDERR]      at oracle.clex.process.controller.HttpServletController.doGet(HttpServletController.java:836)
    15:23:32,752 ERROR [STDERR]      at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
    15:23:32,752 ERROR [STDERR]      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    15:23:32,752 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    15:23:32,752 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    15:23:32,752 ERROR [STDERR]      at myapp.application.servlets.SessionFilter.doFilter(SessionFilter.java:42)
    15:23:32,752 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    15:23:32,752 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    15:23:32,752 ERROR [STDERR]      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    15:23:32,752 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    15:23:32,752 ERROR [STDERR]      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    15:23:32,752 ERROR [STDERR]      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    15:23:32,752 ERROR [STDERR]      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    15:23:32,752 ERROR [STDERR]      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
    15:23:32,752 ERROR [STDERR]      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
    15:23:32,752 ERROR [STDERR]      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
    15:23:32,752 ERROR [STDERR]      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    15:23:32,752 ERROR [STDERR]      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    15:23:32,752 ERROR [STDERR]      at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
    15:23:32,752 ERROR [STDERR]      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    15:23:32,752 ERROR [STDERR]      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    15:23:32,752 ERROR [STDERR]      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    15:23:32,752 ERROR [STDERR]      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
    15:23:32,752 ERROR [STDERR]      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    15:23:32,752 ERROR [STDERR]      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
    15:23:32,752 ERROR [STDERR]      at java.lang.Thread.run(Thread.java:595)
    Thanks in advance....
    Edited by: user1694903 on Feb 10, 2009 12:46 PM
    Edited by: user1694903 on Feb 10, 2009 12:48 PM

    KB 60446, How to clean an LCD Panel

  • In new iPad 4g, when sim card is not inserted, I can not find the enable 4g tap in the setting-cellular data tap, can some one please tell me if this is normal and if so, then when it appears, thanks

    In new iPad 4g, when sim card is not inserted, I can not find the enable 4g tap in the setting-cellular data tap, can some one please tell me if this is normal and if so, then when it appears, thanks

    If the SIM is out of your phone, find my phone needs a data connection, so could use wifi - IF in range of a wifi and one that it can join (ie. a known network or one that is wholly open so no login required).  Your phone could also simple be turned off, so not findable, or it may have been restored (plugged into iTunes and restored as new) again, making it permanently unfindable.  Honestly, for someone stealing an iPhone, this is likely the first thing they do - restore as new and it is theirs forever.
    Find my iPhone is tied to the users iCloud account - the find function is part of the iCloud account's services and it communicates with the iCloud servers over a data connection - either wifi or 3G.
    Have you set up your iCloud account on your replacement phone, and is it working properly on that phone?

  • HT1338 i have apps to be updated but when i try to update them a message pops out saying "You have updates for other accounts, please sigh in with the other id". Can some one help me how can i still update the same with the new apple id ive created.

    i have apps to be updated but when i try to update them a message pops out saying "You have updates for other accounts, please sigh in with the other id". Can some one help me how can i still update the same with the new apple id ive created. As i dont have the access to the earlier id anymore.

    You cannot. The apps are assigned to that Apple ID and there is nothing you can do to change that. You could choose to download them again with the new Apple ID, any paid apps will need to be purchased again.
    Hope that helps.

  • HT1373 Can some one please assit me. I have purchased a new laptop and copied accross my file of music from Itunes I can see the music in my files, however i can copy music from CDs, however the Itunes file does not connect or will not interface into itun

    Hello can some one assit me please. I have purchased a new lap top and copied my old itunes files accross so i do not loose all my music, and have to start again. I can play and see allof my tunes and play these. However I am unable to access the Itunes store through my itunes files. It will not interface at all. I can access itunes store through the Web, but not through the my ituntes file. I have gone in and authorised the laptop through the various process. Highly frustrated already paided a computer person to fix this. However hed deleated all files and started again he had it work and then I turned computer on again and it will not interface from the itune file to itunes, So if I copy a CD it will not tell you the name of the track. I cannot asscess the itunes store to action anything. Please assit me
    Regards
    Karen

    I am not an expert, but assuming that you have a Windows or Mac folder with music in it and want to move that to a new laptop, I think you have to import it into iTunes. iTunes needs to associate each file with a link, so copying it over will not associate a link.
    Delete the files and try importing.

  • I got error 3295 when doing software update to 4.3.4 on my iphone4.. can some one tell me how skip this error?? I'm new to apple products..!?

    I got error 3295 when doing software update to 4.3.4 on my iphone4.. can some one tell me how skip this error?? I'm new to apple products..!

    anyone????

  • New To Iplanet app server.Can some one help me getting started by delpoying and calling one of each of these:JSP,Servlet,EJB.Tried with iplanet docs..didnt quite get it. thanx

     

    Hi,
    What is that you are trying to accomplish ? Is it deployment or
    trying to develop applications ? Are you getting any errors ? If so,
    please post them to help you. I think the documentation is the best place
    for you to begin with.
    Regards & Happy New Year
    Raj
    Arif Khan wrote:
    New To Iplanet app server.Can some one help me getting started by
    delpoying and calling one of each of these:JSP,Servlet,EJB.Tried with
    iplanet docs..didnt quite get it. thanx
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • I have a brand new hp officejet 6700 premium e-all-in-one printer but my macbook pro is not detecting the printer to even install it or make a print can some one tell me if it is a problem with the printer or the macbook pro?

    can some one help me with the question ..

    no not at all..it was just tested if it was being detected on a windows os..it did..i am doubting either it is a problem with the router or the macbook pro....but earlier it did connect well to a hp officejet pro 8600 e-all-in-one printer over a different network(at someone else's house)...

  • Can some one tell me a better way...

    Hi All..
    I work on a web application. I create user ids for people logging into my application. here I have a small problem.. This is what I am currently doing...
    When I create a new user, I assign a new user id to the user and store all hi info.
    All our user ids are stored in User_ID table and user info in User_Info table.
    First I get the max user id from the User_Id table.
    int iuserid = select max(User_ID) from User_ID;
    Then I add ' 1 ' to this and assign it to new user.
    iuserid = iuserid+1;
    insert into User_id values(iuserid, <ssn> );
    Then I store all user info in User_info table..
    insert into User_info(iuserid, <first_name>, <last_name>,...);
    Both these SQLs are executed as a transaction.
    The problem that I have...
    It works fine in a normal environment and in my testing.
    But when the load inceases, before I insert into the User_info, another user tries to get the max User_id from User_ID table, then it conflicts..
    I have seen occurences of User_Info storing the info of a different user against the User_id when many people are accessing the app at the same time.
    Can some one tell me a better way to handle this scenario..
    Appreciate all you help..
    TIA..
    CK

    Hi,
    assuming that the requirement for user_id is only for uniqueness (primary key requirement) not continuosly.
    perhaps can try this,
    1) create a table to keep the max id for each table's key.
    e.g.
    create table key_id_lookup
    key_name char(n),
    current_value number(m)
    where n & m is the size of the field
    2) for each creation of entry in the user_id table, lookup the value in the key_id_table and increment it after retrieval.
    e.g. current_id = select current_value from key_id_lookup where key_name = 'user_id_key';
    current_id+=1;
    update key_id_lookup set current_value = current_id where key_name = 'user_id_key';
    something similar to use of sequence if your database support it.
    3) continue with the creation of record in other tables. now obtain the time stamp of creation and append with the current_id obtained. e.g. timestamp = 132456872; size of m is 5, user_id = 132456872 x 100000 + current_id;
    this should give you a unique key at creation time.
    There should be other better ways of resolving this(like locking the table for the update operation but affect performance, etc), depending on the feature supported by the database in use.
    Hope this can help as last resort if other options not available.

  • Can some one please tell me what is the problem in the below pl/sql block

    Hi, I have problem with the following pl/sql block, I need this with bulk operation.
    -- Assume the following scenario, we are validating dept (master) and emp(child) which are my temporary tables and updating the status back to
    -- dept ( for all the validation errors, even if we have any validation at child  it has to update the header record with error message),
    -- upon successful validation insert the data into dept3, and emp3 interms of batches
    -- I have give the sample example with dept and emp, but i have around 10 million records which has around 30-40 validations,
    -- I would like to process them in terms of batches using bulk collection as this would do fast processing
    -- Can some one please tell me how to insert them in terms of bulk with every set of 1000 records in each batch in this example,for every set of 1000 records
    -- i need update batch id with unique number in dept table
    -- with current data i can have 50 batches , I need to pass, deptno as parameter to my emp cursor. 
    -- can some one please tell me how to make this validation and insertion more efficient. so that while inserting the data for every batch it should insert batch id
    -- Tried with LIMIT clause as well but not working
    -- I am correcting the code as per your comments Request you to please suggest me so that I can correct , I am new to PL/sql, started learning now.
    step - 1:
    CREATE TABLE DEPT
           (DEPTNO NUMBER(6) primary key,
            DNAME VARCHAR2(25),
            LOC VARCHAR2(23),
            batch_id number );
    INSERT INTO DEPT VALUES (10, 'ACCOUNTING', 'NEW YORK', null);
    INSERT INTO DEPT VALUES (20, 'RESEARCH',   'DALLAS', null);
    INSERT INTO DEPT VALUES (30, 'SALES',      'CHICAGO', null);
    INSERT INTO DEPT VALUES (40, 'OPERATIONS', 'BOSTON', null);
    step - 2:
    declare
    begin
    for i in 1..50000 loop
    insert into dept values(40+i, 'OPERATIONS'||i,'BOSTON'||i, null);
    end loop;
    commit;
    exception
    when others then
    dbms_output.put_line('Exception occured:'||SQLERRM);
    end;
    step - 3:
    create sequence emp_seq start with 1 increment by 1;
    step - 4:
    CREATE TABLE EMP
           (EMPNO NUMBER(15) NOT NULL primary key,
            ENAME VARCHAR2(20),
            JOB VARCHAR2(20),
            MGR NUMBER(4),
            HIREDATE DATE,
            SAL NUMBER(7, 2),
            COMM NUMBER(7, 2),
            DEPTNO NUMBER(6));
    INSERT INTO EMP VALUES
            (7369, 'SMITH',  'CLERK',     7902,
            TO_DATE('17-DEC-1980', 'DD-MON-YYYY'),  800, NULL, 20);
    INSERT INTO EMP VALUES
            (7499, 'ALLEN',  'SALESMAN',  7698,
            TO_DATE('20-FEB-1981', 'DD-MON-YYYY'), 1600,  300, 30);
    INSERT INTO EMP VALUES
            (7521, 'WARD',   'SALESMAN',  7698,
            TO_DATE('22-FEB-1981', 'DD-MON-YYYY'), 1250,  500, 30);
    INSERT INTO EMP VALUES
            (7566, 'JONES',  'MANAGER',   7839,
            TO_DATE('2-APR-1981', 'DD-MON-YYYY'),  2975, NULL, 20);
    INSERT INTO EMP VALUES
            (7654, 'MARTIN', 'SALESMAN',  7698,
            TO_DATE('28-SEP-1981', 'DD-MON-YYYY'), 1250, 1400, 30);
    INSERT INTO EMP VALUES
            (7698, 'BLAKE',  'MANAGER',   7839,
            TO_DATE('1-MAY-1981', 'DD-MON-YYYY'),  2850, NULL, 30);
    INSERT INTO EMP VALUES
            (7782, 'CLARK',  'MANAGER',   7839,
            TO_DATE('9-JUN-1981', 'DD-MON-YYYY'),  2450, NULL, 10);
    INSERT INTO EMP VALUES
            (7788, 'SCOTT',  'ANALYST',   7566,
            TO_DATE('09-DEC-1982', 'DD-MON-YYYY'), 3000, NULL, 20);
    INSERT INTO EMP VALUES
            (7839, 'KING',   'PRESIDENT', NULL,
            TO_DATE('17-NOV-1981', 'DD-MON-YYYY'), 5000, NULL, 10);
    INSERT INTO EMP VALUES
            (7844, 'TURNER', 'SALESMAN',  7698,
            TO_DATE('8-SEP-1981', 'DD-MON-YYYY'),  1500, NULL, 30);
    INSERT INTO EMP VALUES
            (7876, 'ADAMS',  'CLERK',     7788,
            TO_DATE('12-JAN-1983', 'DD-MON-YYYY'), 1100, NULL, 20);
    INSERT INTO EMP VALUES
            (7900, 'JAMES',  'CLERK',     7698,
            TO_DATE('3-DEC-1981', 'DD-MON-YYYY'),   950, NULL, 30);
    INSERT INTO EMP VALUES
            (7902, 'FORD',   'ANALYST',   7566,
            TO_DATE('3-DEC-1981', 'DD-MON-YYYY'),  3000, NULL, 20);
    INSERT INTO EMP VALUES
            (7934, 'MILLER', 'CLERK',     7782,
            TO_DATE('23-JAN-1982', 'DD-MON-YYYY'), 1300, NULL, 10);
    commit;
    step :- 5
    declare
    cursor c1 is select * from dept;
    k number:=0;
    m number:=0;
    begin
    for i in  c1 loop
    k:=k+1;
    --dbms_output.put_line('k:'||k);
    --dbms_output.put_line('i.deptno:'||i.deptno);
    m:=0;
    for j in 1..5 loop
    m:=m+1;
    --dbms_output.put_line('m:'||m);
    --dbms_output.put_line('i.deptno:'||i.deptno);
    insert into emp values
            (9000+emp_seq.nextval, 'SMITH'||'_'||emp_seq.currval,  'CLERK'||'_'||emp_seq.currval,     7902,
            TO_DATE('17-DEC-1980', 'DD-MON-YYYY'),  800, NULL, i.deptno);
    end loop;
    end loop;
    commit;
    exception
    when others then
    dbms_output.put_line('Exception occured:'||sqlerrm);
    end;
    step :-6
    create table dept3 as select * from dept where 1=2;
    create table emp3 as select * from emp where 1=2;
    alter table dept add object_id number;
    alter table dept add status varchar(20);
    alter table dept add err_msg varchar2(200);
    alter table emp add object_id number;
    -- I have not included the alter statements in the inital creation because i dont want them to insert into dept3 and emp3
    CREATE OR REPLACE
    PACKAGE test_b
    AS
      g_batch_id NUMBER;
      PROCEDURE emp_ins(
          p_EMPNO    NUMBER,
          p_ENAME    VARCHAR2,
          p_JOB      VARCHAR2,
          p_MGR      NUMBER,
          p_HIREDATE DATE,
          p_SAL      NUMBER,
          p_COMM     NUMBER,
          p_DEPTNO   NUMBER);
      PROCEDURE dept_ins(
          p_DEPTNO NUMBER,
          p_dname  VARCHAR2 ,
          p_LOC    VARCHAR2,
          p_batch  NUMBER);
      PROCEDURE validate_prc;
      PROCEDURE main;
    TYPE dept_t
    IS
      TABLE OF dept%ROWTYPE;
      hdr_tbl dept_t;
    TYPE emp_t
    IS
      TABLE OF emp%ROWTYPE;
      line_tbl emp_t;
    TYPE dept_i_t
    IS
      TABLE OF dept3%ROWTYPE;
      hdr_ins_tbl dept_i_t;
    TYPE emp_i_t
    IS
      TABLE OF emp3%ROWTYPE;
      line_ins_tbl emp_i_t;
    END;
    -- pacakge body
    CREATE OR REPLACE
    PACKAGE body test_b
    AS
    PROCEDURE emp_ins(
        p_EMPNO    NUMBER,
        p_ENAME    VARCHAR2,
        p_JOB      VARCHAR2,
        p_MGR      NUMBER,
        p_HIREDATE DATE,
        p_SAL      NUMBER,
        p_COMM     NUMBER,
        p_DEPTNO   NUMBER)
    IS
    BEGIN
      INSERT
      INTO EMP3
          EMPNO ,
          ENAME ,
          JOB ,
          MGR ,
          HIREDATE ,
          SAL ,
          COMM ,
          DEPTNO
        VALUES
          P_EMPNO ,
          P_ENAME ,
          P_JOB ,
          P_MGR ,
          P_HIREDATE ,
          P_SAL ,
          P_COMM ,
          P_DEPTNO
    EXCEPTION
    WHEN OTHERS THEN
      DBMS_OUTPUT.PUT_LINE('EXCEPTION AT EMP INSERT'||SQLERRM);
    END;
    PROCEDURE dept_ins
        p_DEPTNO NUMBER,
        p_dname  VARCHAR2 ,
        p_LOC    VARCHAR2,
        p_batch  NUMBER
    IS
    BEGIN
      INSERT
      INTO DEPT3
          DEPTNO ,
          DNAME ,
          LOC ,
          batch_id
        VALUES
          p_DEPTNO ,
          p_DNAME ,
          p_LOC ,
          p_batch
    EXCEPTION
    WHEN OTHERS THEN
      DBMS_OUTPUT.PUT_LINE('EXCEPTION AT DEPT INSERT'||SQLERRM);
    END ;
    PROCEDURE validate_prc
    IS
      CURSOR c1
      IS
        SELECT * FROM dept WHERE status IS NULL ;--AND rownum <25;
      CURSOR c2(p_dept NUMBER )
      IS
        SELECT * FROM emp WHERE deptno=p_dept;
      e_validation EXCEPTION;
    BEGIN
      OPEN c1;
      LOOP
        FETCH c1 BULK COLLECT INTO hdr_tbl limit 5000;
        SELECT emp_seq.nextval INTO g_batch_id FROM dual;
        EXIT
      WHEN hdr_tbl.count = 0;
        dbms_output.put_line('batch'||g_batch_id);
      END LOOP;
      CLOSE c1;
      dbms_output.put_line('C1 closed');
      --------- Loading data into the inv line table type -------------------------------
      FOR i IN 1 .. hdr_tbl.count
      LOOP
        dbms_output.put_line('started validation');
        -- do header level validations
        IF hdr_tbl(i).dname  IS NULL THEN
          hdr_tbl(i).status  := 'ERROR';
          hdr_tbl(i).err_msg :=',DNAME is null';
        END IF;
        OPEN c2(hdr_tbl(i).deptno);
        LOOP
          FETCH c2 BULK COLLECT INTO line_tbl;
          -- EXIT WHEN c2%NOTFOUND;
        END LOOP;
        CLOSE c2;
        FOR j IN 1 .. line_tbl.count
        LOOP
          -- do line validations
          IF line_tbl(j).ename IS NULL THEN
            hdr_tbl(i).status  := 'ERROR';
            hdr_tbl(i).err_msg :=',ENAME is null';
          END IF;
          BEGIN
            FORALL j IN line_tbl.FIRST .. line_tbl.LAST
            SAVE EXCEPTIONS
            UPDATE EMP
            SET object_id =3
              -- I have multiple columns to update based on validations
            WHERE deptno =hdr_tbl(i).deptno------------
            AND empno    =line_tbl (j).empno;
            COMMIT;
            line_tbl.DELETE;
            dbms_output.put_line( 'Successfully updated emp temp table.');
          EXCEPTION
          WHEN OTHERS THEN
            ROLLBACK;
            dbms_output.put_line( 'Error while updating line temp table. ' || sqlerrm );
            FOR j IN 1 .. sql%BULK_EXCEPTIONS.COUNT
            LOOP
              DBMS_OUTPUT.put_line(' occurred during line temp table updation ' || sql%BULK_EXCEPTIONS(i).ERROR_INDEX );
            END LOOP;
            raise e_validation;
          END;
        END LOOP; -- j
        --CLOSE c2;
        IF hdr_tbl(i).err_msg IS NULL THEN
          hdr_tbl (i).status  := 'VALID';
          hdr_tbl (i).err_msg := NULL;
        END IF;
        -- even if I have line validation failed I have to update header status and erorr msg
        BEGIN
          FORALL i IN hdr_tbl.FIRST .. hdr_tbl.LAST
          SAVE EXCEPTIONS
          UPDATE DEPT
          SET object_id =4,
            status      = hdr_tbl (i).status,
            err_msg     = hdr_tbl (i).err_msg
            --  batch_id =
            -- I have multiple columns to update based on validations
          WHERE deptno = hdr_tbl (i).deptno
          AND status  IS NULL; ------------
          COMMIT;
          hdr_tbl.DELETE;
          dbms_output.put_line( 'Successfully updated dept temp table.');
          --close c1;
        EXCEPTION
        WHEN OTHERS THEN
          ROLLBACK;
          dbms_output.put_line( 'Error while updating hdr temp table. ' || sqlerrm );
          FOR i IN 1 .. sql%BULK_EXCEPTIONS.COUNT
          LOOP
            DBMS_OUTPUT.put_line(' occurred during line temp table updation ' || sql%BULK_EXCEPTIONS(i).ERROR_INDEX );
          END LOOP;
          raise e_validation;
        END;
      END LOOP; --i
    EXCEPTION
    WHEN OTHERS THEN
      DBMS_OUTPUT.PUT_LINE('EXCEPTION AT validate'||SQLERRM);
    END ;
    PROCEDURE main
    IS
      CURSOR dept_ins_cur
      IS
        SELECT * FROM dept WHERE status='VALID';
      CURSOR emp_ins_cur(p_deptno NUMBER)
      IS
        SELECT * FROM emp WHERE deptno= p_deptno;
    BEGIN
      validate_prc;
      OPEN dept_ins_cur;
      LOOP
      FETCH dept_ins_cur BULK COLLECT INTO hdr_ins_tbl limit 1000
      EXIT
      WHEN dept_ins_cur%NOTFOUND;
      END LOOP;
      CLOSE dept_ins_cur;
      --------- Loading data into the inv line table type -------------------------------
      FOR i IN 1 .. hdr_tbl.count
      loop
      dept_ins(hdr_ins_tbl(i).deptno ,
      hdr_ins_tbl(i).DNAME ,
      hdr_ins_tbl(i).LOC , emp_seq.nextval);
      commit;
      OPEN emp_ins_cur(hdr_ins_tbl(i).deptno);
      LOOP
      FETCH emp_ins_cur BULK COLLECT INTO line_ins_tbl;
      --EXIT WHEN emp_ins_cur%NOTFOUND;
      END LOOP;
      CLOSE emp_ins_cur;
      for j in 1..line_ins_tbl.count loop
      emp_ins(line_ins_tbl(j).EMPNO ,
      line_ins_tbl(j).ENAME ,
      line_ins_tbl(j).JOB ,
      line_ins_tbl(j).MGR ,
      line_ins_tbl(j).HIREDATE ,
      line_ins_tbl(j).SAL ,
      line_ins_tbl(j).comm ,
      line_ins_tbl(j).DEPTNO );
      end loop;
      end loop;
      commit;
      BEGIN
      forall i IN hdr_ins_tbl.first .. hdr_ins_tbl.last
      SAVE exceptions
      UPDATE dept
      SET status   = 'INSERTED',
      err_msg  = null
      WHERE deptno=hdr_ins_tbl (i).deptno
      AND status   = 'VALID';
      COMMIT;
      hdr_ins_tbl.delete;
      dbms_output.put_line( 'inserting into temp tables.');
      EXCEPTION
      WHEN OTHERS THEN
      rollback;
      end;
    EXCEPTION
    WHEN OTHERS THEN
      dbms_output.put_line('exception in main' ||SQLERRM);
    END ;
    END;
    Thanks in advance...
    Message was edited by: 888025

    Hi, I have problem with the following pl/sql block
    Well, as Hoek already said, that is the understatement of the century.
    I can't be absolutely certain but I think that set of DDL and code that you posted has just about every possible error and design issue that there is! It would make an excellent addition to BluShadow's FAQs an an example of what NOT to do.
    I don't think it is even possible to 'fix the basics first' as Hoek suggested. IMHO the first step needs to be to create a functional requirements document (FRD) that explains in detail WHAT needs to be done. That doc should also contain info about how any errors/recovery/restart is to be handled. It is premature to try to implement ANY solution without first knowing what is needed functionally.
    Once the FRD is done you should do a walk-through based on your current architecture and sample data to make sure that the document really covers ALL of the steps that need to be performed and that it adequately explains how to deal with any processing or data issues that might arise.
    The next document you need is the TRD - Technical Requirements Doc that covers the different technical implementions of the FRD that can be done and the advantages/disadvantages of each.
    Then you can start working on a prototype.
    1. The DDL you posted isn't coherent - there are CREATE table statements and then later ALTER statements that add additional columns. There doesn't appear to be any reason for not including ALL of the columns in the CREATE table statement.
    2. You are using PL/SQL types instead of SQL types. That makes it impossible to use those types in SQL statements and makes it much more difficult to test since it is much easier to test a query in SQL (e.g. using sql*plus) that to embed the query in PL/SQL.
    3. You are defining the same type twice but giving it different names.
    TYPE dept_t
       IS
          TABLE OF dept%ROWTYPE
             INDEX BY binary_integer;
    TYPE dept_i_t
       IS
          TABLE OF dept%ROWTYPE
             INDEX BY binary_integer;
    Those are both based on the same DEPT table! Why the duplication?
    Also you are using associative arrays instead of just using nested tables. Get rid of the INDEX BY clause.
    4. You have some serious architectural and data model issues
    -- Assume the following scenario, we are validating dept (master) and emp(child) which are my temporary tables and updating the status back to
    -- dept ( for all the validation errors, even if we have any validation at child  it has to update the header record with error message),
    Why would you do that? You say 'it has to update the header record ...'. Says who? That is just one indication that you are trying to implement a 'solution' before you have adequately defined the 'problem'.
    Typically you would NOT alter any of the data tables; any validation errors/issues would get inserted into a table specifically designed to hold/log those issues. That table would contain key field values to correlate with the source of the error.
    Those 'master' and 'child' entities are two SEPARATE things. Issues with a 'master' row have NOTHING to do with any possible child rows.
    And issues with a 'child' row have NOTHING to do with any possible master rows. The ONLY connection between 'child' and 'master' is the foreign key that correlates them.
    So you don't necessarily have to validate the 'child' rows in sync with their 'master' row. In many cases you would have a procedure that performs validation of the entire set of 'master' rows and log those issues/problems. You would use a different procedure to validate the entire set of 'child' rows and log their issues.
    Those validation procedures can often work with ALL of the data using SQL statements instead of bulk processing.
    5. You are using loop constructs that are not valid for the type of processing you are using
    LOOP
        FETCH c1 BULK COLLECT INTO hdr_tbl;
        EXIT
      WHEN c1%NOTFOUND;
      END LOOP;
    There can be NO exit since the bulk collect with either get EVERYTHING or NOTHING. Possibly that is just a holdover from your attempt to use the LIMIT clause but you removed that clause from the FETCH; I don't know.
    There is so much wrong with what you posted it is really rather pointless to try to 'fix' it.
    I suggest you start over and clarify and DOCUMENT the actual requirements without prejudice about the solution that someone seems to want to force on you.

  • I have to make a catalouge for my services as a financial planner.. earlier i used to do in MS publisher.. now i have a mac book.. can some one help me with some software info with which i can design a catalogue??

    I have to make a catalouge for my services as a financial planner.. earlier i used to do in MS publisher.. now i have a mac book.. can some one help me with some software info with which i can design a catalogue??

    Depending on what your needs are, you may use Pages included in iWork or purchase it separately (usually there is an evaluation copy with any new mac, I guess) or try other publishing apps. I once used MS Publisher, I remember it was something like a more sophisticated word processor, right?
    You may try the cheaper DTP iCalamus or Word for mac.

Maybe you are looking for