10-25-2017 7:12 AM
hello good day,
how can i able to get the address of business entity using vibdbe and adrc
i cant find the link between the two thanks
10-25-2017 12:19 PM
Julian,
Adresses are maintained via table VZOBJECT
ADROBJTYP = 'VI'
ADROBJNR = objnr from table vibdbe
OBTYP = '51'
ADRNR_ORI = 'D' (when is directly mainted, so no derivation from higher object)
Then you get adrnr to get data from adrc or other tables...
10-25-2017 7:22 AM
Hi Julian,
By passing company code and business entity to the BAPI BAPI_RE_BE_GET_DETAIL,
we can fetch the address of the business entity.
Parameter OBJECT_ADDRESS will have address.
Thanks,
Ramesh
10-25-2017 9:03 AM
10-26-2017 12:26 AM
Any specific reason to fetch the data directly from tables rather than using FMs or BAPIs?
10-25-2017 12:19 PM
Julian,
Adresses are maintained via table VZOBJECT
ADROBJTYP = 'VI'
ADROBJNR = objnr from table vibdbe
OBTYP = '51'
ADRNR_ORI = 'D' (when is directly mainted, so no derivation from higher object)
Then you get adrnr to get data from adrc or other tables...
10-25-2017 12:20 PM
Hi Julian,
If I were you, I would use the OO methods to derive the address...
Here is an example
* data declaration
DATA:
ls_vibdbe TYPE vibdbe,
lo_bus_entity TYPE REF TO if_rebd_business_entity,
lo_address_mngr TYPE REF TO if_rebp_address_mngr,
ls_detail_x TYPE rebp_address_rel_x.
* get business entity via intreno
CALL METHOD cf_rebd_business_entity=>find_by_intreno
EXPORTING
id_intreno = ls_vibdbe-intreno
RECEIVING
ro_instance = lo_bus_entity
EXCEPTIONS
error = 1
OTHERS = 2.
IF sy-subrc <> 0.
RETURN.
ENDIF.
* get address manager
lo_address_mngr = lo_bus_entity->get_address_mngr( ).
* get address detail
if lo_address_mngr IS BOUND.
ls_detail_x = lo_address_mngr->get_detail_x( ).
endif.
Kind Regards,
Alexander
10-26-2017 4:09 AM
Small correction it is 'INTRENO' from vibdbe table and not objnr.