SAP Function Modules

SCPR_PRSET_DB_GET_ORIG_TABLES SAP Function module







SCPR_PRSET_DB_GET_ORIG_TABLES 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_PRSET_DB_GET_ORIG_TABLES into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: SCPRPS
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM SCPR_PRSET_DB_GET_ORIG_TABLES - SCPR PRSET DB GET ORIG TABLES





CALL FUNCTION 'SCPR_PRSET_DB_GET_ORIG_TABLES' "
  EXPORTING
    id =                        " scpr_id       Business Configuration Set
*   version = 'N'               " scpr_vers     BC Set: Version
*   category = SPACE            " scpr_ctgry
* TABLES
*   scprattr =                  " scprattr      BC Set: Attributes
*   scprvals =                  " scprvals      BC Set: Values
*   scprvall =                  " scprvall      BC Set: Values (language-dependent)
*   scprreca =                  " scprreca      BC Set: BC Set record attributes
*   scprskeys =                 " scprskeys
*   scprfldv =                  " scprfldv      BC Set: Replace Field Text in Variable Fields
*   scprtext =                  " scprtext      BC Set: Short texts
*   scprpprl =                  " scprpprl      BC Sets: Hierarchical BC Sets
    .  "  SCPR_PRSET_DB_GET_ORIG_TABLES

ABAP code example for Function Module SCPR_PRSET_DB_GET_ORIG_TABLES





The ABAP code below is a full code listing to execute function module SCPR_PRSET_DB_GET_ORIG_TABLES 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).

DATA:
it_scprattr  TYPE STANDARD TABLE OF SCPRATTR,"TABLES PARAM
wa_scprattr  LIKE LINE OF it_scprattr ,
it_scprvals  TYPE STANDARD TABLE OF SCPRVALS,"TABLES PARAM
wa_scprvals  LIKE LINE OF it_scprvals ,
it_scprvall  TYPE STANDARD TABLE OF SCPRVALL,"TABLES PARAM
wa_scprvall  LIKE LINE OF it_scprvall ,
it_scprreca  TYPE STANDARD TABLE OF SCPRRECA,"TABLES PARAM
wa_scprreca  LIKE LINE OF it_scprreca ,
it_scprskeys  TYPE STANDARD TABLE OF SCPRSKEYS,"TABLES PARAM
wa_scprskeys  LIKE LINE OF it_scprskeys ,
it_scprfldv  TYPE STANDARD TABLE OF SCPRFLDV,"TABLES PARAM
wa_scprfldv  LIKE LINE OF it_scprfldv ,
it_scprtext  TYPE STANDARD TABLE OF SCPRTEXT,"TABLES PARAM
wa_scprtext  LIKE LINE OF it_scprtext ,
it_scprpprl  TYPE STANDARD TABLE OF SCPRPPRL,"TABLES PARAM
wa_scprpprl  LIKE LINE OF it_scprpprl .

DATA(ld_id) = 'Check type of data required'.
DATA(ld_version) = 'Check type of data required'.
DATA(ld_category) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_scprattr to it_scprattr.

"populate fields of struture and append to itab
append wa_scprvals to it_scprvals.

"populate fields of struture and append to itab
append wa_scprvall to it_scprvall.

"populate fields of struture and append to itab
append wa_scprreca to it_scprreca.

"populate fields of struture and append to itab
append wa_scprskeys to it_scprskeys.

"populate fields of struture and append to itab
append wa_scprfldv to it_scprfldv.

"populate fields of struture and append to itab
append wa_scprtext to it_scprtext.

"populate fields of struture and append to itab
append wa_scprpprl to it_scprpprl. . CALL FUNCTION 'SCPR_PRSET_DB_GET_ORIG_TABLES' EXPORTING id = ld_id * version = ld_version * category = ld_category * TABLES * scprattr = it_scprattr * scprvals = it_scprvals * scprvall = it_scprvall * scprreca = it_scprreca * scprskeys = it_scprskeys * scprfldv = it_scprfldv * scprtext = it_scprtext * scprpprl = it_scprpprl . " SCPR_PRSET_DB_GET_ORIG_TABLES
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

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_id  TYPE SCPR_ID ,
it_scprattr  TYPE STANDARD TABLE OF SCPRATTR ,
wa_scprattr  LIKE LINE OF it_scprattr,
ld_version  TYPE SCPR_VERS ,
it_scprvals  TYPE STANDARD TABLE OF SCPRVALS ,
wa_scprvals  LIKE LINE OF it_scprvals,
ld_category  TYPE SCPR_CTGRY ,
it_scprvall  TYPE STANDARD TABLE OF SCPRVALL ,
wa_scprvall  LIKE LINE OF it_scprvall,
it_scprreca  TYPE STANDARD TABLE OF SCPRRECA ,
wa_scprreca  LIKE LINE OF it_scprreca,
it_scprskeys  TYPE STANDARD TABLE OF SCPRSKEYS ,
wa_scprskeys  LIKE LINE OF it_scprskeys,
it_scprfldv  TYPE STANDARD TABLE OF SCPRFLDV ,
wa_scprfldv  LIKE LINE OF it_scprfldv,
it_scprtext  TYPE STANDARD TABLE OF SCPRTEXT ,
wa_scprtext  LIKE LINE OF it_scprtext,
it_scprpprl  TYPE STANDARD TABLE OF SCPRPPRL ,
wa_scprpprl  LIKE LINE OF it_scprpprl.

ld_id = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_scprattr to it_scprattr.
ld_version = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_scprvals to it_scprvals.
ld_category = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_scprvall to it_scprvall.

"populate fields of struture and append to itab
append wa_scprreca to it_scprreca.

"populate fields of struture and append to itab
append wa_scprskeys to it_scprskeys.

"populate fields of struture and append to itab
append wa_scprfldv to it_scprfldv.

"populate fields of struture and append to itab
append wa_scprtext to it_scprtext.

"populate fields of struture and append to itab
append wa_scprpprl to it_scprpprl.

Contribute (Add Comments)

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_PRSET_DB_GET_ORIG_TABLES or its description.