contact us at
888-731-3026
or via email
Skip Navigation Links
Skip Navigation Links > blog

Blog entries

next >
DATE: 8/2/2008 12:00:00 AM AUTHOR: Denton

SUMMARY:
Code and unit test activity fill my days. See this blog entry for a detail example of an SAP to emPath interface SQL function.

ENTRY:

Following is an example function being tested. The is one function per field which requires translation. Taking this approach allows the client to modify SQL code instead of C#

-- AciFn_DeriveEmBenefitClass(<0001.PERSG/>,<0001.PERSK/>,<0001.MASSB/>)
-- PERSG = Employee Group
-- PERSK = Employee Subgroup
-- MASSB = action type

Create or Replace Function AciFn_DeriveEmBenefitClass
( v_employee_group char, v_payroll_area char, v_action_type char)

RETURN char is v_emBenefitClass char(5);

Begin

v_emBenefitClass := '?';

if upper(v_employee_group) = 'R'
and (upper(v_payroll_area) = 'FT SALARY'
or upper(v_payroll_area) = 'PT SALARY')
then v_emBenefitClass := 'SAL';
end if;

if upper(v_employee_group) = 'R'
and (upper(v_payroll_area) = 'FT HOURLY'
or upper(v_payroll_area) = 'PT HOURLY')
then v_emBenefitClass := 'BARG';
end if;

Return v_emBenefitClass;
END;
/


 
next >