Month data display

Hi all,
I have a month column in my report which contain the data like 2007/01, 2007/02,2007/03......I have t use that month column in X-axis of chart & it should display the data like 01,02,03........in report for that I have set formula for month column in criteria under ex builder as Month(a.monthcolumn) but its giving me the below error
[nQSError: 10058] A general error has occurred. [nQSError: 22025] Function Calendar Extract is called with an incompatible type. (HY000)
SQL Issued: SELECT "Facts Revenue".Revenue, "Other Dimensions".Area, MONTH(Time."Month"), Time."Year" FROM "Sample Sales Reduced"
how to solve that?
Regards,
Sonal

I think month function will work with date column and since you are not using date column it is giving you an error.
You can use below formula to extract month.Cast the column to char before using this formula
substring(a.month_column from LOCATE('/', (a.month_column -1)+1 for length((a.month_column ))
Hope this helps.
Regards,
Sandeep
Edited by: Sandeep Saini on 11-Nov-2010 02:03

Similar Messages

  • Date display in FOOTER

    hi all,
    I need to display the current date in footer in the format Thursday, November 25, 2010.
    But when i select that format from date settings of Footer am getting the following in the output display dddd, November 25, 2010.
    Please help me in resolving this issue.
    Regards,
    Vino.

    the following shuld be implemented
    <?xdoxslt:sysdate(‘Day’)?>,November 26, 2010
    to display full day along with month, date and year in format Friday, November 26, 2010.
    Regards,
    Vino.
    Edited by: user11107545 on Nov 26, 2010 2:02 PM

  • How to show a report for 'Previous Month' Data

    Hi Gurus,
    I have a requirement, where i have to default my report to show previous month data.
    Scenario:
    My prompts by Default are set to CURRENT (current year,quarter,month). once the user logs in, the report should display data for month 'Nov' instead of 'Dec'.
    I tried using TIMESTAMPADD() in the formula , but it didn't work, though i don't see any error. Not sure if i 'm missing something.
    Is there a way to achieve this.I 'm using OBIEE 11.1.1.6.
    Any help is highly Appreciated ! Please.
    Thanks,
    Ramya

    From what you wrote I am assuming the user can manually save the report results to the Excel file.
    If your report uses ALV Grid it is possible to export the data to a spreadsheet (one of the functions available in the ALV tool bar).
    If you have used WRITE statements it is also possible to save the output as a spreadsheet (menu System -> List -> Save), but the latter will not produce as nice a spreadsheet if the data don't form a matrix. In other words, some work may be necessary in the spreadsheet afterwards before it has the format your user wants.

  • Return Current month Data:Help needed in modifying this code of a Procedure

    Hello Folks i have this scenario where i need to modify this code so that it has to return data from the Current month First Day to the previous Day if its a daily report and previous month data if its a monthly report.
    I have no clue how to modify this code below. Currently the code is returning data for Monthly reports for the previous month. Does anyone have any idea how to modify so that the code meets the requirements of both daily and monthly reprts.
    BEGIN
    if v_lowdate is null or v_highdate is null then
    select to_number(to_char(sysdate, 'DD')) into v_cur_day from dual;
    if v_cur_day < 25 then
    -- this is for the previous month run
    Select Add_Months(trunc(sysdate, 'MONTH'), -1)
    INTO V_LOWDATE
    FROM DUAL;
    SELECT Last_Day(ADD_Months(Sysdate, -1)) INTO V_Highdate From Dual;
    else
    -- this is for the current month run
    Select trunc(sysdate, 'MONTH') INTO V_LOWDATE FROM DUAL;
    SELECT Last_Day(Sysdate) INTO V_Highdate From Dual;
    end if;
    end if;
    Thanks
    Edited by: user11961230 on Sep 30, 2009 8:34 PM

    Hi Frank, This is code till the "modifying Code" which we were working. I will post the code after the "modifying Code" in the next reply. Thanks
    CREATE OR REPLACE PROCEDURE "POPULATE_RECOVERY_ACTIVITYHN"(p_lowdate date,
    p_highdate date) IS
    v_lowdate date := p_lowdate;
    v_highdate date := p_highdate;
    v_error_code NUMBER(20);
    v_error_text VARCHAR2(300);
    v_recovery_id Recovery.Recovery_ID%type;
    v_loop_control Number(20);
    v_settlement_id recovery.settlement_id%type;
    V_Event_ID Event.Event_ID%Type;
    V_Event_Case_ID Event_Case.Event_Case_ID%Type;
    V_Recovery_Month Varchar2(100);
    V_Major_Company Major_Client.Major_Client_Name%Type;
    V_Company Client.Client_Name%Type;
    V_Client_Policy_Identifier Varchar2(100);
    V_Lan_ID Varchar2(10) := 'TROVERIS';
    V_Recovery_Account Client.Account_Number%Type;
    V_AccountA Number(2) := 0;
    V_AccountB Number(2) := 0;
    V_Unit Event_Client_Field.Client_Field_Data%Type;
    V_Market Event_Client_Field.Client_Field_Data%Type;
    V_case_open_date Event_case.Open_Date%type;
    V_Employer_Group_Code Employer_Group.Employer_Group_Code%Type;
    V_Unknown1 Number(2) := 0;
    V_Fee_Schedule_Code Event_Case.Fee_Schedule_Code%Type;
    V_Total_Fee_Percent Number(20, 2) := 0.00;
    V_Subrogation_Fee_Percent Number(20, 2) := 0.00;
    V_Unknown2 Number(2) := NULL;
    V_Unknown3 Number(2) := NULL;
    V_TOTAL_MEDICAL Number(20, 2) := 0.00;
    V_Recovery_Amount Number(20, 2) := 0.00;
    V_Total_Tax Number(20, 2) := 0.00;
    V_Administrative_Tax Number(20, 2) := 0.00;
    V_Total_NonCash_Fee Number(20, 2) := 0.00;
    V_Total_NonCash_Positive Number(20, 2) := 0.00;
    V_Total_NonCash_Negative Number(20, 2) := 0.00;
    V_Total_Recovery Number(20, 2) := 0.00;
    V_Total_NonCash_Fee_Positive Number(20, 2) := 0.00;
    V_Total_NonCash_Fee_Negative Number(20, 2) := 0.00;
    V_Total_Admin_Fee Number(20, 2) := 0.00;
    V_Total_Fee Number(20, 2) := 0.00;
    V_Total_NonCash_Tax_Positive Number(20, 2) := 0.00;
    V_Total_NonCash_Tax_Negative Number(20, 2) := 0.00;
    report_type                  Varchar2(2);
    v_gl_num client.gl_num%type; -- *002*
    v_net_billable client.net_billable%type; -- *003*
    vevent_id event.event_id%type; -- *006*
    v_prev_event event.event_id%type; -- *006*
    v_prev_case event_case.event_case_id%type; -- *006*
    v_tot_recovery recovery.amount%type; -- *006*
    v_rec_amount recovery.amount%type; -- *006*
    v_prev_rec_amt recovery.amount%type; -- *006*
    v_prev_rec_month recovery_activity.recovery_month%type; -- *006*
    v_tot_fee recovery_activity.total_fee%type; --*006*
    v_mth_rev unbundled_recoveries.monthly_revenue%type; -- *006*
    v_diff number(18, 2); -- *006*
    v_nc_count number := 0; -- *006*
    v_c_count number := 0; -- *006*
    v_nc_tot recovery.amount%type; -- *006*
    v_used_rev recovery_activity.total_fee%type; -- *006*
    v_use_mth_rev unbundled_recoveries.monthly_revenue%type := 0; -- *006*
    v_use_nc_mth_rev unbundled_recoveries.monthly_revenue%type := 0; -- *006*
    v_prev_netbill client.net_billable%type; -- *006*
    v_event_type event.event_type_code%type;
    v_date_typed event.date_typed%type;
    v_acc_client_id client.acc_client_id%Type;
    v_Recovery_Revenue_GL_Num client.recovery_revenue_gl_num%Type;
    v_Funds_Due_GL_num client.funds_due_gl_num%Type;
    v_lob Varchar2(20);
    v_nc_recovery_id recovery.recovery_id%Type;
    /*Changed the Client_Policy_Identifier to concatenate the Retlation to insured code instead of the description
    which was exceeding the column size in the table. SWL 09/03/02. Checked with the Design Doc.*/
    CURSOR RECOVERY_INFO IS
    SELECT Event.Event_ID,
    Event_Case.Event_Case_ID,
    TO_CHAR(Recovery.Recovery_Date, 'FMMONTHYYYY') As Recovery_Month,
    Major_Client.Major_Client_Name AS Major_Company,
    -- Client.Client_Name AS Company,
    -- nvl(client.legacy_client_id,'DC')||'-'||substr(Client.Client_Name,1,55) AS Company, -- SWL 04/01/04 52653
    substr(nvl(client.legacy_client_id,
    decode(client.client_id, 1, 'DC', client.client_code)) || '-' ||
    Client.Client_Name,
    1,
    60) AS Company,
    Event.Client_Policy_Identifier ||
    Event_Case.Relation_To_Insured_code as Client_Policy_Identifier,
    Client.Account_Number as Recovery_Account,
    Employer_Group.Employer_Group_Code,
    Event_Case.Fee_Schedule_Code,
    Recovery_ID,
    Event_case.Open_Date,
    '(' || recovery.recovery_transaction_internal || ')' ||
    l.recovery_transaction_descripti, --fml 110276
    recovery.settlement_id,
    trim(client.gl_num), -- *002*
    nvl(trim(client.net_billable), 'N'), -- *003*
    recovery.amount, -- *006*,
    event.event_type_code,
    event.date_typed,
    recovery_id,
    Client.ACC_CLIENT_ID,
    Recovery_Revenue_GL_Num,
    Funds_Due_GL_num
    FROM Recovery,
    Settlement,
    Event_Case,
    Event,
    Employer_Group,
    Client,
    Major_Client,
    recovery_transaction_lookup l
    Where to_date(Recovery.Recovery_Date, 'DD-MON-RR') between
    TO_DATE(v_lowdate, 'DD-MON-RR') and
    TO_DATE(v_highdate, 'DD-MON-RR')
    AND Settlement.Settlement_id = Recovery.Settlement_id
    AND Settlement.Event_Case_ID = Event_Case.Event_Case_id
    AND Event_Case.Event_ID = Event.Event_ID
    AND Event.Employer_Group_ID = Employer_Group.Employer_Group_ID(+)
    AND Event.Client_ID = Client.Client_ID
    AND Client.Major_Client_id = Major_Client.Major_Client_ID(+)
    and recovery.settlement_id not in
    (select settlement_id
    from recovery
    where to_date(Recovery.Recovery_Date, 'DD-MON-RR') between
    TO_DATE(v_lowdate, 'DD-MON-RR') and
    TO_DATE(v_highdate, 'DD-MON-RR')
    AND recovery_transaction_internal in
    ('05', '50', '52', '51'))
    --001
    and    client.invoice_flag = 'N'            *005* commenting
    -- SWL 05/03/05 #71231
    and event.event_id in
    (select event_id
    from event_end_user eeu
    where eeu.active_flag = 'Y'
    and eeu.owner_flag = 'Y'
    and eeu.end_user_id in
    (select end_user_id
    from end_user
    where end_user.research_internal_user = 'Y'))
    and recovery.recovery_transaction_internal =
    l.recovery_transaction_internal --fml 110276
    order by event.event_id, recovery.amount; -- *006*
    -- SWL 05/03/05 #71231
    -- end of 001
    -- SWL 11/10/03 # 52743
    -- *006*
    CURSOR get_recovery(vevent_id event.event_id%type) IS
    SELECT sum(r.amount)
    FROM Recovery r
    Where to_date(r.Recovery_Date, 'DD-MON-RR') between
    TO_DATE(v_lowdate, 'DD-MON-RR') and
    TO_DATE(v_highdate, 'DD-MON-RR')
    and r.event_id = vevent_id
    and r.settlement_id not in
    (select settlement_id
    from recovery
    where to_date(Recovery.Recovery_Date, 'DD-MON-RR') between
    TO_DATE(v_lowdate, 'DD-MON-RR') and
    TO_DATE(v_highdate, 'DD-MON-RR')
    AND recovery_transaction_internal in
    ('05', '50', '52', '51'))
    and r.event_id in
    (select event_id
    from event_end_user eeu
    where eeu.active_flag = 'Y'
    and eeu.owner_flag = 'Y'
    and eeu.end_user_id in
    (select end_user_id
    from end_user
    where end_user.research_internal_user = 'Y'));
    CURSOR RECOVERY_INFO_NC IS
    SELECT distinct Event.Event_ID,
    Event_Case.Event_Case_ID,
    TO_CHAR(Recovery.Recovery_Date, 'FMMONTHYYYY') As Recovery_Month,
    Major_Client.Major_Client_Name AS Major_Company,
    -- Client.Client_Name AS Company,
    -- nvl(client.legacy_client_id,'DC')||'-'||substr(Client.Client_Name,1,55) AS Company, /* SWL 04/01/04 52653 */
    substr(nvl(client.legacy_client_id,
    decode(client.client_id,
    1,
    'DC',
    client.client_code)) || '-' ||
    Client.Client_Name,
    1,
    60) AS Company,
    Event.Client_Policy_Identifier ||
    Event_Case.Relation_To_Insured_code as Client_Policy_Identifier,
    Client.Account_Number as Recovery_Account,
    Employer_Group.Employer_Group_Code,
    Event_Case.Fee_Schedule_Code,
    '(' || recovery.recovery_transaction_internal || ')' ||
    l.recovery_transaction_descripti, --fml 110276
    recovery.settlement_id,
    trim(client.gl_num), -- *002*
    nvl(trim(client.net_billable), 'N'), -- *003*
    recovery.amount,-- *006*
    recovery.recovery_id,
    event.event_type_code,
    event.date_typed,
    Client.ACC_CLIENT_ID,
    Recovery_Revenue_GL_Num,
    Funds_Due_GL_num
    FROM Recovery,
    Settlement,
    Event_Case,
    Event,
    Employer_Group,
    Client,
    Major_Client,
    recovery_transaction_lookup l
    Where to_date(Recovery.Recovery_Date, 'DD-MON-RR') between
    TO_DATE(v_lowdate, 'DD-MON-RR') and
    TO_DATE(v_highdate, 'DD-MON-RR')
    AND Settlement.Settlement_id = Recovery.Settlement_id
    AND Settlement.Event_Case_ID = Event_Case.Event_Case_id
    AND Event_Case.Event_ID = Event.Event_ID
    AND Event.Employer_Group_ID = Employer_Group.Employer_Group_ID(+)
    AND Event.Client_ID = Client.Client_ID
    AND Client.Major_Client_id = Major_Client.Major_Client_ID(+)
    and recovery.settlement_id in
    (select settlement_id
    from recovery
    where to_date(Recovery.Recovery_Date, 'DD-MON-RR') between
    TO_DATE(v_lowdate, 'DD-MON-RR') and
    TO_DATE(v_highdate, 'DD-MON-RR')
    --001
    AND recovery.recovery_transaction_internal in
    ('05', '50', '52', '51')
    and    client.invoice_flag = 'N'   *005* commenting
    /* SWL 05/03/05 #71231 */
    and event.event_id in
    (select event_id
    from event_end_user eeu
    where eeu.active_flag = 'Y'
    and eeu.owner_flag = 'Y'
    and eeu.end_user_id in
    (select end_user_id
    from end_user
    where end_user.research_internal_user = 'Y'))
    and recovery.recovery_transaction_internal =
    l.recovery_transaction_internal --fml 110276
    order by event.event_id, recovery.amount; -- *006*
    /* SWL 05/03/05 #71231 */
    --end of 001
    -- *006*
    CURSOR get_recovery_nc(vevent_id event.event_id%type) IS
    SELECT sum(r.amount)
    FROM Recovery r
    Where to_date(r.Recovery_Date, 'DD-MON-RR') between
    TO_DATE(v_lowdate, 'DD-MON-RR') and
    TO_DATE(v_highdate, 'DD-MON-RR')
    AND r.event_id = vevent_id
    and r.settlement_id in
    (select settlement_id
    from recovery
    where to_date(Recovery.Recovery_Date, 'DD-MON-RR') between
    TO_DATE(v_lowdate, 'DD-MON-RR') and
    TO_DATE(v_highdate, 'DD-MON-RR'))
    AND recovery_transaction_internal in ('05', '50', '52', '51')
    and r.event_id in
    (select event_id
    from event_end_user eeu
    where eeu.active_flag = 'Y'
    and eeu.owner_flag = 'Y'
    and eeu.end_user_id in
    (select end_user_id
    from end_user
    where end_user.research_internal_user = 'Y'));
    CURSOR Recovery_Totals_Nc IS
    Select Recovery_Detail.Recovery_Id, /* SWL 07/01/04 59016 */
    max(NVL(Recovery_Detail.Fees_Percent, 0) +
    NVL(Recovery_Detail.Admin_Percent, 0)) as Total_Fee_Percent,
    max(NVL(Recovery_Detail.Fees_Percent, 0)) as Subrogation_Fee_Percent,
    max(NVL(Recovery.Amount, 0)) as Recovery_Amount, /* SWL 04/01/04 52653 */
    Sum(NVL(Recovery_detail.Fees, 0) + NVL(Recovery_Detail.Admin, 0)) as Total_Fee,
    Sum(NVL(Recovery_Detail.Fees_Taxes, 0) +
    NVL(Recovery_Detail.Admin_Taxes, 0)) as Total_Tax,
    Sum(NVL(Recovery_Detail.Admin_Taxes, 0)) as Administrative_tax,
    Sum(NVL(Recovery_Detail.Admin, 0)) as Total_Admin_Fee,
    sum(recovery.retained_by_client) as Non_cash_fee, --fml 110276
    sum(recovery.allocation_check_amount) as cash --fml 110276
    From Settlement, Recovery, Recovery_Detail
    Where Recovery.settlement_id = v_settlement_id
    And recovery.recovery_id = v_recovery_id
    And Settlement.Settlement_id = Recovery.Settlement_id
    And Recovery.Recovery_id = Recovery_detail.Recovery_id(+)
    and to_date(Recovery.Recovery_Date, 'DD-MON-RR') between
    TO_DATE(v_lowdate, 'DD-MON-RR') and
    TO_DATE(v_highdate, 'DD-MON-RR') /*SWL 12/03/04 */
    -- Group by Recovery_Detail.Fees_Percent; /* SWL 04/01/04 52653 */
    Group by Recovery_Detail.recovery_id;
    v_cash_recovery recovery_activity.cash_recovery%type;
    CURSOR Recovery_Totals_Positive_Nc IS
    -- Select Sum(Recovery.Amount) as Total_NonCash_Positive, /* SWL 04/01/04 52653 */
    Select max(Recovery.Amount) as Total_NonCash_Positive,
    Sum(NVL(Recovery_Detail.Fees_Taxes, 0) +
    NVL(Recovery_Detail.Admin_Taxes, 0)) as Total_NonCash_Tax_Positive
    From Settlement, Recovery, Recovery_detail
    Where Recovery.settlement_id = v_settlement_id
    And Settlement.Settlement_id = Recovery.Settlement_id
    and recovery.recovery_id = v_recovery_id /* SWL 07/01/04 59016 */
    And Recovery.Amount >= 0
    And Recovery.Recovery_id = Recovery_detail.Recovery_id(+)
    And Recovery.Recovery_Transaction_Internal in
    ('05', '50', '52', '51')
    -- Group by Recovery_Detail.Fees_Percent; /* SWL 04/01/04 52653 */
    Group by Recovery_Detail.recovery_id;
    CURSOR Recovery_Totals_Negative_Nc IS
    -- Select Sum(Recovery.Amount) as Total_NonCash_Negative, /* SWL 04/01/04 52653 */
    Select max(Recovery.Amount) as Total_NonCash_Negative,
    Sum(NVL(Recovery_Detail.Fees_Taxes, 0) +
    NVL(Recovery_Detail.Admin_Taxes, 0)) as Total_NonCash_Tax_Negative
    From Settlement, Recovery, Recovery_Detail
    Where Recovery.settlement_id = v_settlement_id
    And Settlement.Settlement_id = Recovery.Settlement_id
    and recovery.recovery_id = v_recovery_id /* SWL 07/01/04 59016 */
    And Recovery.Amount < 0
    And Recovery.Recovery_id = Recovery_detail.Recovery_id(+)
    And Recovery.Recovery_Transaction_Internal in
    ('05', '50', '52', '51')
    Group by Recovery_Detail.recovery_id;
    -- Group by Recovery_Detail.Fees_Percent; /* SWL 04/01/04 52653 */
    /* SWL 11/10/03 # 52743 */
    CURSOR Event_Client_Unit IS
    Select e.Client_Field_Data as Unit
    From Event_Client_Field e, recovery r
    Where r.Event_ID = e.Event_ID
    AND r.Recovery_ID = V_Recovery_ID
    AND e.Client_Field_Name = 'UNIT';
    CURSOR Bill_totals IS
    Select mv_billdetail_case_sum.sum_paid as TOTAL_MEDICAL
    From mv_billdetail_case_sum
    where mv_billdetail_case_sum.event_id = V_Event_ID;
    CURSOR NonCash_Fee IS
    Select NVL(Sum(Recovery.Amount), 0) as Total_NonCash_Fee
    From Settlement, Recovery
    Where Recovery.Recovery_ID = V_Recovery_ID
    And Settlement.Settlement_id = Recovery.Settlement_id
    And Recovery.
    Recovery_Transaction_Internal in ('05', '50', '52', '51');
    /* SWL 04/01/04 52653 */
    CURSOR Recovery_Totals IS
    Select round(avg(NVL(Recovery_Detail.Fees_Percent, 0) +
    NVL(Recovery_Detail.Admin_Percent, 0)),
    2) as Total_Fee_Percent,
    round(avg(NVL(Recovery_Detail.Fees_Percent, 0)), 2) as Subrogation_Fee_Percent,
    max(NVL(Recovery.Amount, 0)) as Recovery_Amount,
    Sum(NVL(Recovery_detail.Fees, 0) + NVL(Recovery_Detail.Admin, 0)) as Total_Fee,
    Sum(NVL(Recovery_Detail.Fees_Taxes, 0) +
    NVL(Recovery_Detail.Admin_Taxes, 0)) as Total_Tax,
    Sum(NVL(Recovery_Detail.Admin_Taxes, 0)) as Administrative_tax,
    Sum(NVL(Recovery_Detail.Admin, 0)) as Total_Admin_Fee
    From Settlement, Recovery, Recovery_Detail
    Where Recovery.Recovery_ID = V_Recovery_ID
    And Settlement.Settlement_id = Recovery.Settlement_id
    And Recovery.Recovery_id = Recovery_detail.Recovery_id(+)
    Group by Recovery_Detail.recovery_id;
    CURSOR Recovery_Totals_Positive IS
    /* Select Sum(Recovery.Amount) as Total_NonCash_Positive,
    Sum(NVL(Recovery_Detail.Fees_Taxes,0)+ NVL(Recovery_Detail.Admin_Taxes,0)) as Total_NonCash_Tax_Positive
    */ /* SWL 04/01/04 52653 */
    Select max(Recovery.Amount) as Total_NonCash_Positive,
    Sum(NVL(Recovery_Detail.Fees_Taxes, 0) +
    NVL(Recovery_Detail.Admin_Taxes, 0)) as Total_NonCash_Tax_Positive
    From Settlement, Recovery, Recovery_detail
    Where Recovery.Recovery_ID = V_Recovery_ID
    And Settlement.Settlement_id = Recovery.Settlement_id
    And Recovery.Amount >= 0
    And Recovery.Recovery_id = Recovery_detail.Recovery_id(+)
    And Recovery.Recovery_Transaction_Internal in ('04', '17', '15') /*SWL 10/05/04 #63919*/--*009* added 15
    Group by Recovery_Detail.recovery_id;
    -- Group by Recovery_Detail.Fees_Percent; /* SWL 04/01/04 52653 */
    CURSOR Recovery_NonFEE_Positive IS
    Select Sum(NVL(Recovery_Detail.Fees, 0) + NVL(Recovery_Detail.Admin, 0)) as Total_NonCash_Fee_Positive
    From Settlement, Recovery, Recovery_detail
    Where Recovery.Recovery_ID = V_Recovery_ID
    And Settlement.Settlement_id = Recovery.Settlement_id
    And Recovery.Amount >= 0
    And Recovery.Recovery_id = Recovery_detail.Recovery_id(+)
    And Recovery.Recovery_Transaction_Internal in
    ('05', '50', '52', '51')
    Group by Recovery_Detail.recovery_id;
    -- Group by Recovery_Detail.Fees_Percent; /* SWL 04/01/04 52653 */
    CURSOR Recovery_Totals_Negative IS
    /* Select Sum(Recovery.Amount) as Total_NonCash_Negative,*/ /* SWL 04/01/04 52653 */
    Select max(Recovery.Amount) as Total_NonCash_Negative,
    Sum(NVL(Recovery_Detail.Fees_Taxes, 0) +
    NVL(Recovery_Detail.Admin_Taxes, 0)) as Total_NonCash_Tax_Negative
    From Settlement, Recovery, Recovery_Detail
    Where Recovery.Recovery_ID = V_Recovery_ID
    And Settlement.Settlement_id = Recovery.Settlement_id
    And Recovery.Amount < 0
    And Recovery.Recovery_id = Recovery_detail.Recovery_id(+)
    And Recovery.Recovery_Transaction_Internal in ('04', '17', '15') /*SWL 10/05/04 #63919*/--*009* added 15
    Group by Recovery_Detail.recovery_id;
    -- Group by Recovery_Detail.Fees_Percent; /* SWL 04/01/04 52653 */
    CURSOR Recovery_NonFEE_Negative IS
    Select Sum(NVL(Recovery_Detail.Fees, 0) + NVL(Recovery_Detail.Admin, 0)) as Total_NonCash_Fee_Negative
    From Settlement, Recovery, Recovery_Detail
    Where Recovery.Recovery_ID = V_Recovery_ID
    And Settlement.Settlement_id = Recovery.Settlement_id
    And Recovery.Amount < 0
    And Recovery.Recovery_id = Recovery_detail.Recovery_id(+)
    And Recovery.Recovery_Transaction_Internal in
    ('05', '50', '52', '51')
    Group by Recovery_Detail.recovery_id;
    -- Group by Recovery_Detail.Fees_Percent; /* SWL 04/01/04 52653 */
    --This is a generic cursor which will be used to control the number of rows inserted into the recovery_activity table
    --There has to be 1 row inserted into the recovery_activity table for each detail record in the recovery_detail table.
    --However, if no recovery_detail record exists there will be only 1 insert into the recovery_activity table.
    CURSOR Control_Detail_Loop
    IS
    Select 1
    FROM Recovery,
    Recovery_Detail
    Where Recovery.Recovery_ID = Recovery_Detail.Recovery_ID(+)
    And Recovery.Recovery_ID = V_Recovery_ID;
    /* SWL 04/01/04 Commented since the only time there were more entries in rd for a recovery is when there is a split fees */
    /* accounting does not want this to be displayed in detail. They need this aggregated as a single fee entry so the recovery */
    /* activity table will now have a single entry corresponding to each recovery in the recovery table. (#52653) */
    CURSOR Control_Detail_Loop IS
    Select 1 FROM Recovery where Recovery.Recovery_ID = V_Recovery_ID;
    /* DJ 10/25/04 # 64633 start*/
    CURSOR Event_Client_Market IS
    Select e.Client_Field_Data as Market
    From Event_Client_Field e, recovery r
    Where r.Event_ID = e.Event_ID
    AND r.Recovery_ID = V_Recovery_ID
    AND e.Client_Field_Name = 'MARKET';
    /* DJ 10/25/04 # 64633 end*/
    v_cur_day integer := 0;
    -----dj
    v_vendor_fee_wh number;
    v_total_vendor_fee_wh number;
    v_rec_itc recovery_activity.recovery_transaction_internal%type;
    --v_settlement_id settlement.settlement_id%type;
    --*004* start
    function unbundled_fee(pevent_id event.event_id%type,
    plowdate date,
    phighdate date) return number is
    -- function variables
    v_fee number(18, 2) := 0;
    v_month_revenue unbundled_recoveries.monthly_revenue%type := 0;
    v_cum_revenue unbundled_recoveries.cum_revenue%type := 0;
    v_contract_fee_per unbundled_recoveries.contractual_fee_per%type := 0;
    v_prev_cum_revenue unbundled_recoveries.cum_revenue%type := 0;
    v_cum_ub_rec unbundled_recoveries.cum_ub_recoveries%type := 0;
    v_cum_inv_paid unbundled_recoveries.cum_inv_paid%type := 0;
    v_month_rec unbundled_recoveries.monthly_recoveries%type := 0;
    v_cum_rec unbundled_recoveries.cum_recoveries%type := 0;
    v_event_id event.event_id%type;
    begin
    --v_month_rec and v_cum_inv_paid
    begin
    select event_id,
    (select sum(r.amount)
    from recovery r
    where r.event_id = e.event_id
    and trunc(r.recovery_date) between plowdate and phighdate) as monthly_recoveries,
    -- *006* added cum_rec
    (select nvl(sum(r.amount), 0)
    from recovery r
    where r.event_id = e.event_id
    and trunc(r.recovery_date) <= trunc(phighdate)) as cum_recoveries,
    (select sum(decode(nvl(ex.client_invoice_closed, 'N'),
    'N',
    ex.paid_amount,
    ex.client_invoice_received))
    from expense ex
    where ex.event_id = e.event_id
    and upper(ex.status) = 'PAID'
    and trunc(ex.check_date) <= phighdate
    and trim(ex.orig_client_invoice_date) is not null
    and nvl(ex.client_invoice_dispute, 'Y') = 'N') as cum_invoiced_paid
    into v_event_id, v_month_rec, v_cum_rec, v_cum_inv_paid
    from event e
    where e.event_id = pevent_id;
    exception
    when no_data_found then
    v_event_id := 0;
    v_month_rec := 0;
    v_cum_rec := 0;
    v_cum_inv_paid := 0;
    when others then
    v_event_id := 0;
    v_month_rec := 0;
    v_cum_rec := 0;
    v_cum_inv_paid := 0;
    end;
    -- *007* start
    -- if event previously written to table, get values from table
    begin
    select nvl(ub.cum_revenue, 0)
    into v_prev_cum_revenue
    from unbundled_recoveries ub
    where ub.event_id = pevent_id
    and ub.month_id =
    (select max(a.month_id)
    from unbundled_recoveries a
    where a.event_id = pevent_id
    and a.month_id < to_char(v_lowdate, 'YYYYMM'));
    exception
    when no_data_found then
    v_prev_cum_revenue := 0;
    when others then
    v_prev_cum_revenue := 0;
    end;
    -- *007* end
    --v_contract_fee_per
    begin
    select nvl(max(rd.fees_percent), 0)
    into v_contract_fee_per
    from recovery_detail rd
    where rd.recovery_id in
    (select r.recovery_id
    from recovery r,
    (select a.event_id, max(amount) as amount
    from recovery a
    where a.event_id = pevent_id
    and trunc(a.recovery_date) between plowdate and
    phighdate
    group by a.event_id) max_r
    where r.event_id = max_r.event_id
    and trunc(r.recovery_date) between plowdate and phighdate
    and r.amount = max_r.amount);
    exception
    when no_data_found then
    v_contract_fee_per := 0;
    when others then
    v_contract_fee_per := 0;
    end;
    v_cum_ub_rec := nvl(v_cum_rec, 0) - nvl(v_cum_inv_paid, 0);
    if ((nvl(v_cum_ub_rec, 0) > 0) and (nvl(v_month_rec, 0) <> 0)) then
    -- latest cumulative unbundled recoveries > 0
    v_cum_revenue := round(((v_contract_fee_per / 100) * v_cum_ub_rec),
    2);
    v_month_revenue := v_cum_revenue - v_prev_cum_revenue;
    end if;
    v_fee := v_month_revenue;
    return v_fee;
    exception
    when others then
    raise_application_error(-20106,
    substr('populate_recovery_activity.undebundled_fee: ' ||
    Sqlcode || Sqlerrm,
    1,
    500));
    return v_fee;
    end;

  • Help with Setting Previous Month Date Parameter for SSAS via SSRS

    Hi All,
    Firstly, any assitance is greatly appreciated.
    Now, I am working on developing a report for a business area that will be sent on the first of every month. The report will contain data for all records created in the previous month, current year.
    I have been able to successfully implement a default year parameter, which will default to current year-
    ="[REFERRAL LODGEMENT DATE].[CAL YEAR].&["+CSTR(Year(Today))+"]". However, when I attempt to set a previous month paramater it is not setting when the report is generated. The code I have used
    is as follows: 
    ="[REFERRAL LODGEMENT DATE].[CAL MONTH NAME].&["+CSTR(Month(Today)-1)+"]"
    Cheers

    Before you spend more time trying to fix the parameter, let me suggest that you can write MDX to come up previous month data.
    if you can't go that route, couple of things to consider for your approach:
    1) don't subtract 1 from January that won't work. you'll need to handle it using the ssrs expression.
    2) when you use the month function it's going to return a month index so effectively you are passing something like [REFERRAL LODGEMENT DATE].[CAL MONTH NAME].&[7] to SSAS, is that the current format?
    you can use the MonthName function to get month names but again make sure that the formatting is right.
    to see the parameter value, you can display it on the ssrs report and see if it's the right format.
    Paras Doshi (Blog: ParasDoshi.com | Twitter:
    @Paras_Doshi )

  • Month day display in matrix report

    in matrix report date field convert into day and it is as row filed if any day of month data not found but it display all 30 days in matrix report.

    try this query
    select rownum as run_num,to_date('01-' || :A_MONTH || '-' || :A_YEAR,'dd/mm/yyyy')+ (rownum-1) CV from
    (select 1 from dual group by cube (1,1,1,1,1))

  • Creation of a Query to show the values for the current month and the last 12 months data.

    Dear All,
    Good day!
    I have to create a Query with the below requirement.
    I have to create a Query to show the values for the current month and the last 12 months data.
    Can you please guide me how to achieve this ??
    thank you,
    Regards,
    Hema

    Hema
    explain the exact problem..? as you mentioned you want to create query to show values for current month and last 12 months.. so I think you want to show values for 12 months from current data.. you can achive this by multiple way..
    you can have selection screen and field with date .. and restrict based on system current date and 12 months before or you can handle this at your target.. .. I mean there are multiple ways to restrict data by date range..
    for some more hints..
    http://www.forumtopics.com/busobj/viewtopic.php?t=34393&sid=7fba465d0463bf7ff5ec46c128754ed6
    http://businessintelligence.ittoolbox.com/groups/technical-functional/cognos8-l/how-to-display-last-12-months-in-report-based-on-todays-date-3231850
    http://scn.sap.com/thread/3217381
    search on SDN you will get many other ways..
    Thanks,
    Bhupesh

  • Video Playback in synchroniz​ation to data display

    I've read a bunch of topics about recording live video, but my question has to do with playback synchronized to a data display.  I've got a simple black and white camera (RS170) already.  I'm going to get some sort of capture board.  I want to record video from this camera to the hard drive.  The reason is that this video file needs to be analyzed later so I need to store it on disk instead of memory as it could be days later.  While I'm recording video, another signal needs to be recorded.  It could be anything really, let us say temperature for discussion.  Assume everything is in place for this temp. acquisition. 
    Recording video to disk doesn't seem to be any problem.  My question relates to playing this video back such that when you play it, you can also look at a data display of the recorded temperatures that happened at the same time as the video was recorded.  If you were to drag the video slider manually (instead of just pressing play), the data display would also update accordingly.  This essentially syncs the data display of temperature with the video picture you are seeing.  Pressing play and just watching the video, the temp data would update itself with the correct historical values.  Pressing pause on the video, would of course freeze the temp display to the value at that time.  Wherever the video is, the temp data would have to display the correct historical value.
    I would need to record possibly a few hours of video a day so disk space could be an issue if using uncompressed AVI format.  I wouldn't have to save every days video file so I could eventually delete a bunch of the files.  I'd just save the days video that produces interesting results to examine later.  A number of video files might build up (a months worth?) before the directory is examined for possible deletes.  I'd like some feedback on this too from someone who has tried uncompressed AVI versus something else that is compressed.  Is performance OK if using compression? 
    The computer I'd be running this on is the latest workstation class machine from HP so it is a fairly powerful computer.
    Is there any sample code of doing this video playback indexing to data signal display?  I'm thinking there would have to be some function to know where the video is playing at all times and then historically retrieve the temperature data.  Is there performance issues with this?  I'd want it fairly accurate such that the smallest increment of a video frame (say 30 times a second) produced a proper data display for temperature.  In reality, my signal will change faster than a typical temperature value would.

    I doubt this will satisfy 100% of what you're looking for, but it should at least get the conversation started on developing some techniques we can use to syncronize acquired data playback (again, let's say temperature) with some external source. I don't know much about video playback, so I won't be able to help you much there, but I do know a lot about leveraging LabVIEW technology to play back data in real-time as best possible, while allowing the user (or the video playback itself) to dictate a specific position at any time, pause, etc...
    My first recommendation would be to save your acquired temperature data as a Waveform. Waveform is more or less like a cluster with three elements: a 1D array of Y-values, an intial time (t0), and the time between samples (dt). You can use these three pieces of information to reconstitute when each sample was acquired and what the timing should be configured for to play these samples back in real time. Search the web for information on writing Waveforms to file and reading them. You should find plenty there (or post somewhere else ).
    After that, we can use a Timed Loop for playback. Timed Loops allow you to set a desired Loop period. They also have a lot of other capabilities, such as setting priorities, handling the fact that your last loop didn't finish on time, etc. Here's a link with more info on Timed Loops. Other than that, Timed Loops can operate like regular while loops.
    My next idea is to incorporate a current position that we keep track of. This could be, for instance, the index of the current element in the 1D Y-values array. If you want this to involve user interaction with the front panel (for instance, changing a Slider value to reflect the playback position), then you could use an event structure with a timeout case set to zero. Then update the temperature value and increment the current position in the timeout case.
    You might take a look at the example I've written in LabVIEW 7.1 that "acquires" 5 seconds of sine wave data and plays it back in real time. The user can adjust the position or pause the playback at any time. Again, I don't know exactly how this would interface with video feedback. If you have more specifics about what method you will use to playback the video, maybe someone with more expertise in this area could help us out.
    Jarrod S.
    National Instruments
    Attachments:
    Signal_Playback_Realtime.vi ‏223 KB

  • Need to show Previous months data in report

    Hi All,
    I have a crystal report 2011 which shows monthly Cash data. It has 3 other columns like Previous 3 months cash data, previous 6 months cash data, Previous 12 months cash data in report.
    My report also has two parameters- start date and end date. If I give Start date as 1/1/2012 and end date as 12/31/2013 (two years date range) then correct data comes in all columns and for 2013 year, correct data is coming for Previous 12 months column. But if I give only one month date range like start date as 1/1/2013 and end date as 01/31/2013, then it is not showing correct data for these 3 columns - Previous 3 months cash data, previous 6 months cash data, Previous 12 months cash data. Ideally as per requirement, it should calculate previous months data regardless of parameter values and put data in respective columns.
    Any help/suggestion? Any trick which can help me to show correct data in all columns no matter what date range or months I am taking in parameters.
    Is it mandatory to have previous 12 Months data in report to calculate column-Previous 12 months Cash data?
    Thanks,
    Remi

    Hi Remi,
    You can try like this:
    I have given a some suggestions i.e You just take one parameter only because u can imagine 3 columns previous data display correctly i.e From Date
    Month parameter is also a alternate option.
    For Ex: Column1: From Date - 90 Days/3 Months  - we get the three months previous data correctly etc.
    Finally, create a stored procedure that returns the required columns and does all the calculations on the database side.
    Follow abhilash suggestion as well.
    Useful threads: Crystal Report Parameter Issue
    Pull Last 6 months of data
    Month to date data for Previous month
    How to find current month, previous month Net Sales by means of formula?
    Thanks,
    DJ

  • Want date displayed with time on the top banner

    Want date displayed with time on the top banner
    On the top banner, I see signal, network, wifi, time, alarm, Bluetooth and battery. I want to see date and month and year too. How?

    There isn't a way to display the date in a banner..  BUT - The calendar icon does display the date and day. 
    HTH

  • Current & Previous month data based on condition

    Hi All,
             Thanks in advance.
    I have some problem in reporting......
            I have to display curr and pre months data .
    If i give fiscal period as 009.2006 i should display no of contracts for 1_90 , 90_180 based on last adjustment date .
    No.of contracts for  <b>last day</b> of given period- <b><b>last adjustment date</b> <=90 .
    Like i should display for given period and previous period.
    If given period is 009.2006 .last day of this month is 31/12/2005.
    like last day for previous period is 30/12/2005.
    Thanks & Regards,
    Sarada .<b></b><b></b>

    Hi Eugene,
               Here is the code..
    WHEN 'LDAT_PRV'.        " Get last day from the given period.
    IF I_STEP = 2.
        REFRESH E_T_RANGE. CLEAR E_T_RANGE.
        LOOP AT I_T_VAR_RANGE INTO TEST WHERE
          VNAM = 'PRV_PER' and IOBJNM = '0FISCPER'. "Contract Enddt
    CONDENSE TEST-LOW.
        V_GJAHR = TEST-LOW+0(4).
        V_BUPER = TEST-LOW+4(3).
    call function 'LAST_DAY_IN_PERIOD_GET'
           EXPORTING
            I_GJAHR = V_GJAHR
            I_PERIV = 'T1'
            I_POPER = V_BUPER
           IMPORTING
            E_DATE = ENDDT.
    IF SY-SUBRC <> 0.
           MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ELSE.
           CLEAR LS_RA_SID.
           LS_RA_SID-SIGN = 'I'.
           LS_RA_SID-OPT = 'EQ'.
          LS_RA_SID-LOW = ENDDT.
          APPEND LS_RA_SID TO E_T_RANGE.
          EXIT.
       ENDIF.
            EXIT.
        ENDLOOP.
      ENDIF.
    Like i have created for one more variable for given period.
    I need last dates for the given and previous periods....
    Best Regards,
    Shradda

  • Dynamic date display as a heading in module pool

    Dynamic date display as a heading in module pool from a ztable
    the ZTABLE contain the date from which the date value is to be printed as a heading like
    "BILLING FOR THE MONTH OF MAY 2010 WILL BE CLOSED ON 26/05/2010"
    thanks,
    Sree

    Hi Sreekanth,
    Simply follow below steps:
    1. Create a Input/Output field in screen layout.
    2. Double click on it and 'Attributes' window will get opened.
    3. Give a 'Name' to it (Ex: Text) and under 'Display' tab, tick 2D display and As label on left
    4. Save and Activate.
    5. In PBO, use below code,
    MODULE status_2000 OUTPUT.
      SET PF-STATUS 'DEMO'.        " PF status
      DATA: l_f_date TYPE sy-datum.
      SELECT SINGLE zdate FROM ztable  INTO l_f_date.         " Select Date from ur ZTABLE
      text = 'BILLING FOR THE MONTH OF MAY 2010 WILL BE CLOSED ON'.
      CONCATENATE text l_f_date INTO text SEPARATED BY spce.
    ENDMODULE.                 " STATUS_2000  OUTPUT
    6. In TOP include,
    DATA:  TEXT type string.     " Same name given to  Input/Output field in screen layout.
    7. Save & Activate.
    Thanks..

  • Monthly Income Display

    Hi,
    I have created two structures...
    In the first structure -- Variables defined for Month, YTD Month
    and Previous year
    Second structure -- Income etc..Key figures defined
    Now I am unable to get particular month data...
    My Report format:
               (Sep 2007) (Sep 2006) (YTD - 2007) (YTD 2006) : 2006
    Income          
    All Kfs
    But Income for Oct will be considered for Sept + Oct..
    Now i want the result of Income has to display only particular month (ex..Say Oct means only Oct)..
    Here instead of particular month it is automatically considering cumulative..
    Please suggest me...
    Help will be greatly appreciated...
    This is urgent...........
    Edited by: venkat R D on Dec 24, 2007 3:23 PM

    Thanks for your information...
    I am using 0FIGL_1 InfoCube..
    and i have loaded only Sep 2007, Oct 2007 and Nov 2007 Data from R/3 Production to BW Development for testing purpose..
    So, August not possible...
    While selecting Income GL's --- I have considered Key figure -- cumulative Balance....
    Could you suggest me ...How to proceed..
    I did not use any customer exits...
    I want to display only particular month data ...
    Help will be greatly appreciatede...
    This is veru urgent...
    Thanks in advance for your help....

  • Why can't I set month,date and time on my imessage?

    Why can't I set month, date and time on my imessage?

    The way the date/time was displayed was changed in iOS7. There had been numerous complaints about not having a date/time stamp on all posts, so it was changed to display the time for all by sliding the post to the left. They left the date stamp to show differently. I couldn't tell you what it does for posts more than a week old, as I never save my messages that long.
    Meg's post provides for software where you could move the SMS to the computer and it should contain a full date/time stamp on it.

  • [10.7 OR 11] AP INVOICE 에서 GL DATE DISPLAY에 대한 요약

    제품 : FIN_AP
    작성날짜 : 2003-05-13
    [10.7 OR 11] AP INVOICE 에서 GL DATE DISPLAY에 대한 요약
    ===================================================
    PURPOSE
    In Oracle Payables Release 10.7 or 11:
    Oracle Payables에서 invoice를 입력한 후 해당 period가 마감된 후
    보여지는 gl date가 달라지는 현상에 대한 이해.
    Explanation
    10.7 이나 11에서 invoice header에서 보여지는 GL date는 db 값이
    아니라 display value이다. 즉 조회될때마다 options에 맞추어 계산된
    값을 가져온다.
    정확한 gl date는 ap_invoice_distributions_all.accounting_date를 참조
    하면 된다.
    Payables Option에서 GL Date Basis (Setup->Options->Payables, Invoice
    region)를 보면 아래와 같이 invoice/system중에 하나로 되어있다.
    1) the GL Date Basis field = "Invoice":
    Payables는 GL date 를 invoice date로부터 가져온다. 그러나 해당월이
    마감된 경우는 열려있는 월의 첫째날로 Setting된다.
    2) the GL Date Basis = "System":
    Payables는 항상 GL Date를 오늘(sysdate)로 setting 한다.
    Example
    Oracle Payables에서 invoice를 입력한 후 해당 period가 마감된 후
    보여지는 gl date가 system month의 첫날(ex: 01-MAY-03)로 setting됨.
    Reference Documents
    Note 1061432.6

    If the last_update_date is not updated when another column in the table is updated, it is most likely a bug in EBS.
    You should search metalink for a patch or raise an SR to obtain one.
    Hope this helps,
    Sandeep Gandhi

Maybe you are looking for

  • N86 bluetooth connection to HP 8350w elite book la...

    I am unable to connect n86 to HP 8350w elite book laptop. Windows vista (64) keeps asking for device driver, Have tried downloading appropriate *.inf files from Nokia, they do not run/install, just open as*.txt files. Vista does not find them. How do

  • Configuration of SMD on SOLMAN 4.0 (SP-13)

    Hi Guru's, I have given a task to implement EWA for JAVA/Portal systems, therefore, I have to configure Soman Diagnostics. I really need help configuring SMD. So far I have understood that I have to install SMD and Wily Introscope Ent..Server.... whe

  • Thanks so much! 32 bit version seems just fixed

    I just installed 9.2 on another 32 bit machine hoping to get at least one of my machines operating with itunes properly - all went fine. The versions are the same but the byte count is way different. No errors - awaiting the 64 bit version which I ho

  • Whats the best website domain for a mac?

    Hi, i have a small business for cosmetic products, i also own a "mac bookpro", i would like to know what will be a good domain for my new website??? i have read too many reviews and im not sure what to choose. does apple has a program that i can use

  • MTP check box when cme integrates with ccm

    I am reading a document abour cme and ccm integration.The following step indicates that we need to check MTP. Step 3 Ensure that the CiscoCallManager network uses a media termination point (MTP). The MTP is required to provide DSP resources for trans