SAP BAPI_CLASS_CHANGE Function Module for BAPI: Change Class
BAPI_CLASS_CHANGE is a standard bapi class change SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for BAPI: Change Class 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 class change FM, simply by entering the name BAPI_CLASS_CHANGE into the relevant SAP transaction such as SE37 or SE38.
Function Group: CLBP
Program Name: SAPLCLBP
Main Program: SAPLCLBP
Appliation area: M
Release date: 08-Jun-1999
Mode(Normal, Remote etc): Remote-Enabled
Update:
Function BAPI_CLASS_CHANGE 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_CLASS_CHANGE'"BAPI: Change Class.
EXPORTING
CLASSNUM = "Class
* CLASSADDITIONALNEW = "Additional Data: New
* CLASSSTANDARD = "Standards Data
* CLASSSTANDARDNEW = "Standards Data: New
CLASSTYPE = "Class Type
* CHANGENUMBER = "Change Number
* KEYDATE = SY-DATUM "Valid-From Date
CLASSBASICDATA = "Basic Data
CLASSBASICDATANEW = "Basic Data: New
* CLASSDOCUMENT = "Document Information
* CLASSDOCUMENTNEW = "Document Information: New
* CLASSADDITIONAL = "Additional Data
TABLES
RETURN = "Return Parameters
* CLASSCHARACTERISTICSNEW = "Characteristics: New
* CHARACTERISTICOVERWRITENEW = "Overwritten Characteristic Attributes: New
* CHARACTVALUEOVERWRITNEW = "Overwritten Characteristic Values: New
* CHARACTERISTICVALUETEXTOVRNEW = "Overwritten Characteristic Descriptions: New
CLASSDESCRIPTIONS = "Class Description / Keywords
* CLASSLONGTEXTS = "Long Texts
* CLASSCHARACTERISTICS = "Characteristics
* CHARACTERISTICOVERWRITE = "Overwritten Characteristic Attributes
* CHARACTVALUEOVERWRIT = "Overwritten Characteristic Values
* CHARACTERISTICVALUETEXTOVR = "Overwritten Characteristic Descriptions
CLASSDESCRIPTIONSNEW = "Class Description / Keywords: New
* CLASSLONGTEXTSNEW = "Long Texts: New
IMPORTING Parameters details for BAPI_CLASS_CHANGE
CLASSNUM - Class
Data type: BAPI_CLASS_KEY-CLASSNUMOptional: No
Call by Reference: No ( called with pass by value option)
CLASSADDITIONALNEW - Additional Data: New
Data type: BAPI1003_ADD_NEWOptional: Yes
Call by Reference: No ( called with pass by value option)
CLASSSTANDARD - Standards Data
Data type: BAPI1003_STANDOptional: Yes
Call by Reference: No ( called with pass by value option)
CLASSSTANDARDNEW - Standards Data: New
Data type: BAPI1003_STAND_NEWOptional: Yes
Call by Reference: No ( called with pass by value option)
CLASSTYPE - Class Type
Data type: BAPI_CLASS_KEY-CLASSTYPEOptional: No
Call by Reference: No ( called with pass by value option)
CHANGENUMBER - Change Number
Data type: BAPI1003_KEY-CHANGENUMBEROptional: Yes
Call by Reference: No ( called with pass by value option)
KEYDATE - Valid-From Date
Data type: BAPI_KEY_DATE-KEY_DATEDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
CLASSBASICDATA - Basic Data
Data type: BAPI1003_BASICOptional: No
Call by Reference: No ( called with pass by value option)
CLASSBASICDATANEW - Basic Data: New
Data type: BAPI1003_BASIC_NEWOptional: No
Call by Reference: No ( called with pass by value option)
CLASSDOCUMENT - Document Information
Data type: BAPI1003_DOCUOptional: Yes
Call by Reference: No ( called with pass by value option)
CLASSDOCUMENTNEW - Document Information: New
Data type: BAPI1003_DOCU_NEWOptional: Yes
Call by Reference: No ( called with pass by value option)
CLASSADDITIONAL - Additional Data
Data type: BAPI1003_ADDOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_CLASS_CHANGE
RETURN - Return Parameters
Data type: BAPIRET2Optional: No
Call by Reference: No ( called with pass by value option)
CLASSCHARACTERISTICSNEW - Characteristics: New
Data type: BAPI1003_CHARACT_NEWOptional: Yes
Call by Reference: Yes
CHARACTERISTICOVERWRITENEW - Overwritten Characteristic Attributes: New
Data type: BAPI1003_CHARACT_OVERWR_NEWOptional: Yes
Call by Reference: Yes
CHARACTVALUEOVERWRITNEW - Overwritten Characteristic Values: New
Data type: BAPI1003_CHARACT_VALUE_OVR_NEWOptional: Yes
Call by Reference: Yes
CHARACTERISTICVALUETEXTOVRNEW - Overwritten Characteristic Descriptions: New
Data type: BAPI1003_CHARVALTEXT_NEWOptional: Yes
Call by Reference: Yes
CLASSDESCRIPTIONS - Class Description / Keywords
Data type: BAPI1003_CATCHOptional: No
Call by Reference: No ( called with pass by value option)
CLASSLONGTEXTS - Long Texts
Data type: BAPI1003_LONGTEXTOptional: Yes
Call by Reference: No ( called with pass by value option)
CLASSCHARACTERISTICS - Characteristics
Data type: BAPI1003_CHARACTOptional: Yes
Call by Reference: No ( called with pass by value option)
CHARACTERISTICOVERWRITE - Overwritten Characteristic Attributes
Data type: BAPI1003_CHARACT_OVERWROptional: Yes
Call by Reference: No ( called with pass by value option)
CHARACTVALUEOVERWRIT - Overwritten Characteristic Values
Data type: BAPI1003_CHARACT_VALUE_OVROptional: Yes
Call by Reference: Yes
CHARACTERISTICVALUETEXTOVR - Overwritten Characteristic Descriptions
Data type: BAPI1003_CHARVALTEXTOptional: Yes
Call by Reference: Yes
CLASSDESCRIPTIONSNEW - Class Description / Keywords: New
Data type: BAPI1003_CATCH_NEWOptional: No
Call by Reference: Yes
CLASSLONGTEXTSNEW - Long Texts: New
Data type: BAPI1003_LONGTEXTOptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BAPI_CLASS_CHANGE 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_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
lv_classnum | TYPE BAPI_CLASS_KEY-CLASSNUM, " | |||
lv_classadditionalnew | TYPE BAPI1003_ADD_NEW, " | |||
lt_classcharacteristicsnew | TYPE STANDARD TABLE OF BAPI1003_CHARACT_NEW, " | |||
lv_classstandard | TYPE BAPI1003_STAND, " | |||
lt_characteristicoverwritenew | TYPE STANDARD TABLE OF BAPI1003_CHARACT_OVERWR_NEW, " | |||
lv_classstandardnew | TYPE BAPI1003_STAND_NEW, " | |||
lt_charactvalueoverwritnew | TYPE STANDARD TABLE OF BAPI1003_CHARACT_VALUE_OVR_NEW, " | |||
lt_characteristicvaluetextovrnew | TYPE STANDARD TABLE OF BAPI1003_CHARVALTEXT_NEW, " | |||
lv_classtype | TYPE BAPI_CLASS_KEY-CLASSTYPE, " | |||
lt_classdescriptions | TYPE STANDARD TABLE OF BAPI1003_CATCH, " | |||
lv_changenumber | TYPE BAPI1003_KEY-CHANGENUMBER, " | |||
lt_classlongtexts | TYPE STANDARD TABLE OF BAPI1003_LONGTEXT, " | |||
lv_keydate | TYPE BAPI_KEY_DATE-KEY_DATE, " SY-DATUM | |||
lt_classcharacteristics | TYPE STANDARD TABLE OF BAPI1003_CHARACT, " | |||
lv_classbasicdata | TYPE BAPI1003_BASIC, " | |||
lt_characteristicoverwrite | TYPE STANDARD TABLE OF BAPI1003_CHARACT_OVERWR, " | |||
lv_classbasicdatanew | TYPE BAPI1003_BASIC_NEW, " | |||
lt_charactvalueoverwrit | TYPE STANDARD TABLE OF BAPI1003_CHARACT_VALUE_OVR, " | |||
lv_classdocument | TYPE BAPI1003_DOCU, " | |||
lt_characteristicvaluetextovr | TYPE STANDARD TABLE OF BAPI1003_CHARVALTEXT, " | |||
lv_classdocumentnew | TYPE BAPI1003_DOCU_NEW, " | |||
lt_classdescriptionsnew | TYPE STANDARD TABLE OF BAPI1003_CATCH_NEW, " | |||
lv_classadditional | TYPE BAPI1003_ADD, " | |||
lt_classlongtextsnew | TYPE STANDARD TABLE OF BAPI1003_LONGTEXT. " |
  CALL FUNCTION 'BAPI_CLASS_CHANGE' "BAPI: Change Class |
EXPORTING | ||
CLASSNUM | = lv_classnum | |
CLASSADDITIONALNEW | = lv_classadditionalnew | |
CLASSSTANDARD | = lv_classstandard | |
CLASSSTANDARDNEW | = lv_classstandardnew | |
CLASSTYPE | = lv_classtype | |
CHANGENUMBER | = lv_changenumber | |
KEYDATE | = lv_keydate | |
CLASSBASICDATA | = lv_classbasicdata | |
CLASSBASICDATANEW | = lv_classbasicdatanew | |
CLASSDOCUMENT | = lv_classdocument | |
CLASSDOCUMENTNEW | = lv_classdocumentnew | |
CLASSADDITIONAL | = lv_classadditional | |
TABLES | ||
RETURN | = lt_return | |
CLASSCHARACTERISTICSNEW | = lt_classcharacteristicsnew | |
CHARACTERISTICOVERWRITENEW | = lt_characteristicoverwritenew | |
CHARACTVALUEOVERWRITNEW | = lt_charactvalueoverwritnew | |
CHARACTERISTICVALUETEXTOVRNEW | = lt_characteristicvaluetextovrnew | |
CLASSDESCRIPTIONS | = lt_classdescriptions | |
CLASSLONGTEXTS | = lt_classlongtexts | |
CLASSCHARACTERISTICS | = lt_classcharacteristics | |
CHARACTERISTICOVERWRITE | = lt_characteristicoverwrite | |
CHARACTVALUEOVERWRIT | = lt_charactvalueoverwrit | |
CHARACTERISTICVALUETEXTOVR | = lt_characteristicvaluetextovr | |
CLASSDESCRIPTIONSNEW | = lt_classdescriptionsnew | |
CLASSLONGTEXTSNEW | = lt_classlongtextsnew | |
. " BAPI_CLASS_CHANGE |
ABAP code using 7.40 inline data declarations to call FM BAPI_CLASS_CHANGE
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 CLASSNUM FROM BAPI_CLASS_KEY INTO @DATA(ld_classnum). | ||||
"SELECT single CLASSTYPE FROM BAPI_CLASS_KEY INTO @DATA(ld_classtype). | ||||
"SELECT single CHANGENUMBER FROM BAPI1003_KEY INTO @DATA(ld_changenumber). | ||||
"SELECT single KEY_DATE FROM BAPI_KEY_DATE INTO @DATA(ld_keydate). | ||||
DATA(ld_keydate) | = SY-DATUM. | |||
Search for further information about these or an SAP related objects