Skip to Content
0

RE FX how to get the address of business entity

Oct 25, 2017 at 06:12 AM

83

avatar image
Former Member

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 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
avatar image
Former Member Oct 25, 2017 at 11:19 AM
0

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

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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
Former Member

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

0
avatar image
Former Member Oct 25, 2017 at 06:22 AM
0

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

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

how about direct get it on a table?

0
Former Member

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

0