SAP Function Modules

BAPI_BRANCH_GETDETAIL SAP Function module







BAPI_BRANCH_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_BRANCH_GETDETAIL into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: J1BU
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM BAPI_BRANCH_GETDETAIL - BAPI BRANCH GETDETAIL





CALL FUNCTION 'BAPI_BRANCH_GETDETAIL' "
  EXPORTING
    company =                   " bapibranch-bukrs  Company
    branch =                    " bapibranch-branch  Branch
  IMPORTING
    branch_detail =             " bapibranch    Branch information
    return =                    " bapiret2      Return Code
    branch_address =            " bapi0002_3    Include Structure with Name Attributes of the ADRC Address
    e_state_insc =              " j_1bstains
    e_munic_insc =              " j_1bmunins
* TABLES
*   smtp_numbers =              " adr6
    .  "  BAPI_BRANCH_GETDETAIL

ABAP code example for Function Module BAPI_BRANCH_GETDETAIL





The ABAP code below is a full code listing to execute function module BAPI_BRANCH_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_branch_detail  TYPE BAPIBRANCH ,
ld_return  TYPE BAPIRET2 ,
ld_branch_address  TYPE BAPI0002_3 ,
ld_e_state_insc  TYPE J_1BSTAINS ,
ld_e_munic_insc  TYPE J_1BMUNINS ,
it_smtp_numbers  TYPE STANDARD TABLE OF ADR6,"TABLES PARAM
wa_smtp_numbers  LIKE LINE OF it_smtp_numbers .


DATA(ld_company) = some text here

DATA(ld_branch) = some text here

"populate fields of struture and append to itab
append wa_smtp_numbers to it_smtp_numbers. . CALL FUNCTION 'BAPI_BRANCH_GETDETAIL' EXPORTING company = ld_company branch = ld_branch IMPORTING branch_detail = ld_branch_detail return = ld_return branch_address = ld_branch_address e_state_insc = ld_e_state_insc e_munic_insc = ld_e_munic_insc * TABLES * smtp_numbers = it_smtp_numbers . " BAPI_BRANCH_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_branch_detail  TYPE BAPIBRANCH ,
ld_company  TYPE BAPIBRANCH-BUKRS ,
it_smtp_numbers  TYPE STANDARD TABLE OF ADR6 ,
wa_smtp_numbers  LIKE LINE OF it_smtp_numbers,
ld_return  TYPE BAPIRET2 ,
ld_branch  TYPE BAPIBRANCH-BRANCH ,
ld_branch_address  TYPE BAPI0002_3 ,
ld_e_state_insc  TYPE J_1BSTAINS ,
ld_e_munic_insc  TYPE J_1BMUNINS .


ld_company = some text here

"populate fields of struture and append to itab
append wa_smtp_numbers to it_smtp_numbers.

ld_branch = some text here

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_BRANCH_GETDETAIL or its description.