GetCSMSGLCode

Get S/WM GL Code

Major Business Rule

Object Name: N1700040

Parent DLL: CCRIN

Location: Client/Server

Language: NER

1.Functional Description

1.1Purpose

The purpose of this NER is to retrieve the G/L Code for CSMS Billing and Costing.


1.2Setup Notes and Prerequisites


1.3Special Logic

If retrieving the G/L Code for Contracts then the following hierarchy is used:

First try to retrieve it from the Service Package on the Contract (F1729)
If business unit is not blank then try to retrieve it from the F4102 (Item Branch file).

If business unit is blank then try to retrieve it from the F4101 (Item Master)

If retrieving the G/L Code for Service Orders or Calls then the following hierarchy is used:

First try to retrieve it from the Type of Service (F1725)

If business unit is not blank then try to retrieve it from the F4102 (Item Branch file).
If business unit is blank then try to retrieve it from the F4101 (Item Master)


2.  Technical Specifications


2.4Processing 


//

//      When Mode is equal to 1 (Contracts)

//

If BF cMode is equal to "1"

   F1729.Select

   F1729.FetchNext

   If SV File_IO_Status is not equal to CO SUCCESS

   Or BF szCoveredGLCode is equal to 

      If BF szBranch is not equal to 

      And BF szBranch is not equal to 

         F4102.FetchSingle

      Else

         F4101.FetchSingle

      End If

      If SV File_IO_Status is not equal to CO SUCCESS

      Or BF szCoveredGLCode is equal to 

         BF szCoveredGLCode = ""

      End If

   End If

End If

//

//     When Mode is equal to 2 (Service Orders) or 3 (Calls)

//

If BF cMode is equal to "2"

Or BF cMode is equal to "3"

   F1725.FetchSingle

   If SV File_IO_Status is not equal to CO SUCCESS

   Or BF szCoveredGLCode is equal to 

   And BF szNonCoveredGLCode is equal to 

      If BF szBranch is not equal to 

      And BF szBranch is not equal to 

         F4102.FetchSingle

      Else

         F4101.FetchSingle

      End If

      BF szNonCoveredGLCode = BF szCoveredGLCode

      If SV File_IO_Status is not equal to CO SUCCESS

      Or BF szCoveredGLCode is equal to 

         BF szCoveredGLCode = ""

         BF szNonCoveredGLCode = ""

      End If

   End If

End If



Data Structure

D1700040 - Get S/WM GL Code

Parameter NameData ItemData TypeReq/OptI/O/Both
szServicePackageSERPcharOPTINPUT

A combination of service order type and coverage type used to define service support to which the customer is contractually entitled. A 
service package also contains response time and coverage group.

cTypeOfServiceTYPScharOPTINPUT

A user defined code (00/TY) that indicates the classification of a work order or engineering change order. You can use work order type as a 
selection criterion for work order approvals.

mnIShortItemNumberITMMATH_NUMERICOPTINPUT

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

szBranchMMCUcharOPTINPUT

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.

szCoveredGLCodeGLCCVcharOPTOUTPUT

A user defined code (41/9) that identifies the G/L Offset to use when the system is searching for the account to which it will post the covered 
portion (by warranty or contract) of the accounting transaction. If you do not want to specify a G/L Offset, you can enter four asterisks in this 
field or you can leave this field blank. If you leave this field blank, the system uses the G/L Offset from Inventory.

szNonCoveredGLCodeGLCNCcharOPTOUTPUT

A user defined code (41/9) that identifies the G/L Offset to use when the system is searching for the account to which it will post the 
non-covered portion of the accounting transaction. If you do not want to specify a G/L Offset, you can enter four asterisks in this field or you can leave 
this field blank. If you leave the field blank, the system uses the G/L Offset from Inventory.

cModeEV01charREQINPUT

An option that specifies the type of processing for an event.

Related Functions

None

Related Tables

None