SAP Function Modules

BBP_CATEGORY_READ SAP Function module







BBP_CATEGORY_READ is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name BBP_CATEGORY_READ into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: BBP_PDC
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM BBP_CATEGORY_READ - BBP CATEGORY READ





CALL FUNCTION 'BBP_CATEGORY_READ' "
* EXPORTING
*   iv_category_guid =          " comt_category_guid
*   iv_category_id =            " comt_category_id
*   iv_hierarchy_guid =         " comt_hierarchy_guid
*   iv_mandt = SY-MANDT         " mandt
*   iv_logsys =                 " comt_logsys
*   iv_object_categories = SPACE  " comt_boolean
*   iv_only_text = SPACE        " xfeld
*   iv_langu = SY-LANGU         " sylangu
*   iv_application = '02'       " comt_application
*   iv_product_type =           " comt_product_type
*   it_category_guids =         " bbpt_guid
  IMPORTING
    ev_category_guid =          " comt_category_guid
    ev_category_id =            " comt_category_id
    ev_product_type =           " comt_product_type
    es_category =               " comt_category
    es_categoryt =              " comt_categoryt
    es_prcat =                  " comt_prcat
    et_category_guids =         " bbpt_guid
    et_category =               " comt_category_tab
    et_category_data =          " comt_product_category_api_tab
    et_categoryt =              " comt_categoryt_tab
  EXCEPTIONS
    NOT_FOUND = 1               "
    HIERARCHY_NOT_FOUND = 2     "
    WRONG_HIERARCHY = 3         "
    .  "  BBP_CATEGORY_READ

ABAP code example for Function Module BBP_CATEGORY_READ





The ABAP code below is a full code listing to execute function module BBP_CATEGORY_READ including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_ev_category_guid  TYPE COMT_CATEGORY_GUID ,
ld_ev_category_id  TYPE COMT_CATEGORY_ID ,
ld_ev_product_type  TYPE COMT_PRODUCT_TYPE ,
ld_es_category  TYPE COMT_CATEGORY ,
ld_es_categoryt  TYPE COMT_CATEGORYT ,
ld_es_prcat  TYPE COMT_PRCAT ,
ld_et_category_guids  TYPE BBPT_GUID ,
ld_et_category  TYPE COMT_CATEGORY_TAB ,
ld_et_category_data  TYPE COMT_PRODUCT_CATEGORY_API_TAB ,
ld_et_categoryt  TYPE COMT_CATEGORYT_TAB .

DATA(ld_iv_category_guid) = 'Check type of data required'.
DATA(ld_iv_category_id) = 'Check type of data required'.
DATA(ld_iv_hierarchy_guid) = 'Check type of data required'.
DATA(ld_iv_mandt) = 'Check type of data required'.
DATA(ld_iv_logsys) = 'some text here'.
DATA(ld_iv_object_categories) = 'some text here'.
DATA(ld_iv_only_text) = 'some text here'.
DATA(ld_iv_langu) = 'Check type of data required'.
DATA(ld_iv_application) = 'Check type of data required'.
DATA(ld_iv_product_type) = 'Check type of data required'.
DATA(ld_it_category_guids) = 'Check type of data required'. . CALL FUNCTION 'BBP_CATEGORY_READ' * EXPORTING * iv_category_guid = ld_iv_category_guid * iv_category_id = ld_iv_category_id * iv_hierarchy_guid = ld_iv_hierarchy_guid * iv_mandt = ld_iv_mandt * iv_logsys = ld_iv_logsys * iv_object_categories = ld_iv_object_categories * iv_only_text = ld_iv_only_text * iv_langu = ld_iv_langu * iv_application = ld_iv_application * iv_product_type = ld_iv_product_type * it_category_guids = ld_it_category_guids IMPORTING ev_category_guid = ld_ev_category_guid ev_category_id = ld_ev_category_id ev_product_type = ld_ev_product_type es_category = ld_es_category es_categoryt = ld_es_categoryt es_prcat = ld_es_prcat et_category_guids = ld_et_category_guids et_category = ld_et_category et_category_data = ld_et_category_data et_categoryt = ld_et_categoryt EXCEPTIONS NOT_FOUND = 1 HIERARCHY_NOT_FOUND = 2 WRONG_HIERARCHY = 3 . " BBP_CATEGORY_READ
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_ev_category_guid  TYPE COMT_CATEGORY_GUID ,
ld_iv_category_guid  TYPE COMT_CATEGORY_GUID ,
ld_iv_category_id  TYPE COMT_CATEGORY_ID ,
ld_ev_category_id  TYPE COMT_CATEGORY_ID ,
ld_iv_hierarchy_guid  TYPE COMT_HIERARCHY_GUID ,
ld_ev_product_type  TYPE COMT_PRODUCT_TYPE ,
ld_es_category  TYPE COMT_CATEGORY ,
ld_iv_mandt  TYPE MANDT ,
ld_es_categoryt  TYPE COMT_CATEGORYT ,
ld_iv_logsys  TYPE COMT_LOGSYS ,
ld_es_prcat  TYPE COMT_PRCAT ,
ld_iv_object_categories  TYPE COMT_BOOLEAN ,
ld_et_category_guids  TYPE BBPT_GUID ,
ld_iv_only_text  TYPE XFELD ,
ld_et_category  TYPE COMT_CATEGORY_TAB ,
ld_iv_langu  TYPE SYLANGU ,
ld_et_category_data  TYPE COMT_PRODUCT_CATEGORY_API_TAB ,
ld_iv_application  TYPE COMT_APPLICATION ,
ld_et_categoryt  TYPE COMT_CATEGORYT_TAB ,
ld_iv_product_type  TYPE COMT_PRODUCT_TYPE ,
ld_it_category_guids  TYPE BBPT_GUID .

ld_iv_category_guid = 'Check type of data required'.
ld_iv_category_id = 'Check type of data required'.
ld_iv_hierarchy_guid = 'Check type of data required'.
ld_iv_mandt = 'Check type of data required'.
ld_iv_logsys = 'Check type of data required'.
ld_iv_object_categories = 'some text here'.
ld_iv_only_text = 'some text here'.
ld_iv_langu = 'Check type of data required'.
ld_iv_application = 'Check type of data required'.
ld_iv_product_type = 'Check type of data required'.
ld_it_category_guids = 'Check type of data required'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name BBP_CATEGORY_READ or its description.