SAP CVAUTH_RFC_SET_INITIAL_AUTH Function Module for Set initial authorization (RFC)
CVAUTH_RFC_SET_INITIAL_AUTH is a standard cvauth rfc set initial auth SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Set initial authorization (RFC) 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 cvauth rfc set initial auth FM, simply by entering the name CVAUTH_RFC_SET_INITIAL_AUTH into the relevant SAP transaction such as SE37 or SE38.
Function Group: CV_AUTH_RFC
Program Name: SAPLCV_AUTH_RFC
Main Program: SAPLCV_AUTH_RFC
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function CVAUTH_RFC_SET_INITIAL_AUTH 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 'CVAUTH_RFC_SET_INITIAL_AUTH'"Set initial authorization (RFC).
EXPORTING
DOKNR = "Document number
DOKAR = "Document type
DOKTL = "Document part
DOKVR = "Document version
* ADMIN = SY-UNAME "SAP System, User Logon Name
* FL_COMMIT_WAIT = 'X' "Boolean Variable (X=True, -=False, Space=Unknown)
IMPORTING
ERROR = "Boolean Variable (X=True, -=False, Space=Unknown)
EXISTS = "Boolean Variable (X=True, -=False, Space=Unknown)
IMPORTING Parameters details for CVAUTH_RFC_SET_INITIAL_AUTH
DOKNR - Document number
Data type: DRAW-DOKNROptional: No
Call by Reference: No ( called with pass by value option)
DOKAR - Document type
Data type: DRAW-DOKAROptional: No
Call by Reference: No ( called with pass by value option)
DOKTL - Document part
Data type: DRAW-DOKTLOptional: No
Call by Reference: No ( called with pass by value option)
DOKVR - Document version
Data type: DRAW-DOKVROptional: No
Call by Reference: No ( called with pass by value option)
ADMIN - SAP System, User Logon Name
Data type: SYST-UNAMEDefault: SY-UNAME
Optional: No
Call by Reference: No ( called with pass by value option)
FL_COMMIT_WAIT - Boolean Variable (X=True, -=False, Space=Unknown)
Data type: DATATYPE-BOOLEANDefault: 'X'
Optional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CVAUTH_RFC_SET_INITIAL_AUTH
ERROR - Boolean Variable (X=True, -=False, Space=Unknown)
Data type: DATATYPE-BOOLEANOptional: No
Call by Reference: No ( called with pass by value option)
EXISTS - Boolean Variable (X=True, -=False, Space=Unknown)
Data type: DATATYPE-BOOLEANOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CVAUTH_RFC_SET_INITIAL_AUTH 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_doknr | TYPE DRAW-DOKNR, " | |||
| lv_error | TYPE DATATYPE-BOOLEAN, " | |||
| lv_dokar | TYPE DRAW-DOKAR, " | |||
| lv_exists | TYPE DATATYPE-BOOLEAN, " | |||
| lv_doktl | TYPE DRAW-DOKTL, " | |||
| lv_dokvr | TYPE DRAW-DOKVR, " | |||
| lv_admin | TYPE SYST-UNAME, " SY-UNAME | |||
| lv_fl_commit_wait | TYPE DATATYPE-BOOLEAN. " 'X' |
|   CALL FUNCTION 'CVAUTH_RFC_SET_INITIAL_AUTH' "Set initial authorization (RFC) |
| EXPORTING | ||
| DOKNR | = lv_doknr | |
| DOKAR | = lv_dokar | |
| DOKTL | = lv_doktl | |
| DOKVR | = lv_dokvr | |
| ADMIN | = lv_admin | |
| FL_COMMIT_WAIT | = lv_fl_commit_wait | |
| IMPORTING | ||
| ERROR | = lv_error | |
| EXISTS | = lv_exists | |
| . " CVAUTH_RFC_SET_INITIAL_AUTH | ||
ABAP code using 7.40 inline data declarations to call FM CVAUTH_RFC_SET_INITIAL_AUTH
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 DOKNR FROM DRAW INTO @DATA(ld_doknr). | ||||
| "SELECT single BOOLEAN FROM DATATYPE INTO @DATA(ld_error). | ||||
| "SELECT single DOKAR FROM DRAW INTO @DATA(ld_dokar). | ||||
| "SELECT single BOOLEAN FROM DATATYPE INTO @DATA(ld_exists). | ||||
| "SELECT single DOKTL FROM DRAW INTO @DATA(ld_doktl). | ||||
| "SELECT single DOKVR FROM DRAW INTO @DATA(ld_dokvr). | ||||
| "SELECT single UNAME FROM SYST INTO @DATA(ld_admin). | ||||
| DATA(ld_admin) | = SY-UNAME. | |||
| "SELECT single BOOLEAN FROM DATATYPE INTO @DATA(ld_fl_commit_wait). | ||||
| DATA(ld_fl_commit_wait) | = 'X'. | |||
Search for further information about these or an SAP related objects