SAP REVISION_LEVEL_SELECT Function Module for Update service - determination of date / change index for material
REVISION_LEVEL_SELECT is a standard revision level select SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Update service - determination of date / change index for material 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 revision level select FM, simply by entering the name REVISION_LEVEL_SELECT into the relevant SAP transaction such as SE37 or SE38.
Function Group: CCRL
Program Name: SAPLCCRL
Main Program: SAPLCCRL
Appliation area: C
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function REVISION_LEVEL_SELECT 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 'REVISION_LEVEL_SELECT'"Update service - determination of date / change index for material.
EXPORTING
* AENNR = ' ' "Change number
* DOKOB = ' ' "
* OBJKY = ' ' "
* AEOBJ = '4' "
* DATUV = 00000000 "Date
* DOKAR = ' ' "
* DOKNR = ' ' "
* DOKTL = ' ' "
* DOKVR = ' ' "
* MATNR = ' ' "Material
* REVLV = ' ' "Change index/revision level
IMPORTING
AAENNR = "Change number
ADATUV = "Date
ADOKVR = "
AREVLV = "Change index/revision level
EXCEPTIONS
DATE_NOT_FOUND = 1 ECN_NOT_FOUND = 2 ECN_NO_REVISION = 3 INPUT_INCOMPLETE = 4 INPUT_INCONSISTENT = 5 REVISION_NOT_FOUND = 6 VERSION_NOT_FOUND = 7
IMPORTING Parameters details for REVISION_LEVEL_SELECT
AENNR - Change number
Data type: AENR-AENNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DOKOB -
Data type: DRAD-DOKOBDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
OBJKY -
Data type: DRAD-OBJKYDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
AEOBJ -
Data type: TCC01-AEOBJDefault: '4'
Optional: Yes
Call by Reference: No ( called with pass by value option)
DATUV - Date
Data type: SY-DATUMDefault: 00000000
Optional: Yes
Call by Reference: No ( called with pass by value option)
DOKAR -
Data type: DRAW-DOKARDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DOKNR -
Data type: DRAW-DOKNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DOKTL -
Data type: DRAW-DOKTLDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DOKVR -
Data type: DRAW-DOKVRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
MATNR - Material
Data type: MARA-MATNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
REVLV - Change index/revision level
Data type: AEOI-REVLVDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for REVISION_LEVEL_SELECT
AAENNR - Change number
Data type: AENR-AENNROptional: No
Call by Reference: No ( called with pass by value option)
ADATUV - Date
Data type: AENR-DATUVOptional: No
Call by Reference: No ( called with pass by value option)
ADOKVR -
Data type: DRAW-DOKVROptional: No
Call by Reference: No ( called with pass by value option)
AREVLV - Change index/revision level
Data type: AEOI-REVLVOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
DATE_NOT_FOUND - At transferred date, no change index for
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ECN_NOT_FOUND - Change number is not available
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ECN_NO_REVISION - For change number, no change index for
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INPUT_INCOMPLETE - Input parameter is incomplete
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INPUT_INCONSISTENT - Input parameter is not unique
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
REVISION_NOT_FOUND - For transferred change index, no date could
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
VERSION_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for REVISION_LEVEL_SELECT 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_aennr | TYPE AENR-AENNR, " SPACE | |||
lv_aaennr | TYPE AENR-AENNR, " | |||
lv_date_not_found | TYPE AENR, " | |||
lv_dokob | TYPE DRAD-DOKOB, " SPACE | |||
lv_objky | TYPE DRAD-OBJKY, " SPACE | |||
lv_aeobj | TYPE TCC01-AEOBJ, " '4' | |||
lv_adatuv | TYPE AENR-DATUV, " | |||
lv_ecn_not_found | TYPE AENR, " | |||
lv_datuv | TYPE SY-DATUM, " 00000000 | |||
lv_adokvr | TYPE DRAW-DOKVR, " | |||
lv_ecn_no_revision | TYPE DRAW, " | |||
lv_dokar | TYPE DRAW-DOKAR, " SPACE | |||
lv_arevlv | TYPE AEOI-REVLV, " | |||
lv_input_incomplete | TYPE AEOI, " | |||
lv_doknr | TYPE DRAW-DOKNR, " SPACE | |||
lv_input_inconsistent | TYPE DRAW, " | |||
lv_doktl | TYPE DRAW-DOKTL, " SPACE | |||
lv_revision_not_found | TYPE DRAW, " | |||
lv_dokvr | TYPE DRAW-DOKVR, " SPACE | |||
lv_version_not_found | TYPE DRAW, " | |||
lv_matnr | TYPE MARA-MATNR, " SPACE | |||
lv_revlv | TYPE AEOI-REVLV. " SPACE |
  CALL FUNCTION 'REVISION_LEVEL_SELECT' "Update service - determination of date / change index for material |
EXPORTING | ||
AENNR | = lv_aennr | |
DOKOB | = lv_dokob | |
OBJKY | = lv_objky | |
AEOBJ | = lv_aeobj | |
DATUV | = lv_datuv | |
DOKAR | = lv_dokar | |
DOKNR | = lv_doknr | |
DOKTL | = lv_doktl | |
DOKVR | = lv_dokvr | |
MATNR | = lv_matnr | |
REVLV | = lv_revlv | |
IMPORTING | ||
AAENNR | = lv_aaennr | |
ADATUV | = lv_adatuv | |
ADOKVR | = lv_adokvr | |
AREVLV | = lv_arevlv | |
EXCEPTIONS | ||
DATE_NOT_FOUND = 1 | ||
ECN_NOT_FOUND = 2 | ||
ECN_NO_REVISION = 3 | ||
INPUT_INCOMPLETE = 4 | ||
INPUT_INCONSISTENT = 5 | ||
REVISION_NOT_FOUND = 6 | ||
VERSION_NOT_FOUND = 7 | ||
. " REVISION_LEVEL_SELECT |
ABAP code using 7.40 inline data declarations to call FM REVISION_LEVEL_SELECT
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 AENNR FROM AENR INTO @DATA(ld_aennr). | ||||
DATA(ld_aennr) | = ' '. | |||
"SELECT single AENNR FROM AENR INTO @DATA(ld_aaennr). | ||||
"SELECT single DOKOB FROM DRAD INTO @DATA(ld_dokob). | ||||
DATA(ld_dokob) | = ' '. | |||
"SELECT single OBJKY FROM DRAD INTO @DATA(ld_objky). | ||||
DATA(ld_objky) | = ' '. | |||
"SELECT single AEOBJ FROM TCC01 INTO @DATA(ld_aeobj). | ||||
DATA(ld_aeobj) | = '4'. | |||
"SELECT single DATUV FROM AENR INTO @DATA(ld_adatuv). | ||||
"SELECT single DATUM FROM SY INTO @DATA(ld_datuv). | ||||
DATA(ld_datuv) | = 00000000. | |||
"SELECT single DOKVR FROM DRAW INTO @DATA(ld_adokvr). | ||||
"SELECT single DOKAR FROM DRAW INTO @DATA(ld_dokar). | ||||
DATA(ld_dokar) | = ' '. | |||
"SELECT single REVLV FROM AEOI INTO @DATA(ld_arevlv). | ||||
"SELECT single DOKNR FROM DRAW INTO @DATA(ld_doknr). | ||||
DATA(ld_doknr) | = ' '. | |||
"SELECT single DOKTL FROM DRAW INTO @DATA(ld_doktl). | ||||
DATA(ld_doktl) | = ' '. | |||
"SELECT single DOKVR FROM DRAW INTO @DATA(ld_dokvr). | ||||
DATA(ld_dokvr) | = ' '. | |||
"SELECT single MATNR FROM MARA INTO @DATA(ld_matnr). | ||||
DATA(ld_matnr) | = ' '. | |||
"SELECT single REVLV FROM AEOI INTO @DATA(ld_revlv). | ||||
DATA(ld_revlv) | = ' '. | |||
Search for further information about these or an SAP related objects