FutureValueEdit

Future Value Edit

Minor Business Rule

Object Name: N0800018

Parent DLL: CHRM

Location: Client/Server

Language: NER

Functional Description


Technical Specifications


Parameters


Data Item            Data Structure DescriptionI/ORequiredTableNotes

DTAI                     Data Item                IY

PHSD                     Future Value          I/OY

PHSD             Storage Future ValueOY

szErrorCodeError Return ValueOY




Related Tables 


Table Table Description

F0006Business Unit Master

F0010Company Master

F060116EE Master

F069016Tax Area X-Reference





Processing


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

 *  Variable declarations

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

ID idRtnVal = ER_SUCCESS;

MATH_NUMERIC evt_mnDD_Item_Type = ;

MATH_NUMERIC evt_mnDD_Item_Length = ;

MATH_NUMERIC evt_mnPos_Counter = ;

MATH_NUMERIC evt_mnConverted_Dollars = ;

MATH_NUMERIC evt_mnFV_Actual_Length = ;

MATH_NUMERIC evt_mnLength_of_Dollar = ;

MATH_NUMERIC evt_mnLength_of_Cents = ;

MATH_NUMERIC evt_mnDD_Nbr_of_Decimals = ;

MATH_NUMERIC evt_mnConverted_Amount = ;

char evt_c1Char = 0;

char evt_szErr_Literals[5] = ;

char evt_szDollars[31] = ;

char evt_szCents[31] = ;

MATH_NUMERIC evt_mnDecimal_Found = ;

MATH_NUMERIC evt_mnConverted_Cents = ;

char evt_szTemp_Var[31] = ;

JDEDATE evt_jdHld_Date = ;

MATH_NUMERIC evt_mnAddNbr = ;

char evt_szUDCSystem_Cde[5] = ;

char evt_szUDCReport_Cde[3] = ;

char evt_szDateWithCentury[31] = ;

MATH_NUMERIC evt_mnYrCenturyChgd = ;

MATH_NUMERIC evt_mnDateYear = ;

char evt_sztemp_storage[31] = ;

MATH_NUMERIC evt_mnNBR = ;

MATH_NUMERIC evt_mnJulianDate = ;

char evt_szJulianDate[31] = ;

char evt_szJulian_Day[4] = ;

char evt_szJulian_Century = 0;

char evt_szGregorian_Century[3] = ;

char evt_szJulian_Year[4] = ;

char evt_szYear[3] = ;


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

 *  Error Handling

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

/* Error message handling codes: */

/* 031N = Future Value LENGTH error. */
/* 0026 = Home Business Unit not found in F0006. */
/* 0024 = Home Company not found in F0010. */

/* 019U = Date Edit error. */

/* 0270 = Invalid Address Book number. */

/* 0376 = Invalid Tax Area (Worked or Resident). */

/* 0027 = UDC  Validation */

/*****************************************************************
 *  Main processing

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

 Call BSFN to retrieve DD attributes based on passed in Data Item 

 Data Item Type 9 is Numeric, numeric are stored in the F06042 file   
 as a 15 character string preceded by zeros (ex: Database storage   

 value = 000000001500000 and Future Value Grid display after edit  =  

 15000.00). Most Grid display and file storage values will be  

 represented differently.  **************************************************************** 

*/

/* NUMERIC DATA ITEM: */

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

    Process each character in the Future Value string, eliminate any   
    character not  equal to 0 thru 9. */

    Every character (0 - 9) before the decimal is the dollar portion 

of the number. Every character after the decimal is the cents portion of the number. */
/*************************************************************** */

    Convert the Dollars to a numeric. */
/**************************************************************** */

    Convert the Cents to a numeric. */

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

    Using the numeric Cents, shift the decimal position by the number        
    of decimal positions dictated in the Data Dictionary, this number   

    will be rounded to the appropriate number of decimals also 

    dictated by the DD. Accumulate the dollars and cents. Convert    

    back to a string.  /*************************************************************** */

    The Numeric to String Scrub will remove the the trailing non-

significant zeros. Add the decimal positions back on to the number for grid display and 
file storage. 

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

          The Future Value field that will be stored in the file will not 

       have a decimal point. This scrub removes any special characters     
       ('.', '/', etc).  

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

    BUSINESS UNIT:

/*********************************************************** */ 
    Validate the length with the DD. 

    Format the Business Unit for grid display and file storage. Also   

    validate against F0006 table. 

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

     HOME COMPANY: 

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

    Validate length and that it exists in F0010. 

/**************************************************************** 
    EDITING FOR DATES:         

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

    First 6 characters 01/01/. 

    Get DD item that determines when a century changes (CENTCHG). 

    Get Year from the Entered Date string. */

    Convert Entered String Year to numeric for comparison. */

    Concat first 6 characters and 19 or 20 for century.  */

    Concat with Year. */

    Display Result = 01/01/1998 or 01/01/2098.  */

    File Storage Result = 000000000098001 or 000000000198001. */

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

          Convert dates from/to a Julian Format. */

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

/*  ADDRESS BOOK NUMBER: */

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

          Verify that the Address Book number exists. 

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

/*  TAX AREA VALIDATION: */
      /*************************************************************** */

    Validate that Tax Area Resident/Worked exist in F069016.  

/*************************************************************** */
/*  UDC VALIDATION : */

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

    Validate UDC  

/****************************************************************/
/*  NUMERIC, NO DECIMALS FORMATING: */

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

Validate that the Future value is correct length for the Data    
Item

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

/* ALPHA, NO EDITING REQUIRED. */

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

   Convert all alpha characters to upper case. 




Data Structure

D0800014 -  Future Value Edit

Parameter NameData ItemData TypeReq/OptI/O/Both
szDataItemDTAIcharNONENONE

A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

szPayrollHistoryDataPHSDcharNONENONE

A code that indicates selection or a future set of information. The value in this field represents an employee master value to be updated in 
the future based upon the effective date of the revision.

szFutureValueDescriptionDL01charNONENONE

A user defined name or remark.

szStorageFormatPHSDcharNONENONE

A code that indicates selection or a future set of information. The value in this field represents an employee master value to be updated in 
the future based upon the effective date of the revision.

szErr_literalsVC04AcharNONENONE

This is a generic field used as a work field in Everest.

Related Functions

N0800018 Future Value Edit

Related Tables

None