Issue with referencing Presentation variables(Date cols) in Case statement

Hi,
I m trying to reference presentation variables created on a Date column in the case statement of one of the request's columns as shown below:
case when "- Quote Details"."Creation Date" between '@{from}{1999-1-1}' and '@{until}{2999-1-1}' then "- Quote Metrics"."# of Quotes" end
I m getting a view display error with the below error message:
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 1861, message: ORA-01861: literal does not match format string at OCI call OCIStmtExecute
SQL Issued: SELECT "- Quote Types"."Level2 Name" saw_0, case when "- Quote Details"."Creation Date" between '4/1/2009' and '4/15/2009' then "- Quote Metrics"."# of Quotes" end saw_1 FROM "(Unity) Quotes Catalog" WHERE "- Quote Details"."Creation Date" BETWEEN timestamp '2009-04-01 00:00:00' AND timestamp '2009-04-15 00:00:00' ORDER BY saw_0
When I created the prompt on the date field I put the following formula in the prompt:
cast("- Time".Day as DATE)
When I apply a filter on the request using these variables it works fine.
If anyone has faced this kind of issue earlier and have a resolution, please help me out.
Thanks,
Kartik

Thanks Goran!!
I've created prompts by selecting columns from the logical tables (i.e. I've selected 2 different cols of datatype DATE...inorder to assign 2 presentation variables).
Yes I m using calendar widget for prompts.
I haven't included any filter in my report. I m trying to display a metric when it satisfies the case statement.
I will defintley go through the blogs you mentioned for better understanding.
Thanks,
Kartik
Query fired on physical db:
WITH
SAWITH0 AS (select D1.c1 as c1,
D1.c2 as c2,
D1.c3 as c3,
D1.c4 as c4,
D1.c5 as c5
from
(select T192898.QLS_FIRST_ACAP_DT as c1,
TO_DATE('3/2/2009','mm/dd/yyyy') as c2,
TO_DATE('4/29/2009','mm/dd/yyyy') as c3,
T188666.LEVEL2_NAME as c4,
T188666.ID as c5,
ROW_NUMBER() OVER (PARTITION BY T188666.ID, T192898.QLS_FIRST_ACAP_DT ORDER BY T188666.ID ASC, T192898.QLS_FIRST_ACAP_DT ASC) as c6
from
XXSLS_GBL_QTE_TYPES_V T188666,
XXSLS_GBL_QTE_DTL_F T192898
where ( T188666.ID = T192898.QUOTE_TYPE_ID )
) D1
where ( D1.c6 = 1 ) ),
SAWITH1 AS (select D1.c1 as c1,
D1.c2 as c2,
D1.c3 as c3
from
(select count(distinct T192898.QUOTE_HEADER_ID) as c1,
T188666.LEVEL2_NAME as c2,
T188666.ID as c3,
ROW_NUMBER() OVER (PARTITION BY T188666.ID ORDER BY T188666.ID ASC) as c4
from
XXSLS_GBL_QTE_TYPES_V T188666,
XXSLS_GBL_QTE_DTL_F T192898
where ( T188666.ID = T192898.QUOTE_TYPE_ID )
group by T188666.ID, T188666.LEVEL2_NAME
) D1
where ( D1.c4 = 1 ) ),
SAWITH2 AS (select D1.c1 as c1,
D1.c2 as c2,
D1.c3 as c3
from
(select case when SAWITH1.c2 is not null then SAWITH1.c2 when SAWITH0.c4 is not null then SAWITH0.c4 end as c1,
case when SAWITH0.c1 between SAWITH0.c2 and SAWITH0.c3 then SAWITH1.c1 else NULL end as c2,
case when SAWITH0.c5 is not null then SAWITH0.c5 when SAWITH1.c3 is not null then SAWITH1.c3 end as c3,
ROW_NUMBER() OVER (PARTITION BY case when SAWITH0.c5 is not null then SAWITH0.c5 when SAWITH1.c3 is not null then SAWITH1.c3 end , case when SAWITH1.c2 is not null then SAWITH1.c2 when SAWITH0.c4 is not null then SAWITH0.c4 end ORDER BY case when SAWITH0.c5 is not null then SAWITH0.c5 when SAWITH1.c3 is not null then SAWITH1.c3 end ASC, case when SAWITH1.c2 is not null then SAWITH1.c2 when SAWITH0.c4 is not null then SAWITH0.c4 end ASC) as c4
from
SAWITH0 full outer join SAWITH1 On SAWITH0.c5 = SAWITH1.c3
) D1
where ( D1.c4 = 1 ) )
select SAWITH2.c1 as c1,
SAWITH2.c2 as c2
from
SAWITH2
order by c1

Similar Messages

  • Issue in using presentation variable as filter condition in the reports

    Hi,
    I have an issue in using presentation variable as filter condition in my reports the details are as follows:
    Details :
    We want to implement the Max and Min variables through Presentation variables only.we do not want to implement it through session variables in this case.
    We have two variables MIN and MAX to be used as Presentation Variables,for a column of the report (which is a quantity),so that the user wants to see the data for this column within a particular range.i.e the Min and the Max.This part has been implemented well . The issue is when the user wants to see the full data.In that case we will not pass any values to these two Presentation Variable or in other words we are not restricting the report data so we are not passing any value to the variables,this is when the report is throwing the error. we want to leave this variables blank in that case.but this is giving error.
    Please suggest how can I overcome this issue.
    Thanks in Advance.
    Regards,
    Praveen

    i think you have to use guided navigation for this. create two reports first is the one you are having currently and second is the one in which remove the presentation variable from the column formula. i.e. the same report with no aggregation applied.
    Now create a dummy report and make it return value only when the presentation variable value is not equal to max or min. guide the report to navigate between the first and second report based on the result of the dummy report.

  • Presentation variable(Date) in German Format

    Hi,
    I like to know whether it is possible to use date(prompt) in German format.
    e.g., We need to filter out the date(06.01.2009) which is given in Dashboard prompt as a Presentation variable.
    The date which we have given in prompt should be accessed by reports to perform some calculations and return back the calculation values.
    As we have tried the presentation variable(date) in US Format,it is working fine.
    Regards,
    Sakthi

    Hi kishore,
    I am not clear with the above mentioned forum link.
    We are using presentation variable for dynamic calculations inside the report.
    Suppose if we are giving date for dynamic calculation,as far as we are using this format (01.Jan.09) and convert the above format in required as used for calculations.
    The problem comes when german date format(01.Dez.2008) is given in prompt,it will throw an error.
    Because both German and US will have January & Januar Jan(First 3 letters as same) but when it comes for some months like December(Dezember(German)),we cannot convert into required format.
    Is there any solution for the above issue.

  • How can I pass a Presentation Variable (Date) into a prompt

    Hello
    How can I pass a Presentation Variable (date) into a prompt? I seem to be able to do this successfully for a non-date value but have had no luck with a Date variable.
    Here's a simplistic version of what I'm trying to do:
    1. I have a Presentation Variable called startDate which is a Date that defaults to this SQL - SELECT "Reporting Dates"."Measure Date" FROM Trading WHERE "Reporting Dates"."Date Name" = 'Current'.
    2. I now want to pass this variable into a prompt with SQL like this: SELECT "Position Date"."Position Date" FROM Trading where "Position Date"."Position Date" = date'@{startDate}{2009-04-24}'
    I get this error: Datetime value @{startDate}{2009-04-24} from @{startDate}{2009-04-24} does not match the specified format.
    Now I can use the exact same syntax in a filter. For example, a simple Answers request where I pick Position Date with a filter saying "Position Date"."Position Date" = date'@{startDate}{2009-04-24}' works fine.
    What am I doing wrong?
    Thanks!

    Can you provide more information please?
    1. What is the format of the first date prompt, is it YYYY-MM-DD or?
    2. Which data type is Position Date."Position Date" in the physical layer, date or date time?
    3. What is the column formula in the first prompt?
    4. The first prompt is set to drop-down or?
    5. If you are using this SQL Results in the second prompt:
    SELECT "Position Date"."Position Date" FROM Trading where "Position Date"."Position Date" = date '@{startDate}{2009-04-24}'
    then @{startDate} must be in YYYY-MM-DD format to work properly, otherwise (for example):
    datetime value 01/01/2000 from 01/01/2000 does not match the specified format.
    This doesn't work for example:
    SELECT Times.time_id FROM "Normal model" where Times.time_id =date '01/01/2000'
    Regards
    Goran
    http://108obiee.blogspot.com

  • Issue with Oracle LONG RAW data type

    Hi All,
    I am facing some issues with Oracle LONG RAW DATA Type.
    We are using Oracle 9IR2 Database.
    I got a table having LONG RAW column and I need to transfer the same into another table having LONG RAW column.
    When I tried using INSERT INTO SELECT * command (or) CREATE TABLE as select * , it is throwing ORA-00997: illegal use of LONG datatype.
    I have gone through some docs and found we should not use LONG RAW using these operations.
    So I did some basic PLSQL block given below and I was able to insert most of the records. But records where the LONG RAW file is like 7O kb, the inserting is faliling.
    I tried to convert LONG RAW to BLOB and again for the record where the LONG RAW is big in size I am getting (ORA-06502: PL/SQL: numeric or value error) error.
    Appreciate if anyone can help me out here.
    DECLARE
    Y LONG RAW;
    BEGIN
    FOR REC IN (SELECT * FROM TRU_INT.TERRITORY WHERE TERRITORYSEQ=488480 ORDER BY TERRITORYSEQ ) LOOP
    INSERT INTO TRU_CMP.TERRITORY
    BUSINESSUNITSEQ, COMPELEMENTLIFETIMEID, COMPONENTIMAGE, DESCRIPTION, ENDPERIOD, GENERATION, NAME, STARTPERIOD, TERRITORYSEQ
    VALUES
    REC.BUSINESSUNITSEQ, REC.COMPELEMENTLIFETIMEID, REC.COMPONENTIMAGE, REC.DESCRIPTION, REC.ENDPERIOD, REC.GENERATION, REC.NAME,
    REC.STARTPERIOD, REC.TERRITORYSEQ
    END LOOP;
    END;
    /

    Maddy wrote:
    Hi All,
    I am facing some issues with Oracle LONG RAW DATA Type.
    We are using Oracle 9IR2 Database.
    I got a table having LONG RAW column and I need to transfer the same into another table having LONG RAW column.
    When I tried using INSERT INTO SELECT * command (or) CREATE TABLE as select * , it is throwing ORA-00997: illegal use of LONG datatype.
    I have gone through some docs and found we should not use LONG RAW using these operations.
    So I did some basic PLSQL block given below and I was able to insert most of the records. But records where the LONG RAW file is like 7O kb, the inserting is faliling.
    I tried to convert LONG RAW to BLOB and again for the record where the LONG RAW is big in size I am getting (ORA-06502: PL/SQL: numeric or value error) error.
    Appreciate if anyone can help me out here.
    DECLARE
    Y LONG RAW;
    BEGIN
    FOR REC IN (SELECT * FROM TRU_INT.TERRITORY WHERE TERRITORYSEQ=488480 ORDER BY TERRITORYSEQ ) LOOP
    INSERT INTO TRU_CMP.TERRITORY
    BUSINESSUNITSEQ, COMPELEMENTLIFETIMEID, COMPONENTIMAGE, DESCRIPTION, ENDPERIOD, GENERATION, NAME, STARTPERIOD, TERRITORYSEQ
    VALUES
    REC.BUSINESSUNITSEQ, REC.COMPELEMENTLIFETIMEID, REC.COMPONENTIMAGE, REC.DESCRIPTION, REC.ENDPERIOD, REC.GENERATION, REC.NAME,
    REC.STARTPERIOD, REC.TERRITORYSEQ
    END LOOP;
    END;
    /below might work
    12:06:23 SQL> help copy
    COPY
    Copies data from a query to a table in the same or another
    database. COPY supports CHAR, DATE, LONG, NUMBER and VARCHAR2.
    COPY {FROM database | TO database | FROM database TO database}
                {APPEND|CREATE|INSERT|REPLACE} destination_table
                [(column, column, column, ...)] USING query
    where database has the following syntax:
         username[/password]@connect_identifier

  • We are not able to pass the presentation variables(date & Date1) to the det

    Hi,
    We have followed the below link to use the date between prompt and passed the presentation variables in the filter condition of the report criteria.
    http://obiee101.blogspot.com/2009/03/obiee-between-dates-prompt.html
    But we are not able to pass the presentation variables(date & Date1) to the detail report.
    Any suggestions are highly appreciated.
    Thanks in Advance
    Siva.

    Yes,I think it wont pass the parameters from one parent report to child report.one thing you can do is put the detailed report on a page in the same dashboard as that of prompt.Put the same between condition on that report also.Give navigation link to this page instead of report.You can hide this page as well so that it will be available only on navigation.
    i have not tried it.Give it a try.
    Regards,
    Sandeep

  • FR Studio - Is there a workaround for the issue with referencing data from a grid with a different DB connection and different # of dimensions?

    Hi,
    I am trying to reference a column in a different grid with a different database connection. I did some research in the forums, and it seems like this is a known issue with FR Studio. The issue is that if the 2 different database connections have different # of dimensions, then the reference will throw an error.
    For example, what I'm trying to do is below:
    In grid2.column[A], I have the following formula:
    grid1.column[A]
    The result is an error.
    The ultimate goal is to have a basic variance formula in the grid between grid1 and grid2, which have different database connections with a different # of dimensions. Is there a workaround at all to this bug? The example of the basic formula is below:
    grid1.column[A] - grid2.column[A] 
    Any help is much appreciated!
    Thanks,
    Tiffany

    Thanks for the detailed response Mike.
    The issue with trying it in Grid1 vs Grid2 is that Grid1's DB connection has more dimensions than Grid2's DB connection. I can't change the DB connection to a database with more dimensions because you have to be able to map all dimensions from the existing DB connection  (Grid1) to the new DB connection (Grid2). This isn't possible, so instead I have to map Grid2 (less dimensions) to Grid1 (more dimensions). It just ignores the extra dimensions from Grid1. Does that make sense?
    Thanks again for your responses. It's very much appreciated.
    Tiffany

  • Performance issues with query input variable selection in ODS

    Hi everyone
    We've upgraded from BW 3.0B to NW04s BI using SP12.
    There is a problem encountered with input variable selection. This happens regardless of using BEx (new or old 3.x) or using RSRT. When using the F4 search help (or "Select from list" in BEx context) to list possible values, this takes forever for large ODS (containing millions of records).
    Using ST01 and SM50 to trace the code in the same query, we see a difference here:
    <u>NW04s BI SQL command</u>
    SELECT                                                                               
    "P0000"."COMP_CODE" AS "0000000032" ,"T0000"."TXTMD" AS "0000000032_TXTMD"                             
    FROM                                                                               
    ( "/BI0/PCOMP_CODE" "P0000" ) LEFT OUTER JOIN "/BI0/TCOMP_CODE" "T0000" ON  "P0000"."COMP_CODE" = "T0000
      "."COMP_CODE"                                                                               
    WHERE                                                                               
    "P0000"."OBJVERS" = 'A' AND "P0000"."COMP_CODE" IN ( SELECT "O"."COMP_CODE" AS "KEY" FROM              
      "/BI0/APY_PP_C100" "O" )                                                                               
    ORDER BY                                                                               
    "P0000"."COMP_CODE" ASC#                                                                               
    <u>BW 3.0B SQL command:</u>
    SELECT ROWNUM < 500 ....
    In 3.0B, rownum is limited to 500 and this results in a speedy, though limited query. In the new NW04s BI, this renders the selection screen unusable as ABAP dumps for timing out will occur first due to the large data volume searched using sequential read.
    It will not be feasible to create indexes for every single query selection parameter (issues with oerformance when loading, space required etc.). Is there a reason why SAP seems have fallen back on a less effective code for this?
    I have tried to change the number of selected rows to <500 in BEx settings but one must reach a responsive screen in order to get to that setting and it is not always possible or saved for the next run.
    Anyone with similar experience or can provide help on this?

    here is a reason why the F4 help on ODS was faster in BW 3.x.
    In BW 3.x the ODS did not support the read mode "Only values in
    InfoProvider". So If I compare the different SQL statements I propose
    to change the F4 mode in the InfoProvider specific properties to
    "About master data". This is the fastest F4 mode.
    As an alternative you can define indexes on your ODS to speed up F4.
    So would need a non-unique index on InfoObject 0COMP_CODE in your ODS
    Check below for insights
    https://forums.sdn.sap.com/click.jspa?searchID=6224682&messageID=2841493
    Hope it Helps
    Chetan
    @CP..

  • CSV creation through PLSQL having issue with some rows of data

    Hi,
    having issue with in some rows of data which is created by the PLSQL code.
    Issue description
    - 50000 rows of data in my CSV
    -around 20 fileds in a row
    - in some the row (in 50000 rows) some fields (20 rows of data) are returning empty as result but actually my query returns data for these fields
    Hope the issue is clear
    Code given below
    CREATE OR REPLACE FUNCTION TSC_OM_AUDIT(ERR_DESC IN OUT VARCHAR2,
    WEB_FILE_URL IN OUT VARCHAR2 ) RETURN BOOLEAN IS
    --Variable Declaration
    L_buff_line VARCHAR2(500);
    L_hdr_str VARCHAR2(32700);
    L_selling_UOM VARCHAR2(5);
    L_prim_bar_code VARCHAR2(30);
    L_status_pri_bar VARCHAR2(2);
    L_multpl_bar_exist VARCHAR2(2);
    L_multpl_prim_bar_exist VARCHAR2(2);
    L_prim_simp_pack VARCHAR2(30);
    L_staus_prim_simp_pack VARCHAR2(2);
    L_mupl_prim_pack_exist VARCHAR2(2);
    L_prim_supp_prim_simpl_pack VARCHAR2(15);
    L_prim_sim_supp_to_TPNB VARCHAR2(2);
    L_sel1 VARCHAR2(200);
    L_sel2 VARCHAR2(200);
    L_sel3 VARCHAR2(200);
    L_item_till_desc VARCHAR2(200);
    L_lengh1 VARCHAR2(200);
    L_width1 VARCHAR2(200);
    L_height1 VARCHAR2(200);
    L_lengh2 VARCHAR2(200);
    L_width2 VARCHAR2(200);
    L_height2 VARCHAR2(200);
    L_lengh3 VARCHAR2(200);
    L_width3 VARCHAR2(200);
    L_height3 VARCHAR2(200);
    --Item type
    CURSOR C_ITEM is
    select im.item L_item,
    im.status L_status,
    im.item_desc L_item_desc,
    'Regular' L_item_type,
    im.dept L_dept,
    im.class L_class,
    im.subclass L_subclass,
    'N/A' L_CW_item_order_type,
    'N/A' L_CW_item_sale_type,
    im.standard_uom L_standard_uom,
    NULL L_selling_uom,
    im.tsl_base_item L_tsl_base_item
    from item_master im
    where im.item_number_type='TPNB'
    -- and im.last_update_id = 'DATALOAD'
    -- and im.create_datetime>=to_timestamp('2010-11-05 10:57:47','YYYY-MM-DD HH24:MI:SS')
    and im.sellable_ind='Y'
    and im.orderable_ind='Y'
    and im.inventory_ind='Y'
    and im.item_xform_ind='N'
    and im.catch_weight_ind='N'
    and rownum<10;
    --order by im.item asc;
    Cursor C_Selling_UOM (tpnb varchar2) is
    select selling_uom
    from rpm_item_zone_price
    where item = tpnb;
    Cursor C_prim_bar (tpnb varchar2) is
    select item,
    status
    from item_master iem
    where item_parent = tpnb
    and iem.primary_ref_item_ind ='Y';
    Cursor C_multi_bar_exit (tpnb varchar2) is
    select count(*)
    from item_master iem
    where item_parent = tpnb;
    Cursor C_multpl_prim_bar_exist (tpnb varchar2) is
    select count(*)
    from item_master
    where item_parent = tpnb
    and primary_ref_item_ind ='Y';
    Cursor C_staus_prim_simp_pack (tpnb varchar2) is
    select piem.pack_no,
    iem.status
    from item_master iem,
    packitem piem
    where piem.item = tpnb
    and piem.pack_no = iem.item
    and iem.tsl_prim_pack_ind ='Y';
    Cursor C_multpl_prim_pack_exist (tpnb varchar2) is
    select count(*)
    from item_master iem,
    packitem piem
    where piem.item = tpnb
    and piem.pack_no = iem.item
    and iem.tsl_prim_pack_ind ='Y';
    Cursor C_prim_supp_prim_simpl_pack (tpnd varchar2) is
    select supplier
    from item_supplier
    where item = tpnd
    and primary_supp_ind= 'Y';
    Cursor C_prim_sim_supp_to_TPNB (tpnb varchar2,suppl number) is
    select 'Y'
    from item_supplier
    where item = tpnb
    and supplier = suppl;
    Cursor C_item_descretion_SEL (tpnb varchar2) is
    select sel_desc_1,
    sel_desc_2,
    sel_desc_3
    from tsl_itemdesc_sel
    where item =tpnb;
    Cursor C_item_till_descretion (tpnb varchar2) is
    select till_desc
    from tsl_itemdesc_till
    where item=tpnb;
    Cursor C_EA (tpnb varchar2,suppl number) is
    select length,
    width,
    height
    from item_supp_country_dim
    where item= tpnb
    and supplier = suppl
    and dim_object='EA';
    Cursor C_CS (tpnb varchar2,suppl number) is
    select length,
    width,
    height
    from item_supp_country_dim
    where item= tpnb
    and supplier = suppl
    and dim_object='TYUNIT';
    Cursor C_TRAY (tpnb varchar2,suppl number) is
    select length,
    width,
    height
    from item_supp_country_dim
    where item= tpnb
    and supplier = suppl
    and dim_object='TRAY';
    BEGIN
    --INITIAL
    WEB_FILE_URL := TSC_RPT_GRS_EXL_GEN.WEB_URL||TSC_RPT_GRS_EXL_GEN.OPEN_FILE;
    TSC_RPT_GRS_EXL_GEN.put_line('Poland Production Cutover');
    TSC_RPT_GRS_EXL_GEN.skip_line;
    l_hdr_str := 'L_item_TPNB,L_status,L_item_desc,L_item_type,L_section,L_class,L_subclass,L_cw_order_type,L_cw_sale_type,L_std_UOM,L_selling_UOM,'||
    'L_base_item,L_prim_bar_code,L_status_pri_bar,L_multpl_bar_exist,L_multpl_prim_bar_exist,L_prim_simple_pack,L_staus_prim_simp_pack,L_mupl_prim_pack_exist,'||
    'L_prim_supp_prim_simpl_pack,L_prim_sim_supp_to_TPNB,L_sel1,L_sel2,L_sel3,L_item_till_desc,L_lengh1,L_width1,L_height1,L_lengh2,L_width2,L_height2,L_lengh3,L_width3,L_height3';
    l_hdr_str := TSC_RPT_GRS_EXL_GEN.CONVERT_SEPARATOR(l_hdr_str);
    TSC_RPT_GRS_EXL_GEN.put_line(l_hdr_str);
    for rec_c_item in C_ITEM
    LOOP
    open C_Selling_UOM (rec_c_item.L_item);
    fetch C_Selling_UOM into L_selling_UOM;
    close C_Selling_UOM;
    open C_prim_bar (rec_c_item.L_item);
    fetch C_prim_bar into L_prim_bar_code,L_status_pri_bar;
    close C_prim_bar;
    open C_multi_bar_exit (rec_c_item.L_item);
    fetch C_multi_bar_exit into L_multpl_bar_exist;
    close C_multi_bar_exit;
    IF to_number(trim(L_multpl_bar_exist)) > 1 THEN
    L_multpl_bar_exist:='Y';
    ELSE
    L_multpl_bar_exist:='N';
    END IF;
    open C_multpl_prim_bar_exist (rec_c_item.L_item);
    fetch C_multpl_prim_bar_exist into L_multpl_prim_bar_exist;
    close C_multpl_prim_bar_exist;
    IF to_number(trim(L_multpl_prim_bar_exist)) > 1 THEN
    L_multpl_prim_bar_exist:='Y';
    ELSE
    L_multpl_prim_bar_exist:='N';
    END IF;
    open C_staus_prim_simp_pack (rec_c_item.L_item);
    fetch C_staus_prim_simp_pack into L_prim_simp_pack,L_staus_prim_simp_pack;
    close C_staus_prim_simp_pack;
    open C_multpl_prim_pack_exist (rec_c_item.L_item);
    fetch C_multpl_prim_pack_exist into L_mupl_prim_pack_exist;
    close C_multpl_prim_pack_exist ;
    IF to_number(trim(L_mupl_prim_pack_exist)) > 1 THEN
    L_mupl_prim_pack_exist:='Y';
    ELSE
    L_mupl_prim_pack_exist:='N';
    END IF;
    open C_prim_supp_prim_simpl_pack (trim(L_prim_simp_pack));
    fetch C_prim_supp_prim_simpl_pack into L_prim_supp_prim_simpl_pack;
    close C_prim_supp_prim_simpl_pack ;
    open C_prim_sim_supp_to_TPNB (rec_c_item.L_item,to_number(trim(L_prim_supp_prim_simpl_pack)));
    fetch C_prim_sim_supp_to_TPNB into L_prim_sim_supp_to_TPNB;
    close C_prim_sim_supp_to_TPNB ;
    open C_item_descretion_SEL (rec_c_item.L_item);
    fetch C_item_descretion_SEL into L_sel1,L_sel2,L_sel3;
    close C_item_descretion_SEL ;
    open C_item_till_descretion (rec_c_item.L_item);
    fetch C_item_till_descretion into L_item_till_desc;
    close C_item_till_descretion ;
    open C_EA (rec_c_item.L_item,to_number(trim(L_prim_supp_prim_simpl_pack)));
    fetch C_EA into L_lengh1,L_width1,L_height1;
    close C_EA ;
    open C_CS (rec_c_item.L_item,to_number(trim(L_prim_supp_prim_simpl_pack)));
    fetch C_CS into L_lengh2,L_width2,L_height2;
    close C_CS ;
    open C_TRAY (rec_c_item.L_item,to_number(trim(L_prim_supp_prim_simpl_pack)));
    fetch C_TRAY into L_lengh3,L_width3,L_height3;
    close C_TRAY ;
    L_buff_line := TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(rec_c_item.L_item), TRUE)||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(rec_c_item.L_status))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(rec_c_item.L_item_desc))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(rec_c_item.L_item_type))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(rec_c_item.L_dept))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(rec_c_item.L_class))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(rec_c_item.L_subclass))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(rec_c_item.L_CW_item_order_type))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(rec_c_item.L_CW_item_sale_type))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(rec_c_item.L_standard_uom))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(trim(L_selling_UOM)))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(rec_c_item.L_tsl_base_item))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(trim(L_prim_bar_code)))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(trim(L_status_pri_bar)))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(trim(L_multpl_bar_exist)))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(trim(L_multpl_prim_bar_exist)))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(trim(L_prim_simp_pack)))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(trim(L_staus_prim_simp_pack)))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(trim(L_mupl_prim_pack_exist)))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(trim(L_prim_supp_prim_simpl_pack)))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(trim(L_prim_sim_supp_to_TPNB)))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(trim(L_sel1)))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(trim(L_sel2)))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(trim(L_sel3)))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(trim(L_item_till_desc)))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(trim(L_lengh1)))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(trim(L_width1)))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(trim(L_height1)))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(trim(L_lengh2)))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(trim(L_width2)))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(trim(L_height2)))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(trim(L_lengh3)))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(trim(L_width3)))||
    TSC_RPT_GRS_EXL_GEN.PAD_COMMA(to_char(trim(L_height3)));
    TSC_RPT_GRS_EXL_GEN.PUT_LINE(L_buff_line);
    L_selling_UOM :=NULL;
    L_prim_bar_code :=NULL;
    L_status_pri_bar :=NULL;
    L_multpl_bar_exist :=NULL;
    L_multpl_prim_bar_exist :=NULL;
    L_prim_simp_pack :=NULL;
    L_staus_prim_simp_pack :=NULL;
    L_mupl_prim_pack_exist :=NULL;
    L_prim_supp_prim_simpl_pack :=NULL;
    L_prim_sim_supp_to_TPNB :=NULL;
    L_sel1 :=NULL;
    L_sel2 :=NULL;
    L_sel3 :=NULL;
    L_item_till_desc :=NULL;
    L_lengh1 :=NULL;
    L_width1 :=NULL;
    L_height1 :=NULL;
    L_lengh2 :=NULL;
    L_width2 :=NULL;
    L_height2 :=NULL;
    L_lengh3 :=NULL;
    L_width3 :=NULL;
    L_height3 :=NULL;
    END LOOP;
    TSC_RPT_GRS_EXL_GEN.close_file;
    return TRUE;
    EXCEPTION WHEN OTHERS THEN
    ERR_DESC := '['||SQLCODE||']-'||SUBSTR(SQLERRM,1,200);
    return FALSE;
    END TSC_OM_AUDIT;
    Please suggest something on this
    Regards,
    Shamed H

    Hi Shamid,
    This forum is only for questions regarding the SQL Developer tool. Please post in Forum Home > Database > SQL and PL/SQL:
    PL/SQL
    Regards,
    Gary
    SQL Developer Team

  • Presentation Variables Date Format

    Hi,
    I have a direct sql request that uses date presentation variables via a dashboard prompt:
    Direct SQL:
    select id, customer
    from test
    where date between @startdate and @enddate
    If I enter startdate '31/03/2013 00:00:00' in the dashboard prompt selection:
    OBIEE converts the above query into database date format:
    'YYYY-MM-DD HH24:MI:SS'
    The database is in date format DD-MON-YYY, this results in error ORA-01861: literal does not match format string
    can anyone help with where the date format should be set?
    Thanks

    There are different levels of users on this forum so you need to be more specific and provide examples to novice users....I want user to think on given hints and fix by himself instead of detailed with examples, this would help user to learn and think in new dimensions instead of depending on any one.
    Sometimes I'll be responding more detail based on their registered date with OTN and # posts posted.
    in your case my hint not fired!! so no full points ;)
    Check this
    Re: How set two presentation variables with one prompt
    Edited by: Srini VEERAVALLI on Apr 11, 2013 10:55 AM

  • Issues with iMessage when switching data carrier (wifi - cellular)

    So I have had this issue with my 5S and now my 6+ in iMessage. Not *always* but often enough I've run into issues sending messages via iMessage when I associate with wifi in that they don't send. I'll get an error message saying "not delivered" and it will stack as many outgoing messages I try to send. However, if I force the first message to send as text, subsequent messages will go through afterwards without issue. If I go from wifi to cellular I have no issues whatsoever and when I have these issues on wifi, my data works fine (incoming emails, Facebook notifications, etc.). I used to run cellular data only because I had unlimited but now I have a cap so I intend on using wifi when possible...but to have to send my first message as a text just so I can use iMessage is annoying...

    Hi there BigDogg795,
    I would recommend taking a look at the troubleshooting steps for iMessage found in the article below. 
    iOS: Troubleshooting Messages - Apple Support
    To resolve issues with sending and receiving iMessages, follow these steps
    Check iMessage system status for current service issues.
    Go to Settings > Messages > Send & Receive and make sure that you registered iMessage with your phone number or Apple ID and that you selected iMessage for use. If the phone number or Apple ID isn't available for use, troubleshoot iMessage registration.
    Open Safari and navigate to www.apple.com to verify data connectivity. If a data connection isn't available, troubleshoot cellular data or a Wi-Fi connection.
    iMessage over cellular data might not be available while you're on a call. Only 3G and faster GSM networks support simultaneous data and voice calls. Learn which network your phone supports. If your network doesn't support simultaneous data and voice calls, go to Settings > Wi-Fi and turn Wi-Fi on to use iMessage while you're on a call.
    Restart your device.
    Tap Settings > General > Reset > Reset Network Settings on your iPhone.
    If you still can't send or receive an iMessage, follow these steps
    Make sure that the contact trying to message you isn't blocked in Settings > Messages > Blocked.
    Make sure that the contact you're trying to send a message to is registered with iMessage.
    If the issue occurs with a specific contact or contacts, back up or forward important messages and delete your current messaging threads with the contact. Create a new message to the contact and try again.
    If the issue occurs with a specific contact or contacts, delete and recreate the contact in the Contacts app. Create a new message to the newly created contact and try again.
    Back up and restore your device as new.
    -Griff W.

  • OBIEE 11g Prompt's default value doesn't work with a presentation variable

    Hi, I'm using OBIEE 11g and I have two dashboard prompts (Product Name and Product Number). Theses prompts are hierarquical, so the values that are displayed in the Product Number prompt have dependency with the values chosen on the Product Name prompt. This I was able to do, but now I want to put a default value on the Product Number prompt. The steps are:
    1 - The user chooses the value for the Product Name Prompt and by doing that the Product Number prompt is automatically filled with the correspondent value.
    But unfortunatelly this is not working, after choosing the value for the Product Name the default value for Product Number is not displayed (when you open the prompt the values displayed are correct and already filtered considering the Product Name but the prompt is not automatically filled with the default value).
    What I did is:
    On the Product Name Prompt I've created a Presentation Variable called PROD.
    On the Product Number Prompt I've selected:
    1 - For the "Choice List Values" field I've checked the option "Limit Values by All Prompts"
    2 - For the "Default Selection" field I've chosen the SQL Results option and enter the following SQL:
    SELECT "Products"."Product Number" FROM "Sample Sales Lite"."Products" WHERE "Products"."Product"='@{variables.PROD}
    What am I doing wrong?
    Thank you,
    Carla

    Sorry I was wrong in my previous thread.
    Actually your approach is not correct, Product Number choose constraint that will show as per the selection of Product Name.
    Coming to default value for Product Number you are going for sql override that is okay but not work with variable, instead of setting default values for product number set that to product name.
    if not you need to go for 2 different prompts
    Prompt 1 Product Name hit GO
    Prompt 2 will work based on as you defined earlier with variables
    Hope this helps

  • Issue with mouseListener / global variables

    So in my project, im having an issue with incrementing a counter using mouseListener. i have 2 windows pop up telling the user whose turn it is and then that players dice roll. after this i want the program to wait untill the player moves their piece. after they have moved their full move, it should go on to the next player. the issue im having is getting the program to wait for the player to make his moves, and i cant quite get it to work. it either skips the move and goes to the next player or never sees that the player has moved fully.
    public int getTurnsLeft(){
    return turnsLeft;
    public void setTurnsLeft(int newTurnsLeft){
    turnsLeft = newTurnsLeft;
    }these are what im using for both my mouseListener release method and my playTurn method to get and set the number of moves left.
    public void mouseReleased(MouseEvent e) {
              if(playerPiece == null) return;
              playerPiece.setVisible(false);
              Component c =  playBoard.findComponentAt(e.getX(), e.getY());
              if (c instanceof JLabel){
                   Container parent = c.getParent();
                   parent.add(playerPiece);
                   setTurnsLeft(getTurnsLeft() + 1);
                   System.out.println(getTurnsLeft());
              else {
                   Container parent = (Container)c;
                   parent.add(playerPiece);
                   setTurnsLeft(getTurnsLeft() + 1);
                   System.out.println(getTurnsLeft());
              playerPiece.setVisible(true);
         }mouse release method
         public void playTurn(){
              JOptionPane.showMessageDialog(null, "Player " + this.getPlayerNum() + "'s turn");
              int turns = (int)diceRoll();
              this.setMoveCount(turns);
              System.out.println(turns);
              int turnCheck = 0;
              while(turnCheck == 0){
                   System.out.print(getTurnsLeft());
                   if(getTurnsLeft() < turns)
                        turnCheck = 0;
                   else
                        turnCheck = 1;
              setTurnsLeft(0);
         }play turn method
    when i run this, the mouseRelease method can modify turnsLeft and get back the correct number, but in the playTurn method, i only get 0, which is what turnsLeft starts at. shouldnt they both get the same value, since there getting the value from the same source? or is the while loop the issue here?

    Your turnsLeft is really deceptively named, it is actually the number of steps taken during the current turn. Better rename it for clarity.
    The problem seems to be in your threading, I don't see how the while loop can end ('never sees that the player has moved fully'?) unless the diceRoll returns zero ('skips the move').
    What you should do is print out that diceRoll for more information (why doesn't it return an int? Use random.nextInt(maxSteps) + 1).
    And probably the end-of-turn check should be in setTurnsLeft(). You need to store the 'number of step this turn' as a class variable.
    So rename:
    playTurn -> startTurn
    turns -> steps
    turnsLeft -> stepsTaken
    setTurnsLeft(int) -> completeStep() which checks if stepsTaken >= steps and if yes calls completeTurn() which can check for a win or call the other players startTurn().

  • Presentation Variable Date Format

    Hi all trying to format a presentation variable in a Narrative view , Is there a way that this can be done using javascript or html that i can paste into narrative view.
    i want something like "the date being used is @{indate} for month end"
    Also date format needs to be dd.mm.yyyy ... its currenty being displayed as yyyy/mm/dd .. I dont want to add the columns in my report and hide them as there seems to be a performance lag when i do that.
    Any ideas .. Java gurus out there.
    I have tried @{indate}[dd.mm.yyyy] .. but that dont work.
    Cheers
    Jenny
    Edited by: user5470064 on Aug 18, 2011 9:58 AM
    Edited by: user5470064 on Aug 18, 2011 9:59 AM

    Here you go...
    I tried in my machine and its working great..
    In Answers--> in Criteria TAB, In the column's fx use below formula...
    case when 1=1 then EVALUATE('TO_CHAR(%1,%2)' as varchar(20),date '@{pv_date}{1998-07-05}','dd.mm.yyyy') else "ORE Time Dim"."Mnth Name" end
    pv_date is the presentation variable and
    For "ORE Time Dim"."Mnth Name" use any varchar datatype column...
    Hope it helpful...
    Thanks
    Ashish Gupta

  • Blocking of Good Issue with respect to posting date

    Hi Expert,
                   Is there any way out in SAP B1 to block the Good Release with respect to posting date.i.e. If User receipt the Good in stock today then system should not allow the user to issue the same good on the back date.
    regards,
    PankajK

    Hi Pankaj,
    There are so many options e.g you can check in oinm select that particular item sort on docdate and check inqty and compare with your goods issue date if it is same then send same transaction to approval if you want.
    Thanks
    Sachin

Maybe you are looking for

  • Duplicates in Collections

    Hello All, Good morning to all OTN users. I have below requirement to identify the duplicates in the Collection and I am not sure how to implement in easy way. Requesting all your help in doing the same. Requirement: I have a collection based on the

  • Galaxy S4 free after rebate and trade in? apparently not

    In February there were ads on TV and on Verizon website about Getting S4 free after rebate and trade in. Purchase online for $150 and get $50 rebate and automatically get $100 trade in value on smartphone in working order.(mine was)  I only got the $

  • Idocs are unable to transfer from R3 to PI system, IDOC status is 03

    Hello Gurus, Idocs are unable to transfer from R3 to PI system, IDOC status is 03 in sm58 getting below error RFC  are working fine "EDISDEF: Port SAPCEP segment defn Z2SH_DESCR000 in IDoc type MATMAS03 CIM" Regrds vamsi

  • Itunes Uses 100% of CPU When Ejecting Disc. How can I solve this?

    Every time I eject a disc in iTunes I get the beach ball and the program won't respond. I can go to other programs while this is happening but iTunes is froze. I opened Activity Monitor and noticed iTunes was pegging the CPU. Why would this be happen

  • Poplist and muti-record block navigation

    Hi. I have a form with a multi-record block and a poplist on each record. When a certain item is TRUE on a record, I want the poplist button to be disabled and enabled when the item is FALSE. The button is normally enabled and I disable it when neede