Date parameters are passed from concurrent programs to subroutines in the format of
YYYY/MM/DD HH:MM:SS
(eg: 2012/01/31 00:00:00). Date from concurrent program cannot be used directly in the programs. To handle date input from concurrent program, it has to be accepted in variable of VARCHAR2 and convert to date format using the expression TO_DATE (SUBSTR (<date_variable>, 1, 10), 'yyyy/mm/dd')
OR
select FND_DATE.CANONICAL_TO_DATE(<date_variable>) from dual;
Passing date to fnd_request.submit_request
Date can only be passed to fnd_request.submit_request in the format of
YYYY/MM/DD HH:MM:SS
(eg: 2012/01/31 00:00:00). Any other format will lead to error or invalid date conversion. Once accepted from concurrent program date will be converted to the format of 'DD-MON-YY'. It should be converted before passing to submit_request using the expression
to_char(to_date(<date_variable>,'DD-MON-YY'),'yyyy/mm/dd')||' 00:00:00'
Hi
ReplyDeletei am having issues when passing date parameters to fnd_request.submit_request.
please can provide me working example of this.
how to use date parameters in fnd_request.submit_request
Thank you it worked:
ReplyDeletePassing date to fnd_request.submit_request
Date can only be passed to fnd_request.submit_request in the format of YYYY/MM/DD HH:MM:SS (eg: 2012/01/31 00:00:00). Any other format will lead to error or invalid date conversion. Once accepted from concurrent program date will be converted to the format of 'DD-MON-YY'. It should be converted before passing to submit_request using the expression
to_char(to_date(,'DD-MON-YY'),'yyyy/mm/dd')||' 00:00:00'
Excellent .... it helps me more.
DeleteThis worked. Thanks for posting this very useful info
ReplyDeleteHi,
ReplyDeleteI have tried the above format to pass date value by using FND_REQUEST.SUBMIT_REQUEST from a concurrent program. But, the program is getting into an error status (ORA-01861: literal does not match format string). Main program parameter list is attached with FND_STANDARD_DATE VS and Child program parameter list is attached with the same VS.
Please, help me to overcome this issue.
Thanks in advance.
To me the below code work well:
ReplyDeleteIn the procedure used by the concurrent program I defined the dates parameters as varchar2
procedure checa_retencao ( x_error_buf OUT NOCOPY VARCHAR2
, x_ret_code OUT NOCOPY NUMBER
, p_date_ini in varchar2
, p_date_end in varchar2
***
**
w_date_ini date;
w_date_end date;
begin
w_date_ini := to_date(p_date_ini,'rrrr/mm/dd hh24:mi:ss');
w_date_end := to_date(p_date_fim,'rrrr/mm/dd hh24:mi:ss');
for r1 in (select * from oe_order_headers_all ooh
where ooh.request_date between w_date_ini and w_date_fim)
loop
*
*
I hope it can help somebody.
Thaanks for this
ReplyDelete