SAP Function Modules

BAPI_ADDRESSORG_GETDETAIL SAP Function module - BAPI to Read Organization Addresses







BAPI_ADDRESSORG_GETDETAIL is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name BAPI_ADDRESSORG_GETDETAIL into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: SZAK
Released Date: 06.01.1999
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM BAPI_ADDRESSORG_GETDETAIL - BAPI ADDRESSORG GETDETAIL





CALL FUNCTION 'BAPI_ADDRESSORG_GETDETAIL' "BAPI to Read Organization Addresses
  EXPORTING
    obj_type =                  " bapi4001_1-objtype  Address owner BOR object type
    obj_id =                    " bapi4001_1-objkey  Address owner BOR object key
*   obj_id_ext = SPACE          " bapi4001_1-extension  BOR object key extension (GUID)
*   context = 1                 " bapi4001_1-context  Semantic meaning of the addresses (-> constants)
*   iv_current_comm_data = 'X'  " bapi4001_1-currentcom  Indicator: Only read current status of communication data
  IMPORTING
    address_number =            " bapi4001_1-addr_no  Address number in target system
* TABLES
*   bapiad1vl =                 " bapiad1vl     BAPI structure company address (w/o. comm.)
*   bapiadtel =                 " bapiadtel     BAPI structure telephone numbers
*   bapiadfax =                 " bapiadfax     BAPI structure fax numbers
*   bapiadttx =                 " bapiadttx     BAPI structure teletex numbers
*   bapiadtlx =                 " bapiadtlx     BAPI structure telex numbers
*   bapiadsmtp =                " bapiadsmtp    BAPI structure internet addresses
*   bapiadrml =                 " bapiadrml     BAPI structure R/Mail addresses
*   bapiadx400 =                " bapiadx400    BAPI structure X400 addresses
*   bapiadrfc =                 " bapiadrfc     BAPI structure RFC addresses
*   bapiadprt =                 " bapiadprt     BAPI structure printer addresses
*   bapiadssf =                 " bapiadssf     BAPI structure SSF addresses
*   bapiaduri =                 " bapiaduri     BAPI structure URI addresses
*   bapiadpag =                 " bapiadpag     BAPI structure pager numbers
*   bapiad_rem =                " bapiad_rem    BAPI structure address comments
*   bapicomrem =                " bapicomrem    BAPI Structure Communication Comments
*   bapiaduse =                 " bapiaduse     BAPI Structure for Communication Usages (BAS)
*   return =                    " bapiret2      Message/error return table
    .  "  BAPI_ADDRESSORG_GETDETAIL

ABAP code example for Function Module BAPI_ADDRESSORG_GETDETAIL

The ABAP code below is a full code listing to execute function module BAPI_ADDRESSORG_GETDETAIL including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
ld_address_number  TYPE BAPI4001_1-ADDR_NO ,
it_bapiad1vl  TYPE STANDARD TABLE OF BAPIAD1VL,"TABLES PARAM
wa_bapiad1vl  LIKE LINE OF it_bapiad1vl ,
it_bapiadtel  TYPE STANDARD TABLE OF BAPIADTEL,"TABLES PARAM
wa_bapiadtel  LIKE LINE OF it_bapiadtel ,
it_bapiadfax  TYPE STANDARD TABLE OF BAPIADFAX,"TABLES PARAM
wa_bapiadfax  LIKE LINE OF it_bapiadfax ,
it_bapiadttx  TYPE STANDARD TABLE OF BAPIADTTX,"TABLES PARAM
wa_bapiadttx  LIKE LINE OF it_bapiadttx ,
it_bapiadtlx  TYPE STANDARD TABLE OF BAPIADTLX,"TABLES PARAM
wa_bapiadtlx  LIKE LINE OF it_bapiadtlx ,
it_bapiadsmtp  TYPE STANDARD TABLE OF BAPIADSMTP,"TABLES PARAM
wa_bapiadsmtp  LIKE LINE OF it_bapiadsmtp ,
it_bapiadrml  TYPE STANDARD TABLE OF BAPIADRML,"TABLES PARAM
wa_bapiadrml  LIKE LINE OF it_bapiadrml ,
it_bapiadx400  TYPE STANDARD TABLE OF BAPIADX400,"TABLES PARAM
wa_bapiadx400  LIKE LINE OF it_bapiadx400 ,
it_bapiadrfc  TYPE STANDARD TABLE OF BAPIADRFC,"TABLES PARAM
wa_bapiadrfc  LIKE LINE OF it_bapiadrfc ,
it_bapiadprt  TYPE STANDARD TABLE OF BAPIADPRT,"TABLES PARAM
wa_bapiadprt  LIKE LINE OF it_bapiadprt ,
it_bapiadssf  TYPE STANDARD TABLE OF BAPIADSSF,"TABLES PARAM
wa_bapiadssf  LIKE LINE OF it_bapiadssf ,
it_bapiaduri  TYPE STANDARD TABLE OF BAPIADURI,"TABLES PARAM
wa_bapiaduri  LIKE LINE OF it_bapiaduri ,
it_bapiadpag  TYPE STANDARD TABLE OF BAPIADPAG,"TABLES PARAM
wa_bapiadpag  LIKE LINE OF it_bapiadpag ,
it_bapiad_rem  TYPE STANDARD TABLE OF BAPIAD_REM,"TABLES PARAM
wa_bapiad_rem  LIKE LINE OF it_bapiad_rem ,
it_bapicomrem  TYPE STANDARD TABLE OF BAPICOMREM,"TABLES PARAM
wa_bapicomrem  LIKE LINE OF it_bapicomrem ,
it_bapiaduse  TYPE STANDARD TABLE OF BAPIADUSE,"TABLES PARAM
wa_bapiaduse  LIKE LINE OF it_bapiaduse ,
it_return  TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM
wa_return  LIKE LINE OF it_return .


DATA(ld_obj_type) = some text here

DATA(ld_obj_id) = some text here

DATA(ld_obj_id_ext) = some text here

DATA(ld_context) = Check type of data required

DATA(ld_iv_current_comm_data) = some text here

"populate fields of struture and append to itab
append wa_bapiad1vl to it_bapiad1vl.

"populate fields of struture and append to itab
append wa_bapiadtel to it_bapiadtel.

"populate fields of struture and append to itab
append wa_bapiadfax to it_bapiadfax.

"populate fields of struture and append to itab
append wa_bapiadttx to it_bapiadttx.

"populate fields of struture and append to itab
append wa_bapiadtlx to it_bapiadtlx.

"populate fields of struture and append to itab
append wa_bapiadsmtp to it_bapiadsmtp.

"populate fields of struture and append to itab
append wa_bapiadrml to it_bapiadrml.

"populate fields of struture and append to itab
append wa_bapiadx400 to it_bapiadx400.

"populate fields of struture and append to itab
append wa_bapiadrfc to it_bapiadrfc.

"populate fields of struture and append to itab
append wa_bapiadprt to it_bapiadprt.

"populate fields of struture and append to itab
append wa_bapiadssf to it_bapiadssf.

"populate fields of struture and append to itab
append wa_bapiaduri to it_bapiaduri.

"populate fields of struture and append to itab
append wa_bapiadpag to it_bapiadpag.

"populate fields of struture and append to itab
append wa_bapiad_rem to it_bapiad_rem.

"populate fields of struture and append to itab
append wa_bapicomrem to it_bapicomrem.

"populate fields of struture and append to itab
append wa_bapiaduse to it_bapiaduse.

"populate fields of struture and append to itab
append wa_return to it_return. . CALL FUNCTION 'BAPI_ADDRESSORG_GETDETAIL' EXPORTING obj_type = ld_obj_type obj_id = ld_obj_id * obj_id_ext = ld_obj_id_ext * context = ld_context * iv_current_comm_data = ld_iv_current_comm_data IMPORTING address_number = ld_address_number * TABLES * bapiad1vl = it_bapiad1vl * bapiadtel = it_bapiadtel * bapiadfax = it_bapiadfax * bapiadttx = it_bapiadttx * bapiadtlx = it_bapiadtlx * bapiadsmtp = it_bapiadsmtp * bapiadrml = it_bapiadrml * bapiadx400 = it_bapiadx400 * bapiadrfc = it_bapiadrfc * bapiadprt = it_bapiadprt * bapiadssf = it_bapiadssf * bapiaduri = it_bapiaduri * bapiadpag = it_bapiadpag * bapiad_rem = it_bapiad_rem * bapicomrem = it_bapicomrem * bapiaduse = it_bapiaduse * return = it_return . " BAPI_ADDRESSORG_GETDETAIL
IF SY-SUBRC EQ 0. "All OK ENDIF.




ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_address_number  TYPE BAPI4001_1-ADDR_NO ,
ld_obj_type  TYPE BAPI4001_1-OBJTYPE ,
it_bapiad1vl  TYPE STANDARD TABLE OF BAPIAD1VL ,
wa_bapiad1vl  LIKE LINE OF it_bapiad1vl,
ld_obj_id  TYPE BAPI4001_1-OBJKEY ,
it_bapiadtel  TYPE STANDARD TABLE OF BAPIADTEL ,
wa_bapiadtel  LIKE LINE OF it_bapiadtel,
ld_obj_id_ext  TYPE BAPI4001_1-EXTENSION ,
it_bapiadfax  TYPE STANDARD TABLE OF BAPIADFAX ,
wa_bapiadfax  LIKE LINE OF it_bapiadfax,
ld_context  TYPE BAPI4001_1-CONTEXT ,
it_bapiadttx  TYPE STANDARD TABLE OF BAPIADTTX ,
wa_bapiadttx  LIKE LINE OF it_bapiadttx,
ld_iv_current_comm_data  TYPE BAPI4001_1-CURRENTCOM ,
it_bapiadtlx  TYPE STANDARD TABLE OF BAPIADTLX ,
wa_bapiadtlx  LIKE LINE OF it_bapiadtlx,
it_bapiadsmtp  TYPE STANDARD TABLE OF BAPIADSMTP ,
wa_bapiadsmtp  LIKE LINE OF it_bapiadsmtp,
it_bapiadrml  TYPE STANDARD TABLE OF BAPIADRML ,
wa_bapiadrml  LIKE LINE OF it_bapiadrml,
it_bapiadx400  TYPE STANDARD TABLE OF BAPIADX400 ,
wa_bapiadx400  LIKE LINE OF it_bapiadx400,
it_bapiadrfc  TYPE STANDARD TABLE OF BAPIADRFC ,
wa_bapiadrfc  LIKE LINE OF it_bapiadrfc,
it_bapiadprt  TYPE STANDARD TABLE OF BAPIADPRT ,
wa_bapiadprt  LIKE LINE OF it_bapiadprt,
it_bapiadssf  TYPE STANDARD TABLE OF BAPIADSSF ,
wa_bapiadssf  LIKE LINE OF it_bapiadssf,
it_bapiaduri  TYPE STANDARD TABLE OF BAPIADURI ,
wa_bapiaduri  LIKE LINE OF it_bapiaduri,
it_bapiadpag  TYPE STANDARD TABLE OF BAPIADPAG ,
wa_bapiadpag  LIKE LINE OF it_bapiadpag,
it_bapiad_rem  TYPE STANDARD TABLE OF BAPIAD_REM ,
wa_bapiad_rem  LIKE LINE OF it_bapiad_rem,
it_bapicomrem  TYPE STANDARD TABLE OF BAPICOMREM ,
wa_bapicomrem  LIKE LINE OF it_bapicomrem,
it_bapiaduse  TYPE STANDARD TABLE OF BAPIADUSE ,
wa_bapiaduse  LIKE LINE OF it_bapiaduse,
it_return  TYPE STANDARD TABLE OF BAPIRET2 ,
wa_return  LIKE LINE OF it_return.


ld_obj_type = some text here

"populate fields of struture and append to itab
append wa_bapiad1vl to it_bapiad1vl.

ld_obj_id = some text here

"populate fields of struture and append to itab
append wa_bapiadtel to it_bapiadtel.

ld_obj_id_ext = some text here

"populate fields of struture and append to itab
append wa_bapiadfax to it_bapiadfax.

ld_context = Check type of data required

"populate fields of struture and append to itab
append wa_bapiadttx to it_bapiadttx.

ld_iv_current_comm_data = some text here

"populate fields of struture and append to itab
append wa_bapiadtlx to it_bapiadtlx.

"populate fields of struture and append to itab
append wa_bapiadsmtp to it_bapiadsmtp.

"populate fields of struture and append to itab
append wa_bapiadrml to it_bapiadrml.

"populate fields of struture and append to itab
append wa_bapiadx400 to it_bapiadx400.

"populate fields of struture and append to itab
append wa_bapiadrfc to it_bapiadrfc.

"populate fields of struture and append to itab
append wa_bapiadprt to it_bapiadprt.

"populate fields of struture and append to itab
append wa_bapiadssf to it_bapiadssf.

"populate fields of struture and append to itab
append wa_bapiaduri to it_bapiaduri.

"populate fields of struture and append to itab
append wa_bapiadpag to it_bapiadpag.

"populate fields of struture and append to itab
append wa_bapiad_rem to it_bapiad_rem.

"populate fields of struture and append to itab
append wa_bapicomrem to it_bapicomrem.

"populate fields of struture and append to itab
append wa_bapiaduse to it_bapiaduse.

"populate fields of struture and append to itab
append wa_return to it_return.

SAP Documentation for FM BAPI_ADDRESSORG_GETDETAIL


The address data of the organization address for the specified object type and key is returned. ...See here for full SAP fm documentation

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name BAPI_ADDRESSORG_GETDETAIL or its description.