SAP BAPI_STUDENT_CREATEFROMDATA2 Function Module for OBSOLETE (DO NOT USE): Create Student
BAPI_STUDENT_CREATEFROMDATA2 is a standard bapi student createfromdata2 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for OBSOLETE (DO NOT USE): Create 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 createfromdata2 FM, simply by entering the name BAPI_STUDENT_CREATEFROMDATA2 into the relevant SAP transaction such as SE37 or SE38.
Function Group: HRPIQ00STUDENTBAPI
Program Name: SAPLHRPIQ00STUDENTBAPI
Main Program: SAPLHRPIQ00STUDENTBAPI
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_STUDENT_CREATEFROMDATA2 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_CREATEFROMDATA2'"OBSOLETE (DO NOT USE): Create Student.
EXPORTING
* VALIDITYBEGIN = SY-DATUM "Start Date of Data Validity
* STUDENTEMAIL = "Student E-Mail Address
* STUDENTORGUNIT = "Organizational Unit Assigned to Student
* STUDENTCAMPUS = "Campus to Which Student is Assigned
* STUDENTSTATUSDATA = "Status Attributes of Student
* TESTRUN = ' ' "Switch to Simulation Mode for Write BAPIs
* OBJECTIDEXTERN = "Object ID of Student
* STUDENTNUMBEREXTERN = "Student Number
STUDENTPERSONALDATA = "Personal Data of Student
* STUDENTADDITIONALDATA = "Additional Personal Data of Student
* STUDENTCHALLENGEDATA = "Challenge Data of Student
* STUDENTRESIDENCYDATA = "Residence Data of Student
* STUDENTSTUDYDATA = "Study Data of Student
* STUDENTFEEDATA = "Fee Calculation Data of Student
IMPORTING
PLANVERSION = "Plan Version
OBJECTID = "Object ID of Student
STUDENTNUMBER = "Student Number
BUSINESSPARTNER = "Student Business Partner Numbers
TABLES
* STUDENTADDRESS = "Student Address
RETURN = "Confirmations
* EXTENSIONIN = "Container for Transfer of Customer Enhancements
IMPORTING Parameters details for BAPI_STUDENT_CREATEFROMDATA2
VALIDITYBEGIN - Start Date of Data Validity
Data type: BAPISTUDENT_HEAD-BEGDADefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
STUDENTEMAIL - Student E-Mail Address
Data type: BAPISTUDENT_EMAILOptional: Yes
Call by Reference: No ( called with pass by value option)
STUDENTORGUNIT - Organizational Unit Assigned to Student
Data type: BAPISTUDENT_ORGUNITOptional: Yes
Call by Reference: No ( called with pass by value option)
STUDENTCAMPUS - Campus to Which Student is Assigned
Data type: BAPISTUDENT_CAMPUSOptional: Yes
Call by Reference: No ( called with pass by value option)
STUDENTSTATUSDATA - Status Attributes of Student
Data type: BAPISTUDENT_STATUSDATAOptional: Yes
Call by Reference: No ( called with pass by value option)
TESTRUN - Switch to Simulation Mode for Write BAPIs
Data type: TESTRUNDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
OBJECTIDEXTERN - Object ID of Student
Data type: BAPISTUDENT_HEAD-OBJIDOptional: Yes
Call by Reference: No ( called with pass by value option)
STUDENTNUMBEREXTERN - Student Number
Data type: BAPISTUDENT_HEAD-STUDENTNUMBEROptional: Yes
Call by Reference: No ( called with pass by value option)
STUDENTPERSONALDATA - Personal Data of Student
Data type: BAPISTUDENT_PERSONALOptional: No
Call by Reference: No ( called with pass by value option)
STUDENTADDITIONALDATA - Additional Personal Data of Student
Data type: BAPISTUDENT_ADDPERSONALOptional: Yes
Call by Reference: No ( called with pass by value option)
STUDENTCHALLENGEDATA - Challenge Data of Student
Data type: BAPISTUDENT_CHALLENGEOptional: Yes
Call by Reference: No ( called with pass by value option)
STUDENTRESIDENCYDATA - Residence Data of Student
Data type: BAPISTUDENT_RESIDENCYOptional: Yes
Call by Reference: No ( called with pass by value option)
STUDENTSTUDYDATA - Study Data of Student
Data type: BAPISTUDENT_STUDYDATAOptional: Yes
Call by Reference: No ( called with pass by value option)
STUDENTFEEDATA - Fee Calculation Data of Student
Data type: BAPISTUDENT_FEEDATAOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_STUDENT_CREATEFROMDATA2
PLANVERSION - Plan Version
Data type: BAPISTUDENT_HEAD-PLVAROptional: No
Call by Reference: No ( called with pass by value option)
OBJECTID - Object ID of Student
Data type: BAPISTUDENT_HEAD-OBJIDOptional: No
Call by Reference: No ( called with pass by value option)
STUDENTNUMBER - Student Number
Data type: BAPISTUDENT_HEAD-STUDENTNUMBEROptional: No
Call by Reference: No ( called with pass by value option)
BUSINESSPARTNER - Student Business Partner Numbers
Data type: BAPISTUDENT_HEAD-PARTNEROptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_STUDENT_CREATEFROMDATA2
STUDENTADDRESS - Student Address
Data type: BAPISTUDENT_ADDRESSOptional: Yes
Call by Reference: Yes
RETURN - Confirmations
Data type: BAPIRET2Optional: No
Call by Reference: Yes
EXTENSIONIN - Container for Transfer of Customer Enhancements
Data type: BAPIPAREXOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for BAPI_STUDENT_CREATEFROMDATA2 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: | ||||
| lv_planversion | TYPE BAPISTUDENT_HEAD-PLVAR, " | |||
| lv_validitybegin | TYPE BAPISTUDENT_HEAD-BEGDA, " SY-DATUM | |||
| lt_studentaddress | TYPE STANDARD TABLE OF BAPISTUDENT_ADDRESS, " | |||
| lv_studentemail | TYPE BAPISTUDENT_EMAIL, " | |||
| lv_studentorgunit | TYPE BAPISTUDENT_ORGUNIT, " | |||
| lv_studentcampus | TYPE BAPISTUDENT_CAMPUS, " | |||
| lv_studentstatusdata | TYPE BAPISTUDENT_STATUSDATA, " | |||
| lv_testrun | TYPE TESTRUN, " ' ' | |||
| lt_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lv_objectid | TYPE BAPISTUDENT_HEAD-OBJID, " | |||
| lv_objectidextern | TYPE BAPISTUDENT_HEAD-OBJID, " | |||
| lt_extensionin | TYPE STANDARD TABLE OF BAPIPAREX, " | |||
| lv_studentnumber | TYPE BAPISTUDENT_HEAD-STUDENTNUMBER, " | |||
| lv_studentnumberextern | TYPE BAPISTUDENT_HEAD-STUDENTNUMBER, " | |||
| lv_businesspartner | TYPE BAPISTUDENT_HEAD-PARTNER, " | |||
| lv_studentpersonaldata | TYPE BAPISTUDENT_PERSONAL, " | |||
| lv_studentadditionaldata | TYPE BAPISTUDENT_ADDPERSONAL, " | |||
| lv_studentchallengedata | TYPE BAPISTUDENT_CHALLENGE, " | |||
| lv_studentresidencydata | TYPE BAPISTUDENT_RESIDENCY, " | |||
| lv_studentstudydata | TYPE BAPISTUDENT_STUDYDATA, " | |||
| lv_studentfeedata | TYPE BAPISTUDENT_FEEDATA. " |
|   CALL FUNCTION 'BAPI_STUDENT_CREATEFROMDATA2' "OBSOLETE (DO NOT USE): Create Student |
| EXPORTING | ||
| VALIDITYBEGIN | = lv_validitybegin | |
| STUDENTEMAIL | = lv_studentemail | |
| STUDENTORGUNIT | = lv_studentorgunit | |
| STUDENTCAMPUS | = lv_studentcampus | |
| STUDENTSTATUSDATA | = lv_studentstatusdata | |
| TESTRUN | = lv_testrun | |
| OBJECTIDEXTERN | = lv_objectidextern | |
| STUDENTNUMBEREXTERN | = lv_studentnumberextern | |
| STUDENTPERSONALDATA | = lv_studentpersonaldata | |
| STUDENTADDITIONALDATA | = lv_studentadditionaldata | |
| STUDENTCHALLENGEDATA | = lv_studentchallengedata | |
| STUDENTRESIDENCYDATA | = lv_studentresidencydata | |
| STUDENTSTUDYDATA | = lv_studentstudydata | |
| STUDENTFEEDATA | = lv_studentfeedata | |
| IMPORTING | ||
| PLANVERSION | = lv_planversion | |
| OBJECTID | = lv_objectid | |
| STUDENTNUMBER | = lv_studentnumber | |
| BUSINESSPARTNER | = lv_businesspartner | |
| TABLES | ||
| STUDENTADDRESS | = lt_studentaddress | |
| RETURN | = lt_return | |
| EXTENSIONIN | = lt_extensionin | |
| . " BAPI_STUDENT_CREATEFROMDATA2 | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_STUDENT_CREATEFROMDATA2
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 BEGDA FROM BAPISTUDENT_HEAD INTO @DATA(ld_validitybegin). | ||||
| DATA(ld_validitybegin) | = SY-DATUM. | |||
| DATA(ld_testrun) | = ' '. | |||
| "SELECT single OBJID FROM BAPISTUDENT_HEAD INTO @DATA(ld_objectid). | ||||
| "SELECT single OBJID FROM BAPISTUDENT_HEAD INTO @DATA(ld_objectidextern). | ||||
| "SELECT single STUDENTNUMBER FROM BAPISTUDENT_HEAD INTO @DATA(ld_studentnumber). | ||||
| "SELECT single STUDENTNUMBER FROM BAPISTUDENT_HEAD INTO @DATA(ld_studentnumberextern). | ||||
| "SELECT single PARTNER FROM BAPISTUDENT_HEAD INTO @DATA(ld_businesspartner). | ||||
Search for further information about these or an SAP related objects