SAP SCPR_PRSET_DB_SAVE_ORIG_TABLES Function Module for









SCPR_PRSET_DB_SAVE_ORIG_TABLES is a standard scpr prset db save orig tables 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 prset db save orig tables FM, simply by entering the name SCPR_PRSET_DB_SAVE_ORIG_TABLES into the relevant SAP transaction such as SE37 or SE38.

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



Function SCPR_PRSET_DB_SAVE_ORIG_TABLES 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_PRSET_DB_SAVE_ORIG_TABLES'"
EXPORTING
PROFID = "
* COMPONENT = "SW Component
* MINRELEASE = "
* MAXRELEASE = "
* PROFSTATE = ' ' "
* ACT_INFO = ' ' "
* LANGU = SY-LANGU "Language of Short Text
* PROFTEXT = "
* VERSION = 'N' "
* PROFTYPE = 'TMP' "
* CATEGORY = ' ' "
* CLI_DEP = ' ' "
* CLI_CAS = ' ' "
* REFTYPE = ' ' "
* REFNAME = "
* ORGID = '/0SAP/' "

TABLES
* SCPRVALS = "BC Set: Values
* SCPRVALL = "BC Set: Values (language-dependent)
* SCPRRECA = "BC Set: BC Set record attributes
* SCPRSKEYS = "
* SCPRFLDV = "BC Set: Replace Field Text in Variable Fields
* SCPRTEXT = "BC Set: Short texts
* SCPRPPRL = "BC Sets: Hierarchical BC Sets

EXCEPTIONS
NO_PROFILE_ID = 1 ERROR_IN_DELETING_DATA = 10 ERROR_IN_WRITING_VALS = 11 ERROR_IN_DELETING_VALS = 12 ERROR_IN_WRITING_FLDTXTVAR = 13 ERROR_IN_DELETING_FLDTXTVAR = 14 WRONG_VERSION = 2 WRONG_PROFTYPE = 3 WRONG_CATEGORY = 4 NO_PROFILE_TEXT = 5 ERROR_IN_WRITING_ATTR = 6 ERROR_IN_WRITING_TEXT = 7 ERROR_IN_DELETING_TEXT = 8 ERROR_IN_WRITING_DATA = 9
.



IMPORTING Parameters details for SCPR_PRSET_DB_SAVE_ORIG_TABLES

PROFID -

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

COMPONENT - SW Component

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

MINRELEASE -

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

MAXRELEASE -

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

PROFSTATE -

Data type: SCPRATTR-STATE
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

ACT_INFO -

Data type: SCPRATTR-ACT_INFO
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

LANGU - Language of Short Text

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

PROFTEXT -

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

VERSION -

Data type: SCPRATTR-VERSION
Default: 'N'
Optional: Yes
Call by Reference: No ( called with pass by value option)

PROFTYPE -

Data type: SCPRATTR-TYPE
Default: 'TMP'
Optional: Yes
Call by Reference: No ( called with pass by value option)

CATEGORY -

Data type: SCPRATTR-CATEGORY
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

CLI_DEP -

Data type: SCPRATTR-CLI_DEP
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

CLI_CAS -

Data type: SCPRATTR-CLI_CAS
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

REFTYPE -

Data type: SCPRATTR-REFTYPE
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

REFNAME -

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

ORGID -

Data type: SCPRATTR-ORGID
Default: '/0SAP/'
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for SCPR_PRSET_DB_SAVE_ORIG_TABLES

SCPRVALS - BC Set: Values

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

SCPRVALL - BC Set: Values (language-dependent)

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

SCPRRECA - BC Set: BC Set record attributes

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

SCPRSKEYS -

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

SCPRFLDV - BC Set: Replace Field Text in Variable Fields

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

SCPRTEXT - BC Set: Short texts

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

SCPRPPRL - BC Sets: Hierarchical BC Sets

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

EXCEPTIONS details

NO_PROFILE_ID -

Data type:
Optional: No
Call by Reference: Yes

ERROR_IN_DELETING_DATA -

Data type:
Optional: No
Call by Reference: Yes

ERROR_IN_WRITING_VALS -

Data type:
Optional: No
Call by Reference: Yes

ERROR_IN_DELETING_VALS -

Data type:
Optional: No
Call by Reference: Yes

ERROR_IN_WRITING_FLDTXTVAR -

Data type:
Optional: No
Call by Reference: Yes

ERROR_IN_DELETING_FLDTXTVAR -

Data type:
Optional: No
Call by Reference: Yes

WRONG_VERSION -

Data type:
Optional: No
Call by Reference: Yes

WRONG_PROFTYPE -

Data type:
Optional: No
Call by Reference: Yes

WRONG_CATEGORY -

Data type:
Optional: No
Call by Reference: Yes

NO_PROFILE_TEXT -

Data type:
Optional: No
Call by Reference: Yes

ERROR_IN_WRITING_ATTR - Error Writing Attributes

Data type:
Optional: No
Call by Reference: Yes

ERROR_IN_WRITING_TEXT -

Data type:
Optional: No
Call by Reference: Yes

ERROR_IN_DELETING_TEXT -

Data type:
Optional: No
Call by Reference: Yes

ERROR_IN_WRITING_DATA -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for SCPR_PRSET_DB_SAVE_ORIG_TABLES 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_profid  TYPE SCPRATTR-ID, "   
lt_scprvals  TYPE STANDARD TABLE OF SCPRVALS, "   
lv_no_profile_id  TYPE SCPRVALS, "   
lv_component  TYPE SCPRATTR-COMPONENT, "   
lv_error_in_deleting_data  TYPE SCPRATTR, "   
lv_minrelease  TYPE SCPRATTR-MINRELEASE, "   
lv_error_in_writing_vals  TYPE SCPRATTR, "   
lv_maxrelease  TYPE SCPRATTR-MAXRELEASE, "   
lv_error_in_deleting_vals  TYPE SCPRATTR, "   
lv_profstate  TYPE SCPRATTR-STATE, "   ' '
lv_error_in_writing_fldtxtvar  TYPE SCPRATTR, "   
lv_act_info  TYPE SCPRATTR-ACT_INFO, "   ' '
lv_error_in_deleting_fldtxtvar  TYPE SCPRATTR, "   
lv_langu  TYPE SY-LANGU, "   SY-LANGU
lv_proftext  TYPE SCPRTEXT-TEXT, "   
lv_version  TYPE SCPRATTR-VERSION, "   'N'
lt_scprvall  TYPE STANDARD TABLE OF SCPRVALL, "   
lv_wrong_version  TYPE SCPRVALL, "   
lv_proftype  TYPE SCPRATTR-TYPE, "   'TMP'
lt_scprreca  TYPE STANDARD TABLE OF SCPRRECA, "   
lv_wrong_proftype  TYPE SCPRRECA, "   
lv_category  TYPE SCPRATTR-CATEGORY, "   ' '
lt_scprskeys  TYPE STANDARD TABLE OF SCPRSKEYS, "   
lv_wrong_category  TYPE SCPRSKEYS, "   
lv_cli_dep  TYPE SCPRATTR-CLI_DEP, "   ' '
lt_scprfldv  TYPE STANDARD TABLE OF SCPRFLDV, "   
lv_no_profile_text  TYPE SCPRFLDV, "   
lv_cli_cas  TYPE SCPRATTR-CLI_CAS, "   ' '
lt_scprtext  TYPE STANDARD TABLE OF SCPRTEXT, "   
lv_error_in_writing_attr  TYPE SCPRTEXT, "   
lv_reftype  TYPE SCPRATTR-REFTYPE, "   ' '
lt_scprpprl  TYPE STANDARD TABLE OF SCPRPPRL, "   
lv_error_in_writing_text  TYPE SCPRPPRL, "   
lv_refname  TYPE SCPRATTR-REFNAME, "   
lv_error_in_deleting_text  TYPE SCPRATTR, "   
lv_orgid  TYPE SCPRATTR-ORGID, "   '/0SAP/'
lv_error_in_writing_data  TYPE SCPRATTR. "   

  CALL FUNCTION 'SCPR_PRSET_DB_SAVE_ORIG_TABLES'  "
    EXPORTING
         PROFID = lv_profid
         COMPONENT = lv_component
         MINRELEASE = lv_minrelease
         MAXRELEASE = lv_maxrelease
         PROFSTATE = lv_profstate
         ACT_INFO = lv_act_info
         LANGU = lv_langu
         PROFTEXT = lv_proftext
         VERSION = lv_version
         PROFTYPE = lv_proftype
         CATEGORY = lv_category
         CLI_DEP = lv_cli_dep
         CLI_CAS = lv_cli_cas
         REFTYPE = lv_reftype
         REFNAME = lv_refname
         ORGID = lv_orgid
    TABLES
         SCPRVALS = lt_scprvals
         SCPRVALL = lt_scprvall
         SCPRRECA = lt_scprreca
         SCPRSKEYS = lt_scprskeys
         SCPRFLDV = lt_scprfldv
         SCPRTEXT = lt_scprtext
         SCPRPPRL = lt_scprpprl
    EXCEPTIONS
        NO_PROFILE_ID = 1
        ERROR_IN_DELETING_DATA = 10
        ERROR_IN_WRITING_VALS = 11
        ERROR_IN_DELETING_VALS = 12
        ERROR_IN_WRITING_FLDTXTVAR = 13
        ERROR_IN_DELETING_FLDTXTVAR = 14
        WRONG_VERSION = 2
        WRONG_PROFTYPE = 3
        WRONG_CATEGORY = 4
        NO_PROFILE_TEXT = 5
        ERROR_IN_WRITING_ATTR = 6
        ERROR_IN_WRITING_TEXT = 7
        ERROR_IN_DELETING_TEXT = 8
        ERROR_IN_WRITING_DATA = 9
. " SCPR_PRSET_DB_SAVE_ORIG_TABLES




ABAP code using 7.40 inline data declarations to call FM SCPR_PRSET_DB_SAVE_ORIG_TABLES

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 ID FROM SCPRATTR INTO @DATA(ld_profid).
 
 
 
"SELECT single COMPONENT FROM SCPRATTR INTO @DATA(ld_component).
 
 
"SELECT single MINRELEASE FROM SCPRATTR INTO @DATA(ld_minrelease).
 
 
"SELECT single MAXRELEASE FROM SCPRATTR INTO @DATA(ld_maxrelease).
 
 
"SELECT single STATE FROM SCPRATTR INTO @DATA(ld_profstate).
DATA(ld_profstate) = ' '.
 
 
"SELECT single ACT_INFO FROM SCPRATTR INTO @DATA(ld_act_info).
DATA(ld_act_info) = ' '.
 
 
"SELECT single LANGU FROM SY INTO @DATA(ld_langu).
DATA(ld_langu) = SY-LANGU.
 
"SELECT single TEXT FROM SCPRTEXT INTO @DATA(ld_proftext).
 
"SELECT single VERSION FROM SCPRATTR INTO @DATA(ld_version).
DATA(ld_version) = 'N'.
 
 
 
"SELECT single TYPE FROM SCPRATTR INTO @DATA(ld_proftype).
DATA(ld_proftype) = 'TMP'.
 
 
 
"SELECT single CATEGORY FROM SCPRATTR INTO @DATA(ld_category).
DATA(ld_category) = ' '.
 
 
 
"SELECT single CLI_DEP FROM SCPRATTR INTO @DATA(ld_cli_dep).
DATA(ld_cli_dep) = ' '.
 
 
 
"SELECT single CLI_CAS FROM SCPRATTR INTO @DATA(ld_cli_cas).
DATA(ld_cli_cas) = ' '.
 
 
 
"SELECT single REFTYPE FROM SCPRATTR INTO @DATA(ld_reftype).
DATA(ld_reftype) = ' '.
 
 
 
"SELECT single REFNAME FROM SCPRATTR INTO @DATA(ld_refname).
 
 
"SELECT single ORGID FROM SCPRATTR INTO @DATA(ld_orgid).
DATA(ld_orgid) = '/0SAP/'.
 
 


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!