SAP Function Modules

SCPR_PRSET_MN_BCSET_SAVE SAP Function module







SCPR_PRSET_MN_BCSET_SAVE 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_MN_BCSET_SAVE 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_MN_BCSET_SAVE - SCPR PRSET MN BCSET SAVE





CALL FUNCTION 'SCPR_PRSET_MN_BCSET_SAVE' "
  EXPORTING
    profid =                    " scprattr-id
    proftext =                  " scprtext-text
*   category = SPACE            " scprattr-category
*   cli_dep = SPACE             " scprattr-cli_dep
*   cli_cas = SPACE             " scprattr-cli_cas
*   reftype = SPACE             " scprattr-reftype
*   refname = SPACE             " scprattr-refname
    orgid =                     " scprattr-orgid
    component =                 " scprattr-component  SW Component
    minrelease =                " scprattr-minrelease  Valid from Release
    maxrelease =                " scprattr-maxrelease  Valid to Release
*   act_info = SPACE            " scprattr-act_info
*   with_transp_insert = 'X'    " c
*   with_progress_indicator =   " c
  IMPORTING
    data_modified =             " c
  TABLES
    subprofs =                  " scproprof
*   texts =                     " scprtext
  EXCEPTIONS
    USER_ABORT = 1              "               Processing Cancelled
    ERROR_IN_TRANSPORT_LAYER = 2  "             Transport Layer Error
    .  "  SCPR_PRSET_MN_BCSET_SAVE

ABAP code example for Function Module SCPR_PRSET_MN_BCSET_SAVE





The ABAP code below is a full code listing to execute function module SCPR_PRSET_MN_BCSET_SAVE 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:
ld_data_modified  TYPE C ,
it_subprofs  TYPE STANDARD TABLE OF SCPROPROF,"TABLES PARAM
wa_subprofs  LIKE LINE OF it_subprofs ,
it_texts  TYPE STANDARD TABLE OF SCPRTEXT,"TABLES PARAM
wa_texts  LIKE LINE OF it_texts .


SELECT single ID
FROM SCPRATTR
INTO @DATA(ld_profid).


SELECT single TEXT
FROM SCPRTEXT
INTO @DATA(ld_proftext).


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 ORGID
FROM SCPRATTR
INTO @DATA(ld_orgid).


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 ACT_INFO
FROM SCPRATTR
INTO @DATA(ld_act_info).

DATA(ld_with_transp_insert) = 'Check type of data required'.
DATA(ld_with_progress_indicator) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_subprofs to it_subprofs.

"populate fields of struture and append to itab
append wa_texts to it_texts. . CALL FUNCTION 'SCPR_PRSET_MN_BCSET_SAVE' EXPORTING profid = ld_profid proftext = ld_proftext * category = ld_category * cli_dep = ld_cli_dep * cli_cas = ld_cli_cas * reftype = ld_reftype * refname = ld_refname orgid = ld_orgid component = ld_component minrelease = ld_minrelease maxrelease = ld_maxrelease * act_info = ld_act_info * with_transp_insert = ld_with_transp_insert * with_progress_indicator = ld_with_progress_indicator IMPORTING data_modified = ld_data_modified TABLES subprofs = it_subprofs * texts = it_texts EXCEPTIONS USER_ABORT = 1 ERROR_IN_TRANSPORT_LAYER = 2 . " SCPR_PRSET_MN_BCSET_SAVE
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 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_data_modified  TYPE C ,
ld_profid  TYPE SCPRATTR-ID ,
it_subprofs  TYPE STANDARD TABLE OF SCPROPROF ,
wa_subprofs  LIKE LINE OF it_subprofs,
ld_proftext  TYPE SCPRTEXT-TEXT ,
it_texts  TYPE STANDARD TABLE OF SCPRTEXT ,
wa_texts  LIKE LINE OF it_texts,
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_orgid  TYPE SCPRATTR-ORGID ,
ld_component  TYPE SCPRATTR-COMPONENT ,
ld_minrelease  TYPE SCPRATTR-MINRELEASE ,
ld_maxrelease  TYPE SCPRATTR-MAXRELEASE ,
ld_act_info  TYPE SCPRATTR-ACT_INFO ,
ld_with_transp_insert  TYPE C ,
ld_with_progress_indicator  TYPE C .


SELECT single ID
FROM SCPRATTR
INTO ld_profid.


"populate fields of struture and append to itab
append wa_subprofs to it_subprofs.

SELECT single TEXT
FROM SCPRTEXT
INTO ld_proftext.


"populate fields of struture and append to itab
append wa_texts to it_texts.

SELECT single CATEGORY
FROM SCPRATTR
INTO ld_category.


SELECT single CLI_DEP
FROM SCPRATTR
INTO ld_cli_dep.


SELECT single CLI_CAS
FROM SCPRATTR
INTO ld_cli_cas.


SELECT single REFTYPE
FROM SCPRATTR
INTO ld_reftype.


SELECT single REFNAME
FROM SCPRATTR
INTO ld_refname.


SELECT single ORGID
FROM SCPRATTR
INTO ld_orgid.


SELECT single COMPONENT
FROM SCPRATTR
INTO ld_component.


SELECT single MINRELEASE
FROM SCPRATTR
INTO ld_minrelease.


SELECT single MAXRELEASE
FROM SCPRATTR
INTO ld_maxrelease.


SELECT single ACT_INFO
FROM SCPRATTR
INTO ld_act_info.

ld_with_transp_insert = 'Check type of data required'.
ld_with_progress_indicator = 'Check type of data required'.

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