Hi Stefan,
I would also use a cross BO association for that. When you modeled the cross BO association you can use the service manager of the source BO of your association to resolve it.
first, you have to get the service manager:
data lo_source_bo_sm type ref to /bobf/if_tra_service_manager.
lo_source_bo_sm = /bobf/cl_tra_serv_mgr_factory=>get_service_manager( iv_bo_key = if_source_bo_c=>sc_bo_key).
Second, get some instances of your source BO:
lo_source_bo_sm->query(
exporting
iv_query_key = if_source_bo_c=>sy_query-root-select_all
importing
et_key = lt_source_bo_root_key )
Third, navigate the cross BO assoc:
lo_source_bo_sm->retrieve_by_association(
exproting
iv_node_key = if_source_bo_c=>sc_node-root
it_key = lt_source_bo_root_key
iv_association = if_source_bo_c=>sc_association-root-target_node
iv_fill_data = abap_true
importing
et_data = lt_target_node_data ).
Remark: I didn't code the sample for real, so if you do cut and past, there might be typos...
Cheers,
Martin