SAP Function Modules

HRGPBS_DRILL_READ_COVP SAP Function module - Read from table COVP







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

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


Pattern for FM HRGPBS_DRILL_READ_COVP - HRGPBS DRILL READ COVP





CALL FUNCTION 'HRGPBS_DRILL_READ_COVP' "Read from table COVP
  EXPORTING
    id_activity =               " c             C = create;R = reverse;G = get reposting
*   doc_type = 'HRPAY'          " awtyp         Reference procedure
    controlling_area =          " kokrs         Controlling Area
  TABLES
    r_kostl =                   " p08p_dlr_kostl_range  HRGBPS: Range of cost centers
    r_order =                   " p08p_dlr_order_range  HRGBPS: Range of orders
    r_wbs_id =                  " p08p_dlr_wbs_list  HRGBPS: Range of WBS elements
    r_wbs_orig =                " p08p_dlr_wbs_range  HRGBPS: Range of WBS elements
    r_budat =                   " p08p_dlr_budat_range  HRGBPS: Range of posting dates
    r_period =                  " p08p_dlr_perio_range  HRGBPS: Range of FI periods
    r_year =                    " p08p_dlr_gjahr_range  HRGBPS: Range of fiscal years
    r_elem =                    " p08p_dlr_acc_range  HRGBPS: Range of G/L accounts
    it_docnum =                 " p08p_dlr_docnum  HRGBPS:Document numbers for selection from HR posting tables
  EXCEPTIONS
    COVP_ERROR = 1              "               Error when reading COVP
    NO_HR_DOCS = 2              "               nor HR documents have been selected
    .  "  HRGPBS_DRILL_READ_COVP

ABAP code example for Function Module HRGPBS_DRILL_READ_COVP





The ABAP code below is a full code listing to execute function module HRGPBS_DRILL_READ_COVP 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:
it_r_kostl  TYPE STANDARD TABLE OF P08P_DLR_KOSTL_RANGE,"TABLES PARAM
wa_r_kostl  LIKE LINE OF it_r_kostl ,
it_r_order  TYPE STANDARD TABLE OF P08P_DLR_ORDER_RANGE,"TABLES PARAM
wa_r_order  LIKE LINE OF it_r_order ,
it_r_wbs_id  TYPE STANDARD TABLE OF P08P_DLR_WBS_LIST,"TABLES PARAM
wa_r_wbs_id  LIKE LINE OF it_r_wbs_id ,
it_r_wbs_orig  TYPE STANDARD TABLE OF P08P_DLR_WBS_RANGE,"TABLES PARAM
wa_r_wbs_orig  LIKE LINE OF it_r_wbs_orig ,
it_r_budat  TYPE STANDARD TABLE OF P08P_DLR_BUDAT_RANGE,"TABLES PARAM
wa_r_budat  LIKE LINE OF it_r_budat ,
it_r_period  TYPE STANDARD TABLE OF P08P_DLR_PERIO_RANGE,"TABLES PARAM
wa_r_period  LIKE LINE OF it_r_period ,
it_r_year  TYPE STANDARD TABLE OF P08P_DLR_GJAHR_RANGE,"TABLES PARAM
wa_r_year  LIKE LINE OF it_r_year ,
it_r_elem  TYPE STANDARD TABLE OF P08P_DLR_ACC_RANGE,"TABLES PARAM
wa_r_elem  LIKE LINE OF it_r_elem ,
it_it_docnum  TYPE STANDARD TABLE OF P08P_DLR_DOCNUM,"TABLES PARAM
wa_it_docnum  LIKE LINE OF it_it_docnum .

DATA(ld_id_activity) = 'Check type of data required'.
DATA(ld_doc_type) = 'Check type of data required'.
DATA(ld_controlling_area) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_r_kostl to it_r_kostl.

"populate fields of struture and append to itab
append wa_r_order to it_r_order.

"populate fields of struture and append to itab
append wa_r_wbs_id to it_r_wbs_id.

"populate fields of struture and append to itab
append wa_r_wbs_orig to it_r_wbs_orig.

"populate fields of struture and append to itab
append wa_r_budat to it_r_budat.

"populate fields of struture and append to itab
append wa_r_period to it_r_period.

"populate fields of struture and append to itab
append wa_r_year to it_r_year.

"populate fields of struture and append to itab
append wa_r_elem to it_r_elem.

"populate fields of struture and append to itab
append wa_it_docnum to it_it_docnum. . CALL FUNCTION 'HRGPBS_DRILL_READ_COVP' EXPORTING id_activity = ld_id_activity * doc_type = ld_doc_type controlling_area = ld_controlling_area TABLES r_kostl = it_r_kostl r_order = it_r_order r_wbs_id = it_r_wbs_id r_wbs_orig = it_r_wbs_orig r_budat = it_r_budat r_period = it_r_period r_year = it_r_year r_elem = it_r_elem it_docnum = it_it_docnum EXCEPTIONS COVP_ERROR = 1 NO_HR_DOCS = 2 . " HRGPBS_DRILL_READ_COVP
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 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_id_activity  TYPE C ,
it_r_kostl  TYPE STANDARD TABLE OF P08P_DLR_KOSTL_RANGE ,
wa_r_kostl  LIKE LINE OF it_r_kostl,
ld_doc_type  TYPE AWTYP ,
it_r_order  TYPE STANDARD TABLE OF P08P_DLR_ORDER_RANGE ,
wa_r_order  LIKE LINE OF it_r_order,
ld_controlling_area  TYPE KOKRS ,
it_r_wbs_id  TYPE STANDARD TABLE OF P08P_DLR_WBS_LIST ,
wa_r_wbs_id  LIKE LINE OF it_r_wbs_id,
it_r_wbs_orig  TYPE STANDARD TABLE OF P08P_DLR_WBS_RANGE ,
wa_r_wbs_orig  LIKE LINE OF it_r_wbs_orig,
it_r_budat  TYPE STANDARD TABLE OF P08P_DLR_BUDAT_RANGE ,
wa_r_budat  LIKE LINE OF it_r_budat,
it_r_period  TYPE STANDARD TABLE OF P08P_DLR_PERIO_RANGE ,
wa_r_period  LIKE LINE OF it_r_period,
it_r_year  TYPE STANDARD TABLE OF P08P_DLR_GJAHR_RANGE ,
wa_r_year  LIKE LINE OF it_r_year,
it_r_elem  TYPE STANDARD TABLE OF P08P_DLR_ACC_RANGE ,
wa_r_elem  LIKE LINE OF it_r_elem,
it_it_docnum  TYPE STANDARD TABLE OF P08P_DLR_DOCNUM ,
wa_it_docnum  LIKE LINE OF it_it_docnum.

ld_id_activity = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_r_kostl to it_r_kostl.
ld_doc_type = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_r_order to it_r_order.
ld_controlling_area = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_r_wbs_id to it_r_wbs_id.

"populate fields of struture and append to itab
append wa_r_wbs_orig to it_r_wbs_orig.

"populate fields of struture and append to itab
append wa_r_budat to it_r_budat.

"populate fields of struture and append to itab
append wa_r_period to it_r_period.

"populate fields of struture and append to itab
append wa_r_year to it_r_year.

"populate fields of struture and append to itab
append wa_r_elem to it_r_elem.

"populate fields of struture and append to itab
append wa_it_docnum to it_it_docnum.

SAP Documentation for FM HRGPBS_DRILL_READ_COVP


Preselection of HR Document numbers from the cost object line item table COVP. The document numbers are then passed to function module ...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 HRGPBS_DRILL_READ_COVP or its description.