F1791EntitlementDates

F1791 Entitlement Dates

Minor Business Rule

Object Name: N1700180

Parent DLL: CCRIN

Location: Client/Server

Language: NER

1.Functional Description

1.1Purpose

User could use this NER to do the hierarchy search by passing PRODF (Product Family), PRODM (Product Model), ITM (Item Number), MMCU 

(Branch), AN8 (Address Number) and CTR (Country) six values, and to bring back EFTB (Effective End Date) and ENTF (Entitlement Flag).

 

1.2Setup Notes and Prerequisites

Tables F1750 (CSMS Sequence) and F1791 (Entitlement Dates) must be set up by the user before an entitlement flag and date value are returned to the 

calling program.


1.3Special Logic

This NER will loop through F1750 and will load the incoming data corresponding to the sequence table setup to variables and will then check F1791 to 

see if an entitlement record exists for that data combination.  


If no entitlement dates exist for the incoming data combination, the returning entitlement flag will be blank.  


If a date exists for the incoming data combination, the entitlement flag will be either 1 or 2 depending on whether the date passed in is before or after 

the entitlement date found in F1791.  The entitlement date will then be returned in the date field.  If the date passed in is before the entitlement date, the 

entitlement flag will be 1.


2.Technical Specifications


2.1Parameters:

Data Item Data Structure DescriptionI/ORequiredNotes

PRODFProductFamilyIY

PRODMProductModelIY                                                                 

ITMItem Number (Short)IY

MMCUBranchIY

AN8Address NumberIY

CTRCountryIY

EFTBEffective End DateI/OYThis date is the end of the default 

entitlement.

ENTFEntitlement FlagOY'1' - No check Entitlement '2' - Check 

Entitlement

UPMJDate InIYDate to compare the effective end date for the 

default entitlement.


2.2Related Tables 

Table Table Description

F1791Entitlement Dates


2.3Related Business Functions

Source NameFunction Name



2.4Processing 


// ===============================================================

//     Defaulting values if passed in blank

// 

If BF jdDateIn is less than or equal to  

BF jdDateIn = date_today( )
End If
If BF mnCustomerNumber is less than or equal to  

BF mnCustomerNumber = "0"
End If

If BF mnInventoryItemNumber is less than or equal to  

BF mnInventoryItemNumber = "0"
End If

If BF szBranch is less than or equal to  

BF szBranch = " "
End If

If BF szCountry is less than or equal to  

BF szCountry = " "
End If

If BF szProductFamily is less than or equal to  

BF szProductFamily = " "
End If

If BF szProductModel is less than or equal to  

BF szProductModel = " "
End If

BF cEntitlementFlag = " "

// 

//     Hierarchical Search

// 

VA evt_cInfoType_ITYPE = "E"

F1750.Select

F1750.FetchNext saving the YN01 - YN06 in variables.

While SV File_IO_Status is equal to CO SUCCESS And BF cEntitlementFlag is equal to  

If VA evt_cCustomerNumber_YN01 is equal to "Y" Or VA evt_cCustomerNumber_YN01 is equal to "1" 
VA evt_mnCustomerNumber_AN8 = BF mnCustomerNumber
Else
VA evt_mnCustomerNumber_AN8 = "0"
End If
// 

If VA evt_cCountry_YN02 is equal to "Y" Or VA evt_cCountry_YN02 is equal to "1" 

VA evt_szCountry_CTR = BF szCountry
Else
VA evt_szCountry_CTR = " "
End If
// 

If VA evt_cBranchPlant_YN03 is equal to "Y" Or VA evt_cBranchPlant_YN03 is equal to "1" 

VA evt_szBranchPlant_MMCU = BF szBranch
Else
VA evt_szBranchPlant_MMCU = " "
End If
// 

If VA evt_cInvItemNumber_YN04 is equal to "Y" Or VA evt_cInvItemNumber_YN04 is equal to "1" 

VA evt_mnItem_ITM = BF mnInventoryItemNumber
Else
VA evt_mnItem_ITM = "0"
End If
// 

If VA evt_cProdModel_YN05 is equal to "Y" Or VA evt_cProdModel_YN05 is equal to "1" 

VA evt_szProdModel_PRODM = BF szProductModel
Else
VA evt_szProdModel_PRODM = " "
End If
// 

If VA evt_cProdFamily_YN06 is equal to "Y" Or VA evt_cProdFamily_YN06 is equal to "1" 

VA evt_szProdFamily_PRODF = BF szProductFamily
Else
VA evt_szProdFamily_PRODF = " "
End If
// 

//     Setting Entitlement Flag

// 

F1791.FetchSingle saving the effective end date in BF jdEffectiveEndDate

If SV File_IO_Status is equal to CO SUCCESS 

If BF jdDateIn is less than BF jdEffectiveEndDate 
BF cEntitlementFlag = "1"
Else
BF cEntitlementFlag = "2"
End If
End If
// 

//     Get next sequence number

// 

If BF cEntitlementFlag is equal to  

F1750.FetchNext saving the YN01 in variables.
End If
End While


Data Structure

D1700180 - F1791EntitlementDates

Parameter NameData ItemData TypeReq/OptI/O/Both
szProductFamilyPRODFcharREQINPUT

A code that classifies an inventory item into a group for customer service. Some examples include: Laser Printer, Inkjet, or Fax.

szProductModelPRODMcharREQINPUT

A code that classifies an inventory item into a model for customer service. Some examples include: Laser Printer, Inkjet or Fax.

mnInventoryItemNumberITMMATH_NUMERICREQINPUT

An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item 
numbers (see data item XRT) to accommodate substitute item numbers, replacements, bar codes, customer numbers, supplier numbers, and 
so forth. The item numbers are as follows:   o Item Number (short) - An eight-digit, computer-assigned item number     o 2nd Item Number - The 
25-digit, free-form, user defined alphanumeric item number     o 3rd Item Number - Another 25-digit, free-form, user defined alphanumeric item 
number

szBranchMMCUcharREQINPUT

A code that represents a high-level business unit. Use this code to refer to a branch or plant that might have departments or jobs, which 
represent lower-level business units, subordinate to it. For example:     o Branch/Plant (MMCU)     o Dept A (MCU)     o Dept B (MCU)     o Job 123 
(MCU) Business unit security is based on the higher-level business unit.

mnCustomerNumberAN8MATH_NUMERICREQINPUT

A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or 
location.

szCountryCTRcharREQINPUT

A user defined code (00/CN) that identifies a country. The country code has no effect on currency conversion. The Address Book system 
uses the country code for data selection and address formatting.

jdEffectiveEndDateEFTBJDEDATEOPTNONE

The date that an address, item, transaction, or table record becomes active.  The meaning of this field differs, depending on the program.  
For example, the effective date could represent the following:    o When a change of address becomes effective.   o When a lease becomes 
effective.   o When a price becomes effective.   o When the currency exchange rate becomes effective.   o When a tax rate becomes effective. 

cEntitlementFlagENTFcharREQOUTPUT

A code which designates that the Interim Check is to be used as a payoff for an Entitlement. THIS FIELD IS RESERVED FOR FUTURE 
USAGE.

jdDateInUPMJJDEDATEREQINPUT

The date that specifies the last update to the file record.

Related Functions

None

Related Tables

None