Quantcast
Channel: Apps2Fusion Articles
Viewing all 930 articles
Browse latest View live

How-to Create a Custom ESS Job in Fusion Applications

$
0
0

How-to Create a Custom ESS Job in Fusion Applications

Creation of Custom Data Loader Summary Report  

Create a Data Model :  

SQL query to be used : 

SELECT hdbo.bus_obj_file_discriminator EntityName,fr.key_source_owner SourceSystemOwner, fr.key_source_id SourceSystemId, l.msg_text ErrorMessage,bo.data_file_name,bo.imported_status,bo.validated_status, bo.skipped_status,bo.loaded_status,'Error' DataLoadStatus,'N' DataLoadFlag   FROM   fusion.hrc_dl_message_lines l   ,      

fusion.hrc_dl_data_set_bus_objs  bo   ,      

fusion.hrc_dl_data_sets          ds   ,      

fusion.hrc_dl_physical_lines pl   ,      

fusion.hrc_dl_file_rows     fr   ,      

fusion.hrc_dl_file_lines    fl   ,      

fusion.hrc_dl_business_objects hdbo    

WHERE  l.message_source_table_name = 'HRC_DL_PHYSICAL_LINES'  

AND    bo.data_set_bus_obj_id      = l.data_set_bus_obj_id  

AND    ds.data_set_id              = bo.data_set_id  

AND    pl.physical_line_id   = l.message_source_line_id                              

AND    fr.row_id             = pl.row_id  

AND    fl.line_id            = fr.line_id  

AND    hdbo.business_object_id = bo.business_object_id  

And    ds.ucm_content_id = :p_ucm_content_id  

union    

SELECT hdbo.bus_obj_file_discriminator EntityName,fr.key_source_owner SourceSystemOwner, fr.key_source_id SourceSystemId, l.msg_text ErrorMessage,bo.data_file_name,bo.imported_status,bo.validated_status,bo.skipped_status,bo.loaded_status,'Error' dataloadstatus,'N' dataloadflag  

FROM   fusion.hrc_dl_message_lines l

, fusion.hrc_dl_data_set_bus_objs bo

, fusion.hrc_dl_data_sets ds

, fusion.hrc_dl_logical_lines ll

, fusion.hrc_dl_file_rows fr

, fusion.hrc_dl_file_lines fl

, fusion.hrc_dl_business_objects hdbo

WHERE l.message_source_table_name = 'HRC_DL_LOGICAL_LINES'

AND bo.data_set_bus_obj_id = l.data_set_bus_obj_id

AND ds.data_set_id = bo.data_set_id AND ll.logical_line_id = l.message_source_line_id

AND fr.logical_line_id = ll.logical_line_id AND fl.line_id = fr.line_id

AND hdbo.business_object_id = bo.business_object_id

And ds.ucm_content_id = :p_ucm_content_id

Screenshot :

CustESS1

Create a Report :

CustESS2

Create a Scheduled Process :

Navigation : Setup and Maintainenance -> Name ( Enter : Manage Custom Enterprise Scheduler Jobs for HCM Core Processes)

CustESS3

Select : Go to Task

You will see the following screen

CustESS4

Click Create and this navigates you to the following screen :

CustESS5

Schedule Jobs Details :

CustESS6

CustESS7

CustESS8

Parameter Details :

CustESS9

CustESS11

Running the Newly Created Custom Scheduled Job :

Navigation : Scheduled Processes -> Schedule New Process -> ( Search for ‘HCM Data Loader Summary Report’)

CustESS12

CustESS13

CustESS14

Sample Output Screenshot : 

CustESS15


Sending Output of Concurrent Programs as Email Attachment

$
0
0

Sending Output Of Concurrent Programs Via Email  

While working on Oracle Applications E- Business Suite it is a very common requirement that we want to send the output of a concurrent program as an email attachment to specific email id.  

This requirement can be easily achieved by creating a shell script which will take the output file and send email to the subscribers.  

For this you have to follow the below mentioned steps:

a) Create a Executable with execution file type as Host.

b) Create a Concurrent program which will have parameters as Request ID(for normal request whose output is stored in fnd_concurrent requests) , Output Request ID ( for XML based concurrent requests where otput is stored in fnd_conc_request_outputs), Attachment type( ‘LOG’/’OUT’ for Log file and output file respectively, Email Id ( email id to whom request needs to be send, Email Subject (Email Subject)          

Now whenever you will call this concurrent program passing the correct parameters you will be able to send the output to email id.  

Moreover, in order to have the control you can have flexibility to control which concurrent programs output you want to send via email and the corresponding email id create a lookup  

Lookup Type : XXC_GET_SUBSCRIBERS  

Code : 10,20,30 ..etc

Meaning : 10,20,30...etc

Description : Concurrent program Name whose output needs to be send  

Tag : Email ID to which the concurrent program output will be send.  

Attaching the shell script program for ready reference.  

SendEmail

When you save the above file in desktop and open with textpad , wordpad, notepad the code is as below:

#!/bin/sh
# *************************************************************************************************
# Filename: ebs2fusion_send_email.sh
# Author: Sandip
# Date Created: 14-OCT-2010
# Description: Send output/log File as an attachment
# Parameters: 1. Request ID
# 2. Output Request ID
# 2. Attachment Type: LOG / OUT
# 3. Email Ids
# 4. Email Subject
# History:
# Name Date Version Description
# --------------- ------------ ------- -----------------------
# Ashish 14-OCT-2010 1.0 Original Creation
# *************************************************************************************************

# -- ------------------------
# -- Extract input parameters
# -- ------------------------
USER_PWD=`echo $1|cut -d '"' -f2` # -- Database User/Pwd
USERNAME=`echo $1|cut -d '"' -f4` # -- UserName

REQ_ID=`echo $1|cut -d '"' -f8` # -- Request Id
OUT_REQ_ID=`echo $1|cut -d '"' -f10` # -- Output Request Id
ATTACHMENT_TYPE=`echo $1|cut -d '"' -f12` # -- Attachment Type
EMAIL_ID=`echo $1|cut -d '"' -f14` # -- Email Id
EMAIL_SUB=`echo $1|cut -d '"' -f16` # -- Email Subject

# -- ----------------------
# -- Print input parameters
# -- ----------------------
echo " "
echo "User Name: "$USERNAME
echo "Request Id: "$REQ_ID
echo "Output Request Id: "$OUT_REQ_ID
echo "Attachment Type: "$ATTACHMENT_TYPE
echo "Email Id: "$EMAIL_ID
echo "Subject: "$EMAIL_SUB
echo "---------------------------------------------------------------------------------------------"

# -- ----------------
# -- Email Validation
# -- ----------------
case $EMAIL_ID in
*@?*.?*) echo "Email Address Validated.";;
*) echo "Invalid Email Address. Please enter the correct format of email address and re-run the program";
exit 1;;
esac

if [ "$OUT_REQ_ID" == "" ]; then
echo "Fetching based on Request Id"
# -- -------------------------------------------
# -- Fetch OUT and LOG filename using Request ID
# -- -------------------------------------------
QUERY_OUTPUT=`sqlplus -s /nolog <<end_stmt1
set heading off
set feedback off
set verify off
set termout off
set pages 0

CONNECT $USER_PWD
SELECT fcq.status_code, length(fcq.logfile_name), length(fcq.outfile_name), fcq.logfile_name, fcq.outfile_name FROM fnd_concurrent_requests fcq WHERE fcq.request_id='${REQ_ID}';
end_stmt1`
else
echo "Fetching based on Output Request Id"
# -- -------------------------------------------
# -- Fetch OUT and LOG filename using Request ID
# -- -------------------------------------------
QUERY_OUTPUT=`sqlplus -s /nolog <<end_stmt1
set heading off
set feedback off
set verify off
set termout off
set pages 0

CONNECT $USER_PWD
SELECT fcq.status_code, length(fcq.logfile_name), length(fcro.file_name), fcq.logfile_name, fcro.file_name FROM fnd_concurrent_requests fcq, fnd_conc_req_outputs fcro WHERE fcq.request_id=fcro.concurrent_request_id AND fcq.request_id='${OUT_REQ_ID}';
end_stmt1`
fi

# -------------------------------------------------------------------
# -- Above query will return the value as
# -- 1. Connected. (If connected to DB)
# -- 2. Program Status (C or E)
# -- 3. Length of Log File Path and Name
# -- 4. Length of Output File Path and Name
# -- 5. Log File Path and Name
# -- 6. Output File Path and Name
# -------------------------------------------------------------------

# --------------------------------------
# -- Using cut command taking the values
# --------------------------------------
IS_CONNECTED_TO_DB=`echo $QUERY_OUTPUT|cut -d" " -f1`

if [ "$IS_CONNECTED_TO_DB" == "Connected." ]; then
#-- Getting the Program Status (C or E)
PROG_STATUS=`echo $QUERY_OUTPUT|cut -d" " -f2`
echo "PROGRAM Status: "$PROG_STATUS
else
echo "Error: Connecting to DB: "$QUERY_OUTPUT
exit 1
fi

# -------------------------------------------------
# -- Sending email
# -- LOG_FILE => Attaching the log file
# -- OUT_FILE => Attaching the output file
# -- EMAIL => Passing EMail id
# -- EMAIL_SUB => Subject of Email
# ------------------------------------------------
if [ "$ATTACHMENT_TYPE" == "OUT" ]; then
# -- Getting the output file (with path)
LEN_OUTPUT_FILE=`echo $QUERY_OUTPUT|cut -d" " -f4`
echo "Length of OUTPUT FILE: "$LEN_OUTPUT_FILE

OUTPUT_FILE=`echo $QUERY_OUTPUT|cut -d" " -f6`
echo "OUTPUT FILE: "$OUTPUT_FILE

if [ $LEN_OUTPUT_FILE -gt 80 ]; then
OUTPUT_FILE1=`echo $QUERY_OUTPUT|cut -d" " -f7`
echo "OUTPUT FILE1: "$OUTPUT_FILE1
OUTPUT_FILE=$OUTPUT_FILE$OUTPUT_FILE1
fi

echo "OUTPUT FILE: "$OUTPUT_FILE

# ---------------------------------------------------------------
# -- Sending EMail with output file attachment
# -- Using -e in echo command to print the file name in new line
# ---------------------------------------------------------------
#(echo -e "$EMAIL_BODY"; uuencode $OUTPUT_FILE OUTPUT_FILE_$REQ_ID.txt) | mail "$EMAIL_ID" -s "$EMAIL_SUB"

echo "$EMAIL_SUB"| mutt -a $OUTPUT_FILE "$EMAIL_ID" -s "$EMAIL_SUB"

echo "EMAIL has been sent with output file to $EMAIL_ID"

elif [ "$ATTACHMENT_TYPE" == "LOG" ]; then
# -- Getting the Log File (with Path)
LOG_FILE=`echo $QUERY_OUTPUT|cut -d" " -f5`

echo "LOG FILE: "$LOG_FILE

# ---------------------------------------------------------------
# -- Sending EMail with log file attachment
# -- Using -e in echo command to print the file name in new line
# ---------------------------------------------------------------
#(echo -e "$EMAIL_BODY"; uuencode $LOG_FILE LOG_FILE_$REQ_ID.txt) | mail "$EMAIL_ID" -s "$EMAIL_SUB"
#uuencode -m $LOG_FILE LOG_FILE_$REQ_ID.txt | mail "$EMAIL_ID" -s "$EMAIL_SUB"

echo "$EMAIL_SUB"| mutt -a $LOG_FILE "$EMAIL_ID" -s "$EMAIL_SUB"

echo "EMAIL has been sent with log file to $EMAIL_ID"
fi

User Hook Implementation – A Sample Example

$
0
0

Business Requirement:

Business wants to ensure that whenever an employee tries to overbook leaves the system should not allow him to do so. In case of exceptional situations the user will contact the Local HR who will then enter his/her leaves in the system.

In 11i Oracle Absence Management user/employee only gets a warning message stating that after you apply this leave your balance will be negative , but allows the user to ignore and proceed. The approver too does not gets any such message so the approver is completely in dark and so he unknowingly approves it.

In order to achieve this there are two options :

a) Upgrade your Application to R12

b) Write custom logic within user hook.

Now, it is not always possible to move to a higher version just for achieving some functionality although that would be best considering the added features you get with next upgrade, but as a stop gap solution we would try to see how we can get this done via user hook.

On investigation it was found that there is a particular out parameter p_exceeds_pto_entit_warning which gives the message on self-service screen. Since it is a out parameter we have to choose the API Hook of process type 'BP' and after insert.

Now I have written a package which takes p_exceeds_pto_entit_warning as input and displays the error message. I have also used a custom profile option XXC_LOA_RESTRICT_OVERBOOKING to ensure I have the option of switching on/off the functionality.

-- Profile Option Details—

Hook Imp 1

Name : XXC_LOA_RESTRICT_OVERBOOKING

User Profile Name : XXC: LOA Restrict Overbooking

Hierarchy Type Access Level : Responsibility and user ( visible and updatable)

User Access : Visible

SQL Validation: SQL="select meaning \"Yes or No\", lookup_code into :visible_option_value, :profile_option_value from fnd_lookups where lookup_type = 'YES_NO'" COLUMN="\"Yes or No\"(*)"

N.B: We have define this profile option value to ensure that the error will be thrown only when employees try to overbook using Self Service Responsibility but when the changes are to be incorporated from Absence Details screen it would allow HR to add details ( with seeded warning message).

In case you want to switch on this functionality just set the value of profile at Responsibility level to ‘Yes’ to switch off set the same to ‘No’.

This gives the flexibility that from Employee Self Service error will be displayed but not from core Absence Details form

---------- Create a Custom Message ----------------------------------------------

Message Name : XXC_HR_LOA_EMP_NOT_ENTITLED

Message : You have exceeded the maximum limit for this absence type. Please resubmit based on the local policy for this leave type.

Hook Imp 2

-------- Custom Package ----------------------------------------------------------------------------------------------------

Hook Imp 3          Hook Imp 4

-- Query to find API HOOK ID and MODULE ID

select hah.api_hook_id,ham.api_module_id

from apps.hr_api_hooks hah,

     apps.hr_api_modules ham

where hah.api_module_id = ham.api_module_id

and hah.hook_package = 'HR_PERSON_ABSENCE_BK1'

and hah.hook_procedure = 'CREATE_PERSON_ABSENCE_A'

-- api_hook_id = 3840, api_module_id = 1731

-- Register User HOOK by CALLING hr_api_hook_call_api.create_api_hook_call

DECLARE

P_VALIDATE BOOLEAN;

P_EFFECTIVE_DATE DATE;

P_API_HOOK_ID NUMBER;

P_API_HOOK_CALL_TYPE VARCHAR2(200);

P_SEQUENCE NUMBER;

P_ENABLED_FLAG VARCHAR2(200);

P_CALL_PACKAGE VARCHAR2(200);

P_CALL_PROCEDURE VARCHAR2(200);

P_API_HOOK_CALL_ID NUMBER;

P_OBJECT_VERSION_NUMBER NUMBER;

BEGIN

P_VALIDATE := TRUE;

P_EFFECTIVE_DATE := 01-JAN-1951;

P_API_HOOK_ID := 3840;-- derived from SQL1

P_API_HOOK_CALL_TYPE := 'PP';

P_SEQUENCE := 3000; -- any value greater than 2000, 1-2000 reserved for Oracle Use

P_ENABLED_FLAG := 'Y';

P_CALL_PACKAGE := 'XXC_HR_USER_HOOK_PKG'; -- custom package

P_CALL_PROCEDURE := 'XXC_LOA_RESTRICT_OVERBOOKING'; -- custom procedure

P_API_HOOK_CALL_ID := NULL; P_OBJECT_VERSION_NUMBER := NULL;

APPS.HR_API_HOOK_CALL_API.CREATE_API_HOOK_CALL ( P_VALIDATE, P_EFFECTIVE_DATE, P_API_HOOK_ID, P_API_HOOK_CALL_TYPE, P_SEQUENCE, P_ENABLED_FLAG, P_CALL_PACKAGE, P_CALL_PROCEDURE, P_API_HOOK_CALL_ID, P_OBJECT_VERSION_NUMBER );

     COMMIT;

dbms_output.put_line('API Hook ID: '|| P_API_HOOK_ID);

dbms_output.put_line('API OVN: '|| P_OBJECT_VERSION_NUMBER);

EXCEPTION

WHEN OTHERS THEN

               dbms_output.put_line('Error: '|| SQLCODE||SQLERRM);

END;

-- Output of above query

-- API Hook Call ID: 864

-- API OVN: 1

------Query to execute Pre-processor---------------------------------

Login to your unix enviornment and connect sqlplus

go to $PER_TOP/admin/sql execute hrahkone.sql

it will ask for module id derived from sql1

After completing the desired steps and setting the profile value of your Responsibility to ‘Yes’ /’ No’ the application will work as per business requirement.

-------------    pkgbody.Pkb-------------------------------

CREATE OR REPLACE PACKAGE BODY send_email
IS

/* ******************************************************************************************
* Package Name: send_email *
* Purpose: Send Email *
* *
* Procedures: *
* ----------- *
* send_email Invoke "XXC_SEND_EMAIL" Program *
* *
* Functions: *
* ---------- *
* get_subscribers: Get list of subscribers *
* *
* Change History: *
* --------------- *
* *
* Version Date Author Description *
* ------- ----------- ------------ ----------------------------------------------- *
* 1.0 02-Jul-2011 Ashish Send Email *
******************************************************************************************** */

/***********************************************************************************************
* Procedure: send_email *
* Description: Procedure to notify program run history *
* *
* Parameters: *
* ----------- *
* Name Description *
* ---------------------- ------------------------------------------------------------- *
* pn_request_id Request ID *
* pn_out_request_id Out Request ID *
* pc_subscribers Subscribers *
* pc_mail_subject Mail Subject *
* *
* Change History: *
* --------------- *
* *
* Version Date Author Description *
* ------- ----------- ------------ ------------------------------------- *
* 1.0 26-DEC-2011 Ashish Harbhajanka Initial Version *
************************************************************************************************/
PROCEDURE send_email
( pn_request_id IN NUMBER DEFAULT NULL,
pc_subscribers IN VARCHAR2,
pc_mail_subject IN VARCHAR2,
pb_sub_request IN BOOLEAN DEFAULT FALSE
)
IS

lc_proc_name VARCHAR2(100) := 'send_email.send_email';
lc_location VARCHAR2(50) := 'FLOW TRACE-1.100';
lc_errbuf VARCHAR2(2000) := NULL;
--lt_tokens error_handler.token_tbl_type DEFAULT error_handler.g_miss_token_tbl;

ln_request_id NUMBER := 0;

BEGIN
send_email.debug ( 'Start of ' || lc_proc_name || ' @ ' || TO_CHAR (SYSDATE, 'DD-MON-YYYY HH24:MI:SS'));
send_email.debug ( ' ');

-- Print input parameters
-- ----------------------
send_email.debug ('Input Parameters: ');
send_email.debug ('----------------- ');
send_email.debug (' Request ID: ' || pn_request_id);
send_email.debug (' Subscribers: ' || pc_subscribers);
send_email.debug (' Mail Subject: ' || pc_mail_subject);
send_email.debug (' ');

-- Submitting Mailing Program
-- --------------------------
send_email.debug ( ' Submitting mailer program: ' || send_email.gc_notify_prog_name );
lc_location := 'FLOW TRACE-1.110';

ln_request_id := APPS.FND_REQUEST.SUBMIT_REQUEST
( application => send_email.gc_appl_name,
program => send_email.gc_notify_prog_code,
sub_request => pb_sub_request,
argument1 => pn_request_id,
argument2 => 'OUT',
argument3 => pc_subscribers,
argument4 => pc_mail_subject
);
COMMIT;

IF ( ln_request_id = 0 )
THEN
-- Get Error Message
-- -----------------
lc_errbuf := SQLCODE || SQLERRM;

send_email.debug (lc_errbuf);

RAISE_APPLICATION_ERROR(-20003, lc_errbuf);
END IF;

send_email.debug ( ' Successfully submitted: ' || send_email.gc_notify_prog_name || ' - request id: ' || ln_request_id );

send_email.debug ( 'End of ' || lc_proc_name || ' @ ' || TO_CHAR(SYSDATE,'DD-MON-YYYY HH24:MI:SS') );
EXCEPTION
WHEN OTHERS THEN
-- Get Error Message
-- -----------------
lc_errbuf := SQLCODE || SQLERRM;

RAISE_APPLICATION_ERROR(-20003, lc_errbuf);
END send_email;

/* ***************************************************************************************
* Function: get_subscribers *
* Description: Get list of subscribers *
* *
* Parameters: *
* ----------- *
* Name Description *
* ------------- ----------------------------------------------------------- *
* pc_all_errors All error flag *
* pc_by_error_category Error category (amc_error_log.error_category) *
* pc_by_source_stream Source stream (amc_error_log.source_stream) *
* pc_by_source_object Source Object (amc_error_log.source_object) *
* pc_by_source_identifier1 Source Identifier1 - Source system Name *
* pc_by_source_identifier2 Source Identifier2 - Source system Type *
* pc_by_source_identifier3 Source Identifier3 - Any other identifier *
* *
* Change History: *
* --------------- *
* *
* Version Date Author Description *
* ------- ----------- ------------ -------------------------------------- *
* 1.0 26-DEC-2011 Ashish Harbhajanka Initial Version *
**************************************************************************************** */
FUNCTION get_subscribers(pc_source_object IN VARCHAR2 DEFAULT NULL)
RETURN VARCHAR2
IS

CURSOR subscribers_cur
IS
SELECT flvv.tag
FROM apps.fnd_lookup_values_vl flvv
WHERE flvv.lookup_type = gc_subscribers_lookup
AND flvv.description = pc_source_object
AND flvv.enabled_flag = gc_yes
AND SYSDATE BETWEEN flvv.start_date_active AND NVL(flvv.end_date_active,SYSDATE);

lc_proc_name CONSTANT VARCHAR2(70) := 'send_email.get_subscribers';
lc_subscribers VARCHAR2(4000) := NULL;

BEGIN
send_email.debug( 'Start of ' || lc_proc_name || ' @ ' || TO_CHAR(SYSDATE,'DD-MON-YYYY HH24:MI:SS') );
send_email.debug( ' ' );

-- Print input parameters
-- ----------------------
send_email.debug( 'Input Parameters: ' );
send_email.debug( '----------------- ' );
send_email.debug( ' By Source Object: ' || pc_source_object );

-- Concatinate all subscribers into a string
-- -----------------------------------------
FOR subscribers_rec IN subscribers_cur
LOOP
lc_subscribers := lc_subscribers || subscribers_rec.tag || '; ';
END LOOP;

send_email.debug(' Subscribers: ' || lc_subscribers);

send_email.debug( 'End of ' || lc_proc_name || ' @ ' || TO_CHAR(SYSDATE,'DD-MON-YYYY HH24:MI:SS') );
send_email.debug( ' ' );

RETURN (lc_subscribers);

EXCEPTION
WHEN OTHERS THEN
RAISE;

END get_subscribers;

END send_email;
/

 

-------------------------------- pkgspec.pks  ------------------------------------

CREATE OR REPLACE PACKAGE send_email AUTHID CURRENT_USER
IS

/* ******************************************************************************************
* Package Name: send_email *
* Purpose: Send Email *
* *
* Procedures: *
* ----------- *
* send_email Invoke "XXC_SEND_EMAIL" Program *
* *
* Functions: *
* ---------- *
* get_subscribers: Get list of subscribers *
* *
* Change History: *
* --------------- *
* *
* Version Date Author Description *
* ------- ----------- ------------ ----------------------------------------------- *
* 1.0 02-Jul-2011 Ashish Send Email *
******************************************************************************************** */

gc_notify_prog_code CONSTANT VARCHAR2(30) := 'XXC_SEND_EMAIL';
gc_subscribers_lookup CONSTANT VARCHAR2(30) := 'XXC_GET_SUBSCRIBERS';


/*****************************************************************************************
* Procedure: send_email *
* Description: Procedure to notify program run history *
* *
* Parameters: *
* ----------- *
* Name Description *
* ---------------------- -------------------------------------------------------------*
* pn_request_id Request ID *
* pn_out_request_id Out Request ID *
* pc_subscribers Subscribers *
* pc_mail_subject Mail Subject *
* pb_sub_request Sub Request *
* *
* Change History: *
* --------------- *
* *
* Version Date Author Description *
* ------- ----------- ------------------ --------------------------------- *
* 1.0 26-DEC-2011 Ashish Harbhajanka Draft Version *
**************************************************************************************** */
PROCEDURE send_email
( pn_request_id IN NUMBER DEFAULT NULL,
pc_subscribers IN VARCHAR2,
pc_mail_subject IN VARCHAR2,
pb_sub_request IN BOOLEAN DEFAULT FALSE
);


/* ***************************************************************************************
* Function: get_subscribers *
* Description: Get list of subscribers *
* *
* Parameters: *
* ----------- *
* Name Description *
* ------------- ----------------------------------------------------------- *
* pc_all_errors All error flag *
* pc_by_error_category Error category (amc_error_log.error_category) *
* pc_by_source_stream Source stream (amc_error_log.source_stream) *
* pc_by_source_object Source Object (amc_error_log.source_object) *
* pc_by_source_identifier1 Source Identifier1 - Source system Name *
* pc_by_source_identifier2 Source Identifier2 - Source system Type *
* pc_by_source_identifier3 Source Identifier3 - Any other identifier *
* *
* Change History: *
* --------------- *
* *
* Version Date Author Description *
* ------- ----------- ------------------ --------------------------------- *
* 1.0 26-DEC-2011 Ashish Harbhajanka Draft Version *
**************************************************************************************** */
FUNCTION get_subscribers(pc_source_object IN VARCHAR2 DEFAULT NULL)
RETURN VARCHAR2;

END send_email;
/

{jcomments off}

WEBADI-A-Sample-Implementation

$
0
0

ADI Set Up Steps

The Basic Mandatory step before starting with the ADI Set Up is to enable Security settings in Internet Explorer, Word, Excel as follows:-

(a) Word:-

(i)Tools->Macro->Security->Security Level tab->check low button (ii)Tools->Macro->Security->Trusted Publishers tab->check Trust Access to Visual Basic Project checkbox also.

(b) Excel:- Same as above

(c) Internet Explorer:- (i) Tools->Internet Options-> Security-> Custom Level-> Initialize and script ActiveX controls not marked as safe-> Prompt (ii) Tools->Internet Options-> Security-> Custom Level-> Automatic prompting for file downloads-> enable (iii) Tools->Internet Options-> Security-> Custom Level-> Use Pop-up Blocker-> Disable

Requirement:

1. Need to download all the applicant details who does not have SIT values using Oracle WEBADI for specific business group

2. Need to insert SIT values for the applicants data which is downloaded

3. Need to upload the applicant’s data to which changes have been done.

4. Need to check weather the data is updated or not from the front end.

1) Create a new view to retrieve data for the applicants

Who does not contain SIT VALUES?

CREATE OR REPLACE VIEW XXGENAPPSITDETAILS_V

AS

SELECT DISTINCT papf.first_name Applicant_First_Name,

papf.last_name Applicant_Last_Name,

papf.applicant_number,

pav.name vacnacy_name,

NULL person_analysis_id,

NULL CEDS_Attended,

NULL CEDS_Writing_Score,

NULL CEDS_Reading_Score,

NULL CEDS_Listening_Score,

NULL CEDS_Free_Speach_Score,

NULL HAWK_Attended,

NULL object_version_number

FROM per_all_people_f papf,

per_all_assignments_f paaf,

per_all_vacancies pav,

APPS.per_person_types ppt,

PER_PERSON_TYPE_USAGES_F pptuf

WHERE papf.business_group_id = ppt.business_group_id

and papf.business_group_id = paaf.business_group_id

and papf.person_id = paaf.person_id

and paaf.vacancy_id = pav.vacancy_id

and pav.business_group_id = paaf.business_group_id

AND papf.business_group_id IN

(SELECT business_group_id

FROM per_business_groups

WHERE name = 'Genpact Guatemala'

)

AND pptuf.person_id = papf.person_id

and pptuf.person_type_id = ppt.person_type_id

AND upper(PPT.USER_PERSON_TYPE) IN ('APPLICANT')

AND sysdate BETWEEN papf.effective_start_date

AND papf.effective_end_date

AND (papf.person_id,pav.name)

NOT in

(SELECT papf.person_id,

pac.SEGMENT1 Vacancy_Number

FROM

apps.per_person_analyses ppa,

apps.per_analysis_criteria pac,

per_all_people_f papf,

APPS.per_person_types PPT ,

per_person_type_usages_f pptuf,

fnd_id_flex_structures FIFS,

per_business_groups bg

WHERE ppa.business_group_id= bg.business_group_id

AND bg.NAME = 'Genpact Guatemala'

AND pptuf.person_id = papf.person_id \

AND ppt.person_type_id = pptuf.person_type_id

AND fifs.id_flex_num = PPA.ID_FLEX_NUM

AND FIFS.id_flex_structure_code = 'XX_CEDS_GUATEMALA'

AND upper(PPT.USER_PERSON_TYPE) IN ('APPLICANT')

and papf.person_id=ppa.person_id

and ppa.analysis_criteria_id=pac.analysis_criteria_id

and sysdate BETWEEN papf.effective_start_date

and papf.effective_end_date

AND TRUNC(sysdate) BETWEEN pptuf.EFFECTIVE_START_DATE AND pptuf.EFFECTIVE_END_DATE )

minus

SELECT DISTINCT

papf.first_name Applicant_First_Name,

papf.last_name Applicant_Last_Name,

papf.applicant_number,

pav.name vacnacy_name,

NULL person_analysis_id,

NULL CEDS_Attended,

NULL CEDS_Writing_Score,

NULL CEDS_Reading_Score,

NULL CEDS_Listening_Score,

NULL CEDS_Free_Speach_Score,

NULL HAWK_Attended,

NULL object_version_number

FROM per_all_people_f papf,

per_all_assignments_f paaf,

per_all_vacancies pav,

APPS.per_person_types ppt,

PER_PERSON_TYPE_USAGES_F pptuf

WHERE papf.business_group_id = ppt.business_group_id

and papf.business_group_id = paaf.business_group_id

and papf.person_id = paaf.person_id

and paaf.vacancy_id = pav.vacancy_id

and pav.business_group_id = paaf.business_group_id

AND papf.business_group_id IN

(SELECT business_group_id

FROM per_business_groups

WHERE name = 'Genpact Guatemala'

)

AND pptuf.person_id = papf.person_id

and pptuf.person_type_id = ppt.person_type_id

AND upper(PPT.USER_PERSON_TYPE) IN ('APPLICANT')

AND sysdate BETWEEN papf.effective_start_date

AND papf.effective_end_date

AND (papf.person_id,pav.name)

in

(SELECT papf.person_id,

pac.SEGMENT1 Vacancy_Number

FROM

apps.per_person_analyses ppa,

apps.per_analysis_criteria pac,

per_all_people_f papf,

APPS.per_person_types PPT ,

per_person_type_usages_f pptuf,

fnd_id_flex_structures FIFS,

per_business_groups bg

WHERE

ppa.business_group_id= bg.business_group_id

AND bg.NAME = 'Genpact Guatemala'

AND pptuf.person_id = papf.person_id

AND ppt.person_type_id = pptuf.person_type_id

AND fifs.id_flex_num = PPA.ID_FLEX_NUM

AND FIFS.id_flex_structure_code = 'XX_CEDS_GUATEMALA'

AND upper(PPT.USER_PERSON_TYPE) IN ('APPLICANT')

and papf.person_id=ppa.person_id

and ppa.analysis_criteria_id=pac.analysis_criteria_id

and sysdate BETWEEN papf.effective_start_date

and papf.effective_end_date

AND TRUNC(sysdate) BETWEEN pptuf.EFFECTIVE_START_DATE AND pptuf.EFFECTIVE_END_DATE

)

Concepts

Integrator – This is the definition that stores the information about the action the user wishes to perform. For example, downloading specific data to a spreadsheet for viewing or to modify and upload back to the database. For ADE users, this equated to the Style.

API – Application Programming Interface. This is the pl/sql interface by which data is validated and uploaded into Oracle HRMS. You would associate an api with an integrator if it was intended to either create new data in the application or update data that had been previously downloaded. See Oracle HRMS Configuring,Reporting and System Administration manual for a list of supported apis.

View – A view is an object by which you can query data on a table or tables. If the action you are intending to perform involves downloading data, you must associate a view with the integrator. If you are using Create style APIs, you do not require a view. You can elect to use a seeded view, for example, PER_PEOPLE_V, to use with your integrator. However, if the integrator is for updating data, then it is recommended that you create your own views and remember to include the OBJECT_VERSION_NUMBER, and any other In/Out parameters used by your chosen API.

One thing to beware of is the use of Aliases in views if you are downloading from a form. For example,if you use an alias for Applicant_Name called Starter, and then use a restrictive query in the form on Applicant Name before running the integrator in Web ADI, you will get the following error in the BNE log.

BneBaseSQL.executeBneQuery: Exception while running query. Error Code: 904, Message: ORA-00904: "APPLICANT_NAME": invalid identifier

The column APPLICANT_NAME has been overwritten by the alias in the definition loaded into the BNE tables.

Layout – This is where the user selects the columns to be displayed in the spreadsheet or Word document from the API and/or View used by the integrator. An integrator can have more than one layout defined for it. You can choose which one to use when you create your document.

Mapping – the mapping definition links the data source to the api columns. If no view is specified against the integrator or no text file used to load data, then no mapping is needed. When the data source is a view, the mapping is created automatically, however if a text file is being used then a mapping needs to be manually defined to associate each column in the file (source) to the relevant api parameter (target). See example c) in section, A Step by Step Guide to Creating HRMS Integrators.

--> Login to Oracle Apps 

-- >Select Oracle WEB ADI Responsibility

webadi1

 

-->Click on Create Document

--> Select Excel 2003 option from the viewer

webadi2

 

--> Click on Next button

webadi3

Select Integrator “HR Integrator Setup”

Click on Next button

webadi4

 

Select Layout as “Integrator Setup”

Click on Next button

webadi5

Select Content as „None”

Click on Next button

webadi6

Click on create document button

webadi7

click on open

webadi8

Detail information for column heading in the above Template

1. Upl - ignore

2. Metadata Type - select List of Values from Oracle menu

3. or right click on mouse.Choose UPDATE

4. Application Short Name- Choose your Application Short Name

5. (see Getting Started)

6. Integrator User Name - Enter a name for your integrator

7. (eg Update Asg Details)

8. View Name - Create your own view, but must include

9. object_version_number from

10. per_all_assignments_f. See Getting

11. Started.

12. Form Name - GENERAL

13. API Package Name - HR_ASSIGNMENT_API

14. API Procedure Name - UPDATE_EMP_ASG_CRITERIA

15. Interface User Name - Enter a unique name

16. Interface Param List - Enter a unique name

17. API Type - select List of Values from Oracle menu

18. or right click on mouse.Choose PROCEDURE

19. API Return Type - ignore

Metadata Type : UPDATE

Application Short name : PER

Intergrator User name : XXTEST_SITAPP

View name : XXGENAPPSITDETAILS_V

Form Name : GENERAL

API Package Name : XX_GENGUATAPPLSIT_PKG

API Procedure Name : XX_GENGUATAPPLSIT_PRC

Interface User Name : XXTEST_SITAPP

Interface Parameter List Name : XXTEST_SITAPP

API Type : PROCEDURE

Note : Interface User Name and Interface Parameter List Name should be same as Integrator name

webadi9

-->goto menu Oracle-->upload

webadi10

 

If upload is successful it will show in green colour which as shown below

webadi11

--> Goto home page of Oracle Webadi responsibility

webadi12

 

Click on Create Documnet

webadi13

 

Select excel 2003 option

webadi14

Select HR Maintain Integrator Form Function Association

Click on Next button

webadi15

Select Form Function Associations option

Click on Next button

webadi16

Select Form Function Associations option

Click on Next button

webadi17

Give Application Short name (#App_short_name)

Give Integrator Short name (#integrator_name)

Click on Next continue

webadi18

Click on Create document button

Form Function Template

webadi19

(3) Define a Form Function like

webadi2o

Function : XXTEST_SITAPP_WEBADI

User Function name : XXTEST_SITAPP_WEBADI

webadi21

Properties : SSWA Servlet Function

webadi23

Web HTML: oracle.apps.bne.webui.BneApplicationService

webadi24

Note: SELECT Integrator_code

FROM BNE_INTEGRATORS_TL

WHERE user_name LIKE „XXTEST_SITAPP‟ (< Integrator Name >)

Parameters: bne: page=BneCreateDoc&bne: integrator=800 :< Integrator_code>

Parameters: bne: page=BneCreateDoc&bne: integrator=800:GENERAL_1420_INTG

System Administrator--> Requests-->Define

--> Query Oracle Web Adi responsibility

webadi25

Copy Menu Name

webadi26

-->Query Menu Name

webadi27

-->Add the defined function name (#function_name) to menu

-->Goback to Form Function template (#Form_Function)

webadi28

Integrator Application Shot name: PER

Integrator User name: XXTEST_SITAPP

Form Function: XXTEST_SITAPP_WEBADI

-->Goto menu Oracle--> Upload

webadi29

-->Goto Oracle Web Adi Responsibility home page

-->Select Define Layout

webadi30

-->Select the Defined Integrator Name

webadi31

-->Click go

-->Provide suitable layout name and unique layout key

webadi32

-->Click Continue

Select all the fields which need to populate in the layout.

Select the fields which are defined in the Procedure parameters.

webadi33

Goto Oracle Web Adi Responsibility home page

Select Define Mapping

webadi34

webadi35

Click go

Define Mapping

webadi36

Provide mapping name and number of fields to be mapped

webadi37

Here mapping is done for defined view columns and procedure parameters

webadi38

Click on Lookup and Click on apply button

Goto --> System Administration --> Requests --> Responsibility

--> Query the responsibility to which webadi template to be attached

--> Query genpact Guatemala irec hiring team

webadi39

->copy the menu name.

webadi40

-> Add the function to menu

-->Goto Genpact Guatemala Irec Hiring Team Responsibility

-->Click Genpact Guatemala Web Adi

--> Select Excel 2003

--> Click Next

--> Select the mapping name which we have defined

--> Click Continue

--> Click Create Document

--> Click Open

-->Here it displays all the applicant details who does not have SIT values

--> Before inserting SIT values for a specific applicant

--> Applicant does not contain SIT values

--> Insert SIT values to the applicant “Sambit Swain”

CEDSATTENDED1 = „Y‟

CEDSWRITINGSCORE1 = 2

CEDSREADINGSCORE1 = 2

CEDSLISTININGSCORE = 4

CEDSFREESPEACHSCORE = 5

HAWKATTENDED = „Y‟

goto menu à OracleàUpload

--> Select Flagged rows option

--> click close

--> Check after uploading SIT values

--> Here SIT values for the applicant is updated.

Fusion Payables- How to Generate Trial Balance Report

$
0
0

Purpose of this article is to provide information regarding generating Payables Trial Balance Report and different parameters needed in Fusion Payable Application.

Purpose of Payable Trial Balance Report

Payables Trial Balance Report lists and subtotals by supplier and liability account all unpaid and partially paid invoices that Payables transferred to the general ledger. Accounts Payable Trial Balance Report helps to verify that total accounts payable liabilities in Payables equal to those in the Fusion General Ledger. Before closing a period, we can compare the cumulative total liability provided by this report with the total liability listed in General Ledger to reconcile these balances. The Trial Balance Report lists and subtotals by supplier all unpaid and partially paid invoices for which Payables created journal entries. Payables lists and subtotals the invoices by the Accounts Payable Liability account. These invoices represent organization's outstanding accounts payable liability. Therefore, to obtain the most up-to-date trial balance, we should create journal entries for payment and invoice activity before submitting this report. Since this report presents outstanding accounts payable liability information, it is only valid for an accrual set of book.

Run this report from the Reports and Analytics work area or the Manage Scheduled Processes page.

S 1

This process flow diagram is taken from Oracle

Prerequisites

When defining natural account values, assign the financial category of Payables to all accounts to include in the Payables Trial Balance. To report invoices that are paid with bills payable as outstanding as long as the bills payable status has not changed to Negotiable, assign the financial category of Payables to the bills payable account and post invoice and payment activity to the General Ledger.

Supplier Model & Supplier Site Assignments

$
0
0

Objective:

In this training article we will learn about the Supplier Model and Supplier Site assignments.

Supplier Model:

Supplier model are modeled as a global entity and are not created within a business unit or in any other Organizational context. A procurement business unit establishes a relationship with a supplier through the creation of a site which maintains internal controls for how procure to pay transactions are executed with the supplier. The other entities of the supplier profile capture mostly external information that is provided by the supplier, such as tax identifiers, addresses, contact information, and so on.

Supplier Site and Supplier Site Assignments:

The site represents a business relationship between a procurement business unit and the supplier. Supplier sites are associated with a procurement business unit. It represents the relation between a procurement business unit and a supplier. A procurement business unit represents a specific purchasing or sourcing organization that is responsible for establishing and maintaining supplier relationships. It set terms, controls and policies which govern how procure to pay transactions are executed between its client business units and the supplier. The site has following information:

 

  • Procurement business unit
  • Site Name
  • Site Address
  • Site Purposes- whether its Procurement, Pay, Purchase, etc.

 

The following snap shot would give an insight of Supplier Site Setup.

Navigation >> Suppliers work area > Search for Supplier > Site tab

SS1

Supplier Site assignments directs which clientbusiness units can transact with the site. It also defines the sold-tobusiness unit associated with the client business unit. In this case sold-to business unit represents the organisation that assumes the liability for the purchases made on behalf of the client business unit. It is to be noted that in most cases, the client business unit and sold-to business unit are the same. The following snap shot would give an insight of Supplier Site Setup.

Navigation >> Suppliers work area > Supplier > Site tab > Site link > Site Assignments tab    

SS2

Collections in Java

$
0
0

Objective:

In the previous article Exception in Java, we have learned how exceptions and exception handling in java works. In this article we will learn about the Collections in Java.

 

Collections:

Collections in java is a framework that provides an architecture to store and manipulate the group of objects. All the operations that you perform on a data such as searching, sorting, insertion, manipulation, deletion etc. can be performed by Java Collections. Java Collection simply means a single unit of objects. Java Collection framework provides many interfaces (Set, List, Queue, Deque etc.) and classes (ArrayList, Vector, LinkedList, PriorityQueue, HashSet, LinkedHashSet, TreeSet etc).

Collection represents a single unit of objects i.e. a group.

 

What is collections in Framework?

A collections framework is a unified architecture for representing and manipulating collections. All collections frameworks contain the following:

  1. Interfaces: These are abstract data types that represent collections. Interfaces allow collections to be manipulated independently of the details of their representation. In object-oriented languages, interfaces generally form a hierarchy.

  2. Implementations: These are the concrete implementations of the collection interfaces. In essence, they are reusable data structures.

  3. Algorithms: These are the methods that perform useful computations, such as searching and sorting, on objects that implement collection interfaces. The algorithms are said to be polymorphic: that is, the same method can be used on many different implementations of the appropriate collection interface. In essence, algorithms are reusable functionality.

Apart from the Java Collections Framework, the best-known examples of collections frameworks are the C++ Standard Template Library (STL) and Small talk's collection hierarchy. Historically, collections frameworks have been quite complex, which gave them a reputation for having a steep learning curve. We believe that the Java Collections Framework breaks with this tradition, as you will learn for yourself in this chapter.

Benefits of the Java Collections Framework:

The Java Collections Framework provides the following benefits:

Reduces programming effort: By providing useful data structures and algorithms, the Collections Framework frees you to concentrate on the important parts of your program rather than on the low-level "plumbing" required to make it work. By facilitating interoperability among unrelated APIs, the Java Collections Framework frees you from writing adapter objects or conversion code to connect APIs.

Increases program speed and quality: This Collections Framework provides high-performance, high-quality implementations of useful data structures and algorithms. The various implementations of each interface are interchangeable, so programs can be easily tuned by switching collection implementations. Because you're freed from the drudgery of writing your own data structures, you'll have more time to devote to improving programs' quality and performance.

Allows interoperability among unrelated APIs: The collection interfaces are the vernacular by which APIs pass collections back and forth. If my network administration API furnishes a collection of node names and if your GUI toolkit expects a collection of column headings, our APIs will interoperate seamlessly, even though they were written independently.

Reduces effort to learn and to use new APIs: Many APIs naturally take collections on input and furnish them as output. In the past, each such API had a small sub-API devoted to manipulating its collections. There was little consistency among these ad hoc collections sub-APIs, so you had to learn each one from scratch, and it was easy to make mistakes when using them. With the advent of standard collection interfaces, the problem went away.

Reduces effort to design new APIs: This is the flip side of the previous advantage. Designers and implementers don't have to reinvent the wheel each time they create an API that relies on collections; instead, they can use standard collection interfaces.

Fosters software reuse: New data structures that conform to the standard collection interfaces are by nature reusable. The same goes for new algorithms that operate on objects that implement these interfaces.

The root of the collection hierarchy. A collection represents a group of objects known as its elements. The Collection interface is the least common denominator that all collections implement and is used to pass collections around and to manipulate them when maximum generality is desired. Some types of collections allow duplicate elements, and others do not. Some are ordered and others are unordered. The Java platform doesn't provide any direct implementations of this interface but provides implementations of more specific subinterfaces, such as Set and List. Also see The Collection Interface section.

 

Example 1:

package com.java2novice.iterator;

import java.util.ArrayList;

import java.util.Iterator;

import java.util.List;

public class MyCollectionIterator {

   public static void main(String a[]){

        

       List<String> myList = new ArrayList<String>();

       myList.add("Java");

       myList.add("Unix");

       myList.add("Oracle");

       myList.add("C++");

       myList.add("Perl");

       Iterator<String> itr = myList.iterator();

       while(itr.hasNext()){

           System.out.println(itr.next());

       }

   }

}

//Output:

Java

Unix

Oracle

C++

Perl

 

Methods of Iterator interface

There are only three methods in the Iterator interface. They are:

  1. public boolean hasNext() it returns true if iterator has more elements.

  2. public object next() it returns the element and moves the cursor pointer to the next element.

  3. public void remove() it removes the last elements returned by the iterator. It is rarely used.
Example 2:

package com.myjava.listiterator;

import java.util.ArrayList;

import java.util.List;

import java.util.ListIterator;

public class MyListIterator {

   public static void main(String a[]){

       List<Integer> li = new ArrayList<Integer>();

       ListIterator<Integer> litr = null;

       li.add(23);

       li.add(98);

       li.add(29);

       li.add(71);

       li.add(5);

       litr=li.listIterator();

       System.out.println("Elements in forward directiton");

       while(litr.hasNext()){

           System.out.println(litr.next());

       }

       System.out.println("Elements in backward directiton");

       while(litr.hasPrevious()){

           System.out.println(litr.previous());

       }

   }

}

Example Output

Elements in forward directiton
23
98
29
71
5
Elements in backward directiton
5
71
29
98
23

How-to Migrate Custom HCM Extract

$
0
0

Business Requirement

At times we have multiple instances and we intend to move one HCM Extract ( created in Development) environment to another instance ( UAT ) or even in Production.

We can use the Export Import feature then.

Export

Login to Fusion Applications, Navigate to ‘Data Exchange’ and then search for the custom worker extract you wish to export.

Click on the Export symbol and xml file gets downloaded as displayed:

 

IMPORT

Navigate to ‘Data Exchange’ as displayed:

Under Tasks -> HCM Extracts -> Manage Extract Definitions

Click on Import Extract Option

A new popup window opens which asks for the File Path as displayed:

Give a new name if you wish to

Once the import Process is complete you would be able to search for the Extract:

 

{jcomments off}


FUSION APPLICATIONS – USER ROLE DETAIL REPORT

$
0
0

BUSINESS REQUIREMENT:

It is a very common requirement in almost all implementation where in the Stakeholders are interested to know how many user accounts are there is the system along with the corresponding roles attached to them. While oracle has delivered some seeded Reports which could be run from ‘Application Diagnostic Framework, screenshot below (Troubleshooting -> Run Diagnostic Tests)

ORACLE DELIVERED REPORTS

1) User Roles Display

2) User and Role : Role Details

3) User and Role : User Details

NAVIGATION TO RUN DELIVERED REPORTS

Login to Application -> Run Diagnostic Tests

UR1

After Running Reports :

UR2

DELIVERED REPORT 1 -> USER ROLES DISPLAY

User Roles Display: (Displays the Roles attached to procurement user)

ur3

Input Value : Sachin.Satpute

UR5

Output Screenshot :

ur30

DELIVERED REPORT 2 -> USER AND ROLE : ROLE DETAILS

User and Role : Role Details

Takes Role Name as input and displays all users who have the role attached to their user account. ( Secured i.e if the individual who is running the Report has access to a specific Data Set individuals belonging to that Data Set would only be displayed).

ur31

 

Input Value : Employee

ur8

 

Output Screenshot :

ur33

DELIVERED REPORT 3 -> USER AND ROLE : USER DETAILS

User and Role : User Details

Takes User Name as input and displays all roles attached to the user. (Secured i.e if the individual who is running the Report has access to a User Account being passed as input data would be displayed else no.)

ur7

Input value : Sachin.Satpute

ur34

Output Screenshot :

ur35

NEED FOR A CUSTOM CONSOLIDATED REPORT 

But if we need a consolidated report which will list all the users along with all the roles they have neither of the delivered ones help.

So we need a Custom Report (Preferred O/P Format could be RTF, Interactive, Excel,PPT. )

Since we are planning to display a colorful report with Different colour Code Combination ( using Conditional Formatting feature we choose PPT Format for this example)

CUSTOM REPORT NAME -> USER AND ROLE DETAILS REPORT

SQL USED FOR USER AND ROLE DETAILS REPORT

select papf.person_number "PersonNumber",

    ppnf_emp.full_name "PersonName",

           pu_emp.user_start_date "UserAccountStartDate",

           pu_emp.user_end_date "UserAccountEndDate",

           pu_emp.is_user_account_active "UserAccountStatus",

           pu_emp.username "UserAccountName",

           pu_emp.is_user_account_suspended "IsUserAccountSuspended",

           pu_emp.user_distinguished_name "UserAccountInternalName",

           pur_emp.method_code "RoleProvisioningMethod",

           pur_emp.is_user_role_active "IsUserRoleActive",

           pur_emp.is_user_role_terminated "IsUserRoleTerminated",

Case

When (pur_emp.is_user_role_active = 'Yes' AND pur_emp.is_user_role_terminated = 'No' ) Then 'Active'

When (pur_emp.is_user_role_active = 'No' AND pur_emp.is_user_role_terminated = 'No') Then 'NeitherActiveNorTerminated'

When (pur_emp.is_user_role_active = 'Yes' AND pur_emp.is_user_role_terminated = 'Yes') Then 'ActiveAndTerminated'

When (pur_emp.is_user_role_active = 'No' AND pur_emp.is_user_role_terminated = 'Yes' ) Then 'InactiveAndNotTerminated'

End as "UserRoleStatus",

pur_emp.role_start_date "UserRoleStartDate",

pur_emp.role_end_date "UserRoleEndDate",

prd_emp.abstract_role "IsRoleAAbstractRole",

prd_emp.job_role "IsRoleAJobRole",

prd_emp.data_role "IsRoleADataRole",

prd_emp.is_role_active "IsRoleActive",

Case

When (prd_emp.abstract_role = 'Y' AND prd_emp.job_role = 'N' AND prd_emp.data_role = 'N' ) Then 'Abstract Role'

When (prd_emp.abstract_role = 'N' AND prd_emp.job_role = 'Y' AND prd_emp.data_role = 'N' ) Then 'Job Role'

When (prd_emp.abstract_role = 'N' AND prd_emp.job_role = 'N' AND prd_emp.data_role = 'Y' ) Then 'Data Role'

When (prd_emp.abstract_role is NULL AND prd_emp.job_role is NULL AND prd_emp.data_role is NULL ) Then '--NA--'

End as "UserRoleType",

prd_emp.role_common_name "RoleCommonName",

prd_emp.multitenancy_common_name "MultitenancyCommonName",

prd_emp.role_distinguished_name "IsRoleDistinguishedName",

prdt_emp.role_name "UserRoleName",

prdt_emp.RoleDescription

FROM per_all_people_f papf

JOIN

(

SELECT ppnf.full_name,

ppnf.person_id

FROM per_person_names_f ppnf

WHERE ppnf.name_type = 'GLOBAL'

AND TRUNC(SYSDATE) BETWEEN ppnf.effective_start_date AND ppnf.effective_end_date

) ppnf_emp

ON (

ppnf_emp.person_id = papf.person_id

AND TRUNC(SYSDATE) BETWEEN papf.effective_start_date AND papf.effective_end_date

)

LEFT OUTER JOIN

(

SELECT pu.person_id,

pu.user_id,

pu.username,

to_char(pu.start_date,'DD-MM-RRRR') user_start_date,

to_char(pu.end_date,'DD-MM-RRRR') user_end_date,

DECODE(pu.active_flag,'N','Inactive','Y','Active') is_user_account_active,

DECODE(pu.suspended,'N','No','Y','Yes') is_user_account_suspended,

pu.user_distinguished_name

FROM per_users pu

) pu_emp

ON(pu_emp.person_id = papf.person_id AND TRUNC(SYSDATE) BETWEEN papf.effective_start_date AND

papf.effective_end_date)

LEFT OUTER JOIN

(

SELECT pur.user_id,

pur.role_id,

        pur.role_guid,

DECODE(pur.method_code,'A','Automatic','M','Manually','E','Externally Provisioned') method_code,

DECODE(pur.active_flag,'N','No','Y','Yes') is_user_role_active,

DECODE(pur.terminated_flag,'N','No','Y','Yes') is_user_role_terminated,

to_char(pur.start_date,'DD-MM-RRRR') role_start_date,

to_char(pur.end_date,'DD-MM-RRRR') role_end_date

FROM per_user_roles pur

) pur_emp

ON (pu_emp.user_id = pur_emp.user_id)

JOIN

(

SELECT        prd.role_id,

prd.role_guid,  

                     prd.abstract_role,

                     prd.job_role,

                     prd.data_role,

DECODE(prd.active_flag,'N','No','Y','Yes') is_role_active,

prd.role_common_name,

prd.multitenancy_common_name,

prd.role_distinguished_name

FROM per_roles_dn prd

) prd_emp

ON (pur_emp.role_id = prd_emp.role_id AND pur_emp.role_guid = prd_emp.role_guid)

JOIN

(

SELECT prdt.role_id, prdt.role_name,

              prdt.description RoleDescription,

              prdt.source_lang

FROM per_roles_dn_tl prdt

) prdt_emp

ON (prd_emp.role_id = prdt_emp.role_id AND pur_emp.role_id = prdt_emp.role_id AND prdt_emp.source_lang = 'US' )

WHERE papf.person_number = nvl(:pn_person_number, papf.person_number)

AND TRUNC (SYSDATE) BETWEEN papf.effective_start_date AND papf.effective_end_date

CONDITIONAL FORMATTING

The different colour code feature can be added using the Conditional Formatting fields

( Highlight and Manage Formats )

ur13

ur14

REPORT OUTPUT

ur15

SCHEDULING THE REPORT

Scheduling the Report :

ur16

 

ur17

SCHEDULED OUTPUT (PPT FORMAT)

ur18

ESS JOB CREATION

ur20

PARAMETER DEFINITION

ur21

RUNNING SCHEDULED JOB

ur22

ur23

ur24

RUNNING SCHEDULED JOB FOR ONE PERSON

Person Number : 10

ur25

ur26

ur27

ur28

ur29

           

Fusion Applications - Creating Custom HCM Extract

$
0
0

    Business Requirement

    HCM Extracts and BI / OTBI / OBIA (currently enabled in on premise) are the most commonly used modes via which data can be transferred from Fusion Applications to 3rd Party System.

    While BI Publisher even OTBI and OBIA in same cases allows you to get the specific data set which is being desired by the third party system, we still need a robust outbound tool / mechanism to cater to all business needs. Some important features being:

      a) Dynamic File Name

      b) Dynamic File Location

      c) Capability to capture ‘Changed Data’ only feature

      d) Capability to provide data into different formats like E-Text, XML, PDF, RTF

    While it is agreed all this can be done using BI Publisher ( Using advanced Features like Bursting which allows dynamic file name generation and also allows encryption too) still for large Data Set and for more coherent integration the preferred and most commonly used mechanism( as of today) is HCM Extract.

    The literal meaning of HCM Extract as the name suggests is HR Output. ‘HR’ for HCM and Output for ‘Extract’ so HCM Extract means HR Output in simple terms i.e. when you get HR Data as Output from Fusion Applications it is called HCM Extract.

    Custom HCM Extract Creation: Available Options

    There are three available options while creating Custom HCM Extract in a Fusion POD (Application Environment):

      A) Import Custom HCM Extract from another Fusion Instance

      B) Make a copy of existing delivered extracts. Add/Edit/Delete/Modify/Extend the same and make a Custom HCM Extract

      C) Create a Custom HCM Extract from scratch

    To make things simpler we would try to publish all three categories in three different articles which would be posted soon. The article names (proposed) are:

      A) How-to Migrate Custom HCM Extract

      B) How-to Make a Copy of Existing Delivered HCM Extracts

      C) How-to Create a Custom HCM Extract from scratch.

Set and File Handling in Java

$
0
0

Objective:
In the previous article Collection in Java we learned about the collection method used in Java. In this article we will learn about the Set in Collection and File Handling in Java.

 

Set:

The Set interface contains only methods inherited from Collection and adds the restriction that duplicate elements are prohibited. Set also adds a stronger contract on the behavior of the equals and hashCode operations, allowing Set instances to be compared meaningfully even if their implementation types differ.

Set have its implementation in various classes like

  1. HashSet

  2. LinkedHashSet.

  3. TreeSet

Methods with description:

add( )

Adds an object to the collection

clear( )

Removes all objects from the collection

contains( )

Returns true if a specified object is an element within the collection

isEmpty( )

Returns true if the collection has no elements

iterator( )

Returns an Iterator object for the collection which may be used to retrieve an object

size( )

Returns the number of elements in the collection

 

Example 1:

Following is the example to explain Set functionality:

import java.util.*;

public class SetDemo {

 public static void main(String args[ ]) {
    int count[ ] = {34, 22,10,60,30,22};
    Set<Integer> set = new HashSet<Integer>();
    try{
       for(int i = 0; i<5; i++){
          set.add(count[i]);
       }
       System.out.println(set);
 
       TreeSet sortedSet = new TreeSet<Integer>(set);
       System.out.println("The sorted list is:");
       System.out.println(sortedSet);

       System.out.println("The First element of the set is: "+
                         (Integer)sortedSet.first());
       System.out.println("The last element of the set is: "+
                       (Integer)sortedSet.last());
    }
    catch(Exception e){}
 }
}

//Output:

[amrood]$ java SetDemo
[34, 30, 60, 10, 22]
The sorted list is:
[10, 22, 30, 34, 60]
The First element of the set is: 10
The last element of the set is: 60

 

File Handling in java:

Java FileInputStream and OutputStream

In Java, FileInputStream and FileOutputStream classes are used to read and write data in file. In another words, they are used for file handling in java.

 

Java FileOutputStream:

Java FileOutputStream is an output stream for writing data to a file.

If you have to write primitive values then use FileOutputStream.Instead, for character-oriented data, prefer FileWriter.But you can write byte-oriented as well as character-oriented data.

Example:

import java.io.*;  

class Test{  

public static void main(String args[]){  

try{  

    FileOutputstream fout=new FileOutputStream("abc.txt");  

    String s="Sachin Tendulkar is my favourite player";  

    byte b[]=s.getBytes();//converting string into byte array  

    fout.write(b);  

    fout.close();  

    System.out.println("success...");  

   }catch(Exception e){system.out.println(e);}  

 }  

}  

//Output:

success...

 

Java FileInputStream:

Java FileInputStream class obtains input bytes from a file.It is used for reading streams of raw bytes such as image data. For reading streams of characters, consider using FileReader.

It should be used to read byte-oriented data for example to read image, audio, video etc.

 

Example:

import java.io.*;  

class SimpleRead{  

public static void main(String args[]){  

 try{  

   FileInputStream fin=new FileInputStream("abc.txt");  

   int i=0;  

   while((i=fin.read())!=-1){  

    System.out.println((char)i);  

   }  

   fin.close();  

 }catch(Exception e){system.out.println(e);}  

}  

}

//Output

Sachin is my favourite player.

Global Absence Accrual Fast Formula In Fusion Absence Management: An Introduction

$
0
0

{jcomments off}

Introduction

In this article we would try to understand what a fast formula is. Why is it named such way. Is it about some formula ( what kind of formula) and why is it called Fast ( is it something which is being tracked against time).

The answers to both the above question is ‘I don’t Know’.

Not sure why it is called fast formula it should be rather named as ‘Custom Code on Application UI’ or may be ‘Application Custom Code’.

So basically a Fast Formula or  Application Custom Code ( if you may like to call it that way) is a way which allows you to customize a delivered / seeded solution to meet specific business needs.

Types of Fast Formulas

Most of the times Fast Formulas are used for HCM related modules ( no comments on whether they can be used for other modules that would be a separate topic and would be discussed later) some of the primary ones being :

Functional Areas

  1. Payroll

  2. Absence Management

Technical Areas

  1. Inbound Integration ( Typical Example being Custom Logic to generate Person Number )

  2. Outbound Integration ( HCM Extracts)

In this article we would discuss primarily about Fast Formulas used associated with Fusion Applications Absence Management.

While there are multiple types of Fast Formulas in Absence Management some of the ones we are trying to discuss here being:

  1. Global Absence Accrual

  2. Global Absence Accrual Matrix

  3. Global Absence Entry Validation

  4. Global Absence Partial Period Accrual Rate

  5. Global Absence Type Duration

  6. Global Absence Vesting Period

  7. Participation and Rate Eligibility Formula

  8. Compensation Hierarchy Determination

Global Absence Accrual

Lets start with describing what do we mean by Global Absence Accrual. Truly speaking the name could very well have been Absence Accrual. For now lets say its Global Absence Accrual and not Absence Accrual ( for reasons not known to me ).

Absence means lack of presence and Accrual means method of accumulating. So Absence Accrual becomes ‘Method of Accumulating Lack of Presence’ or in simpler words ‘Method of Accumulating Absences’.

Each organization may have different ways of accumulating absences like:

  1. a) Allocate All Leaves on the First Day of the Year ( Frontloaded Accruals)

  2. b) Allocate Leaves on regular intervals , say first day of month (Incremental Accrual).

Within the above two categories there could be different variation like do some specific calculation when the employee is having say‘X’ years of service, Grade is ‘G1’, Position is ‘P1’ and so on.

So in these cases the delivered UI Screen would not help and we would need some specific custom codes to be written, hence Fast Formula.

A Sample Example

In this example the customer has a requirement where-in the customer wants to have accrual for Absence of  ‘Extended Child Care Leave’ Type of  2 if the employee has joined the organization within the first 6 months of the calendar year and 1 if the employee has joined the organization after 6 months of the same.

/******************************************************************************

FORMULA NAME: XX_ANC_ACCRUAL_XX_ExtendedChildCare

FORMULA TYPE: Global Absence Accrual

DESCRIPTION: This formula returns the accrual for employees enrolled in Extended Child Care

Change History:

Name Date Comments

-----------------------------------------------

Ashish Harbhajanka 10-Apr-2015 Initial Version

*******************************************************************************/

DEFAULT FOR PER_ASG_FTE IS 1

DEFAULT FOR PER_REL_ORIGINAL_DATE_OF_HIRE IS '4712/12/31 00:00:00' (date)

DEFAULT FOR PER_REL_ACTUAL_TERMINATION_DATE IS '4712/12/31 00:00:00' (date)

ln_accrual = 0

ld_effective_date=PER_REL_ORIGINAL_DATE_OF_HIRE

ld_emp_term_date =PER_REL_ACTUAL_TERMINATION_DATE

ld_current_date = GET_CONTEXT (EFFECTIVE_DATE,'4712/12/31 00:00:00' (date))

ld_term_start_date = TO_DATE ('01-01-'||TO_CHAR (ld_effective_date, 'rrrr'),'dd-mm-rrrr')

ld_term_end_date = TO_DATE ('31-12-'||TO_CHAR (ld_effective_date, 'rrrr'),'dd-mm-rrrr')

ld_term_duration = DAYS_BETWEEN (ld_term_end_date, ld_term_start_date)

ld_hire_year = TO_NUMBER (TO_CHAR (ld_effective_date,'rrrr'))

ld_curr_year = TO_NUMBER (TO_CHAR (ld_current_date,'rrrr'))

Accrual = 0

IF (ld_curr_year = ld_hire_year)

THEN

(

IF (TO_NUMBER(TO_CHAR(ld_effective_date,'MM')) < 7)

THEN

(

accrual = 2

)

IF (TO_NUMBER(TO_CHAR(ld_effective_date,'MM')) >= 7 AND TO_NUMBER(TO_CHAR(ld_effective_date,'MM')) <= 12)

THEN

(

accrual = 1

)

)

IF (ld_curr_year > ld_hire_year)

THEN

(accrual = 2)

ceiling = 2

carryover=0

vestingUnits=3

vestingUOM='M'

RETURN accrual,ceiling,carryover,vestingUnits,vestingUOM

We would discuss more in detail about the other Absence Fast Formula in other article.

Till then bye, do try this out.

Global Absence Accrual Matrix Fast Formula In Fusion Absence Management: An Introduction

$
0
0

{jcomments off}

Introduction

In this article we would try to understand what a fast formula is. Why is it named such way. Is it about some formula ( what kind of formula) and why is it called Fast ( is it something which is being tracked against time).

The answers to all the above question is ‘I don’t Know’.

Not sure why it is called fast formula it should be rather named as ‘Custom Code on Application UI’ or may be ‘Application Custom Code’.

So basically a Fast Formula or  Application Custom Code ( if you may like to call it that way) is a way which allows you to customize a delivered / seeded solution to meet specific business needs.

Types of Fast Formulas

Most of the times Fast Formulas are used for HCM related modules ( no comments on whether they can be used for other modules that would be a separate topic and would be discussed later) some of the primary ones being :

Functional Areas

  1. Payroll

  2. Absence Management

Technical Areas

  1. Inbound Integration ( Typical Example being Custom Logic to generate Person Number )

  2. Outbound Integration ( HCM Extracts)

In this article we would discuss primarily about Fast Formulas associated with Fusion Applications Absence Management.

While there are multiple types of Fast Formulas in Absence Management some of the ones we are trying to discuss here being:

  1. Global Absence Accrual

  2. Global Absence Accrual Matrix

  3. Global Absence Entry Validation

  4. Global Absence Partial Period Accrual Rate

  5. Global Absence Type Duration

  6. Global Absence Vesting Period

  7. Participation and Rate Eligibility Formula

Global Absence Accrual Matrix

Lets start with describing what do we mean by Global Absence Accrual Matrix. Truly speaking the name could very well have been Absence Accrual Matrix. For now lets say its Global Absence Accrual Matrix and not Absence Accrual Matrix ( for reasons not known to me ).

Absence means lack of presence and Accrual means method of accumulating. So Absence Accrual becomes ‘Method of Accumulating Lack of Presence’ or in simpler words ‘Method of Accumulating Absences’.

Matrix in simpler terms means ‘Multiple Categories / Bands ’.

Hence Global Absence Accrual Matrix will stand for Method of Accumulating Absences for Multiple Combinations / Categories / Bands. So when we have different Accrual Rules for Different Bands we need to use Accrual Matrix Formula.

Each organization may have different ways of accumulating absences like:

  1. Allocate All Leaves on the First Day of the Year ( Frontloaded Accruals)

  2. Allocate Leaves on regular intervals, say first day of month (Incremental Accrual).

A Sample Example

In this example the customer has a requirement where-in the customer wants to have Annual Absence Accrual based on different Bands (categories). The different Accrual Bands are classified based upon the length of Service ( SYSDATE – DATE_OF_HIRE) in Years . So the First Accrual band is for 3 years of LOS (length of Service) and corresponding Accrual Value is 15. Second band is for 6 years of LOS (lengths of Service) with accrual value of 18 and lastly Band 3 for all Individuals having LOS greater than 6, the accrual value is 21.

/*******************************************************************

FORMULA NAME: XX_ANC_XX_ACCMAT_Annual

FORMULA TYPE: Global Absence Accrual Matrix

DESCRIPTION: This sample formula will find the weighted average of the Accrual value based on the number of the days the employee was eligible in a particular band. For example, I an employee has changed from Band 1 to Band 2 on 03-Mar-2014 and accrual value for Band 1 and Band 2 is 100 and 200 respectively. The formula will return:

accrual =

(100*(number of days employee in Band1) + 200*(number of days Employee in Band 2))/365

Change History:

Name Date Comments

--------------------------------------------------------------------------------------------------------------------

Ashish Harbhajanka 12-May-2015 Initial Version

--------------------------------------------------------------------------------------------------------------------

***********************************************************************/

/*=========== DATABASE ITEM DEFAULTS BEGIN =====================*/

DEFAULT for PER_ASG_REL_ORIGINAL_DATE_OF_HIRE is '4712/12/31 00:00:00' (date)

Default for IV_BAND_CHG_DT1 is '1951/01/01 00:00' (date)

Default for IV_BAND_CHG_DT2 is '1951/01/01 00:00' (date)

DEFAULT for IV_ACCRUALPERIODSTARTDATE is '4712/12/31 00:00:00' (date)

DEFAULT for IV_ACCRUALPERIODENDDATE is '4712/12/31 00:00:00' (date)

Default for IV_BAND_CHG_BEFVAL1 is 15

Default for IV_BAND_CHG_AFTVAL1 is 18

Default for IV_BAND_CHG_AFTVAL2 is 21

DEFAULT FOR PER_ASG_PERSON_NUMBER IS 'X'

Default for IV_CEILING is 0

Default for IV_CARRYOVER is 0

Inputs are IV_ACCRUAL,IV_BAND_CHG_DT1,IV_BAND_CHG_DT2,IV_BAND_CHG_BEFVAL1,IV_BAND_CHG_AFTVAL1,IV_BAND_CHG_BEFVAL2,IV_BAND_CHG_AFTVAL2,IV_CARRYOVER,IV_CEILING,IV_ACCRUALPERIODSTARTDATE,IV_ACCRUALPERIODENDDATE

/*=========== DATABASE ITEM DEFAULTS ENDS======================*/

/*================ FORMULA SECTION BEGIN =======================*/

ld_effective_date = GET_CONTEXT(EFFECTIVE_DATE,'4712/12/31 00:00:00' (date))

ld_term_start_date = TO_DATE('01-01-'||TO_CHAR(ld_effective_date, 'rrrr'),'dd-mm-rrrr')

ld_term_end_date = TO_DATE('31-12-'||TO_CHAR(ld_effective_date, 'rrrr'),'dd-mm-rrrr')

ld_band1_end_date = ADD_YEARS(PER_ASG_REL_ORIGINAL_DATE_OF_HIRE,3)

ld_band2_end_date = ADD_YEARS(PER_ASG_REL_ORIGINAL_DATE_OF_HIRE,6)

accrual = IV_ACCRUAL

l_log = ess_log_write('***********************START********************************')

l_log = ess_log_write('PERSON_NUMBER : '|| PER_ASG_PERSON_NUMBER)

l_log = ess_log_write('ld_effective_date : '|| TO_CHAR(ld_effective_date,'DD-MM-YYYY'))

l_log = ess_log_write('ld_band1_end_date : '|| TO_CHAR(ld_band1_end_date,'DD-MM-YYYY'))

l_log = ess_log_write('ld_band2_end_date : '|| TO_CHAR(ld_band2_end_date,'DD-MM-YYYY'))

l_log = ess_log_write('IV_BAND_CHG_BEFVAL1 : '|| TO_CHAR(IV_BAND_CHG_BEFVAL1))

l_log = ess_log_write('IV_BAND_CHG_AFTVAL1 : '|| TO_CHAR(IV_BAND_CHG_AFTVAL1))

l_log = ess_log_write('IV_BAND_CHG_AFTVAL2 : '|| TO_CHAR(IV_BAND_CHG_AFTVAL2))

l_log = ess_log_write('Initial Accrual : '|| TO_CHAR(IV_ACCRUAL))

l_log = ess_log_write('Accrual Period Start Date : '|| TO_CHAR(IV_ACCRUALPERIODSTARTDATE,'DD-MON-RRRR'))

l_log = ess_log_write('Accrual Period End Date : '|| TO_CHAR(IV_ACCRUALPERIODENDDATE,'DD-MON-RRRR'))

l_log = ess_log_write('***********************END********************************')

IF (TO_CHAR(ld_effective_date,'YYYY') = TO_CHAR(ld_band1_end_date,'YYYY')) /* (TO_CHAR(ld_effective_date,'YYYY') = TO_CHAR(IV_BAND_CHG_DT1,'YYYY')) */

THEN

(

l_log = ess_log_write('Within Band 1')

l_no_of_ds1 = DAYS_BETWEEN(ld_band1_end_date,ld_term_start_date) + 1

l_log = ess_log_write('l_no_of_ds1 : '|| TO_CHAR(l_no_of_ds1))

l_no_of_ds2 = DAYS_BETWEEN(ld_term_end_date,ld_band1_end_date) + 1

l_log = ess_log_write('l_no_of_ds2 : '|| TO_CHAR(l_no_of_ds2))

l_no_of_ds3 = 0

l_log = ess_log_write('IV_BAND_CHG_BEFVAL1 : '|| TO_CHAR(IV_BAND_CHG_BEFVAL1))

l_log = ess_log_write('IV_BAND_CHG_AFTVAL1 : '|| TO_CHAR(IV_BAND_CHG_AFTVAL1))

l_log = ess_log_write('IV_BAND_CHG_AFTVAL2 : '|| TO_CHAR(IV_BAND_CHG_AFTVAL2))

accrual=(l_no_of_ds1*IV_BAND_CHG_BEFVAL1 + l_no_of_ds2 * IV_BAND_CHG_AFTVAL1 + l_no_of_ds3*IV_BAND_CHG_AFTVAL2)/ 365

l_log = ess_log_write('Accrual : '|| TO_CHAR(accrual))

)

IF (TO_CHAR(ld_effective_date,'YYYY') = TO_CHAR(ld_band2_end_date,'YYYY')) /*(TO_CHAR(ld_effective_date,'YYYY') = TO_CHAR(IV_BAND_CHG_DT2,'YYYY'))*/

THEN

(

l_log = ess_log_write('Within Band 2')

l_no_of_ds1 = 0

l_no_of_ds2 = DAYS_BETWEEN(ld_band2_end_date,ld_term_start_date) + 1

l_log = ess_log_write('l_no_of_ds2 : '|| TO_CHAR(l_no_of_ds2))

l_no_of_ds3 = DAYS_BETWEEN(ld_term_end_date,ld_band2_end_date) + 1

l_log = ess_log_write('l_no_of_ds3 : '|| TO_CHAR(l_no_of_ds3))

l_log = ess_log_write('IV_BAND_CHG_BEFVAL1 : '|| TO_CHAR(IV_BAND_CHG_BEFVAL1))

l_log = ess_log_write('IV_BAND_CHG_AFTVAL1 : '|| TO_CHAR(IV_BAND_CHG_AFTVAL1))

l_log = ess_log_write('IV_BAND_CHG_AFTVAL2 : '|| TO_CHAR(IV_BAND_CHG_AFTVAL2))

accrual=(l_no_of_ds1*IV_BAND_CHG_BEFVAL1 + l_no_of_ds2 * IV_BAND_CHG_AFTVAL1 + l_no_of_ds3*IV_BAND_CHG_AFTVAL2)/ 365

l_log = ess_log_write('Accrual : '|| TO_CHAR(accrual))

)

l_log = ess_log_write(' Prorated Accrual considered : '|| TO_CHAR(accrual))

floored_accrual = FLOOR(accrual)

decimal_accrual = accrual - floored_accrual

IF (decimal_accrual < 0.5 )

THEN

accrual = floored_accrual

IF (decimal_accrual >= 0.5)

THEN

accrual = floored_accrual + 1

l_log = ess_log_write(' Final Accrual considered : '|| TO_CHAR(accrual))

carryover = IV_CARRYOVER

ceiling = IV_CEILING

l_log = ess_log_write(' Carryover : '|| TO_CHAR(IV_CARRYOVER))

l_log = ess_log_write(' Ceiling : '|| TO_CHAR(IV_CEILING))

return accrual,ceiling,carryover

We would discuss more in details about the other Absence Fast Formula in other article.

Till then bye, do try this out.

WHY FUSION ?

$
0
0

{jcomments off}

INTRODUCTION

Fusion as the word suggests stand for Culmination / Mix / Combination.

In context of Oracle, Fusion is referred as Fusion Applications.

So Why Fusion Applications ?

Before that let’s understand What is Fusion Applications ?

Fusion Application is a new Oracle Product to cater to ERP Needs.

But we already have so many ERP Applications. Some of the most popularly used being EBS (E-Business Suite), PeopleSoft, JDEdwards to name a few. So why a new ERP application to cater to business needs. The answer is :

Fusion Applications is an attempt ( and for that matter a very popular and widely accepted one) by Oracle . It takes the best features from EBS and PeopleSoft and does makes life simpler for Business Users and (Both Functional and Technical) Implementation Consultants  .Lets try to get into more details of the same . We would categorize this discussion into two broad categories namely:

  1. Business Reasons ( Details about why should Business adopt Fusion)

  2. Functional Reasons ( Details about why should Functional Consultant adopt Fusion)

  3. Technical Reasons ( Details about why should Technical Consultant adopt Fusion)

BUSINESS REASONS

  1. Easy to use

  2. Better Look and Feel

  3. Better Functionality

  4. Better User Experience

FUNCTIONAL REASONS

  1. Configuration is simpler ( Most configurations from ‘Setup and Maintenance’)

Most of the setups start with Manage% ( screenshot below)

  1. Configuration is based on Train Stop Models ( First Step guides you to second step and so on)

  1. Allows What IF Scenarios (Manage Enterprise Structures, Allows Multiple Combination but Loads just one)

Below Screenshots gives details of creating Enterprise Structures ( and then to view to Technical Summary Report). This would not get loaded but would be used for comparative analysis. Screenshots displaying what-if scenarios ( ESC Setup Example) .

Example of WHAT IF SCENARIO ( Using Enterprise Structure Configurator)

WHAT IF SCENARIO EXAMPLE-> Step 1: Manage Enterprise

WHAT IF SCENARIO EXAMPLE-> Step 2 : Manage Divisions

WHAT IF SCENARIO EXAMPLE-> Step 3 : Manage Legal Entities

WHAT IF SCENARIO EXAMPLE-> Step 4 : Create Business Units

WHAT IF SCENARIO EXAMPLE-> Step 5 : Manage Business Units

WHAT IF SCENARIO EXAMPLE-> Step 6 : Manage Reference Data SETS

WHAT IF SCENARIO EXAMPLE-> STEP 7 : Manage Business Unit Set Assignment

WHAT IF SCENARIO EXAMPLE-> Step 8 : Manage Location Reference Set

WHAT IF SCENARIO EXAMPLE-> Interview Results

WHAT IF SCENARIO EXAMPLE-> Management Reporting Structure

WHAT IF SCENARIO EXAMPLE-> Technical Summary Report

WHAT IF SCENARIO EXAMPLE-> Click on Download Technical Summary Report to Get PDF ReporT

WHAT IF SCENARIO EXAMPLE-> Report Screenshots



We can configure multiple such Enterprise Values and compare before loading one. So we can have WHAT IF scenarios. This feature is not supported in older Legacy Systems ( EBS / PPLSOFT).

TECHNICAL REASONS

Broad Responsibilities of any Technical Resource on any ERP Implementations are :

  1. InBound Integration ( HDL from RELEASE 10 Makes Life SimPLER, DATA LOAD on BUTTON CLICK)

  2. REPORTING ( BIP / OTBI / OBIA )

  3. OUTBOUND INTEGRATION ( HCM EXTRACTS)

All the above three are very easy to implement in Fusion HCM.

So, It is for all the above stated reasons we should have Fusion Applications. Happy Adoption…….Cheers……

Multiple Organisation (Multi Org) R12 Financials

$
0
0

The concept of multiple organisation or multi org is used in the release 11 and 12.

Index:

  1. Introduction

  2. Benefits

  3. Multi Org structure in Release 11 and Release  12

  4. Release 11 versus Release 12

  5. Important points stated in the oracle user guide

  6. Pre requisites  for setting up Multi org in Release 12

  7. Setting up Multi org in Release 12

Introduction:

Multi – Org is a server side enhancement, which enables the multiple organizations (organisations having offices across the globe) in an enterprise to use a single installation of oracle applications products while keeping transacting data separate and secure. (in a single server)

Multi - Org is essential for large customers with multiple lines of business or divisions. It allows secure access to information and simplifies processing and reporting.

Example:

A client spread across Canada and UK, is moving its ERP to Oracle from a different ERP.

It would be a single installation of an oracle server and organisations are placed across the world. It gets integrated using a shared instance.  Using multi org we can have multiple organisations linked and separated through operating units.  Information could be in a shared mode and is secure - all in a single instance or server. Different organisations would be mapped to it.

Key Concepts:

Business Group:

It is the highest level (basically the HRMS) in the organisation structure, such as the consolidated enterprise or major division etc. It is a consolidated enterprise at the top level.

Example:

If a head quarter wants to have a shared payroll. There can be one business group across multiple ledger and legal entities respectively.

Multiple ledgers can share the same business group if they share the same business group attributes, including HR Flex field structures.

Normally the HR is shared across and called shared HR. In few cases, there are separate business groups.  Most cases there is one centralised company under which there are separate ledgers and legal entities mapped.  ( like a big umbrella)

We have the following under business group:

Ledger:

A ledger determines the currency, charts of accounts, accounting calendar, ledger processing options and sub ledger,   accounting method.  Ledger can be Primary and secondary.

Currency and calendar is new in R12.

Ledger deals with the movement of data into GL.

It is critical in configuration.

In the best scenario each country would have own its ledgers. Companies can share the same chart of account structure, but the reports have to be in their own currency (functional).

In case of UK the data would be reported in GBP, in US it would be USD. Therefore there should be a separate ledger for them.

Sub ledger accounting method is new in release 12. It is how the accounting convention has to take place. For e.g. standard accrual or cash based.  That can be defined and attached.

4 c’s are chart of account, currency and calendar and (conventions or accounting conventions. (it’s new in R12) or sub ledger accounting method.

If any one of the four changes a new ledger has to be defined.

There are two types of ledgers in oracle, one is primary and the other is secondary.  Primary is the main book of reporting. Secondary is optional it is required in cases where data is to be reported in a different currency. In is an important concept in the understanding prospective.

Ledgers are new in R 12 in the older version it is set of books or SOB.

Legal Entity:

Legal Entity is a Legal company for which the fiscal report or tax report is prepared.

Example if there is a separate tax registration for an organisation. That becomes a legal entity. It has its own registration a vat number or a sales tax number.

In 11 i it is referred as Government report entity or GRE. Tax reporting is prepared in a legal entity.

Operating Unit:

Operating unit is an organisation that uses Oracle Sub ledgers and related products.  They are sub ledger modules like AP, Accounts receivables, and accounts payable.   They work at the operating unit level. There could be multiple operating units assigned to a single entity, which is correspondingly linked to the ledger. Operating unit is where the operations are carried.  It could be AP or AR operations. It could be of a single country but could have multiple divisions with respect to the AP module so data is segregated by the AP module.  All sub ledgers use operating unit as the base to move on. So there could be an operating unit linked to the legal entity as well as a ledger and they could be logically associated so there could be multiple operating units under one ledger and legal entity combination. It is important in the sub ledger prospective.  Sub ledgers other than GL and fixed assets.  All other modules like AP and AR lock into the operating unit.  Each operating unit prepare their respective AP and AR.  


Accounting for Payables Transactions in Fusion Applications

$
0
0

In this article we will try to understand accounting involved in Fusion Payables. As we know default accounting for taxes for Payables transactions is based on the nature of the tax, tax recoverability, and the tax account assigned to relevant tax configuration. Accounting for Payables transactions is dependent on the categories like-

  • Unmatched standard invoices
  • Purchase order matched invoices
  • Receipt matched invoices
  • Prepayments

Let us know look at individual categories one by one to understand debit and credit accounts. 

Unmatched Standard Invoices- Below table describes the accounting for taxes for unmatched standard invoices:

Nature of TaxRecoverabilityDebit AccountCredit AccountNotes
All taxesRecoverableTax Recoverable PayablesRecoverable tax account is derived from the tax recovery setup. If it is not defined there, it is derived from the tax rate.
All taxesNonrecoverableTax Expense PayablesThe debit to the tax expense account applies only when the tax expense account is specified for the tax rate. If it is not defined, then the debit is applied to the charge account for the transaction line.
Deferred to tax point of PaymentRecoverableInterim Tax PayablesRecovery for these taxes is deferred until payment. On payment, the interim tax account is credited with a debit to the tax recovery account.
Deferred to tax point of PaymentNonrecoverableTax Expense Payables 
Self-assessedRecoverableTax Recoverable or LiabilityTax Recoverable or LiabilityAs these taxes are to be assessed and paid by the first party organization. The credit is posted to the tax liability account instead of the payables account.
Self-assessedNonrecoverableTax ExpenseTax Recoverable or Liability 
Offset taxRecoverableTax Recoverable or LiabilityPayablesOffset taxes are always 100% recoverable. These taxes are defined with a negative rate and an invoice distribution with negative amount is created. The Payables amounts between the base tax and the offset tax are negated. What remains is the debit to tax expense or tax recovery account and negative debit to tax liability account.

 

How-to Migrate Custom HCM Extract

$
0
0

Business Requirement

At times we have multiple instances and we intend to move one HCM Extract ( created in Development) environment to another instance ( UAT ) or even in Production.

We can use the Export Import feature then.

Export

Login to Fusion Applications, Navigate to ‘Data Exchange’ and then search for the custom worker extract you wish to export.

Click on the Export symbol and xml file gets downloaded as displayed:

 

IMPORT

Navigate to ‘Data Exchange’ as displayed:

Under Tasks -> HCM Extracts -> Manage Extract Definitions

Click on Import Extract Option

A new popup window opens which asks for the File Path as displayed:

Give a new name if you wish to

Once the import Process is complete you would be able to search for the Extract:

 

{jcomments off}

FUSION APPLICATIONS – USER ROLE DETAIL REPORT

$
0
0

BUSINESS REQUIREMENT:

It is a very common requirement in almost all implementation where in the Stakeholders are interested to know how many user accounts are there is the system along with the corresponding roles attached to them. While oracle has delivered some seeded Reports which could be run from ‘Application Diagnostic Framework, screenshot below (Troubleshooting -> Run Diagnostic Tests)

ORACLE DELIVERED REPORTS

1) User Roles Display

2) User and Role : Role Details

3) User and Role : User Details

NAVIGATION TO RUN DELIVERED REPORTS

Login to Application -> Run Diagnostic Tests

UR1

After Running Reports :

UR2

DELIVERED REPORT 1 -> USER ROLES DISPLAY

User Roles Display: (Displays the Roles attached to procurement user)

ur3

Input Value : Sachin.Satpute

UR5

Output Screenshot :

ur30

DELIVERED REPORT 2 -> USER AND ROLE : ROLE DETAILS

User and Role : Role Details

Takes Role Name as input and displays all users who have the role attached to their user account. ( Secured i.e if the individual who is running the Report has access to a specific Data Set individuals belonging to that Data Set would only be displayed).

ur31

 

Input Value : Employee

ur8

 

Output Screenshot :

ur33

DELIVERED REPORT 3 -> USER AND ROLE : USER DETAILS

User and Role : User Details

Takes User Name as input and displays all roles attached to the user. (Secured i.e if the individual who is running the Report has access to a User Account being passed as input data would be displayed else no.)

ur7

Input value : Sachin.Satpute

ur34

Output Screenshot :

ur35

NEED FOR A CUSTOM CONSOLIDATED REPORT 

But if we need a consolidated report which will list all the users along with all the roles they have neither of the delivered ones help.

So we need a Custom Report (Preferred O/P Format could be RTF, Interactive, Excel,PPT. )

Since we are planning to display a colorful report with Different colour Code Combination ( using Conditional Formatting feature we choose PPT Format for this example)

CUSTOM REPORT NAME -> USER AND ROLE DETAILS REPORT

SQL USED FOR USER AND ROLE DETAILS REPORT

select papf.person_number "PersonNumber",

    ppnf_emp.full_name "PersonName",

           pu_emp.user_start_date "UserAccountStartDate",

           pu_emp.user_end_date "UserAccountEndDate",

           pu_emp.is_user_account_active "UserAccountStatus",

           pu_emp.username "UserAccountName",

           pu_emp.is_user_account_suspended "IsUserAccountSuspended",

           pu_emp.user_distinguished_name "UserAccountInternalName",

           pur_emp.method_code "RoleProvisioningMethod",

           pur_emp.is_user_role_active "IsUserRoleActive",

           pur_emp.is_user_role_terminated "IsUserRoleTerminated",

Case

When (pur_emp.is_user_role_active = 'Yes' AND pur_emp.is_user_role_terminated = 'No' ) Then 'Active'

When (pur_emp.is_user_role_active = 'No' AND pur_emp.is_user_role_terminated = 'No') Then 'NeitherActiveNorTerminated'

When (pur_emp.is_user_role_active = 'Yes' AND pur_emp.is_user_role_terminated = 'Yes') Then 'ActiveAndTerminated'

When (pur_emp.is_user_role_active = 'No' AND pur_emp.is_user_role_terminated = 'Yes' ) Then 'InactiveAndNotTerminated'

End as "UserRoleStatus",

pur_emp.role_start_date "UserRoleStartDate",

pur_emp.role_end_date "UserRoleEndDate",

prd_emp.abstract_role "IsRoleAAbstractRole",

prd_emp.job_role "IsRoleAJobRole",

prd_emp.data_role "IsRoleADataRole",

prd_emp.is_role_active "IsRoleActive",

Case

When (prd_emp.abstract_role = 'Y' AND prd_emp.job_role = 'N' AND prd_emp.data_role = 'N' ) Then 'Abstract Role'

When (prd_emp.abstract_role = 'N' AND prd_emp.job_role = 'Y' AND prd_emp.data_role = 'N' ) Then 'Job Role'

When (prd_emp.abstract_role = 'N' AND prd_emp.job_role = 'N' AND prd_emp.data_role = 'Y' ) Then 'Data Role'

When (prd_emp.abstract_role is NULL AND prd_emp.job_role is NULL AND prd_emp.data_role is NULL ) Then '--NA--'

End as "UserRoleType",

prd_emp.role_common_name "RoleCommonName",

prd_emp.multitenancy_common_name "MultitenancyCommonName",

prd_emp.role_distinguished_name "IsRoleDistinguishedName",

prdt_emp.role_name "UserRoleName",

prdt_emp.RoleDescription

FROM per_all_people_f papf

JOIN

(

SELECT ppnf.full_name,

ppnf.person_id

FROM per_person_names_f ppnf

WHERE ppnf.name_type = 'GLOBAL'

AND TRUNC(SYSDATE) BETWEEN ppnf.effective_start_date AND ppnf.effective_end_date

) ppnf_emp

ON (

ppnf_emp.person_id = papf.person_id

AND TRUNC(SYSDATE) BETWEEN papf.effective_start_date AND papf.effective_end_date

)

LEFT OUTER JOIN

(

SELECT pu.person_id,

pu.user_id,

pu.username,

to_char(pu.start_date,'DD-MM-RRRR') user_start_date,

to_char(pu.end_date,'DD-MM-RRRR') user_end_date,

DECODE(pu.active_flag,'N','Inactive','Y','Active') is_user_account_active,

DECODE(pu.suspended,'N','No','Y','Yes') is_user_account_suspended,

pu.user_distinguished_name

FROM per_users pu

) pu_emp

ON(pu_emp.person_id = papf.person_id AND TRUNC(SYSDATE) BETWEEN papf.effective_start_date AND

papf.effective_end_date)

LEFT OUTER JOIN

(

SELECT pur.user_id,

pur.role_id,

        pur.role_guid,

DECODE(pur.method_code,'A','Automatic','M','Manually','E','Externally Provisioned') method_code,

DECODE(pur.active_flag,'N','No','Y','Yes') is_user_role_active,

DECODE(pur.terminated_flag,'N','No','Y','Yes') is_user_role_terminated,

to_char(pur.start_date,'DD-MM-RRRR') role_start_date,

to_char(pur.end_date,'DD-MM-RRRR') role_end_date

FROM per_user_roles pur

) pur_emp

ON (pu_emp.user_id = pur_emp.user_id)

JOIN

(

SELECT        prd.role_id,

prd.role_guid,  

                     prd.abstract_role,

                     prd.job_role,

                     prd.data_role,

DECODE(prd.active_flag,'N','No','Y','Yes') is_role_active,

prd.role_common_name,

prd.multitenancy_common_name,

prd.role_distinguished_name

FROM per_roles_dn prd

) prd_emp

ON (pur_emp.role_id = prd_emp.role_id AND pur_emp.role_guid = prd_emp.role_guid)

JOIN

(

SELECT prdt.role_id, prdt.role_name,

              prdt.description RoleDescription,

              prdt.source_lang

FROM per_roles_dn_tl prdt

) prdt_emp

ON (prd_emp.role_id = prdt_emp.role_id AND pur_emp.role_id = prdt_emp.role_id AND prdt_emp.source_lang = 'US' )

WHERE papf.person_number = nvl(:pn_person_number, papf.person_number)

AND TRUNC (SYSDATE) BETWEEN papf.effective_start_date AND papf.effective_end_date

CONDITIONAL FORMATTING

The different colour code feature can be added using the Conditional Formatting fields

( Highlight and Manage Formats )

ur13

ur14

REPORT OUTPUT

ur15

SCHEDULING THE REPORT

Scheduling the Report :

ur16

 

ur17

SCHEDULED OUTPUT (PPT FORMAT)

ur18

ESS JOB CREATION

ur20

PARAMETER DEFINITION

ur21

RUNNING SCHEDULED JOB

ur22

ur23

ur24

RUNNING SCHEDULED JOB FOR ONE PERSON

Person Number : 10

ur25

ur26

ur27

ur28

ur29

           

Oracle Fusion Procurement offerings

$
0
0

Objective:

In the first article we discuss the offerings available with Oracle Fusion procurements together with its key features and benefits. 

 

Oracle Fusion Procurement Offerings:

Oracle Fusion procurement has following modules: 

  • Self Service Procurement: This module is similar to e-commerce sites like Amazon, Yep me, etc., where we can create the requisition by selecting the products from the catalog. Here we can compare the products side by side and shop for the product chosen.
  • Sourcing: In this module RFQ is created and sent to the suppliers for their response.
  • Purchasing: Basic procurement like purchase order creation, etc are handled in this module.
  • Supplier Portal: It is similar to i-supplier portal in R-12.
  • Procurement Contracts: In this module we can build the contracts based on certain conditions. It also has approval process.

 

Proc Image

Oracle Fusion Procurement – Key Features:

Key features of oracle fusion procurement are: 

  • Consumer user experience
  • Interactive help and training
  • Best in class catalog management- example is Self Supplier procurement
  • Requester analytics- comparison of prices with the help of chart & graphs
  • Flexible accounting rules
  • Support of notes and assignments
  • Smart Forms
  • Negotiation planning with sourcing calendar, recent activities and recommended actions
  • Guided negotiation creation with reusable negotiation styles and templates
  • Online supplier negotiations
  • Collaboration with key stakeholders
  • Consolidated view of sourcing activities for buyers and suppliers
  • Spreadsheet support for supplier responses and award analysis
  • Support for centralized, decentralized and hybrid procurement organizations.
  • Buyer work area
  • Multi-currency, Multi-Language support
  • Streamlined order processing and changed management
  • Control approvals by amount, business unit, account segment, item, category and location.

 

 

Oracle Fusion Procurement – Key Benefits

Key benefits of oracle fusion procurement are: 

  • Enforce Contract compliance
  • Improve efficiency
  • Minimize training
  • Reduce support and maintenance costs
  • Increase value from sourcing
  • Enhance negotiation strategies and improve results
  • Streamline supplier negotiations
  • Drive competitive behavior from Suppliers
  •  Minimize training and ongoing support
  • Streamline procurement processes
  • Enforce procurement policies
  • Improve supply base management
  • Manage exceptions
  • Improve visibility

 

Method Overriding in Java

$
0
0

Objective:

In the previous article Set and File handling in Java, we have learned about the Set function and the ways of file handling in Java. In this article,, we are going to learn about the Overriding method in java.

 

Method Overriding in Java:

If subclass (child class) has the same method as declared in the parent class, it is known as method overriding in java.

In other words, If subclass provides the specific implementation of the method that has been provided by one of its parent class, it is known as method overriding.

Method overriding is used to provide specific implementation of a method that is already provided by its super class.

Method overriding is used for runtime polymorphism

Rules for Method overriding:

  1. method must have same name as in the parent class

  2. method must have same parameter as in the parent class.

  3. must be IS-A relationship (inheritance).

 

Example 1:

class Vehicle{

 void run(){System.out.println("Vehicle is running");}

 }

 class Bike2 extends Vehicle{

 void run(){System.out.println("Bike is running safely");}

 

 public static void main(String args[]){

 Bike2 obj = new Bike2();

 obj.run();

 }

}

//Output:

Bike is running safely

 

In thi above example, we have defined the run method in the subclass as defined in the parent class but it has some specific implementation. The name and parameter of the method is same and there is IS-A relationship between the classes, so there is method overriding.

 

Example2:

Consider a scenario, Bank is a class that provides functionality to get rate of interest. But, rate of interest varies according to banks. For example, SBI, ICICI and AXIS banks could provide 8%, 7% and 9% rate of interest.

bankinheritance.png

class Bank{

int getRateOfInterest(){return 0;}

}

 

class SBI extends Bank{

int getRateOfInterest(){return 8;}

}

 

class ICICI extends Bank{

int getRateOfInterest(){return 7;}

}

class AXIS extends Bank{

int getRateOfInterest(){return 9;}

}

 

class Test2{

public static void main(String args[]){

SBI s=new SBI();

ICICI i=new ICICI();

AXIS a=new AXIS();

System.out.println("SBI Rate of Interest: "+s.getRateOfInterest());

System.out.println("ICICI Rate of Interest: "+i.getRateOfInterest());

System.out.println("AXIS Rate of Interest: "+a.getRateOfInterest());

}

}

//Output:

SBI Rate of Interest: 8

ICICI Rate of Interest: 7

AXIS Rate of Interest: 9

Difference between Method overloading and Method Overriding:

 

No.

Method Overloading

Method Overriding

1)

Method overloading is used to increase the readability of the program.

Method overriding is used to provide the specific implementation of the method that is already provided by its super class.

2)

Method overloading is performed within class.

Method overriding occurs in two classes that have IS-A (inheritance) relationship.

3)

In case of method overloading, parameter must be different.

In case of method overriding, parameter must be same.

4)

Method overloading is the example of compile time polymorphism.

Method overriding is the example of run time polymorphism.

5)

In java, method overloading can't be performed by changing return type of the method only. Return type can be same or different in method overloading. But you must have to change the parameter.

Return type must be same or covariant in method overriding.

Viewing all 930 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>