SAP CFG_API_PERF_FIND_KB Function Module for Find Knowledgebases (optimized)
CFG_API_PERF_FIND_KB is a standard cfg api perf find kb 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 Knowledgebases (optimized) 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 cfg api perf find kb FM, simply by entering the name CFG_API_PERF_FIND_KB into the relevant SAP transaction such as SE37 or SE38.
Function Group: COM_CFG_API_MASTERDATA
Program Name: SAPLCOM_CFG_API_MASTERDATA
Main Program: SAPLCOM_CFG_API_MASTERDATA
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function CFG_API_PERF_FIND_KB 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 'CFG_API_PERF_FIND_KB'"Find Knowledgebases (optimized).
EXPORTING
* OBJECT_NAME = "Product Id
* MATCH_COUNT = 10 "CFG: Integer
* ONLY_ACTIVE = 'T' "Indicator: read only active (T/F)
* OBJECT_TYPE = "Product Type
* OBJECT_LOGSYS = "Logical System
* VALID_DATE = "KB validity date
* USAGE = "Usage
* ORG_ID = "Organisation ID
* ORG_TYPE = "Organisation Type
* STATUS = "Status ID
* WITH_KB_PROFILES = 'T' "Boolean (T = True, F = False, Blank = Unknown)
IMPORTING
KNOWLEDGEBASES = "CFG: table of knowledgebases
EXCEPTIONS
INVALID_OBJECT_TYPE = 1
IMPORTING Parameters details for CFG_API_PERF_FIND_KB
OBJECT_NAME - Product Id
Data type: COMT_CFGM_PRODUCT_IDOptional: Yes
Call by Reference: No ( called with pass by value option)
MATCH_COUNT - CFG: Integer
Data type: COMT_CFGM_INTEGERDefault: 10
Optional: No
Call by Reference: No ( called with pass by value option)
ONLY_ACTIVE - Indicator: read only active (T/F)
Data type: COMT_CFGM_BOOLEANDefault: 'T'
Optional: Yes
Call by Reference: No ( called with pass by value option)
OBJECT_TYPE - Product Type
Data type: COMT_CFGM_PRODUCT_TYPEOptional: Yes
Call by Reference: No ( called with pass by value option)
OBJECT_LOGSYS - Logical System
Data type: COMT_CFGD_KBLOGSYSOptional: Yes
Call by Reference: No ( called with pass by value option)
VALID_DATE - KB validity date
Data type: COMT_CFGM_DATEOptional: Yes
Call by Reference: No ( called with pass by value option)
USAGE - Usage
Data type: COMT_CFGD_USAGEOptional: Yes
Call by Reference: No ( called with pass by value option)
ORG_ID - Organisation ID
Data type: COMT_CFGD_ORGIDOptional: Yes
Call by Reference: No ( called with pass by value option)
ORG_TYPE - Organisation Type
Data type: COMT_CFGD_ORGTYPEOptional: Yes
Call by Reference: No ( called with pass by value option)
STATUS - Status ID
Data type: COMT_CFGM_STATUSIDOptional: Yes
Call by Reference: No ( called with pass by value option)
WITH_KB_PROFILES - Boolean (T = True, F = False, Blank = Unknown)
Data type: COMT_CFGM_BOOLEANDefault: 'T'
Optional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CFG_API_PERF_FIND_KB
KNOWLEDGEBASES - CFG: table of knowledgebases
Data type: COMT_CFGM_KB_IOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
INVALID_OBJECT_TYPE - Invalid value object_type (use: MARA/01, SERV/02 ...)
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for CFG_API_PERF_FIND_KB 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_object_name | TYPE COMT_CFGM_PRODUCT_ID, " | |||
| lv_knowledgebases | TYPE COMT_CFGM_KB_I, " | |||
| lv_invalid_object_type | TYPE COMT_CFGM_KB_I, " | |||
| lv_match_count | TYPE COMT_CFGM_INTEGER, " 10 | |||
| lv_only_active | TYPE COMT_CFGM_BOOLEAN, " 'T' | |||
| lv_object_type | TYPE COMT_CFGM_PRODUCT_TYPE, " | |||
| lv_object_logsys | TYPE COMT_CFGD_KBLOGSYS, " | |||
| lv_valid_date | TYPE COMT_CFGM_DATE, " | |||
| lv_usage | TYPE COMT_CFGD_USAGE, " | |||
| lv_org_id | TYPE COMT_CFGD_ORGID, " | |||
| lv_org_type | TYPE COMT_CFGD_ORGTYPE, " | |||
| lv_status | TYPE COMT_CFGM_STATUSID, " | |||
| lv_with_kb_profiles | TYPE COMT_CFGM_BOOLEAN. " 'T' |
|   CALL FUNCTION 'CFG_API_PERF_FIND_KB' "Find Knowledgebases (optimized) |
| EXPORTING | ||
| OBJECT_NAME | = lv_object_name | |
| MATCH_COUNT | = lv_match_count | |
| ONLY_ACTIVE | = lv_only_active | |
| OBJECT_TYPE | = lv_object_type | |
| OBJECT_LOGSYS | = lv_object_logsys | |
| VALID_DATE | = lv_valid_date | |
| USAGE | = lv_usage | |
| ORG_ID | = lv_org_id | |
| ORG_TYPE | = lv_org_type | |
| STATUS | = lv_status | |
| WITH_KB_PROFILES | = lv_with_kb_profiles | |
| IMPORTING | ||
| KNOWLEDGEBASES | = lv_knowledgebases | |
| EXCEPTIONS | ||
| INVALID_OBJECT_TYPE = 1 | ||
| . " CFG_API_PERF_FIND_KB | ||
ABAP code using 7.40 inline data declarations to call FM CFG_API_PERF_FIND_KB
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.| DATA(ld_match_count) | = 10. | |||
| DATA(ld_only_active) | = 'T'. | |||
| DATA(ld_with_kb_profiles) | = 'T'. | |||
Search for further information about these or an SAP related objects