Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

RE FX how to get the address of business entity

0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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...

6 REPLIES 6

0 Kudos

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

0 Kudos

how about direct get it on a table?

0 Kudos

Any specific reason to fetch the data directly from tables rather than using FMs or BAPIs?

Former Member
0 Kudos

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...

0 Kudos

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

0 Kudos

Small correction it is 'INTRENO' from vibdbe table and not objnr.