SAP SCPR_PROT_DATA_WRITE Function Module for









SCPR_PROT_DATA_WRITE is a standard scpr prot data write SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 scpr prot data write FM, simply by entering the name SCPR_PROT_DATA_WRITE into the relevant SAP transaction such as SE37 or SE38.

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



Function SCPR_PROT_DATA_WRITE 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 'SCPR_PROT_DATA_WRITE'"
EXPORTING
ACT_ID = "BC Sets: Activation Log and Links Key
* MSGNO = "Messages, Message Number
* VAR1 = "Messages, Message Variable
* VAR2 = "Messages, Message Variable
* VAR3 = "Messages, Message Variable
* VAR4 = "Messages, Message Variable
* OBJECTTYPE = "Object Type
BCSET_ID = "Business Configuration Set
* CATEGORY = ' ' "
* OBJECTNAME = "Object Name
* TABLENAME = "BC Set: Table/View Name
* TABLETYPE = "BC Set: Type
* TABLEKEY = "BC Sets: BC Set activation error table key
* MSGID = "Application Area
* MSGTY = "Error severity(' ',W(arning),E(rror),A(bnormal termination))

EXCEPTIONS
WRONG_PARAMETERS = 1
.



IMPORTING Parameters details for SCPR_PROT_DATA_WRITE

ACT_ID - BC Sets: Activation Log and Links Key

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

MSGNO - Messages, Message Number

Data type: SCPRACPM-MSGNO
Optional: Yes
Call by Reference: No ( called with pass by value option)

VAR1 - Messages, Message Variable

Data type: SCPRACPM-VAR1
Optional: Yes
Call by Reference: No ( called with pass by value option)

VAR2 - Messages, Message Variable

Data type: SCPRACPM-VAR2
Optional: Yes
Call by Reference: No ( called with pass by value option)

VAR3 - Messages, Message Variable

Data type: SCPRACPM-VAR3
Optional: Yes
Call by Reference: No ( called with pass by value option)

VAR4 - Messages, Message Variable

Data type: SCPRACPM-VAR4
Optional: Yes
Call by Reference: No ( called with pass by value option)

OBJECTTYPE - Object Type

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

BCSET_ID - Business Configuration Set

Data type: SCPR_ID
Optional: No
Call by Reference: No ( called with pass by value option)

CATEGORY -

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

OBJECTNAME - Object Name

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

TABLENAME - BC Set: Table/View Name

Data type: SCPRACPR-TABLENAME
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLETYPE - BC Set: Type

Data type: SCPRACPR-TABLETYPE
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLEKEY - BC Sets: BC Set activation error table key

Data type: SCPRACPR-TABLEKEY
Optional: Yes
Call by Reference: No ( called with pass by value option)

MSGID - Application Area

Data type: SCPRACPM-MSGID
Optional: Yes
Call by Reference: No ( called with pass by value option)

MSGTY - Error severity(' ',W(arning),E(rror),A(bnormal termination))

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

EXCEPTIONS details

WRONG_PARAMETERS - Incorrect Parameter Transfer

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for SCPR_PROT_DATA_WRITE 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_act_id  TYPE SCPRACPP-ACT_ID, "   
lv_wrong_parameters  TYPE SCPRACPP, "   
lv_msgno  TYPE SCPRACPM-MSGNO, "   
lv_var1  TYPE SCPRACPM-VAR1, "   
lv_var2  TYPE SCPRACPM-VAR2, "   
lv_var3  TYPE SCPRACPM-VAR3, "   
lv_var4  TYPE SCPRACPM-VAR4, "   
lv_objecttype  TYPE OB_TYP, "   
lv_bcset_id  TYPE SCPR_ID, "   
lv_category  TYPE SCPR_CTGRY, "   SPACE
lv_objectname  TYPE OB_OBJECT, "   
lv_tablename  TYPE SCPRACPR-TABLENAME, "   
lv_tabletype  TYPE SCPRACPR-TABLETYPE, "   
lv_tablekey  TYPE SCPRACPR-TABLEKEY, "   
lv_msgid  TYPE SCPRACPM-MSGID, "   
lv_msgty  TYPE SCPRACPM-MSGTY. "   

  CALL FUNCTION 'SCPR_PROT_DATA_WRITE'  "
    EXPORTING
         ACT_ID = lv_act_id
         MSGNO = lv_msgno
         VAR1 = lv_var1
         VAR2 = lv_var2
         VAR3 = lv_var3
         VAR4 = lv_var4
         OBJECTTYPE = lv_objecttype
         BCSET_ID = lv_bcset_id
         CATEGORY = lv_category
         OBJECTNAME = lv_objectname
         TABLENAME = lv_tablename
         TABLETYPE = lv_tabletype
         TABLEKEY = lv_tablekey
         MSGID = lv_msgid
         MSGTY = lv_msgty
    EXCEPTIONS
        WRONG_PARAMETERS = 1
. " SCPR_PROT_DATA_WRITE




ABAP code using 7.40 inline data declarations to call FM SCPR_PROT_DATA_WRITE

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 ACT_ID FROM SCPRACPP INTO @DATA(ld_act_id).
 
 
"SELECT single MSGNO FROM SCPRACPM INTO @DATA(ld_msgno).
 
"SELECT single VAR1 FROM SCPRACPM INTO @DATA(ld_var1).
 
"SELECT single VAR2 FROM SCPRACPM INTO @DATA(ld_var2).
 
"SELECT single VAR3 FROM SCPRACPM INTO @DATA(ld_var3).
 
"SELECT single VAR4 FROM SCPRACPM INTO @DATA(ld_var4).
 
 
 
DATA(ld_category) = ' '.
 
 
"SELECT single TABLENAME FROM SCPRACPR INTO @DATA(ld_tablename).
 
"SELECT single TABLETYPE FROM SCPRACPR INTO @DATA(ld_tabletype).
 
"SELECT single TABLEKEY FROM SCPRACPR INTO @DATA(ld_tablekey).
 
"SELECT single MSGID FROM SCPRACPM INTO @DATA(ld_msgid).
 
"SELECT single MSGTY FROM SCPRACPM INTO @DATA(ld_msgty).
 


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!