SAP Function Modules

EHPRC_CP_SP02_API_MSG_GET SAP Function module - CfP: API Message get







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

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


Pattern for FM EHPRC_CP_SP02_API_MSG_GET - EHPRC CP SP02 API MSG GET





CALL FUNCTION 'EHPRC_CP_SP02_API_MSG_GET' "CfP: API Message get
  IMPORTING
    e_flg_error =               " esp1_boolean
  TABLES
    it_api_header =             " esprh_apirh_tab_type
*   it_api_refsubs =            " esprh_apirr_tab_type
*   it_api_ident =              " esprh_apiri_tab_type
*   it_api_ident_longtext =     " esprh_apiil_tab_type
*   it_api_matjoin =            " esprh_apimj_tab_type
*   it_api_prop_header =        " esprh_apivh_tab_type
*   it_api_prop =               " esprh_apiva_tab_type
*   it_api_prop_data =          " esprh_apipr_tab_type
*   it_api_prop_component =     " esprh_apivp_tab_type
*   it_api_prop_usage =         " esprh_apidu_tab_type
*   it_api_prop_ftext =         " esprh_apidf_tab_type
*   it_api_prop_ftext_longtext =   " esprh_apifl_tab_type
  CHANGING
    xt_msg =                    " bal_t_msg     Application Log: Table with Messages
    .  "  EHPRC_CP_SP02_API_MSG_GET

ABAP code example for Function Module EHPRC_CP_SP02_API_MSG_GET





The ABAP code below is a full code listing to execute function module EHPRC_CP_SP02_API_MSG_GET 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_e_flg_error  TYPE ESP1_BOOLEAN ,
it_it_api_header  TYPE STANDARD TABLE OF ESPRH_APIRH_TAB_TYPE,"TABLES PARAM
wa_it_api_header  LIKE LINE OF it_it_api_header ,
it_it_api_refsubs  TYPE STANDARD TABLE OF ESPRH_APIRR_TAB_TYPE,"TABLES PARAM
wa_it_api_refsubs  LIKE LINE OF it_it_api_refsubs ,
it_it_api_ident  TYPE STANDARD TABLE OF ESPRH_APIRI_TAB_TYPE,"TABLES PARAM
wa_it_api_ident  LIKE LINE OF it_it_api_ident ,
it_it_api_ident_longtext  TYPE STANDARD TABLE OF ESPRH_APIIL_TAB_TYPE,"TABLES PARAM
wa_it_api_ident_longtext  LIKE LINE OF it_it_api_ident_longtext ,
it_it_api_matjoin  TYPE STANDARD TABLE OF ESPRH_APIMJ_TAB_TYPE,"TABLES PARAM
wa_it_api_matjoin  LIKE LINE OF it_it_api_matjoin ,
it_it_api_prop_header  TYPE STANDARD TABLE OF ESPRH_APIVH_TAB_TYPE,"TABLES PARAM
wa_it_api_prop_header  LIKE LINE OF it_it_api_prop_header ,
it_it_api_prop  TYPE STANDARD TABLE OF ESPRH_APIVA_TAB_TYPE,"TABLES PARAM
wa_it_api_prop  LIKE LINE OF it_it_api_prop ,
it_it_api_prop_data  TYPE STANDARD TABLE OF ESPRH_APIPR_TAB_TYPE,"TABLES PARAM
wa_it_api_prop_data  LIKE LINE OF it_it_api_prop_data ,
it_it_api_prop_component  TYPE STANDARD TABLE OF ESPRH_APIVP_TAB_TYPE,"TABLES PARAM
wa_it_api_prop_component  LIKE LINE OF it_it_api_prop_component ,
it_it_api_prop_usage  TYPE STANDARD TABLE OF ESPRH_APIDU_TAB_TYPE,"TABLES PARAM
wa_it_api_prop_usage  LIKE LINE OF it_it_api_prop_usage ,
it_it_api_prop_ftext  TYPE STANDARD TABLE OF ESPRH_APIDF_TAB_TYPE,"TABLES PARAM
wa_it_api_prop_ftext  LIKE LINE OF it_it_api_prop_ftext ,
it_it_api_prop_ftext_longtext  TYPE STANDARD TABLE OF ESPRH_APIFL_TAB_TYPE,"TABLES PARAM
wa_it_api_prop_ftext_longtext  LIKE LINE OF it_it_api_prop_ftext_longtext .

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

"populate fields of struture and append to itab
append wa_it_api_header to it_it_api_header.

"populate fields of struture and append to itab
append wa_it_api_refsubs to it_it_api_refsubs.

"populate fields of struture and append to itab
append wa_it_api_ident to it_it_api_ident.

"populate fields of struture and append to itab
append wa_it_api_ident_longtext to it_it_api_ident_longtext.

"populate fields of struture and append to itab
append wa_it_api_matjoin to it_it_api_matjoin.

"populate fields of struture and append to itab
append wa_it_api_prop_header to it_it_api_prop_header.

"populate fields of struture and append to itab
append wa_it_api_prop to it_it_api_prop.

"populate fields of struture and append to itab
append wa_it_api_prop_data to it_it_api_prop_data.

"populate fields of struture and append to itab
append wa_it_api_prop_component to it_it_api_prop_component.

"populate fields of struture and append to itab
append wa_it_api_prop_usage to it_it_api_prop_usage.

"populate fields of struture and append to itab
append wa_it_api_prop_ftext to it_it_api_prop_ftext.

"populate fields of struture and append to itab
append wa_it_api_prop_ftext_longtext to it_it_api_prop_ftext_longtext. . CALL FUNCTION 'EHPRC_CP_SP02_API_MSG_GET' IMPORTING e_flg_error = ld_e_flg_error TABLES it_api_header = it_it_api_header * it_api_refsubs = it_it_api_refsubs * it_api_ident = it_it_api_ident * it_api_ident_longtext = it_it_api_ident_longtext * it_api_matjoin = it_it_api_matjoin * it_api_prop_header = it_it_api_prop_header * it_api_prop = it_it_api_prop * it_api_prop_data = it_it_api_prop_data * it_api_prop_component = it_it_api_prop_component * it_api_prop_usage = it_it_api_prop_usage * it_api_prop_ftext = it_it_api_prop_ftext * it_api_prop_ftext_longtext = it_it_api_prop_ftext_longtext CHANGING xt_msg = ld_xt_msg . " EHPRC_CP_SP02_API_MSG_GET
IF SY-SUBRC EQ 0. "All OK 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_xt_msg  TYPE BAL_T_MSG ,
ld_e_flg_error  TYPE ESP1_BOOLEAN ,
it_it_api_header  TYPE STANDARD TABLE OF ESPRH_APIRH_TAB_TYPE ,
wa_it_api_header  LIKE LINE OF it_it_api_header,
it_it_api_refsubs  TYPE STANDARD TABLE OF ESPRH_APIRR_TAB_TYPE ,
wa_it_api_refsubs  LIKE LINE OF it_it_api_refsubs,
it_it_api_ident  TYPE STANDARD TABLE OF ESPRH_APIRI_TAB_TYPE ,
wa_it_api_ident  LIKE LINE OF it_it_api_ident,
it_it_api_ident_longtext  TYPE STANDARD TABLE OF ESPRH_APIIL_TAB_TYPE ,
wa_it_api_ident_longtext  LIKE LINE OF it_it_api_ident_longtext,
it_it_api_matjoin  TYPE STANDARD TABLE OF ESPRH_APIMJ_TAB_TYPE ,
wa_it_api_matjoin  LIKE LINE OF it_it_api_matjoin,
it_it_api_prop_header  TYPE STANDARD TABLE OF ESPRH_APIVH_TAB_TYPE ,
wa_it_api_prop_header  LIKE LINE OF it_it_api_prop_header,
it_it_api_prop  TYPE STANDARD TABLE OF ESPRH_APIVA_TAB_TYPE ,
wa_it_api_prop  LIKE LINE OF it_it_api_prop,
it_it_api_prop_data  TYPE STANDARD TABLE OF ESPRH_APIPR_TAB_TYPE ,
wa_it_api_prop_data  LIKE LINE OF it_it_api_prop_data,
it_it_api_prop_component  TYPE STANDARD TABLE OF ESPRH_APIVP_TAB_TYPE ,
wa_it_api_prop_component  LIKE LINE OF it_it_api_prop_component,
it_it_api_prop_usage  TYPE STANDARD TABLE OF ESPRH_APIDU_TAB_TYPE ,
wa_it_api_prop_usage  LIKE LINE OF it_it_api_prop_usage,
it_it_api_prop_ftext  TYPE STANDARD TABLE OF ESPRH_APIDF_TAB_TYPE ,
wa_it_api_prop_ftext  LIKE LINE OF it_it_api_prop_ftext,
it_it_api_prop_ftext_longtext  TYPE STANDARD TABLE OF ESPRH_APIFL_TAB_TYPE ,
wa_it_api_prop_ftext_longtext  LIKE LINE OF it_it_api_prop_ftext_longtext.

ld_xt_msg = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_api_header to it_it_api_header.

"populate fields of struture and append to itab
append wa_it_api_refsubs to it_it_api_refsubs.

"populate fields of struture and append to itab
append wa_it_api_ident to it_it_api_ident.

"populate fields of struture and append to itab
append wa_it_api_ident_longtext to it_it_api_ident_longtext.

"populate fields of struture and append to itab
append wa_it_api_matjoin to it_it_api_matjoin.

"populate fields of struture and append to itab
append wa_it_api_prop_header to it_it_api_prop_header.

"populate fields of struture and append to itab
append wa_it_api_prop to it_it_api_prop.

"populate fields of struture and append to itab
append wa_it_api_prop_data to it_it_api_prop_data.

"populate fields of struture and append to itab
append wa_it_api_prop_component to it_it_api_prop_component.

"populate fields of struture and append to itab
append wa_it_api_prop_usage to it_it_api_prop_usage.

"populate fields of struture and append to itab
append wa_it_api_prop_ftext to it_it_api_prop_ftext.

"populate fields of struture and append to itab
append wa_it_api_prop_ftext_longtext to it_it_api_prop_ftext_longtext.

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