Packages oracle not recognized lexical parameter that passed from BIP

Dear all,
My name is Rizal, i've a problem when passing lexical parameter from BIP to Oracle Packages. Below is my data template in BI Publisher that call function f_where_clause on packages :
<dataTemplate name="dtTemplate1" description="dtTemplateTest" dataSourceRef="prodin" defaultPackage="pkg_rep_bip">
<dataTrigger name="cobaTrigReport" source="pkg_rep_bip.f_where_clause(:P_SD)"/>
<dataQuery>
<sqlstatement name="Q1">
<![CDATA[SELECT CODE, SPPD_CODE FROM PRO_SPD01 &amp;v_where_clause]]>
</sqlstatement>
</dataQuery>
</dataTemplate>
and P_SD is one parameter that i created in BI Publisher.
and below is my packages (Spec and Body) :
SPEC :
CREATE OR REPLACE package PRODIN.pkg_rep_bip
as
v_where_clause varchar2(10000);
function f_where_clause (p_sd varchar2)return boolean;
end pkg_rep_bip;
BODY :
CREATE OR REPLACE package body PRODIN.pkg_rep_bip as
function f_where_clause (p_sd varchar2)return boolean is
begin
if p_sd = 'Y' then
v_where_clause := ' where re=11';
else
v_where_clause := ' where re=24';
end if;
return true;
end f_where_clause;
end;
More detail problem is when parameter P_SD = Y (i assigned in BI PUblisher) the result always go to (v_where_clause := ' where re=24'). Any help/answer really appreciate.. Many thanks..

It seems that Reports help is wrong ( or imprecise).
Eg. if we have:
select &p_select
  from dept
where &p_where
and the initial values for the parameters are:
p_select: deptno, dname
p_where: 1 = 2
and the code in the Before Reports trigger is the following:
function BeforeReport return boolean is
begin
  :p_select := 'deptno, ''abcde'' ';
  :p_where := '1 = 1';
  return (TRUE);
end;
we get all the rows (where 1 = 1) and we get the value 'abcde' in the field "dname".
However, try to move your code from the Before Report trigger to After Parameter Form trigger.
Regards,
Zlatko

Similar Messages

Maybe you are looking for

  • Importance of Common Database in SAP B1

    hi guys, Up to this point, its not very clear to me if it is necessary to back the Common Database of SAP business one. As per documentation, it states that Common database – includes tables for basic initialization of any new company database (for e

  • Getting objeects ddl in Oracle 8i

    Hi , i believed there's no dbms_metadata package in 8i but how can i get the objects' ddl besides the export/import utility ? tks & rgds

  • How do I photomerge using PSE10 for Mac?

    I have a photo of a dog in a field and another photo of a different dog on a sidewalk. How do I photomerge these photos into one that has a common background?

  • Is is possible to allow multiple date format strings pass DateFormat.parse?

    I'm trying to use DateFormat.parse to validate a date in the 20/12/08 format. I would like to allow users to input 20-12-08 or 20 12 08. The code currently looks like this: formatter = DateFormat.getDateInstance(DateFormat.SMALL, US);It is currently

  • Average Roll Up

    <p>I try to create an average roll up of period hours instead ofsum up to parent in my Regions dimension. The following is the formula that I built within the account(Period Hour).</p><p> </p><p>IF (@CURLEV(Regions) == 0)<br>"Period hours" = "Period