SAP ADRT_GET_ROC Function Module for Get Range of Coverage to set the end date









ADRT_GET_ROC is a standard adrt get roc SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Get Range of Coverage to set the end date processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for adrt get roc FM, simply by entering the name ADRT_GET_ROC into the relevant SAP transaction such as SE37 or SE38.

Function Group: ADRT10
Program Name: SAPLADRT10
Main Program: SAPLADRT10
Appliation area: I
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function ADRT_GET_ROC pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'ADRT_GET_ROC'"Get Range of Coverage to set the end date
EXPORTING
IV_WERKS = "
* IV_MTART = "
* IV_BKLAS = "
* IV_EQUNR = "Equipment number
* IV_PRKEY = "Rotable Control : Priority key
* IS_ADPMPRIOPRF = "
IV_LGORT = "
* IV_MATNR = "
* IV_IMATN = "
* IV_DISPO = "
* IV_DISMM = "
* IV_GSBER = "
* IV_MATKL = "
* IV_SPART = "

IMPORTING
ES_RWWBWBEST = "
ES_DATUM = "
ES_RWWBWBEST_FFF = "
ES_DATUM_FFF = "Last reference

TABLES
IV_CAUFVD = "Dialog structure for order headers and items

EXCEPTIONS
NO_ROC = 1 PROFILE_NOT_FOUND = 2 WHGRP_NOT_FOUND = 3 INTERNAL_ERROR = 4 NO_CALENDER = 5 MATERIAL_NOT_FOUND = 6
.



IMPORTING Parameters details for ADRT_GET_ROC

IV_WERKS -

Data type: S032-WERKS
Optional: No
Call by Reference: No ( called with pass by value option)

IV_MTART -

Data type: S032-MTART
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_BKLAS -

Data type: S032-BKLAS
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_EQUNR - Equipment number

Data type: EQUI-EQUNR
Optional: Yes
Call by Reference: Yes

IV_PRKEY - Rotable Control : Priority key

Data type: ADPMPRIOHD-PRKEY
Optional: Yes
Call by Reference: Yes

IS_ADPMPRIOPRF -

Data type: ADPMPRIOPRF
Optional: Yes
Call by Reference: Yes

IV_LGORT -

Data type: S032-LGORT
Optional: No
Call by Reference: No ( called with pass by value option)

IV_MATNR -

Data type: MARA-MATNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_IMATN -

Data type: MARA-IMATN
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_DISPO -

Data type: S032-DISPO
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_DISMM -

Data type: S032-DISMM
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_GSBER -

Data type: S032-GSBER
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_MATKL -

Data type: S032-MATKL
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_SPART -

Data type: S032-SPART
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for ADRT_GET_ROC

ES_RWWBWBEST -

Data type: S039-RWWBWBEST
Optional: No
Call by Reference: No ( called with pass by value option)

ES_DATUM -

Data type: SY-DATUM
Optional: No
Call by Reference: No ( called with pass by value option)

ES_RWWBWBEST_FFF -

Data type: S039-RWWBWBEST
Optional: No
Call by Reference: No ( called with pass by value option)

ES_DATUM_FFF - Last reference

Data type: SY-DATUM
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for ADRT_GET_ROC

IV_CAUFVD - Dialog structure for order headers and items

Data type: CAUFVD
Optional: No
Call by Reference: Yes

EXCEPTIONS details

NO_ROC - No calculation of ROC Possible

Data type:
Optional: No
Call by Reference: Yes

PROFILE_NOT_FOUND - Profile not found

Data type:
Optional: No
Call by Reference: Yes

WHGRP_NOT_FOUND - Warehouse group not found

Data type:
Optional: No
Call by Reference: Yes

INTERNAL_ERROR - Internal Error

Data type:
Optional: No
Call by Reference: Yes

NO_CALENDER - No calender in Profile

Data type:
Optional: No
Call by Reference: Yes

MATERIAL_NOT_FOUND - Matieral not found

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for ADRT_GET_ROC Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_no_roc  TYPE STRING, "   
lv_iv_werks  TYPE S032-WERKS, "   
lt_iv_caufvd  TYPE STANDARD TABLE OF CAUFVD, "   
lv_es_rwwbwbest  TYPE S039-RWWBWBEST, "   
lv_iv_mtart  TYPE S032-MTART, "   
lv_iv_bklas  TYPE S032-BKLAS, "   
lv_iv_equnr  TYPE EQUI-EQUNR, "   
lv_iv_prkey  TYPE ADPMPRIOHD-PRKEY, "   
lv_is_adpmprioprf  TYPE ADPMPRIOPRF, "   
lv_es_datum  TYPE SY-DATUM, "   
lv_iv_lgort  TYPE S032-LGORT, "   
lv_profile_not_found  TYPE S032, "   
lv_iv_matnr  TYPE MARA-MATNR, "   
lv_whgrp_not_found  TYPE MARA, "   
lv_es_rwwbwbest_fff  TYPE S039-RWWBWBEST, "   
lv_iv_imatn  TYPE MARA-IMATN, "   
lv_es_datum_fff  TYPE SY-DATUM, "   
lv_internal_error  TYPE SY, "   
lv_iv_dispo  TYPE S032-DISPO, "   
lv_no_calender  TYPE S032, "   
lv_iv_dismm  TYPE S032-DISMM, "   
lv_material_not_found  TYPE S032, "   
lv_iv_gsber  TYPE S032-GSBER, "   
lv_iv_matkl  TYPE S032-MATKL, "   
lv_iv_spart  TYPE S032-SPART. "   

  CALL FUNCTION 'ADRT_GET_ROC'  "Get Range of Coverage to set the end date
    EXPORTING
         IV_WERKS = lv_iv_werks
         IV_MTART = lv_iv_mtart
         IV_BKLAS = lv_iv_bklas
         IV_EQUNR = lv_iv_equnr
         IV_PRKEY = lv_iv_prkey
         IS_ADPMPRIOPRF = lv_is_adpmprioprf
         IV_LGORT = lv_iv_lgort
         IV_MATNR = lv_iv_matnr
         IV_IMATN = lv_iv_imatn
         IV_DISPO = lv_iv_dispo
         IV_DISMM = lv_iv_dismm
         IV_GSBER = lv_iv_gsber
         IV_MATKL = lv_iv_matkl
         IV_SPART = lv_iv_spart
    IMPORTING
         ES_RWWBWBEST = lv_es_rwwbwbest
         ES_DATUM = lv_es_datum
         ES_RWWBWBEST_FFF = lv_es_rwwbwbest_fff
         ES_DATUM_FFF = lv_es_datum_fff
    TABLES
         IV_CAUFVD = lt_iv_caufvd
    EXCEPTIONS
        NO_ROC = 1
        PROFILE_NOT_FOUND = 2
        WHGRP_NOT_FOUND = 3
        INTERNAL_ERROR = 4
        NO_CALENDER = 5
        MATERIAL_NOT_FOUND = 6
. " ADRT_GET_ROC




ABAP code using 7.40 inline data declarations to call FM ADRT_GET_ROC

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
"SELECT single WERKS FROM S032 INTO @DATA(ld_iv_werks).
 
 
"SELECT single RWWBWBEST FROM S039 INTO @DATA(ld_es_rwwbwbest).
 
"SELECT single MTART FROM S032 INTO @DATA(ld_iv_mtart).
 
"SELECT single BKLAS FROM S032 INTO @DATA(ld_iv_bklas).
 
"SELECT single EQUNR FROM EQUI INTO @DATA(ld_iv_equnr).
 
"SELECT single PRKEY FROM ADPMPRIOHD INTO @DATA(ld_iv_prkey).
 
 
"SELECT single DATUM FROM SY INTO @DATA(ld_es_datum).
 
"SELECT single LGORT FROM S032 INTO @DATA(ld_iv_lgort).
 
 
"SELECT single MATNR FROM MARA INTO @DATA(ld_iv_matnr).
 
 
"SELECT single RWWBWBEST FROM S039 INTO @DATA(ld_es_rwwbwbest_fff).
 
"SELECT single IMATN FROM MARA INTO @DATA(ld_iv_imatn).
 
"SELECT single DATUM FROM SY INTO @DATA(ld_es_datum_fff).
 
 
"SELECT single DISPO FROM S032 INTO @DATA(ld_iv_dispo).
 
 
"SELECT single DISMM FROM S032 INTO @DATA(ld_iv_dismm).
 
 
"SELECT single GSBER FROM S032 INTO @DATA(ld_iv_gsber).
 
"SELECT single MATKL FROM S032 INTO @DATA(ld_iv_matkl).
 
"SELECT single SPART FROM S032 INTO @DATA(ld_iv_spart).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!