Procedure throwing error

Hi Team,
Here is my procedure
procedure SLA_FAILURE_PR_SR(
startdate_i IN DATE,
enddate_i IN DATE,
pacifictimezone_i IN VARCHAR2,
extranet_user_i IN VARCHAR2,
severity_i IN NUMBER,
reportRC_o out ref_cur
IS
BEGIN
logpkg.info ('Begin ramOpsReportSummaryPkg.SLA_FAILURE_PR_SR');
open reportRC_o for
SELECT
customer "Client",
case_id_ "Case ID",
to_char(aradmin.datepkg.unixTimeToDate(create_time, 'PST', 'Y'),'MM-DD-YYYY HH12:MI:SS PM') "Created",
to_char(aradmin.datepkg.unixTimeToDate(resolved_time, 'PST', 'Y'),'MM-DD-YYYY HH12:MI:SS PM') "Resolved",
total_downtime__min_ "Down Time",
assigned_to_group_ || ' ' || ASSIGNED_TO_INDIVIDUAL_ "Group Assigned",
reason_for_missed_sla "Reason For Miss",
assigned_to_group_ "Group That Missed",
internal_mgmt_summary "Ops Mgmt summary",
follow_up_proactive_actions "Follow-Up Proactive Actions"
FROM aradmin.hpd_helpdesk
WHERE
create_time >= datepkg.dateToUnixTime(TO_DATE(startdate_i,'YYYY-MM-DD'),pacifictimezone_i)
AND create_time < datepkg.dateToUnixTime(TO_DATE(enddate_i,'YYYY-MM-DD')+7,pacifictimezone_i)
AND extranet_user=extranet_user_i
AND severity = severity_i
AND (MET_RESOLUTION_SLA_=0 or MET_CONTACT_SLA_=0);
logpkg.info ('END ramOpsReportSummaryPkg.SLA_FAILURE_PR_SR');
END SLA_FAILURE_PR_SR;
--I am getting while executing like this
DECLARE
reportRC_o SYS_REFCURSOR;
BEGIN
ramOpsReportSummaryPkg.SLA_FAILURE_PR_SR(to_date('2013-01-01','YYYY-MM-DD'),to_date('2013-01-10','YYYY-MM-DD'),'PST',
'totality',1,:reportRC_o);
END;
--Its saying wrong no of arguments. Plz Can anybody give me the solution? I am using ORACLE 10g                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

V11081985 wrote:
Thanks It was helpful... But still i am getting error like "declare ref_cur"...
can u tell me how to call that proc exactlyI would have kept the call to the procedure the same and changed the procedure itself...
procedure SLA_FAILURE_PR_SR(
startdate_i IN DATE,
enddate_i IN DATE,
pacifictimezone_i IN VARCHAR2,
extranet_user_i IN VARCHAR2,
severity_i IN NUMBER,
reportRC_o out SYS_REFCURSOR
..There's no need to define a user declared ref cursor type when SYS_REFCURSOR is built in and available to use.

Similar Messages

  • SSRS dataset throws error when another stored procedure is called inside dataset stored procedure

    Hello;
    I am using Report Build 3.0, I have a simple report which gets data using dataset which is created from a Stored Procedure. I have another stored procedure which updates the data in the table which is used for the report. I want to get the live data on report everytime
    the report is run so that I call that stored procedure (sp_updatedata) inside my report dataset stored procedure and here where my report fails as it throws error while creating dataset.
    Here is sample:
    sp_updatedata (this only returns "Command(s) completed successfully"
    Create Proce sp_getReportData
    As
    Begin
    Exec sp_updatedata -- I call it to update the data before it displays on the report
    Select * from customers
    End
    If I remove this line it works.
    Exec sp_updatedata -- I call it to update the data before it displays on the report
    Thanks
    Essa Mughal

    Hi MESSA,
    According to your description, you create a dataset based on a stored procedure. In this procedure, it calls another procedure. Now it throws error when creating dataset. Right?
    In Reporting Services, when creating dataset, all the query or stored procedure will be executed in SSMS. So if the procedure can be executed in SSMS, it supposed to be working in SSRS. However, it has a limitation in SSRS. In a dataset, it can only return
    one result set.
    In this scenario, I don't think it's the issue of calling other procedure inside of procedure. Because we tested in our local environment, it works fine. I guess the sp_updatedata returns a result set, and the "select * from customers" returns
    another result set. This might be the reason cause the error.
    Reference:
    Query Design Tools in Report Designer SQL Server Data Tools (SSRS)
    Reporting Services Query Designers
    If you still have any question, please post the error message and the store procedure (sp_updatedata).
    Best Regards,
    Simon Hou

  • Procedure throwing ORA-01002: fetch out of sequence error

    Hello ..
    I am not using any commits inside cursors with for update statements. This was running for the last 48 hrs and suddenly started throwing errors. Can anyone help me why it has problems sporadically. Code is enclosed here.
    Is Sys_refcursor a dynamic cursor?.. I have my transaction_cursor as a sys_refcursor? Is that the problem here. If so, Do I need to remove commit inside the opening and closing of this cursor. The commit is executed for every 10000 rows..
    Thanks in Advance
    Kris
    PROCEDURE PROCESS_EXECUTOR AS
    cursor jobs_cursor is
    select job_id from (
    SELECT DISTINCT
    job_id
    FROM table_x )
    ORDER BY job_id ) where ROWNUM <= 10;
    transaction_cursor SYS_REFCURSOR;
    tran tran_type;
    sql_code varchar2(1024);
    err_msg varchar2(1024);
    cmt_counter number := 0;
    BEGIN -- Process_Executor Start
    for r_csr in jobs_cursor loop
    OPEN transaction_cursor FOR SELECT * FROM table_y a
    WHERE a.job_id = r_csr.job_id
    order by create_timestamp, task_id;
    LOOP
    FETCH transaction_cursor BULK COLLECT INTO tran LIMIT 10;
    EXIT WHEN tran.COUNT = 0;
    FOR i IN 1..tran.COUNT LOOP
    begin
    if cmt_counter = 0 then
    savepoint last_transaction;
    end if;
    cmt_counter := cmt_counter + 1;
    exec_process1(tran(i));
    if (cmt_counter = 10000 ) then
    commit;
    cmt_counter := 0;
    end if;
    exception
    when others then
    rollback to last_transaction;
    end;
    END LOOP;
    END LOOP;
    CLOSE transaction_cursor;
    end loop;
    commit;
    END PROCESS_EXECUTOR;

    I'm always trying to avoid loops at all cost.
    Anyway your jobs_cursor contains one open* and two close brackets* (see added comments)
    I don't have a database available but as usually order by is the last sql clause maybe close bracket 1 should be commented out
    PROCEDURE PROCESS_EXECUTOR AS
      cursor jobs_cursor is select job_id
                              from (SELECT DISTINCT job_id  -- OPEN BRACKET 1
                                      FROM table_x
                                   )                        -- CLOSE BRACKET 1   
                                     ORDER BY job_id
                                   )                        -- CLOSE BRACKET 2
                             where ROWNUM <= 10;
      transaction_cursor SYS_REFCURSOR;
      tran               tran_type;
      sql_code           varchar2(1024);
      err_msg            varchar2(1024);
      cmt_counter        number := 0;
    BEGIN -- Process_Executor Start
      for r_csr in jobs_cursor loop
        OPEN transaction_cursor FOR SELECT * FROM table_y a
                                     WHERE a.job_id = r_csr.job_id
                                     order by create_timestamp, task_id;
        LOOP
          FETCH transaction_cursor BULK COLLECT INTO tran LIMIT 10;
          EXIT WHEN tran.COUNT = 0;
          FOR i IN 1..tran.COUNT LOOP
            begin
              if cmt_counter = 0 then
                savepoint last_transaction;
              end if;
              cmt_counter := cmt_counter + 1;
              exec_process1(tran(i));
              if (cmt_counter = 10000 ) then
                commit;
                cmt_counter := 0;
              end if;
            exception
              when others then
                rollback to last_transaction;
            end;
          END LOOP;
        END LOOP;
        CLOSE transaction_cursor;
      end loop;
      commit;
    END PROCESS_EXECUTOR;Regards
    Etbin

  • Oracle Store procedure Docu. Ex throws error ?!!!!

    The following are the Oracle Docu. Contents on Store Procedures.
    I could create same Function and added the same java codes to a JSP but it throws error as
    java.sql.SQLException: Malformed SQL92 string at position: 5. Expecting "call"
    Code is as follows
    JDBC and SQLJ allow you to call PL/SQL stored functions and procedures. For example, suppose you want to call the following stored function, which returns the balance of a specified bank account:
    FUNCTION balance (acct_id NUMBER) RETURN NUMBER IS
    acct_bal NUMBER;
    BEGIN
    SELECT bal INTO acct_bal FROM accts
    WHERE acct_no = acct_id;
    RETURN acct_bal;
    END;
    From a JDBC program, your call to the function balance might look like this:
    CallableStatement cstmt = conn.prepareCall("{? = CALL balance(?)}");
    cstmt.registerOutParameter(1, Types.FLOAT);
    cstmt.setInt(2, acctNo);
    cstmt.executeUpdate();
    float acctBal = cstmt.getFloat(1);
    Can any one Advise
    Abhiash

    change line
    CallableStatement cstmt = conn.prepareCall("{? = CALL
    balance(?)}");
    to
    CallableStatement cstmt = conn.prepareCall("{? = call
    balance(?)}");
    i.e. lowercase 'call'
    hope it solves

  • I am using Mac OS X 10.7.5 as of now and when I am trying to upgrade to Mavericks, it is throwing error "The product distribution file could not be verified. It may be damaged or not signed".

    I am using Mac OS X 10.7.5 as of now and when I am trying to upgrade to Mavericks, the App Store is throwing error "The product distribution file could not be verified. It may be damaged or not signed".
    Is there anything I should do differently? Is anyone else facing the same issue?
    Kindly help.

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It won’t solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    Third-party system modifications are a common cause of usability problems. By a “system modification,” I mean software that affects the operation of other software — potentially for the worse. The following procedure will help identify which such modifications you've installed. Don’t be alarmed by the complexity of these instructions — they’re easy to carry out and won’t change anything on your Mac. 
    These steps are to be taken while booted in “normal” mode, not in safe mode. If you’re now running in safe mode, reboot as usual before continuing. 
    Below are instructions to enter some UNIX shell commands. The commands are harmless, but they must be entered exactly as given in order to work. If you have doubts about the safety of the procedure suggested here, search this site for other discussions in which it’s been followed without any report of ill effects. 
    Some of the commands will line-wrap or scroll in your browser, but each one is really just a single line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, and you can then copy it. The headings “Step 1” and so on are not part of the commands. 
    Note: If you have more than one user account, Step 2 must be taken as an administrator. Ordinarily that would be the user created automatically when you booted the system for the first time. The other steps should be taken as the user who has the problem, if different. Most personal Macs have only one user, and in that case this paragraph doesn’t apply. 
    Launch the Terminal application in any of the following ways: 
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.) 
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens. 
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid. 
    When you launch Terminal, a text window will open with a line already in it, ending either in a dollar sign (“$”) or a percent sign (“%”). If you get the percent sign, enter “sh” and press return. You should then get a new line ending in a dollar sign. 
    Step 1 
    Triple-click anywhere in the line of text below on this page to select it:
    kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}' | open -ef 
    Copy the selected text to the Clipboard by pressing the key combination command-C. Then click anywhere in the Terminal window and paste (command-V). I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting. A TextEdit window will open with the output of the command. If the command produced no output, the window will be empty. Post the contents of the TextEdit window (not the Terminal window), if any — the text, please, not a screenshot. You can then close the TextEdit window. The title of the window doesn't matter, and you don't need to post that. No typing is involved in this step.
    Step 2 
    Repeat with this line:
    { sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix\.cron)|org\.(amav|apac|cups|isc|ntp|postf|x)/{print $3}'; echo; sudo defaults read com.apple.loginwindow LoginHook; echo; sudo crontab -l; } 2> /dev/null | open -ef 
    This time you'll be prompted for your login password, which you do have to type. Nothing will be displayed when you type it. Type it carefully and then press return. You may get a one-time warning to be careful. Heed that warning, but don't post it. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator. 
    Note: If you don’t have a login password, you’ll need to set one before taking this step. If that’s not possible, skip to the next step. 
    Step 3
    { launchctl list | sed 1d | awk '!/0x|com\.apple|org\.(x|openbsd)/{print $3}'; echo; crontab -l 2> /dev/null; } | open -ef 
    Step 4
    ls -A /e*/{cr,la,mach}* {,/}Lib*/{Ad,Compon,Ex,Fram,In,Keyb,La,Mail/Bu,P*P,Priv,Qu,Scripti,Servi,Spo,Sta}* L*/Fonts .la* 2> /dev/null | open -ef  
    Important: If you formerly synchronized with a MobileMe account, your me.com email address may appear in the output of the above command. If so, anonymize it before posting. 
    Step 5
    osascript -e 'tell application "System Events" to get name of login items' | open -ef 
    Remember, steps 1-5 are all copy-and-paste — no typing, except your password. Also remember to post the output. 
    You can then quit Terminal.

  • USerhook in HR_APPRAISALS_BK2.Update_appraisal_B throwing Error oracle.jbo.

    Hi All,
    The USerhook in the HR_APPRAISALS_BK2.Update_appraisal_B throwing Error "oracle.jbo.RemoveWithDetailsException: JBO-26019: Attempting to remove a parent entity without removing all children entities"
    We wrote a custom logic to throw error on the application in the Update Apprisals Page.
    The custom package is placed in the HR_APPRAISALS_BK2.Update_appraisal_B procedure
    create or replace PACKAGE BODY XX_APPR_HOOK_PKG
    PROCEDURE XX_APPR_HOOK_PRC (p_appraisal_id IN NUMBER)
    AS
    CURSOR APPRAISAL_DETAIL
    IS
    SELECT person_id
    FROM per_all_assignments_f
    WHERE supervisor_id = (SELECT APPRAISEE_PERSON_ID
    FROM PER_APPRAISALS
    WHERE APPRAISAL_ID = p_appraisal_id)
    and trunc(sysdate) between effective_start_date and effective_end_date;
    l_message VARCHAR2(3000) ;
    APPID NUMBER (30);
    APPSTATUS VARCHAR2 (30);
    l_names VARCHAR2(200) ;
    l_msg varchar2(500);
    l_cntr number:=0;
    BEGIN
    l_message :='Kindly close the appraisal for the following employees ';
    debug('1Hello1');
    debug('2Hello1'||p_appraisal_id);
    FOR J IN APPRAISAL_DETAIL
    LOOP
    debug('3Hello Inside loop'||J.PERSON_ID);
    APPSTATUS := null;
    BEGIN
    SELECT MAX (APPRAISAL_ID)
    INTO APPID
    FROM PER_APPRAISALS
    WHERE APPRAISEE_PERSON_ID = J.PERSON_ID;
    EXCEPTION
    WHEN OTHERS THEN
    APPID :=null;
    END;
    debug('4Hello after APPID'||J.PERSON_ID||'_'||APPID);
    BEGIN
    SELECT APPRAISAL_SYSTEM_STATUS
    INTO APPSTATUS
    FROM PER_APPRAISALS
    WHERE appraisal_id = APPID;
    EXCEPTION
    WHEN OTHERS THEN
    APPSTATUS:=null;
    END;
    debug('5Hello after APPSTATUS_'||J.PERSON_ID||APPSTATUS);
    BEGIN
    select (last_name ||' '|| first_name) employee_name,employee_number
    into l_emp_name,l_emp_number
    from per_all_people_f where person_id = J.PERSON_ID
    and trunc(sysdate) between effective_start_date and effective_end_date ;
    EXCEPTION
    WHEN OTHERS THEN
    l_emp_name :=null;
    l_emp_number:=null;
    END;
    debug('6Hello after l_emp_name'||J.PERSON_ID||l_emp_number);
    IF (APPSTATUS <> 'COMPLETED' or APPSTATUS is null)
    THEN
    l_cntr :=l_cntr +1;
    l_msg := l_msg ||l_cntr||') '||l_emp_name||' '||l_emp_number||' ';
    END IF;
    END LOOP;
    IF (l_cntr<>0 ) THEN
    debug('9_Inside l_cntr<>0 ');
    hr_utility.set_message(800, 'XX_APPRAISAL_USER_HOOK_MSG');
    hr_utility.set_message_token( 'XX_TOKEN',l_msg);
    hr_utility.raise_error;
    END IF;
    End XX_APPR_HOOK_PRC;
    END 'XX_APPR_HOOK_PKG;
    And ran the pre-processor,but still recieving the same error.
    Using the Debug procedure,I am inserting the debugmessages into table.
    It is inserting all the debug messages correctly.
    If I delete the api hook call using hr_api_hook_call_api.delete_api_hook_call, and then do the transaction it is not dispaying any error.
    but once i create the userhook using below code, it is displaying the error "oracle.jbo.RemoveWithDetailsException: JBO-26019: Attempting to remove a parent entity without removing all children entities"
    declare
    l_api_hook_call_id number;
    l_object_version_number number;
    begin
    hr_api_hook_call_api.create_api_hook_call
    (p_validate => false,
    p_effective_date => to_date('01-jan-2000','dd-mon-yyyy'),
    p_api_hook_id => 2925,
    p_api_hook_call_type => 'PP',
    p_sequence => 3000,
    p_enabled_flag => 'Y',
    p_call_package =>'XX_APPR_HOOK_PKG',
    p_call_procedure => 'XX_APPR_HOOK_PRC',
    p_api_hook_call_id => l_api_hook_call_id,
    p_object_version_number => l_object_version_number);
    COMMIT;
    end;
    Please let me know how to resolves this issue.
    Thanks,
    Anuradha

    Kindly help.

  • PL/SQL throwing errors! trying to alter dates

    the following code keeps throwing errors, I was wondering if it is due to me getting confused when to use ":" before a variable and also ":=" when setting values?
    Can anyone see what I am doing wrong?
    Here is the code, at the moment it is throwing an error on line 44
    ORA-06550: line 44, column 1:
    PLS-00103: Encountered the symbol "" when expecting one of the following:
    CODE.....
    DECLARE
         QNStart DATE;
         QNFinish DATE;
         Q1Start DATE;
         Q1Finish DATE;
         Q2Start DATE;
         Q2Finish DATE;
         Q3Start DATE;
         Q3Finish DATE;
         Q4Start DATE;
         Q4Finish DATE;
         Q5Start DATE;
         Q5Finish DATE;
         QNT NUMBER;
         Q1T NUMBER;
         Q2T NUMBER;
         Q3T NUMBER;
         Q4T NUMBER;
         QNR NUMBER;
         Q1R NUMBER;
         Q2R NUMBER;
         Q3R NUMBER;
         Q4R NUMBER;
    BEGIN
         case current_date
              when current_date between to_date('01-JAN', 'DD-Mon') AND to_date('31-MAR', 'DD-Mon') then
                        QNStart := to_date('01-JAN', 'DD-Mon');
                        QNFinish := to_date('31-MAR', 'DD-Mon');
              when current_date between to_date('01-APR', 'DD-Mon') AND to_date('30-JUN', 'DD-Mon') then
                        QNStart := to_date('01-APR', 'DD-Mon');
                        QNFinish := to_date('30-JUN', 'DD-Mon');
              when current_date between to_date('01-JUL', 'DD-Mon') AND to_date('30-SEP', 'DD-Mon') then
                        QNStart := to_date('01-JUL', 'DD-Mon');
                        QNFinish := to_date('30-SEP', 'DD-Mon');
              when current_date between to_date('01-OCT', 'DD-Mon') AND to_date('31-DEC', 'DD-Mon') then
                        QNStart := to_date('01-OCT', 'DD-Mon');
                        QNFinish := to_date('31-DEC', 'DD-Mon');
         End Case
    :Q1Start := ADD_MONTHS(:QNStart,-3);
    :Q1Finish := ADD_MONTHS(:QNFinish,-3);
    :Q2Start := ADD_MONTHS(:QNStart,-6);
    :Q2Finish := ADD_MONTHS(:QNFinish,-6);
    :Q3Start := ADD_MONTHS(:QNStart,-3);
    :Q3Finish := ADD_MONTHS(:QNFinish,-3);
    :Q4Start := ADD_MONTHS(:QNStart,-4);
    :Q4Finish := ADD_MONTHS(:QNFinish,-4);
    :Q5Start := ADD_MONTHS(:QNStart,-5);
    :Q5Finish := ADD_MONTHS(:QNFinish,-5);
    select COUNT(COUNT(*)) INTO :Q1T from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
    WHERE f.DATE_ENTERED BETWEEN :Q1Start AND :Q1Finish
    AND a.ACTION_SCORE = 'Y'
    AND f.INPUT_TYPE = a.ACTION_NAME
    GROUP BY f.COMPANY_NAME;
    select COUNT(COUNT(*)) INTO :Q2T from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
    WHERE f.DATE_ENTERED BETWEEN :Q2Start AND :Q2Finish
    AND a.ACTION_SCORE = 'Y'
    AND f.INPUT_TYPE = a.ACTION_NAME
    GROUP BY f.COMPANY_NAME;
    select COUNT(COUNT(*)) INTO :Q3T from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
    WHERE f.DATE_ENTERED BETWEEN :Q3Start AND :Q3Finish
    AND a.ACTION_SCORE = 'Y'
    AND f.INPUT_TYPE = a.ACTION_NAME
    GROUP BY f.COMPANY_NAME;
    select COUNT(COUNT(*)) INTO :Q4T from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
    WHERE f.DATE_ENTERED BETWEEN :Q4Start AND :Q4Finish
    AND a.ACTION_SCORE = 'Y'
    AND f.INPUT_TYPE = a.ACTION_NAME
    GROUP BY f.COMPANY_NAME;
    select COUNT(COUNT(*)) INTO :QNT from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
    WHERE f.DATE_ENTERED BETWEEN :QNStart AND :QNFinish
    AND a.ACTION_SCORE = 'Y'
    AND f.INPUT_TYPE = a.ACTION_NAME
    GROUP BY f.COMPANY_NAME;
    select COUNT(COUNT(*)) INTO :Q1R from FF_ACTIONS a
    WHERE a.DATE_ENTERED BETWEEN Q1Start AND Q1Finish
    AND a.COMPANY_NAME IN
         (select f.COMPANY_NAME from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
         WHERE f.DATE_ENTERED BETWEEN Q2Start AND Q2Finish
         AND a.ACTION_SCORE = 'Y'
         AND f.INPUT_TYPE = a.ACTION_NAME
         GROUP BY f.COMPANY_NAME)
    GROUP BY a.COMPANY_NAME;
    select COUNT(COUNT(*)) INTO :Q2R from FF_ACTIONS a
    WHERE a.DATE_ENTERED BETWEEN Q2Start AND Q2Finish
    AND a.COMPANY_NAME IN
         (select f.COMPANY_NAME from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
         WHERE f.DATE_ENTERED BETWEEN Q3Start AND Q3Finish
         AND a.ACTION_SCORE = 'Y'
         AND f.INPUT_TYPE = a.ACTION_NAME
         GROUP BY f.COMPANY_NAME)
    GROUP BY a.COMPANY_NAME;
    select COUNT(COUNT(*)) INTO :Q3R from FF_ACTIONS a
    WHERE a.DATE_ENTERED BETWEEN Q3Start AND Q3Finish
    AND a.COMPANY_NAME IN
         (select f.COMPANY_NAME from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
         WHERE f.DATE_ENTERED BETWEEN Q4Start AND Q4Finish
         AND a.ACTION_SCORE = 'Y'
         AND f.INPUT_TYPE = a.ACTION_NAME
         GROUP BY f.COMPANY_NAME)
    GROUP BY a.COMPANY_NAME;
    select COUNT(COUNT(*)) INTO :Q4R from FF_ACTIONS a
    WHERE a.DATE_ENTERED BETWEEN Q4Start AND Q4Finish
    AND a.COMPANY_NAME IN
         (select f.COMPANY_NAME from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
         WHERE f.DATE_ENTERED BETWEEN Q5Start AND Q5Finish
         AND a.ACTION_SCORE = 'Y'
         AND f.INPUT_TYPE = a.ACTION_NAME
         GROUP BY f.COMPANY_NAME)
    GROUP BY a.COMPANY_NAME;
    select COUNT(COUNT(*)) INTO :QNR from FF_ACTIONS a
    WHERE a.DATE_ENTERED BETWEEN QNStart AND QNFinish
    AND a.COMPANY_NAME IN
         (select f.COMPANY_NAME from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
         WHERE f.DATE_ENTERED BETWEEN Q1Start AND Q1Finish
         AND a.ACTION_SCORE = 'Y'
         AND f.INPUT_TYPE = a.ACTION_NAME
         GROUP BY f.COMPANY_NAME)
    GROUP BY a.COMPANY_NAME;
    EXECUTE
    Cheers
    Simon

    Dave had given you already some good advice.
    Your code is not only too complicated, but you have also probably a bug in it. You have for instance a QNstart as to_date('01.01, 'dd.mm') and a corresponding QNfinish as to_date('31.03', 'dd.mm'). As this means, it is the time portion at 00:01, you are missing the complete last day of this interval. So you better do:
    declare
      l_QNstart      date;
      l_Q1start      date;
      l_Q1finish     date;
      l_q1t          number
    begin
      l_QNstart := trunc(sysdate, 'Q');
      l_Q1start := add_months(l_QNstart, -3);
      l_Q1finish := l_QNstart;
      -- your condition is now
      select count(count(*))
      into   l_q1t
      from   ff_actions f, ff_action_type_lov a
      where  f.date_entered >= l_Q1start and f.date_entered < l_Q1finish
      and    a.action_score = 'y'
      and    f.input_type = a.action_name
      group by f.company_name;
    end;
    /Message was edited by:
    Leo Mannhart
    btw: what is the difference between Q1Start / Q3 Start and Q1Finish / Q3Finish resp.?

  • Report throwing error

    Hi BI Experts,
    I have an issue in the report output. The query is giving the data but the report is not showing the same.
    when nonexisting values are given, report is throwing ERROR instead of giving blank page. Client is expecting blank page or dummy page with tables or headings etc but not the error message.
    Please suggest a solution for this.
    Let me know if anybody needs any other information regarding this.
    Thanks in advance.

    you need to use no data found logic in order to get blank or any message saying no data found for that selected value.
    check this link
    https://blogs.oracle.com/xmlpublisher/entry/no_data_found
    or
    send me your sample xml having data and no data and template i can try at my side. email: [email protected]
    assign me some points if helpful

  • I am using report generation toolkit 1.1 with Labview 7.0 and Office 2003 profession​al. The create new report VI opens Excel but throws error (-21471672​62- from automation open VI) when I try to open MS word. please help...

    I am using report generation toolkit 1.1 with Labview 7.0 and Office 2003 professional. The create new report VI opens Excel but throws error (-2147167262- from automation open VI) when I try to open MS word. please help...

    Hi Leo22,
    Does this error occur if you use any of the example programs that come shipped with LabVIEW? I would try opening one of the examples that write data to Word and see if those give you an error. Also, have you tried just putting down a New Report.VI and change the report type to Word? If this simple vi (that's all you need to open Word) breaks, I would check to see if there are any instances of Word still open. Check the task manager to see if any word processes are still open. There should not be a problem accessing Word 2003 from LabVIEW 7.0. If neither of these solutions work, please give some more detail about your application and we can research further. Thanks!
    Jeremy L.
    National Instruments
    Jeremy L.
    National Instruments

  • Function module throwing error from work area. Cannot find the problem...

    REPORT  ZPSMARTFORM1.
    tables: zptable1.
    types: begin of ty_zptable1,
          f1 type zf1,
          f2 type zf2,
          f3 type zf3,
    end of ty_zptable1.
    data: itab type table of ty_zptable1 with header line.
    data: wa type ty_zptable1.
    select f1 f2 f3 from zptable1 into table itab.
    CALL FUNCTION '/1BCDWB/SF00000005'
    EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
      CONTROL_PARAMETERS         =
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
      OUTPUT_OPTIONS             =
      USER_SETTINGS              = 'X'
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
      JOB_OUTPUT_INFO            =
      JOB_OUTPUT_OPTIONS         =
      TABLES
        ITAB                       =   .
    EXCEPTIONS
      FORMATTING_ERROR           = 1
      INTERNAL_ERROR             = 2
      SEND_ERROR                 = 3
      USER_CANCELED              = 4
      OTHERS                     = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    this is my driver program.In my form interface  there are tables,import,export are there where i have to declare tables data.If i am putting wa means it is throwing error.Please show me the clear information.
    Edited by: Julius Bussche on Nov 14, 2008 10:09 AM

    REPORT ZPSMARTFORM1.
    tables: zptable1.
    types: begin of ty_zptable1,
    f1 type zf1,
    f2 type zf2,
    f3 type zf3,
    end of ty_zptable1.
    data: itab type table of ty_zptable1 with header line.
    data: wa type ty_zptable1.
    select f1 f2 f3 from zptable1 into table itab.
    CALL FUNCTION '/1BCDWB/SF00000005'
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS =
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    TABLES
    ITAB = .
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Plz for this driver program. Give me the exact solution.I am passing the information like itab  like zptable1 ther ein the smart form table. Even now i am getting error.Here in this driver program i passed itab = itab means .I  am not getting solution.If i have to change any function module name means plz tell me.What i have to put there.Plz give me the correct solution

  • Throwing error message for a component

    I have a form in which there are several fields. One of field is LOV for which i do some validation on valuechangeListener. If that validation fails, i send error to the form for that particular field. It is working fine. but after this if user submits the form, it is submitted. In case of validation failed by framewrok, it is not submitted. HOw i can set that component in error state so that form is not submitted. I am using following code to throw error or component:
    FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, null, "Invalid value");
    FacesContext context = FacesContext.getCurrentInstance();
    context.addMessage(binding.getClientId(context), msg);
    I am using Jdeveloper 11g with latest patch set of ADF i.e. 11.1.3.x

    Hi,
    actually you are not throwing an error but set a message to display to the user. Can't you just create a validation for the input field. The field has a property for you to define a managed bean validation reference. You can generate the method skeleton from JDeveloper.
    Frank

  • WebI report throwing error when migrated from XIR2 to XI3.1

    I have some webi reports built in BO XIR2 on OLAP universes (SAP BW3.5 based). Recently I have migrated the reports from old XIR2 environment to a new XI3.1 environment.
    The specification of new system is as below:
    BO XI3.1
    SAP BW 3.5
    No SP and FP is installed. (Actually when I tried to install the SP2, it failed)
    After the migration, some of my reports are running for 5 minutes and then throwing an error like below:
    A database error occured. The database error text is: Error in MDDataSetBW.GetCellData. See RFC trace file or SAP system log for more details. (WIS 10901).
    The same report is working fine in old system.
    Has anyone faced this problem yet?
    Regards

    Hi Jacques,
    The transports are already imported.
    What I can see is if there is a query with only dimension objects and no measure, then that is throwing error in XI3.1. But the same query is running fine in XIR2.
    Any Idea?
    Thanks and Regards

  • Database.LoadDataSet() method throwing error while retriving data from IBM DB2 database

    Database.LoadDataSet() method is throwing error during retriving data from empty table of IBM DB2 database. It is giving error code "SQL0100W".
    “Error Message: 0NO_DATA [02000] [IBM] [DB2 / NT] SQL0100W FETCH, whether there is a line to be UPDATE or DELETE, or of the query result is an empty table .
    SQLSTATE = 02000”

    Hello SharayuPandit,
    For issues regarding DB2, i suggest that you could post it to DB2 related forum:
    https://www.ibm.com/developerworks/community/forums/html/forum?id=11111111-0000-0000-0000-000000000842
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • ARP_PROC_RECEIPTS1.update_cash_receipt throws error while manual execution

    Hi All,
    I am working on oracle apps AR implementation process in r12.
    I have a requirement for updating the receipt information in my custom code, so i am using using ARP_PROC_RECEIPTS1.update_cash_receipt procedure for updating the receipt details.
    But i am facing following errors while executing this procedure.
    Error
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "APPS.ARP_PROC_RECEIPTS1", line 1775
    ORA-06512: at line 235
    I am passing following input parameters for this oracle procedure.
    p_cash_receipt_id: 152443
    p_status: CONFIRMED
    p_currency_code: USD
    p_amount: 55
    p_pay_from_customer: 117738
    p_receipt_number: 10723
    p_receipt_date: 19-JAN-13
    p_gl_date: 19-JAN-13
    p_maturity_date: 19-JAN-13
    p_comments:
    p_exchange_rate_type:
    p_exchange_rate:
    p_exchange_date:
    p_attribute_category:
    p_attribute1:
    p_attribute2:
    p_attribute3:
    p_attribute4:
    p_attribute5:
    p_attribute6:
    p_attribute7:
    p_attribute8:
    p_attribute9:
    p_attribute10:
    p_attribute11:
    p_attribute12:
    p_attribute13:
    p_attribute14:
    p_attribute15:
    p_override_remit_account_flag: Y
    p_remittance_bank_account_id: 10010
    p_customer_bank_account_id:
    p_customer_site_use_id: 13878
    p_customer_receipt_reference:
    p_factor_discount_amount:
    p_deposit_date: 19-JAN-13
    p_receipt_method_id: 1121
    p_doc_sequence_value: 10723
    p_doc_sequence_id: 500
    p_ussgl_transaction_code:
    p_vat_tax_id:
    p_confirm_date: 19-JAN-13
    p_confirm_gl_date: 19-JAN-13
    p_unconfirm_gl_date:
    p_postmark_date:
    p_rate_adjust_gl_date:
    p_new_exchange_date:
    p_new_exchange_rate:
    p_new_exchange_rate_type:
    p_gain_loss:
    p_exchange_rate_attr_cat:
    p_exchange_rate_attr1:
    p_exchange_rate_attr2:
    p_exchange_rate_attr3:
    p_exchange_rate_attr4:
    p_exchange_rate_attr5:
    p_exchange_rate_attr6:
    p_exchange_rate_attr7:
    p_exchange_rate_attr8:
    p_exchange_rate_attr9:
    p_exchange_rate_attr10:
    p_exchange_rate_attr11:
    p_exchange_rate_attr12:
    p_exchange_rate_attr13:
    p_exchange_rate_attr14:
    p_exchange_rate_attr15:
    p_reversal_date:
    p_reversal_gl_date:
    p_reversal_category:
    p_reversal_comments:
    p_reversal_reason_code:
    p_dm_reversal_flag: N
    p_dm_cust_trx_type_id:
    p_dm_cust_trx_type:
    p_cc_id:
    p_dm_number:
    p_dm_doc_sequence_value:
    p_dm_doc_sequence_id:
    p_tw_status:
    p_anticipated_clearing_date:
    p_customer_bank_branch_id:
    p_global_attribute1:
    p_global_attribute2:
    p_global_attribute3:
    p_global_attribute4:
    p_global_attribute5:
    p_global_attribute6:
    p_global_attribute7:
    p_global_attribute8:
    p_global_attribute9:
    p_global_attribute10:
    p_global_attribute11:
    p_global_attribute12:
    p_global_attribute13:
    p_global_attribute14:
    p_global_attribute15:
    p_global_attribute16:
    p_global_attribute17:
    p_global_attribute18:
    p_global_attribute19:
    p_global_attribute20:
    p_global_attribute_category:
    p_issuer_name:
    p_issue_date:
    p_issuer_bank_branch_id:
    p_application_notes:
    p_new_state:
    p_new_state_dsp:
    p_new_status:
    p_new_status_dsp:
    p_form_name: ARXRWRCT
    p_form_version: 70.1
    p_payment_server_order_num:
    p_approval_code: 1234567890
    p_legal_entity_id: 204
    p_payment_trxn_extension_id: 80539
    p_automatch_set_id:
    p_autoapply_flag:
    Could you please help.
    Thanks,

    I have a requirement for updating the receipt information in my custom code, so i am using using ARP_PROC_RECEIPTS1.update_cash_receipt procedure for updating the receipt details. Do you have the latest patches applied?
    After applying Patch 13694711 Unable To Update Anything After Saving As An Unidentified Receipt Or Unapplied Receipt [ID 1433035.1]
    Comments on Receipts Window Cannot be Updated to NULL [ID 1470192.1]
    But i am facing following errors while executing this procedure.
    Error
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "APPS.ARP_PROC_RECEIPTS1", line 1775
    ORA-06512: at line 235Please check line 235 in the package body code and make sure you are passing the correct value.
    OERR: ORA 6502 PL/SQL: numeric or value error [ID 20063.1]
    Master Note for Diagnosing ORA-06502 Error [ID 1137237.1]
    Thanks,
    Hussein

  • Excel is throwing error when it click print : 'No printers are installed. To install a printer click the File tab, and then click Print. Click No Printers Installed, and then click Add Printer. Follow the instructions in the Add Printer dialog box'

    Excel is throwing error when it click print : 'No printers are installed. To install a printer click the File tab, and then click Print. Click No Printers Installed, and then click Add Printer. Follow the instructions in the Add Printer dialog box'
    Word, and powerpoint application are working fine.  
    Environment :  Windows 7 64-bit, MS Office 2013 64-bit
    Steps to recreate
    (i)  Create new user account and add to any group ( do not log on using this
     account)
      (ii)  runas /user:<new user account>  <fullpath>\excel.exe
       it will ask password so enter on command prompt
    (iii)  open any excel document  and click File->Print
      (iv)  verify result  (it is failing) it pop ups below error
     Error:`Microsoft Excel
     No printers are installed. To install a printer click the File tab, and then click
     Print. Click No Printers Installed, and then click Add Printer. Follow the
     instructions in the Add Printer dialog box.                                                                                                               

    Sorry for late reply i was not at work
    I have a default set excel is still throwing error. Interestingly winword , powerpoint and publisher are working fine. I am able to print from all office applications except Excel.
     Probably excel behaves differently from other office applications.
     Probably it is a bug in excel
    Workaround : Log on to a system once using newly created account then runas excel using this account then print works fine.
    It means something in user profile should be configure to run excel print operation. Could you please somebody help what I need to configure in user profile that makes print operation success?

Maybe you are looking for

  • Switching off previewing of attachments

    Anyone know how to stop Mail from automatically opening and displaying attached pdfs, jpgs and other such filetypes when displaying a mail message either in the preview or the main reading pane? If you work with 5meg pdfs a lot then this gets very te

  • Recycling a MacPro's ATI 2600 in a 2.5GHz Quad G5

    Hi there, My friend's Quad G5 has a PCI-e port and Leopard. What if I put my Mac Pro's ATI 2600 in his machine? Will it work at all? Thanks for your help.

  • Second wireless connection causes problems

    I have some friends who are having the following problem: They have BT Infinity and a HH4. Their desktop PC has a built-in wifi card which they use to connect to the HH4 on the 2.4GHz band. This generally works ok. I know that a cable would be prefer

  • IPhoto '11 won't import 3gp files, but iPhoto '09 did. Help!

    I had iPhoto '09, which imported 3gp video files from my android phone just fine.  Then I upgraded to iPhoto '11, and suddenly I can't import them; they're an "unrecognized file format" WTH? Why, Apple, why? Just to add insult to injury, the old 3gp

  • Nokia N8 Conversations problem

    Greetings! Today, for no apparent reason, whenever I receive a new SMS message, I press open.. and the phone opens up the conversations window but not the sms or the conversation in question. Also.. the last active conversation (i.e. last sms sent/re