SAP SCPR_TEMPL_MN_TEMPLATE_SAVE Function Module for
SCPR_TEMPL_MN_TEMPLATE_SAVE is a standard scpr templ mn template save 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 templ mn template save FM, simply by entering the name SCPR_TEMPL_MN_TEMPLATE_SAVE into the relevant SAP transaction such as SE37 or SE38.
Function Group: SCPRTM
Program Name: SAPLSCPRTM
Main Program: SAPLSCPRTM
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function SCPR_TEMPL_MN_TEMPLATE_SAVE 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_TEMPL_MN_TEMPLATE_SAVE'".
EXPORTING
PROFID = "
MINRELEASE = "Valid from Release
MAXRELEASE = "Valid to Release
* ACT_INFO = ' ' "
* BCSET_TYPE = 'TMV' "
* FLDTXTVAR_SUPPLIED = ' ' "General text length 20
* WITH_TRANSP_INSERT = 'X' "
* WITH_COMMIT = 'X' "
* WITH_PROGRESS_INDICATOR = "
* REMOVE_DENIED_DATA = ' ' "
* ASK_FOR_CONT_AFTER_REMOVE = ' ' "
PROFTEXT = "
* P_RECNR_ADJUST = ' ' "
* VALUES_VALUESL_COMPLETE = ' ' "
* CATEGORY = ' ' "
* CLI_DEP = ' ' "
* CLI_CAS = ' ' "
* REFTYPE = ' ' "
* REFNAME = ' ' "
ORGID = "
* COMPONENT = "SW Component
IMPORTING
DATA_MODIFIED = "
ACTION_RESULTS = "
TABLES
VALUES = "
* VALUESL = "BC Set: Values (language-dependent)
RECATTR = "Data Record Attributes
* FIELDDESCRS = "Field Descriptions
* IT_FLDV = "BC Set: Replace Field Text in Variable Fields
* TEXTS = "
EXCEPTIONS
USER_ABORT = 1 ERROR_IN_TRANSPORT_LAYER = 2 INCONSISTENT_DATA = 3 DATABASE_ERROR = 4
IMPORTING Parameters details for SCPR_TEMPL_MN_TEMPLATE_SAVE
PROFID -
Data type: SCPRATTR-IDOptional: No
Call by Reference: No ( called with pass by value option)
MINRELEASE - Valid from Release
Data type: SCPRATTR-MINRELEASEOptional: No
Call by Reference: No ( called with pass by value option)
MAXRELEASE - Valid to Release
Data type: SCPRATTR-MAXRELEASEOptional: No
Call by Reference: No ( called with pass by value option)
ACT_INFO -
Data type: SCPRATTR-ACT_INFODefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
BCSET_TYPE -
Data type: SCPRATTR-TYPEDefault: 'TMV'
Optional: Yes
Call by Reference: No ( called with pass by value option)
FLDTXTVAR_SUPPLIED - General text length 20
Data type: SCPR_TXT20Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_TRANSP_INSERT -
Data type: CDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_COMMIT -
Data type: CDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_PROGRESS_INDICATOR -
Data type: COptional: Yes
Call by Reference: No ( called with pass by value option)
REMOVE_DENIED_DATA -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ASK_FOR_CONT_AFTER_REMOVE -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PROFTEXT -
Data type: SCPRTEXT-TEXTOptional: No
Call by Reference: No ( called with pass by value option)
P_RECNR_ADJUST -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
VALUES_VALUESL_COMPLETE -
Data type: CDefault: ' '
Optional: No
Call by Reference: No ( called with pass by value option)
CATEGORY -
Data type: SCPRATTR-CATEGORYDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
CLI_DEP -
Data type: SCPRATTR-CLI_DEPDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
CLI_CAS -
Data type: SCPRATTR-CLI_CASDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
REFTYPE -
Data type: SCPRATTR-REFTYPEDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
REFNAME -
Data type: SCPRATTR-REFNAMEDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
ORGID -
Data type: SCPRATTR-ORGIDOptional: No
Call by Reference: No ( called with pass by value option)
COMPONENT - SW Component
Data type: SCPRATTR-COMPONENTOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for SCPR_TEMPL_MN_TEMPLATE_SAVE
DATA_MODIFIED -
Data type: COptional: No
Call by Reference: No ( called with pass by value option)
ACTION_RESULTS -
Data type: SCP1_GENERAL_ERRORSOptional: No
Call by Reference: Yes
TABLES Parameters details for SCPR_TEMPL_MN_TEMPLATE_SAVE
VALUES -
Data type: SCPRVALSOptional: No
Call by Reference: No ( called with pass by value option)
VALUESL - BC Set: Values (language-dependent)
Data type: SCPRVALLOptional: Yes
Call by Reference: Yes
RECATTR - Data Record Attributes
Data type: SCPRRECAOptional: No
Call by Reference: Yes
FIELDDESCRS - Field Descriptions
Data type: SCPR_RECORDSOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_FLDV - BC Set: Replace Field Text in Variable Fields
Data type: SCPRFLDVOptional: Yes
Call by Reference: Yes
TEXTS -
Data type: SCPRTEXTOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
USER_ABORT - Processing Cancelled
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_IN_TRANSPORT_LAYER - Transport Layer Error
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INCONSISTENT_DATA -
Data type:Optional: No
Call by Reference: Yes
DATABASE_ERROR -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for SCPR_TEMPL_MN_TEMPLATE_SAVE 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_values | TYPE STANDARD TABLE OF SCPRVALS, " | |||
| lv_user_abort | TYPE SCPRVALS, " | |||
| lv_data_modified | TYPE C, " | |||
| lv_minrelease | TYPE SCPRATTR-MINRELEASE, " | |||
| lv_maxrelease | TYPE SCPRATTR-MAXRELEASE, " | |||
| lv_act_info | TYPE SCPRATTR-ACT_INFO, " ' ' | |||
| lv_bcset_type | TYPE SCPRATTR-TYPE, " 'TMV' | |||
| lv_fldtxtvar_supplied | TYPE SCPR_TXT20, " ' ' | |||
| lv_with_transp_insert | TYPE C, " 'X' | |||
| lv_with_commit | TYPE C, " 'X' | |||
| lv_with_progress_indicator | TYPE C, " | |||
| lv_remove_denied_data | TYPE C, " SPACE | |||
| lv_ask_for_cont_after_remove | TYPE C, " SPACE | |||
| lt_valuesl | TYPE STANDARD TABLE OF SCPRVALL, " | |||
| lv_proftext | TYPE SCPRTEXT-TEXT, " | |||
| lv_action_results | TYPE SCP1_GENERAL_ERRORS, " | |||
| lv_error_in_transport_layer | TYPE SCP1_GENERAL_ERRORS, " | |||
| lv_p_recnr_adjust | TYPE C, " SPACE | |||
| lv_values_valuesl_complete | TYPE C, " ' ' | |||
| lt_recattr | TYPE STANDARD TABLE OF SCPRRECA, " | |||
| lv_category | TYPE SCPRATTR-CATEGORY, " ' ' | |||
| lv_inconsistent_data | TYPE SCPRATTR, " | |||
| lv_cli_dep | TYPE SCPRATTR-CLI_DEP, " ' ' | |||
| lt_fielddescrs | TYPE STANDARD TABLE OF SCPR_RECORDS, " | |||
| lv_database_error | TYPE SCPR_RECORDS, " | |||
| lv_cli_cas | TYPE SCPRATTR-CLI_CAS, " ' ' | |||
| lt_it_fldv | TYPE STANDARD TABLE OF SCPRFLDV, " | |||
| lt_texts | TYPE STANDARD TABLE OF SCPRTEXT, " | |||
| lv_reftype | TYPE SCPRATTR-REFTYPE, " ' ' | |||
| lv_refname | TYPE SCPRATTR-REFNAME, " ' ' | |||
| lv_orgid | TYPE SCPRATTR-ORGID, " | |||
| lv_component | TYPE SCPRATTR-COMPONENT. " |
|   CALL FUNCTION 'SCPR_TEMPL_MN_TEMPLATE_SAVE' " |
| EXPORTING | ||
| PROFID | = lv_profid | |
| MINRELEASE | = lv_minrelease | |
| MAXRELEASE | = lv_maxrelease | |
| ACT_INFO | = lv_act_info | |
| BCSET_TYPE | = lv_bcset_type | |
| FLDTXTVAR_SUPPLIED | = lv_fldtxtvar_supplied | |
| WITH_TRANSP_INSERT | = lv_with_transp_insert | |
| WITH_COMMIT | = lv_with_commit | |
| WITH_PROGRESS_INDICATOR | = lv_with_progress_indicator | |
| REMOVE_DENIED_DATA | = lv_remove_denied_data | |
| ASK_FOR_CONT_AFTER_REMOVE | = lv_ask_for_cont_after_remove | |
| PROFTEXT | = lv_proftext | |
| P_RECNR_ADJUST | = lv_p_recnr_adjust | |
| VALUES_VALUESL_COMPLETE | = lv_values_valuesl_complete | |
| CATEGORY | = lv_category | |
| CLI_DEP | = lv_cli_dep | |
| CLI_CAS | = lv_cli_cas | |
| REFTYPE | = lv_reftype | |
| REFNAME | = lv_refname | |
| ORGID | = lv_orgid | |
| COMPONENT | = lv_component | |
| IMPORTING | ||
| DATA_MODIFIED | = lv_data_modified | |
| ACTION_RESULTS | = lv_action_results | |
| TABLES | ||
| VALUES | = lt_values | |
| VALUESL | = lt_valuesl | |
| RECATTR | = lt_recattr | |
| FIELDDESCRS | = lt_fielddescrs | |
| IT_FLDV | = lt_it_fldv | |
| TEXTS | = lt_texts | |
| EXCEPTIONS | ||
| USER_ABORT = 1 | ||
| ERROR_IN_TRANSPORT_LAYER = 2 | ||
| INCONSISTENT_DATA = 3 | ||
| DATABASE_ERROR = 4 | ||
| . " SCPR_TEMPL_MN_TEMPLATE_SAVE | ||
ABAP code using 7.40 inline data declarations to call FM SCPR_TEMPL_MN_TEMPLATE_SAVE
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 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_act_info) | = ' '. | |||
| "SELECT single TYPE FROM SCPRATTR INTO @DATA(ld_bcset_type). | ||||
| DATA(ld_bcset_type) | = 'TMV'. | |||
| DATA(ld_fldtxtvar_supplied) | = ' '. | |||
| DATA(ld_with_transp_insert) | = 'X'. | |||
| DATA(ld_with_commit) | = 'X'. | |||
| DATA(ld_remove_denied_data) | = ' '. | |||
| DATA(ld_ask_for_cont_after_remove) | = ' '. | |||
| "SELECT single TEXT FROM SCPRTEXT INTO @DATA(ld_proftext). | ||||
| DATA(ld_p_recnr_adjust) | = ' '. | |||
| DATA(ld_values_valuesl_complete) | = ' '. | |||
| "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). | ||||
| DATA(ld_refname) | = ' '. | |||
| "SELECT single ORGID FROM SCPRATTR INTO @DATA(ld_orgid). | ||||
| "SELECT single COMPONENT FROM SCPRATTR INTO @DATA(ld_component). | ||||
Search for further information about these or an SAP related objects