0% found this document useful (0 votes)
12 views3 pages

Call Function 'Revision - Level - Select'

The document describes the ABAP function module 'REVISION_LEVEL_SELECT', which is used to determine the change index and date for a material based on various input parameters. It outlines the parameters for exporting and importing data, as well as exceptions that may occur during execution. Additionally, it provides an example of how to call the function and handle potential exceptions.

Uploaded by

shitalitp158
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views3 pages

Call Function 'Revision - Level - Select'

The document describes the ABAP function module 'REVISION_LEVEL_SELECT', which is used to determine the change index and date for a material based on various input parameters. It outlines the parameters for exporting and importing data, as well as exceptions that may occur during execution. Additionally, it provides an example of how to call the function and handle potential exceptions.

Uploaded by

shitalitp158
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

CALL FUNCTION 'REVISION_LEVEL_SELECT' "Update service - determination of date /

change index for material


* EXPORTING
* aennr = SPACE " aenr-aennr Change number
* aeobj = '4' " tcc01-aeobj
* datuv = 00000000 " sy-datum Date
* dokar = SPACE " draw-dokar
* doknr = SPACE " draw-doknr
* doktl = SPACE " draw-doktl
* dokvr = SPACE " draw-dokvr
* matnr = SPACE " mara-matnr Material
* revlv = SPACE " aeoi-revlv Change index/revision level
* dokob = SPACE " drad-dokob
* objky = SPACE " drad-objky
IMPORTING
aaennr = " aenr-aennr Change number
adatuv = " aenr-datuv Date
adokvr = " draw-dokvr
arevlv = " aeoi-revlv Change index/revision level
EXCEPTIONS
DATE_NOT_FOUND = 1 " At transferred date, no change
index for
ECN_NOT_FOUND = 2 " Change number is not available
ECN_NO_REVISION = 3 " For change number, no change index
for
INPUT_INCOMPLETE = 4 " Input parameter is incomplete
INPUT_INCONSISTENT = 5 " Input parameter is not unique
REVISION_NOT_FOUND = 6 " For transferred change index, no
date could
VERSION_NOT_FOUND = 7 "
. " REVISION_LEVEL_SELECT

// ABAP code example for Function Module REVISION_LEVEL_SELECT //


DATA:
ld_aaennr TYPE AENR-AENNR ,
ld_adatuv TYPE AENR-DATUV ,
ld_adokvr TYPE DRAW-DOKVR ,
ld_arevlv TYPE AEOI-REVLV .

SELECT single AENNR


FROM AENR
INTO @DATA(ld_aennr).

SELECT single AEOBJ


FROM TCC01
INTO @DATA(ld_aeobj).

DATA(ld_datuv) = '20210129'.
SELECT single DOKAR
FROM DRAW
INTO @DATA(ld_dokar).

SELECT single DOKNR


FROM DRAW
INTO @DATA(ld_doknr).

SELECT single DOKTL


FROM DRAW
INTO @DATA(ld_doktl).

SELECT single DOKVR


FROM DRAW
INTO @DATA(ld_dokvr).

SELECT single MATNR


FROM MARA
INTO @DATA(ld_matnr).

SELECT single REVLV


FROM AEOI
INTO @DATA(ld_revlv).

SELECT single DOKOB


FROM DRAD
INTO @DATA(ld_dokob).

SELECT single OBJKY


FROM DRAD
INTO @DATA(ld_objky).

CALL FUNCTION 'REVISION_LEVEL_SELECT'


* EXPORTING
* aennr = ld_aennr
* aeobj = ld_aeobj
* datuv = ld_datuv
* dokar = ld_dokar
* doknr = ld_doknr
* doktl = ld_doktl
* dokvr = ld_dokvr
* matnr = ld_matnr
* revlv = ld_revlv
* dokob = ld_dokob
* objky = ld_objky
IMPORTING
aaennr = ld_aaennr
adatuv = ld_adatuv
adokvr = ld_adokvr
arevlv = ld_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

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
ELSEIF SY-SUBRC EQ 3. "Exception
"Add code for exception here
ELSEIF SY-SUBRC EQ 4. "Exception
"Add code for exception here
ELSEIF SY-SUBRC EQ 5. "Exception
"Add code for exception here
ELSEIF SY-SUBRC EQ 6. "Exception
"Add code for exception here
ELSEIF SY-SUBRC EQ 7. "Exception
"Add code for exception here
ENDIF.

You might also like