Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

PLS-00306: wrong number or types of arguments in call

379746Jul 14 2010 — edited Jul 20 2010
Hi,
I am getting the following error on this when I run it as a concurrent program.
I am on 11i/9i.
''''
Cause: FDPSTP failed due to ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'NFPC_FUT_MTDSLS_LOAD'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
.
'''
The procedure is
CREATE OR REPLACE procedure APPS.NFPC_FUT_MTDSLS_LOAD
(errbuff OUT varchar2,
retcode OUT number
)
IS
   fileID UTL_FILE.FILE_TYPE;
BEGIN
   fileID := UTL_FILE.FOPEN ('/usr/tmp', 'mtdsls.txt', 'W');

   FOR salesrec IN ((SELECT msi.segment1 "Line-Label Code", 
       bill.location "Customer Ship-To Code",
       pv.segment1 "Broker Code", 
       lin.attribute1 "Division Code", 
       nbm.region_code "Region Code", 
       msi.attribute9 "Product Type Code",
       prty.party_name "Customer Name",
       pv.vendor_name "Broker Name" ,
       --msi.description description, 
       nbm.DIVISION "Division Name",
       nbm.regional_manager "Regional Mgr. Name", 
       DECODE (msi.attribute9, 
          2, 'VINEGAR', 
          4, 'SAUCE', 
          6, 'JUICE', 
          41, 'SINGLE SERVE', 
          9, 'SPECIALITY', 
          91, 'SLICES', 
          92, 'PIE FILLING', 
          93, 'PUDD/CHEESE', 
          94, 'LEMON TEA TRADEWINDS', 
          95, 'FRUIT AND JUICE', 
          NULL)  "Product Type Description",
          DECODE (hdr.trx_date, 'YY',
          10, '2011') "Fiscal Year"
         ,'01'"Fiscal Month",
           SUM ((nvl(lin.quantity_invoiced,0)*nvl(msi.attribute13,1)) -
           ((nvl(lin.quantity_credited,0)*-1)*nvl(msi.attribute13,1))) "Gross Unit Sales" , 
       SUM (lin.revenue_amount) "Net Dollar Sales",
          msi.attribute12, 
       msi.attribute11 
 FROM   ra_customer_trx_all hdr, 
       ra_customer_trx_lines_all lin, 
       mtl_system_items_b msi, 
       hz_cust_accounts cust, 
       hz_parties prty, 
       hz_cust_site_uses_all bill, 
       hz_cust_acct_sites_all bill_addr, 
       hz_party_sites bill_sites, 
       hz_locations bill_locn, 
       po_vendors pv, 
       nfpc_broker_master nbm, 
       nfpc_broker_master_v brk 
WHERE    cust.cust_account_id = hdr.SHIP_TO_CUSTOMER_ID
   AND      nbm.broker_code(+) = pv.segment1 
   AND      prty.party_id = cust.party_id 
   AND      bill.site_use_id = hdr.ship_to_site_use_id 
  -- AND      bill.site_use_code = 'SHIP_TO'
   AND      bill_addr.cust_acct_site_id = bill.cust_acct_site_id 
   AND      bill_sites.party_site_id = bill_addr.party_site_id 
   AND      bill_locn.location_id = bill_sites.location_id 
   AND      lin.customer_trx_id = hdr.customer_trx_id 
   AND      interface_header_context = 'ORDER ENTRY' 
   AND      msi.inventory_item_id = lin.inventory_item_id 
   AND      msi.organization_id = hdr.interface_header_attribute10 
   AND      pv.segment1 = lin.attribute2 
   AND     trunc(hdr.trx_date) between trunc(sysdate,'mm') and trunc(sysdate) 
   AND      brk.broker_code = lin.attribute2 
      and interface_header_attribute1 not like '%B'
    --  and msi.SEGMENT1 = '4411884'
GROUP BY msi.segment1, 
       cust.account_number, 
       bill.location,
       pv.segment1, 
       lin.attribute1, 
       nbm.region_code, 
       msi.attribute9, 
       msi.description, 
       prty.party_name, 
       pv.vendor_name, 
       nbm.regional_manager, 
       brk.division,
          msi.attribute12, 
       msi.attribute11,
       nbm.division,
       hdr.trx_date
     ))
   LOOP
      UTL_FILE.PUT_LINE(fileid, salesrec."Line-Label Code" ||chr(9)||salesrec."Customer Ship-To Code"||chr(9)||salesrec."Broker Code"||
      chr(9)||salesrec."Division Code"
      ||chr(9)|| salesrec."Region Code"||chr(9)||salesrec."Product Type Code"||chr(9)|| salesrec."Customer Name"||chr(9)||salesrec."Broker Name"
      ||chr(9)||salesrec."Division Name"||chr(9)||salesrec."Regional Mgr. Name"||chr(9)||salesrec."Product Type Description"||chr(9)||
      salesrec."Fiscal Year" ||chr(9)||salesrec."Fiscal Month"||chr(9)|| salesrec."Gross Unit Sales"||chr(9)|| salesrec."Net Dollar Sales"
      ||chr(9)||salesrec.attribute12||chr(9)||salesrec.attribute11 );
     -- UTL_FILE.FCOYY (fileid, emp.dat , emp.dat_old);
      
   END LOOP;

   UTL_FILE.FCLOSE (fileID);
   utl_file.fcopy('/usr/tmp','mtdsls.txt.txt','/usr/tmp','mtdsls-'||TO_CHAR(SYSDATE,'DDMMYY')||'-'||TO_CHAR(SYSDATE,'HH24MI')||'.txt');
END;
/
Any help please!!
Thanks
A/A

Edited by: asgar_amin on Jul 14, 2010 10:46 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 17 2010
Added on Jul 14 2010
7 comments
3,022 views