Protected by Copyscape Web Copyright Protection Software

Pages

Search This Blog

Thursday, March 27, 2014

Difference Between Interface and API

Hi All,

I asked same question to my friends, They replied like this....

What do you refer as interface or api? API is used to load the data. its the engine of load. Any interface should call an API or a package (which calls an API).
As long as its public API its supported by oracle. If you have the blessing to use private API you can use it too.
ETRM can find your supplier API. + all info needed.

API and Interface both are good...

For the Usage of API , we need to study the behavior of API and how to handle it, like error records , success records and how to capture error records,how to debug etc... Needs some program practice....

For the Interface or conversion, is just like playing safe game... we need to know which tables are hitting post running the program, like if error occurred, which table it is hitting and also summary will be displayed after running the program ...

Hope this will help you....

If I am wrong let me know...

SQL Query to fetch Element entry names and Values for employees for a given supervisor

SELECT PETF.ELEMENT_NAME "Element Entry Name" ,
PApF3.full_name supervisor,
PAPF.FULL_NAME "Employee Name" ,
PEEVF.EFFECTIVE_START_DATE "Entry Start Date" ,
PEEVF.EFFECTIVE_END_DATE "Entry End Date" ,
PEEVF.SCREEN_ENTRY_VALUE "Entry Values"
FROM PAY_ELEMENT_TYPES_F PETF ,
PAY_ELEMENT_LINKS_F PELF ,
PAY_ELEMENT_ENTRIES_F PEEF ,
PER_ALL_ASSIGNMENTS_F PAAF ,
PER_ALL_PEOPLE_F PAPF ,
PAY_ELEMENT_ENTRY_VALUES_F PEEVF ,
PAY_INPUT_VALUES_F PIVF
,per_all_people_f papf2
,per_all_people_f papf3
WHERE 1 = 1
--AND PETF.ELEMENT_NAME = '&Entry_Name'
AND PELF.ELEMENT_TYPE_ID = PETF.ELEMENT_TYPE_ID
AND PEEF.ELEMENT_TYPE_ID = PETF.ELEMENT_TYPE_ID
AND TRUNC(SYSDATE) BETWEEN TRUNC(PEEF.EFFECTIVE_START_DATE) AND TRUNC(PEEF.EFFECTIVE_END_DATE)
AND PAAF.ASSIGNMENT_ID = PEEF.ASSIGNMENT_ID
AND TRUNC(SYSDATE) BETWEEN TRUNC(PAAF.EFFECTIVE_START_DATE) AND TRUNC(PAAF.EFFECTIVE_END_DATE)
AND PAPF.PERSON_ID = PAAF.PERSON_ID
AND PAPF.CURRENT_EMP_OR_APL_FLAG = 'Y'
AND TRUNC(SYSDATE) BETWEEN TRUNC(PAPF.EFFECTIVE_START_DATE) AND TRUNC(PAPF.EFFECTIVE_END_DATE)
AND PEEVF.ELEMENT_ENTRY_ID = PEEF.ELEMENT_ENTRY_ID
AND PIVF.INPUT_VALUE_ID = PEEVF.INPUT_VALUE_ID
and papf2.person_id=paaf.person_id
AND paaf.primary_flag = 'Y'
AND paaf.assignment_type = 'E'
AND paaf.supervisor_id = papf3.person_id
AND papf3.current_employee_flag = 'Y'
AND papf2.business_group_id = paaf.business_group_id
AND SYSDATE BETWEEN papf2.effective_start_date AND papf2.effective_end_date
AND SYSDATE BETWEEN papf3.effective_start_date AND papf3.effective_end_date
AND PApF3.full_name=nvl(:P_SUPERVISOR,PApF3.full_name)
AND PEEVF.EFFECTIVE_START_DATE=nvl(:P_PAY_START_DATE,P EEVF.EFFECTIVE_START_DATE)
AND PEEVF.EFFECTIVE_END_DATE=nvl(:P_PAY_END_DATE,PEEVF .EFFECTIVE_END_DATE) 

How to get year start date and end date based on period name?

SELECT year_start_date
,last_day(add_months(trunc(year_start_date,'YYYY') , 14)) year_end_date
FROM gl_periods
WHERE period_name='MAY-13';

YEAR_START_DATE YEAR_END_DATE
-----------------------------------
01-APR-13 31-MAR-14

Monday, March 17, 2014

How to make the Oracle report concurrent program ends with warning?



Solution:
We can make the Oracle report concurrent program ends with warning based on conditions.
Let’s do the sample rdf report first.



Then Save this as XX_SAMPLE_ALL.rdf
And prepare layout.


Save it and go to oracle applications system administrator responsibility and create executable like below.


Then create concurrent program.


Then attach it to request group and go to that responsibility and then run the report through SRS window. Before this, make sure that our XX_SAMPLE_ALL.rdf is in server respective folder.



It is completed Normal. Click on view output


Now our requirement is whenever the output contains no data then the report should end with Warning status.

So first make the output contains No data. For that Just use where 1=2 then it will return no data.

Save it and move to server.
And run the report and check the output



So here no data but the report completed normal. But we need the concurrent program should goes to Warning status. For this take one summary column for count on any column from data model query.


Then go to After report trigger and write code like this.

function AfterReport return boolean is
l_result boolean;
begin
  SRW.USER_EXIT('FND SRWEXIT');
If :CS_COUNT<1 then
l_result := fnd_concurrent.set_completion_status('WARNING','Optional Sample Warning Text');
end if;
commit;
  return (l_result);
  end;

Then save the report and move to server and run the report.

Now it shows completed Warning. Click on the output.


Note:
-------

To achieve this we should use user exits and P_CONC_REQUEST_ID and we shouldn’t use fnd_global.apps_initialize.