SAP CNAU_AUTHORITY_AFKO Function Module for NOTRANSL: Berechtigungsprüfung für Netzplankopf









CNAU_AUTHORITY_AFKO is a standard cnau authority afko SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Berechtigungsprüfung für Netzplankopf 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 cnau authority afko FM, simply by entering the name CNAU_AUTHORITY_AFKO into the relevant SAP transaction such as SE37 or SE38.

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



Function CNAU_AUTHORITY_AFKO 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 'CNAU_AUTHORITY_AFKO'"NOTRANSL: Berechtigungsprüfung für Netzplankopf
EXPORTING
* AUTH_OBJECT = ' ' "Directed check for an authorization object
* I_AFKO = ' ' "Header Data in PP Orders
* I_AUFK = ' ' "Order header, general
* I_CAUFV = ' ' "Header Data in PP Orders
* MSGTY = ' ' "Message category
* SMSG_ON = ' ' "30E ! Do not display message in log
* SMSG_ZEILE = 000 "Reference line for message_store
* TRTYP = CNAU_TR_CHANGE "Transaction type
* TRTYP_A = CNAU_TR_DISPLAY "Alternative trtyp, if TRTYP not allowed

IMPORTING
X_TRTYP = "Trtyp allowed, alt. trtyp not checked
X_TRTYP_A = "Trtyp not allowed, alternative trtyp allowed
.




Customer Function user exits

Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.
EXIT_SAPLCNAU_001 PS Customer Exit: Project Definition Authorization Check
EXIT_SAPLCNAU_002 PS Customer Exit WBS Elment Authorization Check
EXIT_SAPLCNAU_003 PS Customer Exit Network Header Authorization Check
EXIT_SAPLCNAU_004 PS Customer Exit: Network Activity Authorization Check
EXIT_SAPLCNAU_005 PS Customer Exit: Milestone Authorization Check
EXIT_SAPLCNAU_006 PS Customer Exit PS Text Authorization Check
EXIT_SAPLCNAU_007 PS Customer Exit: Simulation Version Authorization Check

IMPORTING Parameters details for CNAU_AUTHORITY_AFKO

AUTH_OBJECT - Directed check for an authorization object

Data type: TOBJ-OBJCT
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_AFKO - Header Data in PP Orders

Data type: AFKO
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_AUFK - Order header, general

Data type: AUFK
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_CAUFV - Header Data in PP Orders

Data type: CAUFV
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

MSGTY - Message category

Data type: SY-MSGTY
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

SMSG_ON - 30E ! Do not display message in log

Data type: RCJ_MARKL-MARK
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

SMSG_ZEILE - Reference line for message_store

Data type: MESG-ZEILE
Default: 000
Optional: Yes
Call by Reference: No ( called with pass by value option)

TRTYP - Transaction type

Data type: TC10-TRTYP
Default: CNAU_TR_CHANGE
Optional: Yes
Call by Reference: No ( called with pass by value option)

TRTYP_A - Alternative trtyp, if TRTYP not allowed

Data type: TC10-TRTYP
Default: CNAU_TR_DISPLAY
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for CNAU_AUTHORITY_AFKO

X_TRTYP - Trtyp allowed, alt. trtyp not checked

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

X_TRTYP_A - Trtyp not allowed, alternative trtyp allowed

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

Copy and paste ABAP code example for CNAU_AUTHORITY_AFKO 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_x_trtyp  TYPE RCJ_MARKL-MARK, "   
lv_auth_object  TYPE TOBJ-OBJCT, "   SPACE
lv_i_afko  TYPE AFKO, "   SPACE
lv_x_trtyp_a  TYPE RCJ_MARKL-MARK, "   
lv_i_aufk  TYPE AUFK, "   SPACE
lv_i_caufv  TYPE CAUFV, "   SPACE
lv_msgty  TYPE SY-MSGTY, "   SPACE
lv_smsg_on  TYPE RCJ_MARKL-MARK, "   SPACE
lv_smsg_zeile  TYPE MESG-ZEILE, "   000
lv_trtyp  TYPE TC10-TRTYP, "   CNAU_TR_CHANGE
lv_trtyp_a  TYPE TC10-TRTYP. "   CNAU_TR_DISPLAY

  CALL FUNCTION 'CNAU_AUTHORITY_AFKO'  "NOTRANSL: Berechtigungsprüfung für Netzplankopf
    EXPORTING
         AUTH_OBJECT = lv_auth_object
         I_AFKO = lv_i_afko
         I_AUFK = lv_i_aufk
         I_CAUFV = lv_i_caufv
         MSGTY = lv_msgty
         SMSG_ON = lv_smsg_on
         SMSG_ZEILE = lv_smsg_zeile
         TRTYP = lv_trtyp
         TRTYP_A = lv_trtyp_a
    IMPORTING
         X_TRTYP = lv_x_trtyp
         X_TRTYP_A = lv_x_trtyp_a
. " CNAU_AUTHORITY_AFKO




ABAP code using 7.40 inline data declarations to call FM CNAU_AUTHORITY_AFKO

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 MARK FROM RCJ_MARKL INTO @DATA(ld_x_trtyp).
 
"SELECT single OBJCT FROM TOBJ INTO @DATA(ld_auth_object).
DATA(ld_auth_object) = ' '.
 
DATA(ld_i_afko) = ' '.
 
"SELECT single MARK FROM RCJ_MARKL INTO @DATA(ld_x_trtyp_a).
 
DATA(ld_i_aufk) = ' '.
 
DATA(ld_i_caufv) = ' '.
 
"SELECT single MSGTY FROM SY INTO @DATA(ld_msgty).
DATA(ld_msgty) = ' '.
 
"SELECT single MARK FROM RCJ_MARKL INTO @DATA(ld_smsg_on).
DATA(ld_smsg_on) = ' '.
 
"SELECT single ZEILE FROM MESG INTO @DATA(ld_smsg_zeile).
DATA(ld_smsg_zeile) = 000.
 
"SELECT single TRTYP FROM TC10 INTO @DATA(ld_trtyp).
DATA(ld_trtyp) = CNAU_TR_CHANGE.
 
"SELECT single TRTYP FROM TC10 INTO @DATA(ld_trtyp_a).
DATA(ld_trtyp_a) = CNAU_TR_DISPLAY.
 


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!