SAP PEG08_CHECK_AUTHORIZATION Function Module for Pegging: Authorization Checks









PEG08_CHECK_AUTHORIZATION is a standard peg08 check authorization SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Pegging: Authorization Checks 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 peg08 check authorization FM, simply by entering the name PEG08_CHECK_AUTHORIZATION into the relevant SAP transaction such as SE37 or SE38.

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



Function PEG08_CHECK_AUTHORIZATION 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 'PEG08_CHECK_AUTHORIZATION'"Pegging: Authorization Checks
EXPORTING
I_OBJECT = "Auth. object in user master maintenance
* I_WERKS = "Plant
* I_TCODE = "ABAP program, current transaction code
I_MODE = "Mode

IMPORTING
O_MODE = "Mode

EXCEPTIONS
NO_PLANT = 1 INCORRECT_MODE = 2 NO_TCODE = 3
.



IMPORTING Parameters details for PEG08_CHECK_AUTHORIZATION

I_OBJECT - Auth. object in user master maintenance

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

I_WERKS - Plant

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

I_TCODE - ABAP program, current transaction code

Data type: SY-TCODE
Optional: Yes
Call by Reference: Yes

I_MODE - Mode

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

EXPORTING Parameters details for PEG08_CHECK_AUTHORIZATION

O_MODE - Mode

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

EXCEPTIONS details

NO_PLANT - No plant

Data type:
Optional: No
Call by Reference: Yes

INCORRECT_MODE - Incorrect mode

Data type:
Optional: No
Call by Reference: Yes

NO_TCODE - No Transaction Code

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for PEG08_CHECK_AUTHORIZATION 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_o_mode  TYPE CHAR1, "   
lv_i_object  TYPE XUOBJECT, "   
lv_no_plant  TYPE XUOBJECT, "   
lv_i_werks  TYPE WERKS_D, "   
lv_incorrect_mode  TYPE WERKS_D, "   
lv_i_tcode  TYPE SY-TCODE, "   
lv_no_tcode  TYPE SY, "   
lv_i_mode  TYPE CHAR1. "   

  CALL FUNCTION 'PEG08_CHECK_AUTHORIZATION'  "Pegging: Authorization Checks
    EXPORTING
         I_OBJECT = lv_i_object
         I_WERKS = lv_i_werks
         I_TCODE = lv_i_tcode
         I_MODE = lv_i_mode
    IMPORTING
         O_MODE = lv_o_mode
    EXCEPTIONS
        NO_PLANT = 1
        INCORRECT_MODE = 2
        NO_TCODE = 3
. " PEG08_CHECK_AUTHORIZATION




ABAP code using 7.40 inline data declarations to call FM PEG08_CHECK_AUTHORIZATION

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 TCODE FROM SY INTO @DATA(ld_i_tcode).
 
 
 


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!