Purpose
The purpose of this little series of blog posts is to provide an orientation to working with equipment addresses in customer development programs. In this blog post, we take a closer look at the management of addresses by the equipment application.
This is the
second blog post in the series, which has the following structure.
- Equipment Address Management - introduction
- Equipment Address Management - a closer look
- Equipment Address Management - reading and searching for addresses
- Equipment Address Management - creating Equipment with an address
- Equipment Address Management - creating an address for equipment
Let's get started.
Equipment Addresses
In the prior blog post, we learned that the equipment application uses the services of Business Address Services to manage addresses. We also learned that the equipment application also plays a role in the manage of the equipment address, by maintaining a reference to the equipment's address in the equipment Location and Accounting segment ILOA.
Before we go much further, a closer but quick look at the details of ILOA is worthwhile.
Table ILOA
The table ILOA maintains location and accounting details for maintenance objects, including equipment, functional locations, notifications and orders. It provides a snapshot of location and accounting details - including a reference to an address.
ILOA also notes the data origin or source of the information using a data origin indicator paired with each data field.
The data origin indicator identifies the source of the locational data:
- R - Data transferred from reference object
- D - Data was directly maintained
- H - Data transferred from superior object
These indicators will give us some clues to interpreting the source of the equipment's address.
A picture of a few ILOA records of equipment might help. Note that the SWERK is sourced from the reference object indicated by R, whilst the address number in ADRNR is sourced from direct entry - D.
Illustration of ILOA
As we start to look more closely at how the equipment application manages addresses, we will observe closely how the address number ADRNR and the data source indicator ADRNRI entries in ILOA change.
Let's get back to addresses and run through some scenarios and seeing how things behave.
Creation of equipment without installation and without address
In this scenario, a piece of equipment is created - not installed into a structure - and no address is maintained. We would expect that no address is created and indeed this is what appears to be the case.
The result of this is
- A new equipment is created with records in EQUI, EQUZ and ILOA
- No address number reference recorded in ILOA
- Address number reference data origin indicator in ILOA has value of D - the blank value is deemed to be directly maintained.
- No new address number in ADRC
- No address number cross reference in ADRV
Simple outcome. No address maintained and no address created or assigned to the equipment.
Creation of equipment without installation but with address
In this scenario, a piece of equipment is created but not installed into a structure and an address is maintained in the Location - Address screen in the equipment. We would expect that an address is created and indeed this is what appears to be the case.
The result of this is
- A new equipment, with records in EQUI, EQUZ and ILOA
- An address number reference in ILOA
- Address number reference indicator in ILOA of D - the address value is deemed to be directly maintained.
- A new address number in ADRC
- An address number cross reference to the equipment in ADRV
For visibility, here are the resulting EQUZ, ILOA and ADRV records for the new equipment and its address. (If you aren't familiar with these tables, then the first blog post will help
Here
EQUZ
ILOA
ADRV
Some observations on ADRV - the table that holds the "consumers" or "uses" of the address.
Since we have one equipment using this address - only one consumer is recorded. This is what we would expect. Note also the fields starting with APPL_ . Since address management is a generic service, it needs to be able to cross reference the address numbers to the objects of many applications. Hence the information in the table ADRV notes the application table and field to which the application key relates. The application key (APPL_KEY) contains the full equipment number pre-pended by the client number.
Note also the field OWNER in ADRV - it has an X to indicate that this address is owned by the equipment. This isn't to be confused with OWNER in table ILOA. That has another purpose unrelated to addresses.
Let's move to the next scenario.
Creation of equipment with installation into a functional location
In this scenario, a piece of equipment is created - and installed into a functional location which already has an address. We would expect that the equipment references the address from the functional location. This is indeed what occurs.
The result of this is
- A new equipment, with records in EQUI, EQUZ and ILOA
- An address number reference in ILOA of the equipment
- Address number reference indicator in ILOA of R - the address value is sourced from the reference .
- The address number reference in ILOA of the equipment is also that in the ILOA of the functional location.
- An additional entry in the address number cross reference table ADRV to the equipment.
I repeated this creation and installation scenario quite a few times to generate a few usages of the same functional location address - consumed ( "used" ) by many pieces of equipment. Note the functional location is the Owner of the address - and by convention has consumer reference number 0000000001. The equipment are also consumers but not owners.
Multiple usage of the same functional location address by many equipment
If we flip this around and look at ILOA, we see a similar listing of multiple equipment referencing (ADRNRI = R) the address of the functional location. The OWNER in ILOA indicates the ownership of the ILOA record. 2 = Functional Location space = Equipment.
ILOA showing similar use of the same address
This also also what we expect to see. The usage of the address number is referenced both in the equipment application in ILOA and also by Address Services in ADRV.
Which leads us to the final scenario to explore in this blog post. What happens when we change the address of a piece of equipment referencing the address of a functional location?
Changing a referenced address
Before we go further, spend a moment to ponder what should happen when we attempt to change a referenced address?
Since the equipment is referencing ( sharing ) the address of the functional location, is it even appropriate that a user can change the functional location address from the equipment?
I'd think it isn't appropriate to change the address owned by the functional location referenced by many other parties. Sure, if I was changing the address from the functional location - that would be fine, but not when changing from the equipment, a consumer of the address.
So what happens in a transaction like Equipment Change - IE02?
When a user attempts to change the equipment address, a popup is provided to ask which address should be maintained.
Make a choice
If Superior object is selected, the existing address is displayed but it cannot be changed. That is correct - the address is owned by the functional location. If Individual Maintenance is selected, a screen to create a new address is displayed and the equipment receives a new address upon saving.
The result of selecting Individual Maintenance is this
- A new address and address number in ADRC
- The new address number has a cross reference to the equipment in ADRV - equipment is now the owner of the new address.
- Removal of the cross reference record in ADRV showing the equipment as a consumer of the (prior) functional location address
- The new address number recorded in ILOA and the data origin of D set.
What do you think happens to the existing equipment ILOA record? Is a new ILOA record generated or is the existing merely updated? I'll leave you to ponder that and let you watch EQUZ-ILOAN before and after the equipment address is changed.
Summary
From this second blog post, you should now have a better understanding of how the address in the equipment is managed by Business Application Services and the equipment application. We have seen how changes in the usage of an address are reflected not only in the Business Application Services table ADRV - Address Where Used but also in ILOA - the Location and Accounting record of maintenance objects.
In the next blog post, we will start looking at what we can do to work with equipment address from customer developer programs.
Till then.