SAP BAPI_CLASS_SELECT_OBJECTS Function Module for Find Objects in Class









BAPI_CLASS_SELECT_OBJECTS is a standard bapi class select objects SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Find Objects in 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 select objects FM, simply by entering the name BAPI_CLASS_SELECT_OBJECTS into the relevant SAP transaction such as SE37 or SE38.

Function Group: CLBP
Program Name: SAPLCLBP
Main Program: SAPLCLBP
Appliation area: M
Release date: 17-Jun-2003
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function BAPI_CLASS_SELECT_OBJECTS 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_SELECT_OBJECTS'"Find Objects in Class
EXPORTING
CLASSTYPE = "Class Type
CLASSNUM = "Class Number
* LANGUISO = "Language Key
* LANGUINT = "Internal Language Key
* KEYDATE = SY-DATUM "Validity Time
* MAXHITS = 100 "Maximum Hits Read
* I_STATUS_LOCKED = "With Locked Assignments
* I_STATUS_INCOMPLETE = "With Incomplete Assignments

IMPORTING
RETURN = "Return Messages

TABLES
SELECTIONCRITERIONS = "Selection Criteria
SELECTEDOBJECTS = "Objects Found
* OBJECTCLASSIFICATION = "Values of Selected Characteristics for Objects
.



IMPORTING Parameters details for BAPI_CLASS_SELECT_OBJECTS

CLASSTYPE - Class Type

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

CLASSNUM - Class Number

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

LANGUISO - Language Key

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

LANGUINT - Internal Language Key

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

KEYDATE - Validity Time

Data type: BAPI_KEY_DATE-KEY_DATE
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

MAXHITS - Maximum Hits Read

Data type: BAPI_MAX_HITS-MAX_HITS
Default: 100
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_STATUS_LOCKED - With Locked Assignments

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

I_STATUS_INCOMPLETE - With Incomplete Assignments

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

EXPORTING Parameters details for BAPI_CLASS_SELECT_OBJECTS

RETURN - Return Messages

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

TABLES Parameters details for BAPI_CLASS_SELECT_OBJECTS

SELECTIONCRITERIONS - Selection Criteria

Data type: BAPI_SELECTION_CRITERIONS
Optional: No
Call by Reference: Yes

SELECTEDOBJECTS - Objects Found

Data type: BAPI_SELECTED_OBJECTS
Optional: No
Call by Reference: Yes

OBJECTCLASSIFICATION - Values of Selected Characteristics for Objects

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

Copy and paste ABAP code example for BAPI_CLASS_SELECT_OBJECTS 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_return  TYPE BAPIRETURN1, "   
lv_classtype  TYPE BAPI_CLASS_KEY-CLASSTYPE, "   
lt_selectioncriterions  TYPE STANDARD TABLE OF BAPI_SELECTION_CRITERIONS, "   
lv_classnum  TYPE BAPI_CLASS_KEY-CLASSNUM, "   
lt_selectedobjects  TYPE STANDARD TABLE OF BAPI_SELECTED_OBJECTS, "   
lv_languiso  TYPE BAPI_LANGUAGE-LANGUAGE_ISO, "   
lt_objectclassification  TYPE STANDARD TABLE OF BAPI_OBJECT_VALUES, "   
lv_languint  TYPE BAPI_LANGUAGE-LANGUAGE_INT, "   
lv_keydate  TYPE BAPI_KEY_DATE-KEY_DATE, "   SY-DATUM
lv_maxhits  TYPE BAPI_MAX_HITS-MAX_HITS, "   100
lv_i_status_locked  TYPE BAPI1003_KEY-STATUS, "   
lv_i_status_incomplete  TYPE BAPI1003_KEY-STATUS. "   

  CALL FUNCTION 'BAPI_CLASS_SELECT_OBJECTS'  "Find Objects in Class
    EXPORTING
         CLASSTYPE = lv_classtype
         CLASSNUM = lv_classnum
         LANGUISO = lv_languiso
         LANGUINT = lv_languint
         KEYDATE = lv_keydate
         MAXHITS = lv_maxhits
         I_STATUS_LOCKED = lv_i_status_locked
         I_STATUS_INCOMPLETE = lv_i_status_incomplete
    IMPORTING
         RETURN = lv_return
    TABLES
         SELECTIONCRITERIONS = lt_selectioncriterions
         SELECTEDOBJECTS = lt_selectedobjects
         OBJECTCLASSIFICATION = lt_objectclassification
. " BAPI_CLASS_SELECT_OBJECTS




ABAP code using 7.40 inline data declarations to call FM BAPI_CLASS_SELECT_OBJECTS

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 CLASSTYPE FROM BAPI_CLASS_KEY INTO @DATA(ld_classtype).
 
 
"SELECT single CLASSNUM FROM BAPI_CLASS_KEY INTO @DATA(ld_classnum).
 
 
"SELECT single LANGUAGE_ISO FROM BAPI_LANGUAGE INTO @DATA(ld_languiso).
 
 
"SELECT single LANGUAGE_INT FROM BAPI_LANGUAGE INTO @DATA(ld_languint).
 
"SELECT single KEY_DATE FROM BAPI_KEY_DATE INTO @DATA(ld_keydate).
DATA(ld_keydate) = SY-DATUM.
 
"SELECT single MAX_HITS FROM BAPI_MAX_HITS INTO @DATA(ld_maxhits).
DATA(ld_maxhits) = 100.
 
"SELECT single STATUS FROM BAPI1003_KEY INTO @DATA(ld_i_status_locked).
 
"SELECT single STATUS FROM BAPI1003_KEY INTO @DATA(ld_i_status_incomplete).
 


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!