SAP Function Modules

HR_BE_GET_COMMENT SAP Function module - Get the comment for the given field







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

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


Pattern for FM HR_BE_GET_COMMENT - HR BE GET COMMENT





CALL FUNCTION 'HR_BE_GET_COMMENT' "Get the comment for the given field
  EXPORTING
    im_tab_psp =                " ptpsp_tab     Tabelle von Übergabestrukturen für persönlichen AZP
    im_wa_sv =                  " pc280         Social Insurance
    im_pernr =                  " p99sd_codaq-pernr  Personnel number
    im_date =                   " d             Date
    im_form =                   " cl_hr99s00_daq  Form instance
    im_field =                  " p_99s_field   Forms: Field
*   im_risk_id =                " p12_risk_id
  IMPORTING
    ex_comment =                " p12_srd_comment  Comment in Social Risk Declaration
    ex_returncode =             " sy-subrc      Rückgabewert, Rückgabewert nach ABAP-Anweisungen
* CHANGING
*   ch_tab_error =              " p99sf_tab_error  Table with messages
    .  "  HR_BE_GET_COMMENT

ABAP code example for Function Module HR_BE_GET_COMMENT





The ABAP code below is a full code listing to execute function module HR_BE_GET_COMMENT 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_ex_comment  TYPE P12_SRD_COMMENT ,
ld_ex_returncode  TYPE SY-SUBRC .

DATA(ld_ch_tab_error) = 'Check type of data required'.
DATA(ld_im_tab_psp) = 'Check type of data required'.
DATA(ld_im_wa_sv) = 'Check type of data required'.

DATA(ld_im_pernr) = some text here
DATA(ld_im_date) = 'Check type of data required'.
DATA(ld_im_form) = 'Check type of data required'.
DATA(ld_im_field) = 'Check type of data required'.
DATA(ld_im_risk_id) = 'Check type of data required'. . CALL FUNCTION 'HR_BE_GET_COMMENT' EXPORTING im_tab_psp = ld_im_tab_psp im_wa_sv = ld_im_wa_sv im_pernr = ld_im_pernr im_date = ld_im_date im_form = ld_im_form im_field = ld_im_field * im_risk_id = ld_im_risk_id IMPORTING ex_comment = ld_ex_comment ex_returncode = ld_ex_returncode * CHANGING * ch_tab_error = ld_ch_tab_error . " HR_BE_GET_COMMENT
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_ch_tab_error  TYPE P99SF_TAB_ERROR ,
ld_ex_comment  TYPE P12_SRD_COMMENT ,
ld_im_tab_psp  TYPE PTPSP_TAB ,
ld_ex_returncode  TYPE SY-SUBRC ,
ld_im_wa_sv  TYPE PC280 ,
ld_im_pernr  TYPE P99SD_CODAQ-PERNR ,
ld_im_date  TYPE D ,
ld_im_form  TYPE CL_HR99S00_DAQ ,
ld_im_field  TYPE P_99S_FIELD ,
ld_im_risk_id  TYPE P12_RISK_ID .

ld_ch_tab_error = 'Check type of data required'.
ld_im_tab_psp = 'Check type of data required'.
ld_im_wa_sv = 'Check type of data required'.

ld_im_pernr = some text here
ld_im_date = 'Check type of data required'.
ld_im_form = 'Check type of data required'.
ld_im_field = 'Check type of data required'.
ld_im_risk_id = 'Check type of data required'.

SAP Documentation for FM HR_BE_GET_COMMENT


This function allows you retrieve a comment stored in table T5BR5 for the Social Risk Declaration file. Comments are used in different ...See here for full SAP fm documentation

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