To pass date parameter to thew SQ:L of a reprt file through form
I want a layman user to enter a date parameter in a Form and the parameter to be passed on to the SQL of a report file, so that a new report is created. How to do that?
Let the user enter the date as Varchar2 or as Date itself. You create the parameter list to pass this value as Text parameter to the report.
Now, use this text parameter as the input to your WHERE clause of the report SQL. You can compare it with the date field by converting it as a date using TO_DATE() function or vise-versa.
Eg:
SELECT * FROM emp WHERE join_dt=TO_CHAR(:mdate,'DD-MON-YYY');
or
SELECT * FROM emp WHERE TO_CHAR(join_dt,'<date format used>')=:mdate;
Hope this works
Regards,
APK
Similar Messages
-
How to pass date parameter from one page to other in BSP application
Hello gurus,
In my BSP application i have taken an input field and made its type "date" and its value also of type date and have set showhelp .
Now once a particular date is given as an input i want to pass its value to next page. And in next page i have to fire a query based on the date entered in previous page...
Now my prb is that my date value is not getting passed to the next page.
I have used
navigation->set_parameter( name = 'BEGDA' value = BEGDA ).
to pass date parameter.....still parameter is not getting passed.
plz help me with this.....
thankx.....Hi Eddy,
By truncation i mean the entire date becomes 10 char including the ' . ' eg(06.12.2006).
so with begda being 8chars it takes my date as 06.12.200
as a result my query is not getting executed.
now i have tried to use a FM 'CONVERT_DATE_TO_INTERN_FORMAT'.
in my 1st page but still in 2nd page its giving me following error.
<b>The data that was read could not be written to the specified target field during a SELECT access. Either the conversion is not supported for the type of the target field, or the target field is too short to accept the value, or the data is not in the appropriateformat for the target field.
</b>
Regards
Swati -
Passing data parameter between SWF files
Hello Xcelsius Gurus,
Is it possible to pass data parameter between SWF files?
If possible, how to achieve it?
Thank you.
JustineHi,
Thank you for the reference. Little bit confused, please let me clarify.
I do not understand how the receiver SWF receieved the data parameter and process.
For example, I have a parent dashboard and a child dashboard. In the parent dashboard, I have set up combo box to filter the data. And I want the data that I have selected in combo box to the child dashboard.
To do this, first I need to setup the flash variable at the parent dashboard to fetch the data I selected.
After this, how to link this data to the child dashboard?
Furthermore, after the child dashboard received the data parameter, I need this data to insert into the spreadsheet so I can filter the data. Is this possible?
Thanks.
Edited by: Justine Liu on Jan 19, 2010 3:11 PM -
Can we pass data-parameter in host
Can we pass a data-parameter to a report using host command in the form.
urgent please
vishalYour answer is quite correct, but it is stupid behavior - how do you build backwards compatibility into a function if you have to specify the keyword 'default'?
For example, I have an existing function that takes one parameter, but I need to alter it to take two parameters. I work for a large bank that has a rigorous change management process, and this function resides in the data warehouse, so many
people can use this function in their code, and I need to ensure that any changes I make are backwards compatible, and don't break any existing code that I don't know about.
If this was a stored proc, I could call it without the optional parameter, and the default value would be applied, but a function needs me to specify the keyword 'default' or to provide a value.
My only option seems to be to create a wrapper function that calls either the old function (if only one parameter is provided) or the new function (if both parameters are provided). Sort of defeats the purpose of having default or optional values. -
Passing date parameter from forms to report
Hi,
I'm using forms and reports 6i.
I want to pass one date parameter from forms to reports.
Using
Add_Parameter(pl_id,'P_FROM_DATE',TEXT_PARAMETER,:FROM_DT);
giving me error REP-0091- Invalid value for parameter 'P_FROM_DATE'
This i think is because report expects date and here it is converted as varchar.
Please helpHi Divya,
Even I use this kind of statement
Add_Parameter(pl_id,'P_FROM_DATE',TEXT_PARAMETER,:FROM_DT);and works fine for me.
This i think is because report expects date and here it is converted as varchar
Correct.
Open the report in the builder and under Data Model -> User Parameters, Go to the Property Inspector of P_FROM_DATE. Under Parameter, set Datatype as Character instead of Date.
Hope this should work. and tell me if it works(coz it wokred for me). -
Error while passing date parameter to the XML data definition
Hi All,
I have developed a BI publisher report using XML data definition & RTF template.
This data definition contains a SQL query in it's CDATA section and runs as a concurrent program(without RDF) . We are looking to pass a date parameter to the SQL query and its not accepting the date parameter. However, when we hardcode SYSDATE in the SQL query in place of the parameter, the report runs fine. In the log file it shows that the parameter is being treated in American date style and we are using DD-MON-RRRR format. I have tried to convert the date format however still the error exists.
What we did ?
Created a XML data definition which contains the SQL query in its CDATA section & p_rundate (DATE) parameter.
Registerd the XML data definition as concurrent program with EXECUTABLE= XDODTEXE and Output format as XML with p_date as a date parameter.
Looking for any available solution for the same.
Thanks.Hi All,
I have developed a BI publisher report using XML data definition & RTF template.
This data definition contains a SQL query in it's CDATA section and runs as a concurrent program(without RDF) . We are looking to pass a date parameter to the SQL query and its not accepting the date parameter. However, when we hardcode SYSDATE in the SQL query in place of the parameter, the report runs fine. In the log file it shows that the parameter is being treated in American date style and we are using DD-MON-RRRR format. I have tried to convert the date format however still the error exists.
What we did ?
Created a XML data definition which contains the SQL query in its CDATA section & p_rundate (DATE) parameter.
Registerd the XML data definition as concurrent program with EXECUTABLE= XDODTEXE and Output format as XML with p_date as a date parameter.
Looking for any available solution for the same.
Thanks. -
How to pass date parameter in URL in system date format
Hi All,
I am working on a requirement where I need to pass the date parameter in URL. Where date format needs to be system default date format. How can we format date without providing specific date format.
Also, I got some post which had below example. Can you let me know what this format does.
'/analysis/report?queryGroupName=Custom-ProjectInfo&TimePeriodBeginning=', <%+%> FCI_CHARFMT(TIME_PERIOD_START_DATE),' <%+%>
'&TimePeriodBeginning_format=17&link_crumb=true'
Waiting for response.
Thanks,
SaloniHi,
If you're running this in SQL*Plus, you can use substitution variables.
If you have a file called my_query.sql, like this
select A.agent_no,
(a.first_name || A.agent_name) as agent_Name,
P.Policy_No,
D.Driver_No,
D.mvr_predict_score,
D.mvr_received
from policy P,
agent A,
Driver D
where D.request_mvr_hit = 'M'
AND D.mvr_predict_Score > 540
And D.request_mvr = 'D'
AND p.fullkey = d.fullkey
AND p.agent_no = a.agent_no
AND d.mvr_received >= TO_DATE ('&1', 'DD-Mon-YYYY') -- New
AND d.mvr_received < TO_DATE ('&2', 'DD-Mon-YYYY') + 1 -- New
order by a.agent_no,
CASE a.producer_type
when 'S' then 1
when 'C' then 2
when 'R' then 3
end
;Then you can run it from SQL*Plus by saying something like:
@my_query 1-Jan-2009 31-Dec-2009&1 in the script will be replace by the 1st argument (1-Jan-2009) and &2 will be replaced by the 2nd argument (31-Dec-2009).
Notice that the last condition adds 1 to the argument
AND d.mvr_received < TO_DATE ('&2', 'DD-Mon-YYYY') + 1 -- Newbut uses the < operator (not <=). The result is that if mvr_received is any time on the last day (e.g. 31-Dec-2009 11:59 pm) will be included. -
Pass data parameter from URL to Forms
Hi
Is it possible to pass a data parameter from asp to Forms?.
In my asp I have a url to call a form (eg. http://servername:port/forms90/f90servlet/form=testform.fmx). In my testform.fmx I accept 'account no' as a parameter for querying the records. Since I am calling this form from asp, I already have the account no in my asp. I would like to pass this account no to the form automatically.
Is it possible to pass this data parameter from url to forms?.
If possible, what changes to be made in the form. Please help.
sreekumarCreate a parameter in your form, there's a node for it in the Navigator window. Imagine it is called myParam.
Pass it on the URL like this:
http://host/forms90/f90servlet?config=myApp&otherParams=myParam=somevalue
Regards,
Robin Zimmermann
Forms Product Management -
How to auto login and pass data (parameter) to ApEx at the same time
Does anybody know how to automatically login to apex (e.g. from JSP page) and pass a parameter value at the same time? I can use wwv_flow_custom_auth_std to login, I can even choose a page but I cannot pass any data (at least I do not know how). If I use f?p URL syntax I can pass data but there is no way to pass login/password information.
Any idea? Thanks JarosJaros -
You could copy your login page and make the new page "public". On the new page, add a process before the login process that sets the value of application item FSP_AFTER_LOGIN_URL to the report page URL (with the arguments), e.g., :FSP_AFTER_LOGIN_URL := 'f?p=&APP_ID.:100:&SESSION.::NO::P100_X,P100_Y:&RPT_VALUE1.,&RPT_VALUE2.';Create application-level items RPT_VALUE1 and RPT_VALUE2 in the application.
From your external page, POST to this new "login" page, passing values for the username, password, rpt_value1, and rpt_value2 items.
Let us know if it works.
Scott -
Passing date parameter from prompt
Hi experts
I am getting some problem while passing date from a dashboard prompt.
In RPD i have changed the date column properties as DATE only so that i will get the DATE part of the data not the time stamp.
Now in the dashboard prompt i added a prompt for the date column.
I initialized the date prompt with a server variable of sysdate
when i am running the dashboard i am getting default value in the prompt(04/15/2011)
when i am changing the date it is selected as(04/15/2011)
but when i am clicking the 'Go' button the date is converting to 2011-04-15 00:00:00 due to which my report is not running and i am getting error as
View Display Error
A date value was expected (received "2011-04-15 00:00:00").
Error Details
Error Codes: QABPH2PO
can anyone help me to pass only date part
thanks in advance
regards
GourisankarHi J / Srikanth
Sorry to restart the thread again.
As we discussed i have downloaded the patch and applied to my windows 32 bit machine.
But now when i run the report the report is running only for the default value(Server Variable) which is specified to the prompt. when i change the date there is no effect to the report.
When i drill down to the report i found that the date column(is prompted) is changed to teh server variable name which is might be the cause.
any input on this???
regards
Gourisankar -
Error while passing date parameters in procedure and commit issue
Hi
1) I am doing a archiveing records and pls find my code below and i have couple of issue,pls find my code and want to ensure the commit is happening every 100000 rows inserted but i am archeiving a huge table but when i checks the table frequently it shows 0 records and after it shows count the actual rows around 20 million records.How can i ensure it commiting on every 100000 records. pls find my code my db version is 10g on windows
CREATE OR REPLACE PROCEDURE doins as
cnt number:=0;
FOR x IN (select * from Call_log
where trunc(c_date) = to_date('11-Aug-2008','DD-MON-YYYY'))
LOOP
INSERT INTO call_arch
select * from Call_log
where trunc(c_date) = to_date('11-Aug-2008','DD-MON-YYYY');
cnt := cnt + 1;
IF( cnt = 10000 )
THEN
cnt := 0;
commit;
END IF;
commit;
END LOOP;
2) Error while passing date as parameter i am getting following errors while passing date parameter pls find my code and errors
CREATE OR REPLACE PROCEDURE doins(p_date date) as
cnt number:=0;
begin
FOR x IN (select * from Call_log
where trunc(c_date) = to_char(p_date,'DD-MON-YYYY'))
LOOP
INSERT INTO call_arch
select * from Call_log
where trunc(c_date) = to_char(p_date,'DD-MON-YYYY');
cnt := cnt + 1;
IF( cnt = 10000 )
THEN
cnt := 0;
commit;
END IF;
commit;
END LOOP;
end;
exec doins(11-Aug-2008) then gives
SQL> exec doins(11-Aug-2008);
BEGIN doins(11-Aug-2008); END;
ERROR at line 1:
ORA-06550: line 1, column 16:
PLS-00201: identifier 'AUG' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
if i gave exec doins(11-08-2008) it gaves
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'DOINS'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
rgds
roshCREATE OR REPLACE PROCEDURE doins(p_date varchar2) as
cnt number:=0;
begin
FOR x IN (select A.rowid,A.* from Call_log A
where trunc(c_date) = to_date(p_date,'DD-MON-YYYY'))
--hope that's c_date columne is DATE datatype
LOOP
INSERT INTO call_arch
select * from Call_log
where rowid=x.rowid;
cnt := cnt + 1;
IF( cnt = 10000 )
THEN
cnt := 0;
commit;
END IF;
commit;
END LOOP;
end;
thats your correct procedure - but NOT CORRECT ISSUE.
You should use bulk collect with limit clause and forall clause to do it faster!!! Or Merge clause. -
Can I pass a parameter to a mapping without using a process flow?
I have to load data from multiple countries at different times. Rather than creating an individual mapping for each country, I want to create 1 mapping and pass the country code as a parameter to the mapping. I tried to use an input parameter in the mapping and add a custom parameter to the sqlplus_exec_template hoping the custom parameter would pass to the mapping input parameter but it's not working. No data loads.
When I add a default value to the input parameter, the data loads but this isn't the solution I need. The value of the parameter will vary depending on the country so I can't use defaults. Since the mappings load automatically, I need the script to be able to pass the parameter in.
I'm trying to avoid going through a process flow because that just seems like overkill for what I need to do. I just want to load all the data where country code = 'X'. Is this even possible?o.k. I tried everything to see which would be the best scenario.
Zeppo - I can't use your solution because ".main", I believe, applies to an older version of OWB. We have 10g. I know in 3.1 ".main" applies because I still have mappings from that version. Doesn't apply to 10g.
Sutirtha - I set the property for the prompt but it still didn't work.
MccM - Yes, the premapping process works perfectly. Only thing is that I have to come up with so many different scenarios in the If then else logic. Giving me a migraine ...
.... so ....
I punked out and created a table that stores all of the load times by country code. In the joiner, I linked the table's country code to the country code in my view and only retrieved data where the table's load hour equals the sysdate hour. Now all I have to do is change an entry in the working table if I need to reschedule a load.
It's cluggy but it works ... and I met me goal of only using 1 mapping.
Thanks to all of you for providing your input. Much appreciated. -
Extracting data from Essbase & loading into flat file through ODI
Hi,
I want to extract data from Essbase and load it into a flat file through ODI(for extraction from essbase I'm using a report script) and I’m using these KM’s:- LKM Hyperion Essbase data to SQL,IKM SQL to FILE Append & for reversing I’m using RKM Hyperion Essbase.All the mappings have been done and the interface has been made. But when I’m executing the interface it is throwing the error below:-
ODI-1217: Session ESS_FILEI (114001) fails with return code 7000.
ODI-1226: Step ESS_FILEI fails after 1 attempt(s).
ODI-1240: Flow ESS_FILEI fails while performing a Loading operation. This flow loads target table ESS_FILE.
ODI-1228: Task SrcSet0 (Loading) fails on the target FILE connection FILE_PS_ODI.
Caused By: java.sql.SQLException: ODI-40417: An IOException was caught while creating the file saying The system cannot find the path specified
at com.sunopsis.jdbc.driver.file.impl.commands.CommandCreateTable.execute(CommandCreateTable.java:62)
at com.sunopsis.jdbc.driver.file.CommandExecutor.executeCommand(CommandExecutor.java:33)
at com.sunopsis.jdbc.driver.file.FilePreparedStatement.execute(FilePreparedStatement.java:178)
at oracle.odi.runtime.agent.execution.sql.SQLCommand.execute(SQLCommand.java:163)
at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:102)
at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:1)
at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2906)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2609)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:537)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:453)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1740)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:338)
at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:214)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:272)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:263)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:822)
at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:123)
at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
at java.lang.Thread.run(Thread.java:619)
Please let me know what I'm missing and how I can resolve this error.
ThanksIt seems that you are trying to use the file as your staging areas. Hyperion LKM extracts essbase data into a DB staging area which can then be used by your file IKM to load it into file.
You need to use a RDBMS for your staging area. -
How to pass a date parameter(from a procedure IN) to a API
Hi,
CREATE OR REPLACE package body xxal_basic_sal_increment_pkg1 as
procedure emp_pro_inc1(ERRBUF VARCHAR2,RETCODE OUT NUMBER,
p_business_group_id_enter in number,p_change_date in varchar2) is
CURSOR STAFF IS
SELECT pp.ASSIGNMENT_ID
,peo.EMPLOYEE_NUMBER employee_no
,pp.OBJECT_VERSION_NUMBER
,pp.PAY_PROPOSAL_ID
,pp.PROPOSED_SALARY_N basic_salary
,pp.PROPOSAL_REASON
,pp.change_date
,pp.BUSINESS_GROUP_ID
,pg.name
,pr.PERFORMANCE_RATING,
'' v_effective_start_date,
'' v_effective_end_date
FROM per_all_people_f peo,
per_all_assignments_f pa,
per_pay_proposals pp,
per_grades_tl pg,
per_performance_reviews_v pr
where pa.person_id = peo.PERSON_ID
and pa.ASSIGNMENT_ID = pp.ASSIGNMENT_ID
and peo.PERSON_ID=pr.PERSON_ID
and pg.GRADE_ID=pa.GRADE_ID
--and peo.EMPLOYEE_NUMBER=STAFF_VAR.employee_no
and sysdate between peo.EFFECTIVE_START_DATE and peo.EFFECTIVE_END_DATE
and sysdate between pa.EFFECTIVE_START_DATE and pa.EFFECTIVE_END_DATE
and peo.BUSINESS_GROUP_ID = p_business_group_id_enter
and pp.change_DATE = (select max(change_DATE) from per_pay_proposals temp
where ASSIGNMENT_ID =pp.ASSIGNMENT_ID);
--L_BUSINESS_GROUP_ID NUMBER:=5128;
L_ASSIGNMENT_ID NUMBER;
L_PAY_PROPOSAL_ID NUMBER;
L_OBJECT_VERSION_NUMBER NUMBER;
L_pyp_proposed_sal_warning BOOLEAN;
L_additional_comp_warning boolean;
l_person_id number;
L_COMMON boolean;
L_ELEMENT_ENTRY_ID NUMBER;
TEMP NUMBER;
L_EFFECTIVE_START_DATE DATE;
L_MULTI VARCHAR2(30):='N';
L_APPROVED VARCHAR2(30):='Y';
L_CHANGE_DATE DATE:=TO_DATE('31-JAN-2008','DD-MON-YYYY');
BEGIN
v_disp_output:='EMPLOYEE_NUMBER'||','||
'BASIC'||','||
'EFF START DATE'||','||
'EFF END DATE';
fnd_file.put_line(FND_FILE.output,v_disp_output);
FOR STAFF_VAR IN STAFF LOOP
L_ELEMENT_ENTRY_ID:=null;
begin
select assign.assignment_id,assign.effective_start_date into
l_assignment_id,l_change_date_new
from per_people_f peo,per_assignments_f assign
where peo.person_id=assign.person_id
and sysdate between peo.effective_start_date and peo.effective_end_date
and sysdate between assign.effective_start_date and assign.effective_end_date
and current_employee_flag='Y'
and primary_flag='Y'
and peo.business_group_id=l_business_group_id
and peo.employee_number=staff_var.employee_no;
L_CHANGE_DATE_new:=L_CHANGE_DATE;
--L_CHANGE_DATE_new:=STAFF_VAR.v_effective_start_date;
begin
HR_MAINTAIN_PROPOSAL_API.INSERT_SALARY_PROPOSAL
P_PAY_PROPOSAL_ID=>L_PAY_PROPOSAL_ID
,P_ASSIGNMENT_ID=>staff_var.ASSIGNMENT_ID
,P_BUSINESS_GROUP_ID=>staff_var.BUSINESS_GROUP_ID
,P_CHANGE_DATE=>L_CHANGE_DATE_new
,P_PROPOSED_SALARY_N=>STAFF_VAR.basic_salary
,P_OBJECT_VERSION_NUMBER=>STAFF_VAR.OBJECT_VERSION_NUMBER
,p_multiple_components=>L_MULTI
,p_approved=>L_APPROVED
,P_VALIDATE=>false
,p_element_entry_id =>L_ELEMENT_ENTRY_ID
,P_INV_NEXT_SAL_DATE_WARNING=>l_common
,P_PROPOSED_SALARY_WARNING=>L_COMMON
,P_APPROVED_WARNING=>L_COMMON
,P_PAYROLL_WARNING=>L_COMMON
in the above code the variable L_CHANGE_DATE DATE is hard coded .
but we need to supply this variable value as dynamic, means (p_change date--procedure IN Parameter )
i tried like below ,
CREATE OR REPLACE package body xxal_basic_sal_increment_pkg1 as
procedure emp_pro_inc1(ERRBUF VARCHAR2,RETCODE OUT NUMBER,
p_business_group_id_enter in number,p_change_date in varchar2) is
CURSOR STAFF IS
SELECT pp.ASSIGNMENT_ID
,peo.EMPLOYEE_NUMBER employee_no
,pp.OBJECT_VERSION_NUMBER
,pp.PAY_PROPOSAL_ID
,pp.PROPOSED_SALARY_N basic_salary
,pp.PROPOSAL_REASON
,pp.change_date
,pp.BUSINESS_GROUP_ID
,pg.name
,pr.PERFORMANCE_RATING,
'' v_effective_start_date,
'' v_effective_end_date
FROM per_all_people_f peo,
per_all_assignments_f pa,
per_pay_proposals pp,
per_grades_tl pg,
per_performance_reviews_v pr
where pa.person_id = peo.PERSON_ID
and pa.ASSIGNMENT_ID = pp.ASSIGNMENT_ID
and peo.PERSON_ID=pr.PERSON_ID
and pg.GRADE_ID=pa.GRADE_ID
--and peo.EMPLOYEE_NUMBER=STAFF_VAR.employee_no
and sysdate between peo.EFFECTIVE_START_DATE and peo.EFFECTIVE_END_DATE
and sysdate between pa.EFFECTIVE_START_DATE and pa.EFFECTIVE_END_DATE
and peo.BUSINESS_GROUP_ID = p_business_group_id_enter
and pp.change_DATE = (select max(change_DATE) from per_pay_proposals temp
where ASSIGNMENT_ID =pp.ASSIGNMENT_ID);
--L_BUSINESS_GROUP_ID NUMBER:=5128;
L_ASSIGNMENT_ID NUMBER;
L_PAY_PROPOSAL_ID NUMBER;
L_OBJECT_VERSION_NUMBER NUMBER;
L_pyp_proposed_sal_warning BOOLEAN;
L_additional_comp_warning boolean;
l_person_id number;
L_COMMON boolean;
L_ELEMENT_ENTRY_ID NUMBER;
TEMP NUMBER;
L_EFFECTIVE_START_DATE DATE;
L_MULTI VARCHAR2(30):='N';
L_APPROVED VARCHAR2(30):='Y';
L_CHANGE_DATE DATE:=TO_DATE(p_change_date,'DD-MON-YYYY');
BEGIN
v_disp_output:='EMPLOYEE_NUMBER'||','||
'BASIC'||','||
'EFF START DATE'||','||
'EFF END DATE';
fnd_file.put_line(FND_FILE.output,v_disp_output);
FOR STAFF_VAR IN STAFF LOOP
L_ELEMENT_ENTRY_ID:=null;
begin
select assign.assignment_id,assign.effective_start_date into
l_assignment_id,l_change_date_new
from per_people_f peo,per_assignments_f assign
where peo.person_id=assign.person_id
and sysdate between peo.effective_start_date and peo.effective_end_date
and sysdate between assign.effective_start_date and assign.effective_end_date
and current_employee_flag='Y'
and primary_flag='Y'
and peo.business_group_id=l_business_group_id
and peo.employee_number=staff_var.employee_no;
L_CHANGE_DATE_new:=L_CHANGE_DATE;
--L_CHANGE_DATE_new:=STAFF_VAR.v_effective_start_date;
begin
HR_MAINTAIN_PROPOSAL_API.INSERT_SALARY_PROPOSAL
P_PAY_PROPOSAL_ID=>L_PAY_PROPOSAL_ID
,P_ASSIGNMENT_ID=>staff_var.ASSIGNMENT_ID
,P_BUSINESS_GROUP_ID=>staff_var.BUSINESS_GROUP_ID
,P_CHANGE_DATE=>L_CHANGE_DATE_new
,P_PROPOSED_SALARY_N=>STAFF_VAR.basic_salary
,P_OBJECT_VERSION_NUMBER=>STAFF_VAR.OBJECT_VERSION_NUMBER
,p_multiple_components=>L_MULTI
,p_approved=>L_APPROVED
,P_VALIDATE=>false
,p_element_entry_id =>L_ELEMENT_ENTRY_ID
,P_INV_NEXT_SAL_DATE_WARNING=>l_common
,P_PROPOSED_SALARY_WARNING=>L_COMMON
,P_APPROVED_WARNING=>L_COMMON
,P_PAYROLL_WARNING=>L_COMMON
but we are getting the error Cause: FDPSTP failed due to ORA-01839: date not valid for month specified
ORA-06512: at "APPS.XXAL_BASIC_SAL_INCREMENT_PKG1", line 45
ORA-06512: at line 1
we tried the solution available in the metalink still its giving error ..
pl help us to solve this issue ...
how should we pass the date parameter while we run the concurrent program(we used date value set).
also we tried with some other value set also ..
Regards,
kumardear,
I have the following code to create proposal, but the API create salary proposal for all record s and does not create entry for all records it just creates for the first record
any advice
the code ....
/* Formatted on 2007/08/29 16:20 (Formatter Plus v4.8.8) */
----------------------- P R O P O S A L -------------------------
DECLARE
l_rows_processed NUMBER := 0;
l_commit_point NUMBER := 500;
l_business_group_id NUMBER
:= fnd_profile.VALUE ('PER_BUSINESS_GROUP_ID');
l_proposal_salry NUMBER;
l_approved CHAR (1);
l_rowid VARCHAR2 (30);
l_errmessage VARCHAR2 (400);
l_entry_indecator NUMBER;
l_assignment_id NUMBER;
p_ctr_object_version_number NUMBER;
-- Out Parameters --
l_element_entry_id NUMBER;
p_element_entry_id NUMBER;
l_ctr_object_version_number NUMBER;
l_pay_proposal_id NUMBER;
l_inv_next_sal_date_warning BOOLEAN;
l_proposed_salary_warning BOOLEAN;
l_approved_warning BOOLEAN;
l_payroll_warning BOOLEAN;
CURSOR crs_dc_mn
IS
SELECT xdp.ROWID, xdp.assignment_id, xdp.change_date,
xdp.proposal_reason, xdp.proposed_salary,
xdp.assignment_number, xdp.employee_number, xdp.person_id,
xdp.new_asg_id
FROM apps.xx_dc_proposal xdp
WHERE xdp.assignment_id <> -1
AND xdp.processed = 'N'
AND xdp.change_date =
(SELECT MIN (xdc.change_date)
FROM xx_dc_proposal xdc
WHERE xdc.assignment_id = xdp.assignment_id
AND xdc.processed = 'N')
ORDER BY assignment_id, change_date ASC;
pro_rcrd crs_dc_mn%ROWTYPE;
CURSOR crs_dc_proposal1 (p_asg_id IN NUMBER)
IS
SELECT xdp.ROWID, xdp.assignment_id, xdp.change_date,
xdp.proposal_reason, xdp.proposed_salary,
xdp.assignment_number, xdp.employee_number, xdp.person_id,
xdp.new_asg_id
FROM apps.xx_dc_proposal xdp
WHERE xdp.assignment_id <> -1
AND xdp.processed = 'N'
AND xdp.assignment_id = p_asg_id
ORDER BY assignment_id, change_date ASC;
BEGIN
OPEN crs_dc_mn;
FETCH crs_dc_mn
INTO pro_rcrd;
LOOP
BEGIN
hr_maintain_proposal_api.insert_salary_proposal
(p_pay_proposal_id => l_pay_proposal_id,
p_assignment_id => pro_rcrd.assignment_id,
p_business_group_id => l_business_group_id,
p_change_date => pro_rcrd.change_date,
p_comments => NULL,
p_next_sal_review_date => NULL,
p_proposal_reason => NULL,
p_proposed_salary_n => pro_rcrd.proposed_salary,
p_forced_ranking => NULL,
p_performance_review_id => NULL,
p_attribute_category => NULL,
p_attribute1 => NULL,
p_attribute2 => NULL,
p_attribute3 => NULL,
p_attribute4 => NULL,
p_attribute5 => NULL,
p_attribute6 => NULL,
p_attribute7 => NULL,
p_attribute8 => NULL,
p_attribute9 => NULL,
p_attribute10 => NULL,
p_attribute11 => NULL,
p_attribute12 => NULL,
p_attribute13 => NULL,
p_attribute14 => NULL,
p_attribute15 => NULL,
p_attribute16 => NULL,
p_attribute17 => NULL,
p_attribute18 => NULL,
p_attribute19 => NULL,
p_attribute20 => NULL,
p_object_version_number => l_ctr_object_version_number,
p_multiple_components => 'N', -- 918219
p_approved => 'Y',
p_validate => FALSE,
p_element_entry_id => l_element_entry_id,
p_inv_next_sal_date_warning => l_inv_next_sal_date_warning,
p_proposed_salary_warning => l_proposed_salary_warning,
p_approved_warning => l_approved_warning,
p_payroll_warning => l_payroll_warning
UPDATE xx_dc_proposal
SET processed = 'Y'
WHERE ROWID = pro_rcrd.ROWID;
l_rows_processed := l_rows_processed + 1;
IF l_rows_processed = l_commit_point
THEN
COMMIT;
l_rows_processed := 0;
END IF;
EXCEPTION
WHEN OTHERS
THEN
l_errmessage := SQLERRM;
UPDATE xx_dc_proposal
SET err_message = l_errmessage
WHERE ROWID = pro_rcrd.ROWID;
END;
END LOOP;
CLOSE crs_dc_mn;
COMMIT;
END;
.............................. -
How to pass a date parameter from report builder query designer to oracle database
i'm using report builder 3.0 connected to oracle database. i'm trying to pass a date parameter in the query with no success, i don't
know the exact syntax. I've tried :
SELECT * FROM igeneral.GCL_CLAIMS where CREATED_BY IN (:CREATED_BY) AND CLAIM_YEAR IN(:UW_YEAR) AND (LOSS_DATE) >To_Date('01/01/2014','mm/dd/yyyy')
it worked perfectly.
However if i try to put a date parameter "From" instead of 01/01/2014 it will not work, a Define Query Parameter popup window appear and error occurred after i fill
the values (usually i shouldnt get this popup i should enter the value when i run the report)
SELECT * FROM igeneral.GCL_CLAIMS where CREATED_BY IN (:CREATED_BY) AND CLAIM_YEAR IN(:UW_YEAR) AND (LOSS_DATE) >To_Date(:From,'mm/dd/yyyy')
appreciate your assistanceHi Gorgo,
According to your description, you have problem when in passing a parameter for running a Oracle Query. Right?
Based on my knowledge, it use "&" as synax for parameter in Oracle, like we use "@" in SQL Server. In this scenario, maybe you can try '01/01/2014' when inputing in "From". We are not sure if there's any limitation for To_Date()
function. For your self-testing, you can try the query in sqlplus/sql delveloper. Since your issue is related to Oracle query, we suggest you post this thread onto Oracle forum.
Best Regards,
Simon Hou
Maybe you are looking for
-
Hello, I've encountered issue during installation of SP1 to SQL Server 2012. After upgrade I'm getting this error in Event Log: Script level upgrade for database 'master' failed because upgrade step 'msdb110_upgrade.sql' encountered error 537, state
-
Mountain Lion download corrupts hard drive!!
I am trying to re-download Mountain Lion to create a boot jump drive so I can reinstall Mountain Lion clean. After download I can not open "mount" the installEDS.dmg file. Error pops up stating invalid checksums and I can not complete the process o
-
Hi ! I have made a ALV report. On the output screen, whenever the user clicks on the material name then, ME1P alike my custom report comes up with material purchase history report. Now, in this report the requirement iis :- 1). The respective P.O. No
-
Unable to view ext HDD when connect via wireless from mac to mac
Hi guys, I have just recently started sharing files over wireless and until the other day I had no problems. That problem being - when I log on I cannot see any external HDD's attached to the computer Im connecting with. I have an iMac and a MacbookP
-
I'm starting a new project and I want to combine the use of ADF without using adf-faces in other words I want to connect to the Oracle data base through ADF while building my own beans.