DATA: xy_lt_ger TYPE isu07_twd_gertab_t.
CALL FUNCTION 'ISU_DET_DEVICE_FROM_INST'
EXPORTING
x_anlage = eastl-anlage
x_keydate = '01/01/1900'
X_ONLY_KEYDATE = 'X'
CHANGING
xy_t_ger = xy_lt_ger
EXCEPTIONS
not_found = 1
internal_error = 2
system_error = 3
OTHERS = 4.
If you want all the old devices on the installation then you should pass the key data as 01/01/1900 and the only keydate set to X as above.
Without knowing your entire code it might be hard to fix the issues, but I just tried to help with the little I know about your requirements.