User:Mmunch

Create Licensee

Overview
The creation of a licensee is a 4 part process which involves:
 * 1) The creation of the Business Entity Record (TYPE="LICENSEE")
 * 2) The creation of PRIMARY Address
 * 3) the creation of Network records (related to Address record)
 * 4) The creation of Relationships with a Controlling Company and other Licensees (if necessary)

Create Business Entity record (type="LICENSEE")
Create Record in GLB_BUE_BUSINESS_ENTITY table

Inputs

Outputs:

IF Success

IF Err

Error message

Create Licensee PRIMARY Address record in GLB_BEA_BE_ADDRESS
Inputs

Outputs

If Success:

IF Err:

Error message

Create Business Entity Network Records and relate records to Address
Create Licensee Contact Phone and Licensee Contact Fax records in GLB_BNW_BE_NETWORK and related entries in GLB_BNR_BE_ADDRESS_NET_REL

At creation, a licensee has requires 2 types of entries in the Network table (a "LICENSEE CONTACT PHONE" and a "LICENSEE CONTACT FAX"), thus it requires two entries in the GLB_BNR_BE_ADDRESS_NET_REL table.

The creation of Licensee Network Records is a two part process:
 * 1) Create Network record in GLB_BNW_BE_NETWORK
 * 2) Create record in GLB_BNR_BE_ADDRESS_NET_REL to relate Network record back to Address

Create "LICENSEE CONTACT PHONE"
Licensee Contact Phone Inputs

Outputs

If Success:

IF Err:

Error message

Relate Network Records to Address
Input

Output:

Err Message if applicable

Create "LICENSEE CONTACT FAX"
Repeat Create "LICENSEE CONTACT PHONE" process above to create LICENSEE CONTACT FAX and related record to Address

Relate Network Record to Address
Repeat Relate Network Records to Address process described above to relate Contact Fax to Primary Address.

Create Licensee Relationships
A business entity has 2 mandatory relationship TYPES recorded in the GLB_BER_BE_REL table


 * 1) CONTROLLED BY a Business Entity of TYPE="CONTROLLING COMPANY"
 * 2) PROCESSED BY a Business of TYPE="CONTROLLING COMPANY" or "LICENSEE" (Licensee IEE processes its own Month end statements and therefore is processed by itself)

A licensee may also have a relationship type "SUB-LICENSEE OF"

Create CONTROLLED BY relationship
Precondition: Controlling Company must exist

Business Rule: R_BER_S_BE_ID must be FK to BE of type "CONTROLLING COMPANY"

Input

Output Success or Error message

Create PROCESSED BY relationship
Precondition: Processing Controlling Company or Licenee must exist

Input

Output

Success or Error message

Create is SUB-LICENSEE OF relationship (if Applicable)
Precondition: Parent Licensee must exist

Input

Output

Success or Error message