F1216EditDataforUpdate

F1216 - Edit Data for Update

Minor Business Rule

Object Name: B1300190

Parent DLL: CMFG

Location: Client/Server

Language: C

Functional Description

Purpose


The purpose of this function is to take user entered data and format in string format for update to 

the database.   All data is stored in the Database as a String but is displayed on the screen as either 

a String (in the case of 'A' or 'T' data types), a MATH_NUMERIC field (for 'N' data types) or as a 

JDEDATE field (for 'D' data types).  The appropriate editing and conversion must be made for each data 

type.  


'A'lphanumeric data - Edited for length and right or left justified per the F1215 definition.


'T'ime data - the string is parsed and the ':' separators are removed.


'N'umeric data -  the MATH_NUMERIC data is converted to a String with correct decimal padding. 


'D'ate data - the date is entered into a JDEDATE structure which is then converted into a 

MATH_NUMERIC structure in Julian date format.  This is then converted into a string ready for update.



Setup Notes and Prerequisites


Special Logic




Technical Specification


Main


Convert DataItem Size from BSFN data structure to an int to be used in internal functions


Switch on FieldType


If FieldType is 'A'
I1300190_Edit Alpha


If FieldType is 'N'
Switch on DisplayDecimals

Call I1300190_EditNumeric and pass in correct GNUM data structure member 
corresponding to the number of decimals in the MATH_NUMERIC.


If FieldType is 'T'

Call I1300190_EditTime 


If FieldType is 'D'

Call I1300190_EditDate


Return



I1300190_EditAlpha


If Justification == L

Edit String for Length

Else

Edit String for Length

Right Justify and pad with blanks


Return



I1300190_EditNumeric


Load up parameters and call "Math Numeric to String" - B0800001


Copy string from DS0800001 to return String


Return



I1300190_EditTime




Parse out any ':' separators to be found in the string


Return



I1300190_EditDate


Call "Convert Date to Julian" - B9800210


Load up parameters and call "Math Numeric to String" - B0800001


Parse out the Days


Parse out the Years


Parse out Century 


Convert Century string to an integer


Subtract 19 from  the Century integer


Convert Century integer to Century character


Concatenate Century character, Year and Days to get new Julian Date String


Return

        



Data Structure

D1300190 - F1216 - Edit data for update

Parameter NameData ItemData TypeReq/OptI/O/Both
szStringInputFB01charNONENONE

 The Glossary for spec item 01. client defined and maintained.

cTypeFieldFDTTcharNONENONE

'A'lphanumeric data  Edited for length and right or left justified per the F1215 definition.

'T'ime data  the string is parsed and the ':' separators are removed.


'N'umeric data   the MATH_NUMERIC data is converted to a String with correct decimal padding. 


'D'ate data  the date is entered into a JDEDATE structure which is then converted into a MATH_NUMERIC structure in Julian date format.  This is then 

converted into a string ready for update.



^

mnDataItemSizeDTASMATH_NUMERICNONENONE

The field size of the data item. Note: All amount fields should be entered as 15 bytes, 0 decimals, and the data item type should be P 
(packed).

cDataDisplayDecimalsCDECcharNONENONE

A value that designates the number of decimals in the currency, amount, or quantity fields the system displays. For example, U.S. Dollars 
would be 2  decimals, Japanese Yen would be no decimals, and Cameroon Francs would be 3  decimals.

cJustifyLeftorRightLRAcharNONENONE

A code that specifies the justification of the text in the field. Valid values are: R  Right justification  L  Left justification

jdDateDATE01JDEDATENONENONE

Event point for JDE Date.

mnNumeric0GNUM0MATH_NUMERICNONENONE

This field is used for Numeric Specification Data.

mnNumeric1GNUM1MATH_NUMERICNONENONE

This field is used for Numeric Specification Data.

mnNumeric2GNUM2MATH_NUMERICNONENONE

This field is used for Numeric Specification Data.

mnNumeric3GNUM3MATH_NUMERICNONENONE

This field is used for Numeric Specification Data.

mnNumeric4GNUM4MATH_NUMERICNONENONE

This field is used for Numeric Specification Data.

mnNumeric5GNUM5MATH_NUMERICNONENONE

This field is used for Numeric Specification Data.

mnNumeric6GNUM6MATH_NUMERICNONENONE

This field is used for Numeric Specification Data.

mnNumeric7GNUM7MATH_NUMERICNONENONE

This field is used for Numeric Specification Data.

mnNumeric8GNUM8MATH_NUMERICNONENONE

This field is used for Numeric Specification Data.

szDataItemField001_2FB01charNONENONE

 The Glossary for spec item 01. client defined and maintained.

Related Functions

None

Related Tables

None