I thought again about this and would like to correct my previous answer a bit.
Please keep in mind I have not loaded equipments with addresses.
I said you should load address prior to equipment, this should be after .
Let me explain briefly how I do it for vendors and customers
I load with IDOCs , because here I can pre-assign an internal number like you would do it in case of external numbers. SAP posts the IDOCs with the given number even the number range is set to internal.
I use the function module NUMBER_GET_NEXT to pre-assign this internal number from the number range. This function module call is done in LSMW field mapping from the e.g. vendor number field. At the same field I actually write the old number and the new number into a Z-table which I use for mapping.
The address number field is left blank.
In a second LSMW object I load then the addresses with ADRMAS Idoc.
In field E1ADRMAS-OBJ_ID I do a select to get the new vendor number from the mapping table based on the old vendor number from my source file.
This field in the IDOC is actually the connection between address and vendor master. While posting the IDOC, SAP updates the address number field in LFA1 vendor master table.
For your case it would actually mean that you fetch the next equipment umber via function module NUMBER_GET_NEXT. I am not sure if you have to switch the number range to external for the load with direct input.
Then you enter this new equipment in the address IDoc OBJ_ID field .
After posting you have to check whether the table EQUI_ADDR has the address number as link to ADRC and hopefully as well a short form of this address.
If that does not work, then you have to load the address with a recording