SAP BAPI_STUDENT_ADDRESSES_GET Function Module for Method: Determine All Addresses of the Student









BAPI_STUDENT_ADDRESSES_GET is a standard bapi student addresses get SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Method: Determine All Addresses of the Student processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for bapi student addresses get FM, simply by entering the name BAPI_STUDENT_ADDRESSES_GET into the relevant SAP transaction such as SE37 or SE38.

Function Group: HRPIQ00STUDENTBAPI
Program Name: SAPLHRPIQ00STUDENTBAPI
Main Program: SAPLHRPIQ00STUDENTBAPI
Appliation area:
Release date: 02-Nov-2002
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function BAPI_STUDENT_ADDRESSES_GET pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'BAPI_STUDENT_ADDRESSES_GET'"Method: Determine All Addresses of the Student
EXPORTING
* PLANVERSION = "Plan Version
OBJECTID = "Object ID of Student
* OPERATION = "Activity for BP Address Determination
* ADDRESSTYPE = "Address Type
* VALID_DATE = SY-DATLO "Validity Date

IMPORTING
STANDARDADDRESSNUMBER = "Address Number
STANDARDADDRESSGUID = "GUID of a Business Partner Address
STANDARDADDRESSUSEINSTEAD = "Indicator: Address is Standard Address

TABLES
* ADDRESSES = "Addresses
* RETURN = "Messages
* ADDRESSES_ALL = "Addresses Independent of Temporal Validity
.



IMPORTING Parameters details for BAPI_STUDENT_ADDRESSES_GET

PLANVERSION - Plan Version

Data type: BAPISTUDENT_HEAD-PLVAR
Optional: Yes
Call by Reference: No ( called with pass by value option)

OBJECTID - Object ID of Student

Data type: BAPISTUDENT_HEAD-OBJID
Optional: No
Call by Reference: No ( called with pass by value option)

OPERATION - Activity for BP Address Determination

Data type: BAPIBUS1006_ADDRESSES_INT-OPERATION
Optional: Yes
Call by Reference: No ( called with pass by value option)

ADDRESSTYPE - Address Type

Data type: BAPIBUS1006_ADDRESSUSAGE-ADDRESSTYPE
Optional: Yes
Call by Reference: No ( called with pass by value option)

VALID_DATE - Validity Date

Data type: BAPIBUS1006_VALIDITY-VALID_DATE
Default: SY-DATLO
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for BAPI_STUDENT_ADDRESSES_GET

STANDARDADDRESSNUMBER - Address Number

Data type: BAPIBUS1006_ADDRESSES_INT-ADDRNUMBER
Optional: No
Call by Reference: No ( called with pass by value option)

STANDARDADDRESSGUID - GUID of a Business Partner Address

Data type: BAPIBUS1006_ADDRESSES_INT-ADDRGUID
Optional: No
Call by Reference: No ( called with pass by value option)

STANDARDADDRESSUSEINSTEAD - Indicator: Address is Standard Address

Data type: BAPIBUS1006_ADDRESSES_INT-STANDARDADDRESS
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for BAPI_STUDENT_ADDRESSES_GET

ADDRESSES - Addresses

Data type: BAPIBUS1006_ADDRESSES
Optional: Yes
Call by Reference: No ( called with pass by value option)

RETURN - Messages

Data type: BAPIRET2
Optional: Yes
Call by Reference: No ( called with pass by value option)

ADDRESSES_ALL - Addresses Independent of Temporal Validity

Data type: BAPIBUS1006_ADDRESSES
Optional: Yes
Call by Reference: Yes

Copy and paste ABAP code example for BAPI_STUDENT_ADDRESSES_GET Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lt_addresses  TYPE STANDARD TABLE OF BAPIBUS1006_ADDRESSES, "   
lv_planversion  TYPE BAPISTUDENT_HEAD-PLVAR, "   
lv_standardaddressnumber  TYPE BAPIBUS1006_ADDRESSES_INT-ADDRNUMBER, "   
lt_return  TYPE STANDARD TABLE OF BAPIRET2, "   
lv_objectid  TYPE BAPISTUDENT_HEAD-OBJID, "   
lv_standardaddressguid  TYPE BAPIBUS1006_ADDRESSES_INT-ADDRGUID, "   
lv_operation  TYPE BAPIBUS1006_ADDRESSES_INT-OPERATION, "   
lt_addresses_all  TYPE STANDARD TABLE OF BAPIBUS1006_ADDRESSES, "   
lv_standardaddressuseinstead  TYPE BAPIBUS1006_ADDRESSES_INT-STANDARDADDRESS, "   
lv_addresstype  TYPE BAPIBUS1006_ADDRESSUSAGE-ADDRESSTYPE, "   
lv_valid_date  TYPE BAPIBUS1006_VALIDITY-VALID_DATE. "   SY-DATLO

  CALL FUNCTION 'BAPI_STUDENT_ADDRESSES_GET'  "Method: Determine All Addresses of the Student
    EXPORTING
         PLANVERSION = lv_planversion
         OBJECTID = lv_objectid
         OPERATION = lv_operation
         ADDRESSTYPE = lv_addresstype
         VALID_DATE = lv_valid_date
    IMPORTING
         STANDARDADDRESSNUMBER = lv_standardaddressnumber
         STANDARDADDRESSGUID = lv_standardaddressguid
         STANDARDADDRESSUSEINSTEAD = lv_standardaddressuseinstead
    TABLES
         ADDRESSES = lt_addresses
         RETURN = lt_return
         ADDRESSES_ALL = lt_addresses_all
. " BAPI_STUDENT_ADDRESSES_GET




ABAP code using 7.40 inline data declarations to call FM BAPI_STUDENT_ADDRESSES_GET

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
"SELECT single PLVAR FROM BAPISTUDENT_HEAD INTO @DATA(ld_planversion).
 
"SELECT single ADDRNUMBER FROM BAPIBUS1006_ADDRESSES_INT INTO @DATA(ld_standardaddressnumber).
 
 
"SELECT single OBJID FROM BAPISTUDENT_HEAD INTO @DATA(ld_objectid).
 
"SELECT single ADDRGUID FROM BAPIBUS1006_ADDRESSES_INT INTO @DATA(ld_standardaddressguid).
 
"SELECT single OPERATION FROM BAPIBUS1006_ADDRESSES_INT INTO @DATA(ld_operation).
 
 
"SELECT single STANDARDADDRESS FROM BAPIBUS1006_ADDRESSES_INT INTO @DATA(ld_standardaddressuseinstead).
 
"SELECT single ADDRESSTYPE FROM BAPIBUS1006_ADDRESSUSAGE INTO @DATA(ld_addresstype).
 
"SELECT single VALID_DATE FROM BAPIBUS1006_VALIDITY INTO @DATA(ld_valid_date).
DATA(ld_valid_date) = SY-DATLO.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!