Hi Amber,
You can use dynamic query object "BuilHeaderAdvancedSearch" instead of simple query object ('BuilHeaderSearch' ).. Once you get the result entity you can update email id in corresponding address entity.
And also check in debug mode at the line CHECK lr_email IS BOUND. if this is not bound then you have to create a new entity and then set the email value to it.
Modify instead of check lr_email is bound, add below code,
if lr_email is bound.
set email id to the entity.
else.
lr_adrs->create_related_entities( iv_relation_name = 'BuilAddressEMailRel' ).
then set the email id value to the entity.
endif.
Regards,
Dharmakasi.