SCPR_DB_ATTR_STORE is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.
See here to view full function module documentation and code listing, simply by entering the name SCPR_DB_ATTR_STORE into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
SCPRPR
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'SCPR_DB_ATTR_STORE' "
EXPORTING
profid = " scprattr-id
* version = 'N' " scprattr-version
* proftype = 'TMV' " scprattr-type
* category = ' ' " scprattr-category
* cli_dep = ' ' " scprattr-cli_dep
* cli_cas = ' ' " scprattr-cli_cas
* reftype = ' ' " scprattr-reftype
* refname = ' ' " scprattr-refname
component = " scprattr-component SW Component
minrelease = " scprattr-minrelease
maxrelease = " scprattr-maxrelease
* orgid = '/0SAP/' " scprattr-orgid
* profstate = ' ' " scprattr-state
* act_info = ' ' " scprattr-act_info
EXCEPTIONS
NO_PROFILE_ID = 1 "
WRONG_VERSION = 2 "
ERROR_IN_WRITING_ATTR = 3 " Error Writing Attributes
WRONG_PROFTYPE = 4 "
WRONG_CATEGORY = 5 "
. " SCPR_DB_ATTR_STORE
The ABAP code below is a full code listing to execute function module SCPR_DB_ATTR_STORE including all data declarations. The code uses 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 original method of declaring data variables up front. 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).
SELECT single ID
FROM SCPRATTR
INTO @DATA(ld_profid).
SELECT single VERSION
FROM SCPRATTR
INTO @DATA(ld_version).
SELECT single TYPE
FROM SCPRATTR
INTO @DATA(ld_proftype).
SELECT single CATEGORY
FROM SCPRATTR
INTO @DATA(ld_category).
SELECT single CLI_DEP
FROM SCPRATTR
INTO @DATA(ld_cli_dep).
SELECT single CLI_CAS
FROM SCPRATTR
INTO @DATA(ld_cli_cas).
SELECT single REFTYPE
FROM SCPRATTR
INTO @DATA(ld_reftype).
SELECT single REFNAME
FROM SCPRATTR
INTO @DATA(ld_refname).
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 ORGID
FROM SCPRATTR
INTO @DATA(ld_orgid).
SELECT single STATE
FROM SCPRATTR
INTO @DATA(ld_profstate).
SELECT single ACT_INFO
FROM SCPRATTR
INTO @DATA(ld_act_info).
. CALL FUNCTION 'SCPR_DB_ATTR_STORE' EXPORTING profid = ld_profid * version = ld_version * proftype = ld_proftype * category = ld_category * cli_dep = ld_cli_dep * cli_cas = ld_cli_cas * reftype = ld_reftype * refname = ld_refname component = ld_component minrelease = ld_minrelease maxrelease = ld_maxrelease * orgid = ld_orgid * profstate = ld_profstate * act_info = ld_act_info EXCEPTIONS NO_PROFILE_ID = 1 WRONG_VERSION = 2 ERROR_IN_WRITING_ATTR = 3 WRONG_PROFTYPE = 4 WRONG_CATEGORY = 5 . " SCPR_DB_ATTR_STORE
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ENDIF.
The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
| ld_profid | TYPE SCPRATTR-ID , |
| ld_version | TYPE SCPRATTR-VERSION , |
| ld_proftype | TYPE SCPRATTR-TYPE , |
| ld_category | TYPE SCPRATTR-CATEGORY , |
| ld_cli_dep | TYPE SCPRATTR-CLI_DEP , |
| ld_cli_cas | TYPE SCPRATTR-CLI_CAS , |
| ld_reftype | TYPE SCPRATTR-REFTYPE , |
| ld_refname | TYPE SCPRATTR-REFNAME , |
| ld_component | TYPE SCPRATTR-COMPONENT , |
| ld_minrelease | TYPE SCPRATTR-MINRELEASE , |
| ld_maxrelease | TYPE SCPRATTR-MAXRELEASE , |
| ld_orgid | TYPE SCPRATTR-ORGID , |
| ld_profstate | TYPE SCPRATTR-STATE , |
| ld_act_info | TYPE SCPRATTR-ACT_INFO . |
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name SCPR_DB_ATTR_STORE or its description.