Please help me to find out solution to following problem

create or replace procedure load_prod_dim
is
cursor c2 is select p.productid,p.productname,p.unitprice,c.categoryname,s.companyname from products p
join categories c on p.categoryid = c.categoryid
join suppliers s on p.supplierid = s.supplierid;
type c2_prod is table of c2%rowtype index by pls_integer;
type typ_prod_dim is table of product_dim%rowtype index by pls_integer;
p_dim typ_prod_dim;
p_dim_up typ_prod_dim;
c1_var     typ_prod_dim;
k number := 1;
m number := 1;
flag number := 1;
y number := 1;
j number := 1;
v_sdate date := to_date('1-Jan-1995','DD-MON-YYYY');
v_edate date := to_date('31-Dec-2050','DD-MON-YYYY');
begin
     select * bulk collect into p_dim from
                         (select * from product_dim order by eff_start_dt desc);
     if p_dim.count = 0 then
     dbms_output.put_line('Insert all rows in the table...');
     for i in c2
     loop
               select Product_Seq.nextval into c1_var(k).seq_id from dual;
               c1_var(k).product_id := i.productid;
               c1_var(k).product_name := i.productname;
               c1_var(k).list_price := i.unitprice;
               c1_var(k).category := i.categoryname;
               c1_var(k).supplier_name := i.companyname;
               c1_var(k).eff_start_dt := v_sdate;
               c1_var(k).eff_end_dt := v_edate;
               k := k + 1;
     end loop;
     forall i in c1_var.first..c1_var.last insert into product_dim values c1_var(i);
else
dbms_output.put_line('Inside the else part..');
     for i in c2
     loop
          for j in p_dim.first..p_dim.last
          loop
          if p_dim(j).product_id = i.productid
                    and p_dim(j).product_name = i.productname
                    and p_dim(j).list_price = i.unitprice
                    and p_dim(j).category = i.categoryname
                    and p_dim(j).supplier_name = i.companyname
          then
               flag := 1;
               exit;
          else
               if p_dim(j).product_id = i.productid then
                    p_dim_up(y).eff_end_dt := sysdate - 1;
                    p_dim_up(y).seq_id := p_dim(j).seq_id;
                    flag := flag + 1;
                    y := y + 1;
                    exit;
               end if;
          end if;
          end loop;
          if flag != 1 then
          select Product_Seq.nextval into c1_var(m).seq_id from dual;
               --c1_var(m).seq_id := Product_Seq.nextval;
               c1_var(m).product_id := i.productid;
               c1_var(m).product_name := i.productname;
               c1_var(m).list_price := i.unitprice;
               c1_var(m).category := i.categoryname;
               c1_var(m).supplier_name := i.companyname;
               c1_var(m).eff_start_dt := sysdate;
               c1_var(m).eff_end_dt := v_edate;
               m := m + 1;
          end if;
     end loop;
     forall i in p_dim_up.first..p_dim_up.last
          update product_dim set eff_end_dt = p_dim_up(i).eff_end_dt where seq_id = p_dim_up(i).seq_id;
     forall i in c1_var.first..c1_var.last insert into product_dim values c1_var(i);
--     forall i in p_dim_up.first..p_dim_up.last update product_dim set eff_end_dt = p_dim_up(i).eff_end_dt where seq_id = p_dim_up(i).seq_id;
end if;
end;
show err
Error in procedure are:
@load_prod_dim.sql
Warning: Procedure created with compilation errors.
Errors for PROCEDURE LOAD_PROD_DIM:
LINE/COL ERROR
98/3     PL/SQL: SQL Statement ignored
98/39     PL/SQL: ORA-22806: not an object or REF
98/39     PLS-00382: expression is of wrong type
98/39     PLS-00436: implementation restriction: cannot reference fields of
     BULK In-BIND table of records
98/77     PLS-00382: expression is of wrong type
98/77     PLS-00436: implementation restriction: cannot reference fields of
     BULK In-BIND table of records
Edited by: 958621 on Dec 11, 2012 3:31 AM

I didn't go through your unformatted code, but a brief search on google for PLS-00436 revealed this:
http://www.oracle-developer.net/display.php?id=410
cheers

Similar Messages

  • PLEASE HELP ME TO FIND THE SOLUTION REGARDING "LOGICAL SYSTEM CHANGED"

    HAI EVERYBODY,
    PLEASE HELP ME TO FIND THE SOLUTION REGARDING "LOGICAL SYSTEM CHANGED" during the material master replication by using middleware parameters.
    step1 : i have taken SRM client 810 and named it as CHINNISRM
    step2 : i  have taken r3 client 810 and named it as CHINNIR3
    step3: During material master replication i maintained tables like crmconsum,crmrfcpar,crmparoltp in   r3   and smofparsfa in srm client and filtered the objects and loaded the objects through r3ac3,r3ac1,r3as.
    step4 : And later i have checked in r3 queues to activate the objects,but i have seen a message like  "LOGICAL SYSTEM CHANGED:SEE 588701".according to the oss instructions i have checked in CRMPRLS table in se16 in R3 .there i found out there is one logical client  named with T90CLNT810.
    oss :588701
    Solution
    There are different cases in which different forms of processing are
    required or where several options exist:
    - The logical system name of an R/3 Backend client was changed in
    current operation. In this case, the data hangs in the outbound
    queues of the R/3 Backend system as specified under point 1 of
    the symptom. In this case, the logical system name must be
    changed back to the original value. Then the outbound queues
    can be reactivated. If no data was transferred to the EBP/CRM
    server before the change, also a correctioin of the check table
    is possible.
    - The same logical system name was used again in a new client of
    an R/3 Backend system that was linked to the EBP/CRM server. In
    this case, the data is in the inbound queue of the EBP/CRM
    server with the exception GUID_FOR_LOGSYS_CHANGED. In this
    case, the queue entries which have status SYSFAIL must be rejected, however, not the entire queues. If the new client of  the R/3 Backend system you have linked has exactly the same
    data as the old client and if it is meant to replace the old
    client (that is, this was deactivated), also a correction of
    the check tables is possible. In this case, the inbound queues
    can be reactivated after the correction.
    oss:765018
    1. If the situation in your system corresponds to the situation described
    under "Reason and Prerequisites" and if symptom 1 occurs, you can
    delete the table entry from table CRMPRLS table (there is just one
    entry). Since there is no maintenance dialog for this table and you
    cannot maintain it using transaction SE16, you must use a report to
    delete it. This report is attached to this note as correction
    instructions.
    Create the report ZZ_DELETE_CRMPRLS in your system and copy the source
    code from the correction instructions. You cannot implement this
    source code using transaction SNOTE.
    You can use the report in every plug-in or plug-in basis system, even
    if it is not specified in the validity section.
    After you have run the report, you can trigger existing queues again
    in transaction SMQ1.
    2. If the situation in your system corresponds to the situation described
    under "Reason and prerequisite" and if symptom 2 occurs, you can
    delete the entry from table CRMMLSGUID (there is just one entry).
    Since there is no maintenance entry for this table and you cannot
    maintain it using transaction SE16, you must use a report to delete
    it. This report is attached to this note as correction instructions.
    If they do not yet exist, add the following messages to message class SMOF in your logon language:
    Message Message short text
    303 User &1 is not allowed to change table &2.
    304 User &1 IS not allowed to display table &2.
    305 Logical system &1 was not found in table &2.
    306 System error! The current client was not
    found in table T000.
    Create the report ZZ_DELETE_CRMMLSGUID in your system and copy the
    source code from the correction instructions. You cannot implement
    this source code using transaction SNOTE.
    You can use the report for every release of the CRM system, even if it
    is not specified in the validity section. The only exceptions are CRM
    releases with Support Package versions that are too low such as CRM
    Release 3.0 with Support Package 12.
    After you have run the report, you can trigger existing queues again
    in transaction SMQ1 of the R/3 back-end system or transaction SMQ2 of
    the CRM system.
    so what should i do to do the replication.please suggest me .untill and unless i solve my problem i cant move to the further activity.i hope you people can solve my problem.thanks in advance.
    thanks and best regards,
    n.chakradhar

    Hi chakradhar,
    Did you find a solution to your issue? We are facing a similar issue and looking to figure out how this can be resolved.
    BR// 420

  • Can anybody please help me to find out the link where small co.

    can anybody please help me to find out the link where small companies implementing saps.

    Hi,
         SAP is providing a solution to Small Scale Industries with SMB (Small and Midsize Business) Product for various industries. It's a Pre configured SAP Solution pertaining to a specific industry(like Pharma, Oil..etc) with which the implementation as well as the cost will also decreases.
    Regards,
      Jayaram...

  • Please help me to find out how to turn off the shuffle feature on my touch i-pod, Please help me to find out how to turn off the shuffle feature on my touch i-pod

    Please help me to find out how to turn off the shuffle feature on my I-pod nano ... THANK YOU!!!!!! :)

    Just figured it out :) Thanks though!!!

  • Please help me to find out windows 7 home premium product key

    Please help me to find out windows 7 home premium product key .My windows product ID is 00359-OEM-XXXXXX-XXXX
    my pc have sticker but is damage ...only can see last is -RXWJ8-XXXXX

    Hi,
    Please don't disclose any product key information in here. This is public and open place to discuss Windows 7 problem. It's dangerous for any personal information.
    Also, since the Windows is brought with OEM computer, maybe you could try to contact the manufacturer for help.
    Karen Hu
    TechNet Community Support

  • Please help me to find out the solution..​.plz

    question-"fourier series coefficents of a square wave using gibbs phenominon"
    i have tried this problem so many times to find the solution but i can not find find it.it shows a data type problem.
    plz help me sir to draw the circuit properly...plz
    i am sending my program to you...plz check it and give me some suggestions..i am very thankful to you.
    Attachments:
    try_fourier1.vi ‏847 KB

    Hi
    The Templates are in this path
    For OCDT the path is C:\Program Files\SAP\Data Transfer Workbench\Templates\Templates\Administration\Setup\Banking\Credit Card Payment
    For sample template ODSC it is in C:\Program Files\SAP\Data Transfer Workbench\Templates\Samples\1. Add New Data\Administration\Setup\Banking\Banks
    like the way u can see all the set up banking templates in this path
    C:\Program Files\SAP\Data Transfer Workbench\Templates\Templates\Administration\Setup\Banking
    Regards,
    Sudhir B.
    Edited by: B.sudhir on Dec 13, 2011 11:13 AM

  • Please help me to find out Oracle iStore 11i?

    I have difficulty to find out the Oracle iStore 11i among the Oracle11i CDs? Is there anyone have successfully installed iStore 11i? Please give me a hint, how to install it and where I can find store manager. Any help will be appreciated!
    Thanks in advance
    wei

    Wei,
    Istore 11I is bundel product with the Oracle Application 11i. You have to fully install Oracle Application 11I then you need to start the set up for iStore. There is a document called "Oracle iSupport Implementation Guide
    A86192-01" you can find it at metalink.oracle.com.
    If you cant find it there pls open a tar with the Oracle support requesting this document.
    Thanks,
    Maher
    null

  • Please help me in finding the solution for this query

    Hi Experts,
    How could i print column name's second word in next line
    suppose am taking ename alias as "employee name"
    i want to print the second word "name" in next line
    like
    "Employee
    Name"
    Whats the way of writing this query
    Please help me out
    Thanks in Advance

    Hi,
    914618 wrote:
    WITH mydata AS
    SELECT 1 emp_id, 'John Smith' emp_name FROM DUAL UNION ALL
    SELECT 2 emp_id, 'Steve Jobs' emp_name FROM DUAL UNION ALL
    SELECT 3 emp_id, 'Larry Allison' emp_name FROM DUAL
    SELECT emp_id, emp_name
    FROM mydata;
    after executing the above query the o/p I am getting is in the normal format like EMP_ID and EMP_NAME
    not according to my requirement like
    Emp Emp
    Id NameWhat are the results you reaally want? Do you want this?
    `   EMP_ID SPLIT_NAME
             1 John
               Smith
             2 Steve
               Jobs
             3 Larry
               AllisonIf so:
    SELECT  emp_id
    ,      REPLACE (emp_name, ' ', CHR (10))     AS split_name
    FROM      mydata
    ;The results above are 3 rows, not 6.
    What results would you want if emp_name contained 3 or more words? For example, if you add this to the sample data:
    SELECT 9 emp_id, 'Aung San Suu Kyi' emp_name FROM DUAL UNION ALL

  • The sound of my macbook 10.6.4 is not working since friday, please help me to find out why and how to solve it.. please pleas..

    please help me to solve my problem. my macbook is just 8days old and suddenly the sound is gone..

    I do not know what Leopard Dock is....anything is possible though...
    ....try a NVRAM reset....
    http://support.apple.com/kb/HT1379?viewlocale=en_US

  • Plz help me in finding out the BADI or menu exit for IW32

    HI
    in Tcode IW32, based on the user status(ASTTX), the menu items ,EXTRAS -> TASK LIST SELECTION -> all items have to be grayed out.
    Please help me to find out BADI or menu exit which ever is available.
    Thanks,
    Pallavi.

    Hi,
         Please check if the below user exit/BADI is useful.
         Enhancement
         IWO10012                                Maintenance order: Priority handling on central header
         BAdi
         IWO_UI_USEFLEX                     BAdI for Calling Up an Alternative UI
    Regards,
    Srini.

  • I need to swich from us store to saudi arabian store, please help me to find solution.

    i need to swich from us store to saudi arabian store, please help me to find solution.

    See  >  Change your iTunes Store country
    Here  >  http://support.apple.com/kb/HT1311

  • I am asking this for my friend, who was using iphone 4. He lost it one week back and couldnt find it so far. He is having his IMEA number of the phone. Could you please help me in tracing out this?

    I am asking this for my friend, who was using iphone 4. He lost it one week back and couldnt find it so far. He is having his IMEA number of the phone. Could you please help me in tracing out this?

    If he has not previously set up Find My iPhone, there is no way to
    track the iPhone. Apple does not and will not track phones.
    Immediately change all passwords. Hopefully he was using a passcode
    to get by the lock screen. If he was, his data is protected; if not, anyone
    who finds the iPhone can access anything that was on it.

  • I am using apple iPod-suffle model and I am unable to upload music into iPod and 3 lights(green,orange and red) keeps blinking for few seconds when I connect my iPod to my PC and after few seconds its turn to unresponce mode,Plz help to find out solution

    I am using apple iPod-suffle model,I am unable to upload music into iPod and 3 lights(green,orange and red) keeps blinking for few seconds when I connect my iPod to my PC and after few seconds its turn to unresponce mode,Plz help to find out solution.

    Try:                                               
    - iOS: Not responding or does not turn on           
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable       
    - Try on another computer                                                       
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
      Apple Retail Store - Genius Bar

  • In my mac i dont create icloud keychain but it is asking password please help me to get out of this problem

    In my mac book pro i don't create icloud keychain. But it is asking password.Please help me to get out of this problem.In OS X Mavericks

    Hi, nportillo,
    The next time you attempt to reach Skype Customer Service, try again using a different web browser and choosing a different path through the various drop-down menu options presented.  Do not choose the obvious - you have already established that path is not working.  Also, look to approve a pop-up dialogue box which would connect you to start an instant message chat with a customer service agent. If you have pop-ups blocked in your browser settings, this will also impede reaching an agent.
    Skype is aware of problems reaching their customer service unit via the website, however people are getting through.  I have flagged your report for follow-up by those to whom I report.
    Regards,
    Elaine
    Was your question answered? Please click on the Accept as a Solution link so everyone can quickly find what works! Like a post or want to say, "Thank You" - ?? Click on the Kudos button!
    Trustworthy information: Brian Krebs: 3 Basic Rules for Online Safety and Consumer Reports: Guide to Internet Security Online Safety Tip: Change your passwords often!

  • Plz help me to find out tables and fields........based on SD,PM,FICO Module

    Hi plz help me to find out the table name and field names as i am unable to find .....In the spec am given requirements in the following pattern.
    Description          SAP-Term                                       Explaination
    1.Salesman        Equipment AC Mgr.                          VBPA2 – this is the salesman code - I need the                                                                               
    description for this.
    2.Vendor              MEPO_TOPLINE-SUPERFIELD     Vendor field is pull from me23n where the                                                                               
    condition will be that COBL-KDAUF (this is a
                                                                                    structure from me23n in item data-account
                                                                                    assignment-sales order. The number here should
                                                                                    be the corresponding contract number. This field
                                                                                    should include a multiple selection function. User                                                                               
    can put more than one description to search for.
    3. Val. Period   Val. Period Category                           Val. Period Category from va41 header-contract
        Category                                                               data. This field should include a multiple selection                                                                               
    function. User can put more than one description                                                                               
    to search for.
    4. Service Order/    CAUFVD-GSTRP/                         This should be the document date where by it is in
        Purchase Order      MEPO_TOPLINE-BEDAT          between the range the user input
        Document Date    
    5. B2B Vendor      MEPO_TOPLINE-SUPERFIELD     Vendor field is pull from me23n where the condition                                                                               
    will be that COBL-KDAUF (this is a structure from
                                                                                    me23n in item data-account assignment-sales                                                                               
    order. The number here should be the                                                                               
    corresponding contract number.
    6. B2B Cost         MEPO1211-NETPR                       This cost is pulled from PO (me23n) however take
                                                                                    note that the price will be pulled out base on line                                                                               
    item Net Price. Make sure that price is taken                                                                               
    corresponding only to the equipment tied to it.                                                                               
    Check on Number 7 to see how is the line item tied                                                                               
    to the equipment.                                                                               
    If this is in other currency please make it to SGD                                                                               
    with the exchange rate field Exchange rate                                                                               
    (MEPO1226-WKURS)
                                                                                  NOTE:: I need to know the table from which I can                                                                               
    determine the currency type as can be seen in the                                                                               
    ME23N transaction and also te exchange rate for                                                                               
    that particular currency.
    7. No of faults                                                          The service order (CAUFVD-AUFNR) created base                                                                               
    on the equipment in Number 8. This should exclude                                                                               
    the service order of type RD08. Service order can be                                                                               
    access by IW33.
    8. Faults Completed                                                This would be the number of faults (Number 13)                                                                               
    which has a system status (CAUFVD-STTXT) of                                                                               
    TECO. System status can be viewed in IW33 Sys.                                                                               
    Status. Take note service order type RD08 will be                                                                               
    excluded
    9. Time Spent on Fault   AFVGD-ISMNW                   This field is in IW41 in confirmation base on the                                                                               
    order created. This field will be the actual time                                                                               
    spent. This will correspond to the Faults                                                                               
    Completed (Number 14). This means only orders                                                                               
    with system status TECO will be pull. Take not                                                                               
    service order type RD08 will be excluded
    10. Fault Cost         RIHAUFK_LIST- DGESKOSIST   This will be the total cost for a service order which                                                                               
    have the status TECO. Those which are not TECO                                                                               
    will not be needed. This field can be obtain from                                                                               
    IW39 (standard report). Execute the report and                                                                               
    there will be a field for Total Actual Cost. You might                                                                               
    need to change the screen layout to be able to view                                                                               
    this. Take note service order type RD08 will be                                                                               
    excluded
    11. PM Hours      AFVGD-ISMNW                            This field is in IW41 in confirmation base on the
                                                                                 order created. This field will be the actual time
                                                                                 spent. This will correspond to the Faults Completed
                                                                                 This means only orders with system
                                                                                 status TECO will be pull. Take note service only
                                                                                 take order type RD08.
    12. Spare Cost   Spare part cost                              This field will be in IW33 under cost tab, and cost
                             PMCOEA-IKOSTENKGR                tab in item level. This will be the actual cost of spare
                                                                                 part after TECO. This will include all order type.
    13. Credit Note   Credit Memo                                 The programs need to pull out credit memo which is
                                                                                 reference from the contract. If there is a credit memo
                                                                                 reference from the contract then the value will be net
                                                                                 price per equipment.

    Can u tell me purpose of this spec ?
    Regards,
    pandu.

Maybe you are looking for

  • Lion Server not handing out DHCP addresses to Snow Leopard client

    I have been pulling my hair out over this. Here is the layout Lion Server running on the newest Mac Mini and doing mail, DNS, DHCP, Software update and has a valid, not self assigned, certificate 3 clients running Lion Desktop (2 iMACs and a MBP pro

  • When printing in Adobe, missing the Custom Scale option.

    Adobe Version 11.0.2 Windows 7 64 bit. Doesn't matter what type of network printer I select.  When selecing to print a document, under Page Sizing & Handling, there is no "Custom Scale" option.  There is on other workstations.  Thank you.

  • My program makes 5 instances of a class; Why?

    I removed or commented out as much as possible. I still get five instances of the RecordObj class. There are five methods in that class, other than the getters and setters, so I suspect the problem involves those methods, but I don't know how a metho

  • Need solution for Requirements

    Hi All, I am very new to Adobe and need to know if Adobe LiveCycle can solve my problem. I need to create a PDF based electronic form for entering data in a pre-defined format. Once data is filled, the utility should generate a report in a pre-define

  • Session based load balance + Prepared statements

    Experts, From the docs I understand that there are 3 load balancing techniques. One is client side and two are server side. Of the two, one is session count based load balancing, and as per docs, it is recommended for connection pool setting. My ques