Hello Ricky,
I think if you understand the concept of technical installation, technical removal, billing related installation and billing related removal with the corresponding tables that are updated in the background you can yourself build the required logic. Please allow me to explain.
When a device is created, at the background a equipment gets created. Device is an ISU entity and equipment is an R/3 entity. The reason for an equipment creation in R/3 is to perform the plant maintenance activities. When the device is created an entry is created in the table EGERH.
By performing the technical installation, we link the device to the device location. At this point in time a new entry is created in the table EGERH with a unique number called as the logical device number.
Now, in order to bill the consumption recorded in this device it has to be linked to the Installation. This activity of linking the device to the installation is called as the billing related installation. A billing related installation cannot be done without performing the technical installation. And when the billing related installation is done an entry is created in the table EASTL by using the logical device number present in EGERH.
Usually, the technical and billing installation are done in one shot and this is called as the full installation. This activity updates the EGERH and EASTL tables.
When we intend to perform the removal activity, the billing related removal has to be done first which ends the time slices in EASTL against the logical device number. This means that the link between the installation and the device is terminated.
And the time slices that you see in the ES32->Devices screen is a replica of the time slices in EASTL table.
Once the billing related removal is done, the technical removal has to be done. This terminates the link between the device location and the device. And an entry is created in the table EGERH.
Now coming to your query where you want to identify the removed devices from an installation.
If you have the installation number and the removal date, you may pass the installation to the EASTL table along with the removal date = EASTL-BIS. You will get the logical device numbers, using which you can query the EGERH table to identify the devices.
Hope that helps.
Thanks.
Regards,
Mohammed Muzammil.