SAP Function Modules

BBP_CUF_GET_DATA SAP Function module







BBP_CUF_GET_DATA 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_CUF_GET_DATA into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM BBP_CUF_GET_DATA - BBP CUF GET DATA





CALL FUNCTION 'BBP_CUF_GET_DATA' "
* EXPORTING
*   iv_dynattr =                " xfeld
*   iv_cuf_table_name =         " tabname
*   iv_doc_type =               " crmd_orderadm_h-object_type
*   iv_pcard =                  " xfeld
  IMPORTING
    ev_okcode =                 " sy-ucomm
* TABLES
*   it_doc_types =              " bbp_pds_object_type
*   gt_messages =               " bbp_pds_messages
*   et_search_header =          " bbp_cuf_search_header
*   et_search_item =            " bbp_cuf_search_item
*   ct_cuf_table =              " table
*   et_hcf =                    " table
*   et_icf =                    " table
* CHANGING
*   es_header =                 " bbp_pds_header
*   es_item =                   " bbp_pds_item
*   es_acc =                    " bbp_pds_acc
*   es_history =                " bbp_pds_history
*   es_but000 =                 " but000
*   es_partner =                " bbp_pds_partner
  EXCEPTIONS
    PARAMETER_ERROR = 1         "
    .  "  BBP_CUF_GET_DATA

ABAP code example for Function Module BBP_CUF_GET_DATA





The ABAP code below is a full code listing to execute function module BBP_CUF_GET_DATA 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_okcode  TYPE SY-UCOMM ,
it_it_doc_types  TYPE STANDARD TABLE OF BBP_PDS_OBJECT_TYPE,"TABLES PARAM
wa_it_doc_types  LIKE LINE OF it_it_doc_types ,
it_gt_messages  TYPE STANDARD TABLE OF BBP_PDS_MESSAGES,"TABLES PARAM
wa_gt_messages  LIKE LINE OF it_gt_messages ,
it_et_search_header  TYPE STANDARD TABLE OF BBP_CUF_SEARCH_HEADER,"TABLES PARAM
wa_et_search_header  LIKE LINE OF it_et_search_header ,
it_et_search_item  TYPE STANDARD TABLE OF BBP_CUF_SEARCH_ITEM,"TABLES PARAM
wa_et_search_item  LIKE LINE OF it_et_search_item ,
it_ct_cuf_table  TYPE STANDARD TABLE OF TABLE,"TABLES PARAM
wa_ct_cuf_table  LIKE LINE OF it_ct_cuf_table ,
it_et_hcf  TYPE STANDARD TABLE OF TABLE,"TABLES PARAM
wa_et_hcf  LIKE LINE OF it_et_hcf ,
it_et_icf  TYPE STANDARD TABLE OF TABLE,"TABLES PARAM
wa_et_icf  LIKE LINE OF it_et_icf .

DATA(ld_es_header) = 'Check type of data required'.
DATA(ld_es_item) = 'Check type of data required'.
DATA(ld_es_acc) = 'Check type of data required'.
DATA(ld_es_history) = 'Check type of data required'.
DATA(ld_es_but000) = 'Check type of data required'.
DATA(ld_es_partner) = 'Check type of data required'.
DATA(ld_iv_dynattr) = 'Check type of data required'.
DATA(ld_iv_cuf_table_name) = 'Check type of data required'.

SELECT single OBJECT_TYPE
FROM CRMD_ORDERADM_H
INTO @DATA(ld_iv_doc_type).

DATA(ld_iv_pcard) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_doc_types to it_it_doc_types.

"populate fields of struture and append to itab
append wa_gt_messages to it_gt_messages.

"populate fields of struture and append to itab
append wa_et_search_header to it_et_search_header.

"populate fields of struture and append to itab
append wa_et_search_item to it_et_search_item.

"populate fields of struture and append to itab
append wa_ct_cuf_table to it_ct_cuf_table.

"populate fields of struture and append to itab
append wa_et_hcf to it_et_hcf.

"populate fields of struture and append to itab
append wa_et_icf to it_et_icf. . CALL FUNCTION 'BBP_CUF_GET_DATA' * EXPORTING * iv_dynattr = ld_iv_dynattr * iv_cuf_table_name = ld_iv_cuf_table_name * iv_doc_type = ld_iv_doc_type * iv_pcard = ld_iv_pcard IMPORTING ev_okcode = ld_ev_okcode * TABLES * it_doc_types = it_it_doc_types * gt_messages = it_gt_messages * et_search_header = it_et_search_header * et_search_item = it_et_search_item * ct_cuf_table = it_ct_cuf_table * et_hcf = it_et_hcf * et_icf = it_et_icf * CHANGING * es_header = ld_es_header * es_item = ld_es_item * es_acc = ld_es_acc * es_history = ld_es_history * es_but000 = ld_es_but000 * es_partner = ld_es_partner EXCEPTIONS PARAMETER_ERROR = 1 . " BBP_CUF_GET_DATA
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_es_header  TYPE BBP_PDS_HEADER ,
ld_ev_okcode  TYPE SY-UCOMM ,
ld_iv_dynattr  TYPE XFELD ,
it_it_doc_types  TYPE STANDARD TABLE OF BBP_PDS_OBJECT_TYPE ,
wa_it_doc_types  LIKE LINE OF it_it_doc_types,
ld_es_item  TYPE BBP_PDS_ITEM ,
ld_iv_cuf_table_name  TYPE TABNAME ,
it_gt_messages  TYPE STANDARD TABLE OF BBP_PDS_MESSAGES ,
wa_gt_messages  LIKE LINE OF it_gt_messages,
ld_es_acc  TYPE BBP_PDS_ACC ,
ld_iv_doc_type  TYPE CRMD_ORDERADM_H-OBJECT_TYPE ,
it_et_search_header  TYPE STANDARD TABLE OF BBP_CUF_SEARCH_HEADER ,
wa_et_search_header  LIKE LINE OF it_et_search_header,
ld_es_history  TYPE BBP_PDS_HISTORY ,
ld_iv_pcard  TYPE XFELD ,
it_et_search_item  TYPE STANDARD TABLE OF BBP_CUF_SEARCH_ITEM ,
wa_et_search_item  LIKE LINE OF it_et_search_item,
ld_es_but000  TYPE BUT000 ,
it_ct_cuf_table  TYPE STANDARD TABLE OF TABLE ,
wa_ct_cuf_table  LIKE LINE OF it_ct_cuf_table,
ld_es_partner  TYPE BBP_PDS_PARTNER ,
it_et_hcf  TYPE STANDARD TABLE OF TABLE ,
wa_et_hcf  LIKE LINE OF it_et_hcf,
it_et_icf  TYPE STANDARD TABLE OF TABLE ,
wa_et_icf  LIKE LINE OF it_et_icf.

ld_es_header = 'Check type of data required'.
ld_iv_dynattr = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_doc_types to it_it_doc_types.
ld_es_item = 'Check type of data required'.
ld_iv_cuf_table_name = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_gt_messages to it_gt_messages.
ld_es_acc = 'Check type of data required'.

SELECT single OBJECT_TYPE
FROM CRMD_ORDERADM_H
INTO ld_iv_doc_type.


"populate fields of struture and append to itab
append wa_et_search_header to it_et_search_header.
ld_es_history = 'Check type of data required'.
ld_iv_pcard = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_et_search_item to it_et_search_item.
ld_es_but000 = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_ct_cuf_table to it_ct_cuf_table.
ld_es_partner = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_et_hcf to it_et_hcf.

"populate fields of struture and append to itab
append wa_et_icf to it_et_icf.

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_CUF_GET_DATA or its description.