2
2
2
***********************************************************************************
*****
* Header
* LDG :
/* Inputs */
INPUTS ARE OPERATION (text),
LINENO (number),
LINESEQUENCE (number),
POSITION1 (text),
POSITION2 (text),
POSITION3 (text),
POSITION4 (text),
POSITION5 (text),
POSITION6 (text),
POSITION7 (text),
POSITION8 (text),
POSITION9 (text),
POSITION10 (text),
POSITION11 (text),
POSITION12 (text),
POSITION13 (text),
POSITION14 (text),
POSITION15 (text),
LINEREPEATNO (number)
DEFAULT FOR LINEREPEATNO IS 3
DEFAULT FOR LINENO IS 1
DEFAULT FOR LINESEQUENCE IS 1
DEFAULT FOR POSITION1 IS 'NO DATA'
DEFAULT FOR POSITION2 IS 'NO DATA'
DEFAULT FOR POSITION3 IS 'NO DATA'
DEFAULT FOR POSITION4 IS 'NO DATA'
DEFAULT FOR POSITION5 IS 'NO DATA'
DEFAULT FOR POSITION6 IS 'NO DATA'
DEFAULT FOR POSITION7 IS 'NO DATA'
DEFAULT FOR POSITION8 IS 'NO DATA'
DEFAULT FOR POSITION9 IS 'NO DATA'
DEFAULT FOR POSITION10 IS 'NO DATA'
DEFAULT FOR POSITION11 IS 'NO DATA'
DEFAULT FOR POSITION12 IS 'NO DATA'
DEFAULT FOR POSITION13 IS 'NO DATA'
DEFAULT FOR POSITION14 IS 'NO DATA'
DEFAULT FOR POSITION15 IS 'NO DATA'
IF OPERATION='FILETYPE' THEN
OUTPUTVALUE='DELIMITED'
ELSE IF OPERATION='DELIMITER' THEN
OUTPUTVALUE='|'
ELSE IF OPERATION='READ' THEN
OUTPUTVALUE='NONE'
ELSE IF OPERATION = 'NUMBEROFBUSINESSOBJECTS' THEN
(
OUTPUTVALUE = '4'
RETURN OUTPUTVALUE
)
ELSE IF OPERATION = 'METADATALINEINFORMATION' THEN
(
METADATA1[1] = 'BalanceAdjustmentLine'
METADATA1[2] = 'BalanceAdjustmentLine'
METADATA1[3] = 'LegislativeDataGroupName'
METADATA1[4] = 'BatchName'
METADATA1[5] = 'PayrollName'
METADATA1[6] = 'ConsolidationSetName'
METADATA1[7] = 'EffectiveDate'
METADATA1[8] = 'BatchLineSequence'
METADATA1[9] = 'AssignmentNumber'
METADATA1[10] = 'ElementName'
METADATA1[11] = 'TaxReportingUnitName'
BatchName = 'SOPSAR_Bi-weekly'||TO_CHAR(get_current_date(),'YYYYMMDD_HHMISS')
PayrollName = ' ' /*Review if all employee have the same name*/
/* HCMA-2283 Start - Change the consolidation group to AZSTOCK */
/* ConsolidationSetName = 'Biweekly' */
ConsolidationSetName = 'AZSTOCK'
/* HCMA-2283 End - Change the consolidation group to AZSTOCK */
BatchLineSequence = POSITION9
AssignmentNumber = ' '
ElementName = ' '
TaxReportingUnitName = ' '
L_TRU = ' '
InputValueName = ' '
EntryValue = ' '
EffectiveDate = POSITION7
L_BW_Batch_Name = ' '
L_W_Batch_Name = ' '
)
ELSE
(
BatchName = L_W_Batch_Name
)
ElementName = POSITION4
InputValueName = POSITION5
EntryValue = POSITION6
l_bal_name = 'US_SOCIAL_SECURITY_EMPLOYER_TAXABLE'
l_vd_name = 'US_SS_ER_RATE'
l_year = substr(EffectiveDate,1,4)
l_wage_limit = 0
l_vd_wage = 'US_SS_ER_WAGE_LIMIT'
TaxC = 0
ExeC = 0
TinC = 0
l_bal_value = 0
if isnull(l_temp) = 'Y'
then
(
l_bal_value = to_number(l_temp)
l_bal_value = l_cache_value + l_bal_value
)
l_rate = to_number(GET_VALUE_SET('AZ_FETCH_VD_VALUE','|
=P_BASE_VD='''||l_vd_name||''''||'|P_YEAR='''||l_year||''''))
l_wage_limit = to_number(GET_VALUE_SET('AZ_FETCH_VD_VALUE','|
=P_BASE_VD='''||l_vd_wage||''''||'|P_YEAR='''||l_year||''''))
)
IF InputValueName = 'Tax Calculated'
then
(
EntryValue = to_char(round(TaxC,2))
)
ELSE IF InputValueName = 'Social Security Employer Taxable'
then
(
EntryValue = to_char(TinC)
)
ELSE IF InputValueName = 'Excess Income'
then
(
EntryValue = to_char(ExeC)
)
)
ELSE IF ElementName = 'Social Security Employee Tax' And
(
InputValueName = 'Social Security Employee Taxable'
or
InputValueName = 'Excess Income'
)
THEN
(
l_bal_name = 'US_SOCIAL_SECURITY_EMPLOYEE_TAXABLE'
l_vd_name = 'US_SS_EE_RATE'
l_year = substr(EffectiveDate,1,4)
l_wage_limit = 0
l_vd_wage = 'US_SS_EE_WAGE_LIMIT'
ExeC = 0
TinC = 0
l_bal_value = 0
if isnull(l_temp) = 'Y'
then
(
l_bal_value = to_number(l_temp)
l_bal_value = l_bal_value + l_cache_value
)
l_rate = to_number(GET_VALUE_SET('AZ_FETCH_VD_VALUE','|
=P_BASE_VD='''||l_vd_name||''''||'|P_YEAR='''||l_year||''''))
l_wage_limit = to_number(GET_VALUE_SET('AZ_FETCH_VD_VALUE','|
=P_BASE_VD='''||l_vd_wage||''''||'|P_YEAR='''||l_year||''''))
TinC = 0
)
l_cache_value = l_cache_value + TinC
WSA_SET(ESS_KEY || 'SEE', l_cache_value)
WSA_SET(ESS_KEY || 'SEE' || POSITION6, 'Y' )
L_MX_BU_CHECK = GET_VALUE_SET('AZ_PY_EQUITY_MX_BU_CHECK_VS','|=P_ASG_NO='''||
AssignmentNumber||''''||'|P_EFFECTIVE_DATE='''||EffectiveDate||'''')
)
/*METADATA|ElementEntryValue|LegislativeDataGroupName|
EffectiveStartDate|EffectiveEndDate|ElementName|MultipleEntryCount|
AssignmentNumber|InputValueName|ScreenEntryValue|EntryType MERGE|ElementEntryValue|
IN Legislative Data Group|2019/12/08|4712/12/31|ABC Element Name|1|E509|test|Grade
Change|E*/
IF( LINEREPEATNO=2 ) THEN
(
/*IF(change <>'UCM') THEN*/
IF (LENGTH(POSITION3)=4) THEN
(
FileDiscriminator = 'BalanceAdjustmentValue'
LINEREPEAT = 'Y'
BusinessOperation = 'MERGE'
RETURN
BusinessOperation,FileDiscriminator,FileName,LegislativeDataGroupName,BatchName,Pay
rollName,ConsolidationSetName,EffectiveDate,BatchLineSequence,InputValueName,EntryV
alue,ElementName,LINEREPEAT,LINEREPEATNO
)
)
IF( LINEREPEATNO=3 and LINESEQUENCE=1 ) THEN
(
/*IF(change <>'UCM') THEN*/
IF (LENGTH(POSITION1)>8) THEN
(
BatchName = L_BW_Batch_Name
PayrollName = 'Bi-weekly'
/* HCMA-2283 Start - Change the consolidation group to
AZSTOCK */
/* ConsolidationSetName = 'Biweekly' */
ConsolidationSetName = 'AZSTOCK'
/* HCMA-2283 End - Change the consolidation group to
AZSTOCK */
FileDiscriminator = 'BalanceAdjustmentHeader'
FileName = 'BalanceAdjustmentHeader'
LINEREPEAT = 'Y'
BusinessOperation = 'MERGE'
RETURN
BusinessOperation,FileName,FileDiscriminator,LegislativeDataGroupName,BatchName,LIN
EREPEAT,LINEREPEATNO
)
)
IF( LINEREPEATNO=4 and LINESEQUENCE=1 ) THEN
(
/*IF(change <>'UCM') THEN*/
IF (LENGTH(POSITION1)>8) THEN
(
BatchName = L_BW_Batch_Name
PayrollName = 'Bi-weekly'
/* HCMA-2283 Start - Change the consolidation group to
AZSTOCK */
/* ConsolidationSetName = 'Biweekly' */
ConsolidationSetName = 'AZSTOCK'
/* HCMA-2283 End - Change the consolidation group to
AZSTOCK */
FileDiscriminator = 'BalanceAdjustmentGroup'
FileName = 'BalanceAdjustmentHeader'
LINEREPEAT = 'Y'
BusinessOperation = 'MERGE'
PrepayFlag = 'N'
BalanceAdjCostFlag='Y'
RETURN
BusinessOperation,FileDiscriminator,FileName,LegislativeDataGroupName,BatchName,Eff
ectiveDate,PayrollName,ConsolidationSetName,PrepayFlag,BalanceAdjCostFlag,LINEREPEA
T,LINEREPEATNO
)
)
IF( LINEREPEATNO=5 and LINESEQUENCE=1 ) THEN
(
/*IF(change <>'UCM') THEN*/
IF (LENGTH(POSITION1)>8) THEN
(
BatchName = L_W_Batch_Name
PayrollName = 'Weekly'
/* HCMA-2283 Start - Change the consolidation group to
AZSTOCK */
/* ConsolidationSetName = 'Weekly' */
ConsolidationSetName = 'AZSTOCK'
/* HCMA-2283 End - Change the consolidation group to
AZSTOCK */
FileDiscriminator = 'BalanceAdjustmentHeader'
FileName = 'BalanceAdjustmentHeader'
LINEREPEAT = 'Y'
BusinessOperation = 'MERGE'
RETURN
BusinessOperation,FileName,FileDiscriminator,LegislativeDataGroupName,BatchName,LIN
EREPEAT,LINEREPEATNO
)
)
IF( LINEREPEATNO=6 and LINESEQUENCE=1 ) THEN
(
/*IF(change <>'UCM') THEN*/
IF (LENGTH(POSITION1)>8) THEN
(
BatchName = L_W_Batch_Name
PayrollName = 'Weekly'
/* HCMA-2283 Start - Change the consolidation group to
AZSTOCK */
/* ConsolidationSetName = 'Weekly' */
ConsolidationSetName = 'AZSTOCK'
/* HCMA-2283 End - Change the consolidation group to
AZSTOCK */
FileDiscriminator = 'BalanceAdjustmentGroup'
FileName = 'BalanceAdjustmentHeader'
LINEREPEAT = 'N'
BusinessOperation = 'MERGE'
PrepayFlag = 'N'
BalanceAdjCostFlag='Y'
RETURN
BusinessOperation,FileDiscriminator,FileName,LegislativeDataGroupName,BatchName,Eff
ectiveDate,PayrollName,ConsolidationSetName,PrepayFlag,BalanceAdjCostFlag,LINEREPEA
T,LINEREPEATNO
)
)
)
)
ELSE OUTPUTVALUE = 'NONE'
RETURN OUTPUTVALUE