SAP BAPI_OBJCL_CREATE Function Module for Classification BAPI: Create Assignment
BAPI_OBJCL_CREATE is a standard bapi objcl create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Classification BAPI: Create Assignment 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 objcl create FM, simply by entering the name BAPI_OBJCL_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: CLBPA
Program Name: SAPLCLBPA
Main Program: SAPLCLBPA
Appliation area: M
Release date: 25-Nov-1999
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_OBJCL_CREATE 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_OBJCL_CREATE'"Classification BAPI: Create Assignment.
EXPORTING
OBJECTKEYNEW = "Object Key, Concatenated
OBJECTTABLENEW = "Object Table
CLASSNUMNEW = "Class Number
CLASSTYPENEW = "Class Type
* STATUS = '1' "Classification Status
* STANDARDCLASS = "Indicator: Standard Class
* CHANGENUMBER = "Change Number
* KEYDATE = SY-DATUM "Date
* NO_DEFAULT_VALUES = ' ' "Default Values
IMPORTING
CLASSIF_STATUS = "Classification Status
TABLES
* ALLOCVALUESNUM = "Assigned NUM, DATE, and TIME Values
* ALLOCVALUESCHAR = "Assigned CHAR and BOOL Values
* ALLOCVALUESCURR = "Assigned CURR Values
RETURN = "Error Messages
IMPORTING Parameters details for BAPI_OBJCL_CREATE
OBJECTKEYNEW - Object Key, Concatenated
Data type: BAPI1003_KEY-OBJECTOptional: No
Call by Reference: No ( called with pass by value option)
OBJECTTABLENEW - Object Table
Data type: BAPI1003_KEY-OBJECTTABLEOptional: No
Call by Reference: No ( called with pass by value option)
CLASSNUMNEW - Class Number
Data type: BAPI1003_KEY-CLASSNUMOptional: No
Call by Reference: No ( called with pass by value option)
CLASSTYPENEW - Class Type
Data type: BAPI1003_KEY-CLASSTYPEOptional: No
Call by Reference: No ( called with pass by value option)
STATUS - Classification Status
Data type: BAPI1003_KEY-STATUSDefault: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)
STANDARDCLASS - Indicator: Standard Class
Data type: BAPI1003_KEY-STDCLASSOptional: Yes
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 - Date
Data type: BAPI1003_KEY-KEYDATEDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
NO_DEFAULT_VALUES - Default Values
Data type: BAPI1003_KEY-FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_OBJCL_CREATE
CLASSIF_STATUS - Classification Status
Data type: BAPI1003_KEY-STATUSOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_OBJCL_CREATE
ALLOCVALUESNUM - Assigned NUM, DATE, and TIME Values
Data type: BAPI1003_ALLOC_VALUES_NUMOptional: Yes
Call by Reference: Yes
ALLOCVALUESCHAR - Assigned CHAR and BOOL Values
Data type: BAPI1003_ALLOC_VALUES_CHAROptional: Yes
Call by Reference: Yes
ALLOCVALUESCURR - Assigned CURR Values
Data type: BAPI1003_ALLOC_VALUES_CURROptional: Yes
Call by Reference: Yes
RETURN - Error Messages
Data type: BAPIRET2Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BAPI_OBJCL_CREATE 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_objectkeynew | TYPE BAPI1003_KEY-OBJECT, " | |||
| lt_allocvaluesnum | TYPE STANDARD TABLE OF BAPI1003_ALLOC_VALUES_NUM, " | |||
| lv_classif_status | TYPE BAPI1003_KEY-STATUS, " | |||
| lv_objecttablenew | TYPE BAPI1003_KEY-OBJECTTABLE, " | |||
| lt_allocvalueschar | TYPE STANDARD TABLE OF BAPI1003_ALLOC_VALUES_CHAR, " | |||
| lv_classnumnew | TYPE BAPI1003_KEY-CLASSNUM, " | |||
| lt_allocvaluescurr | TYPE STANDARD TABLE OF BAPI1003_ALLOC_VALUES_CURR, " | |||
| lt_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lv_classtypenew | TYPE BAPI1003_KEY-CLASSTYPE, " | |||
| lv_status | TYPE BAPI1003_KEY-STATUS, " '1' | |||
| lv_standardclass | TYPE BAPI1003_KEY-STDCLASS, " | |||
| lv_changenumber | TYPE BAPI1003_KEY-CHANGENUMBER, " | |||
| lv_keydate | TYPE BAPI1003_KEY-KEYDATE, " SY-DATUM | |||
| lv_no_default_values | TYPE BAPI1003_KEY-FLAG. " SPACE |
|   CALL FUNCTION 'BAPI_OBJCL_CREATE' "Classification BAPI: Create Assignment |
| EXPORTING | ||
| OBJECTKEYNEW | = lv_objectkeynew | |
| OBJECTTABLENEW | = lv_objecttablenew | |
| CLASSNUMNEW | = lv_classnumnew | |
| CLASSTYPENEW | = lv_classtypenew | |
| STATUS | = lv_status | |
| STANDARDCLASS | = lv_standardclass | |
| CHANGENUMBER | = lv_changenumber | |
| KEYDATE | = lv_keydate | |
| NO_DEFAULT_VALUES | = lv_no_default_values | |
| IMPORTING | ||
| CLASSIF_STATUS | = lv_classif_status | |
| TABLES | ||
| ALLOCVALUESNUM | = lt_allocvaluesnum | |
| ALLOCVALUESCHAR | = lt_allocvalueschar | |
| ALLOCVALUESCURR | = lt_allocvaluescurr | |
| RETURN | = lt_return | |
| . " BAPI_OBJCL_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_OBJCL_CREATE
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 OBJECT FROM BAPI1003_KEY INTO @DATA(ld_objectkeynew). | ||||
| "SELECT single STATUS FROM BAPI1003_KEY INTO @DATA(ld_classif_status). | ||||
| "SELECT single OBJECTTABLE FROM BAPI1003_KEY INTO @DATA(ld_objecttablenew). | ||||
| "SELECT single CLASSNUM FROM BAPI1003_KEY INTO @DATA(ld_classnumnew). | ||||
| "SELECT single CLASSTYPE FROM BAPI1003_KEY INTO @DATA(ld_classtypenew). | ||||
| "SELECT single STATUS FROM BAPI1003_KEY INTO @DATA(ld_status). | ||||
| DATA(ld_status) | = '1'. | |||
| "SELECT single STDCLASS FROM BAPI1003_KEY INTO @DATA(ld_standardclass). | ||||
| "SELECT single CHANGENUMBER FROM BAPI1003_KEY INTO @DATA(ld_changenumber). | ||||
| "SELECT single KEYDATE FROM BAPI1003_KEY INTO @DATA(ld_keydate). | ||||
| DATA(ld_keydate) | = SY-DATUM. | |||
| "SELECT single FLAG FROM BAPI1003_KEY INTO @DATA(ld_no_default_values). | ||||
| DATA(ld_no_default_values) | = ' '. | |||
Search for further information about these or an SAP related objects