SAP BAPI_RSSRVAPS_SAVEDEFS Function Module for Create or Change Definitions
BAPI_RSSRVAPS_SAVEDEFS is a standard bapi rssrvaps savedefs SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Create or Change Definitions processing and below is the pattern details for this FM, 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 bapi rssrvaps savedefs FM, simply by entering the name BAPI_RSSRVAPS_SAVEDEFS into the relevant SAP transaction such as SE37 or SE38.
Function Group: 10004
Program Name: SAPL10004
Main Program: SAPL10004
Appliation area: C
Release date: 01-Dec-2000
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_RSSRVAPS_SAVEDEFS 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 'BAPI_RSSRVAPS_SAVEDEFS'"Create or Change Definitions.
EXPORTING
* COMMIT_CONTROL = 'E' "COMMIT Control
* PLANNING_VERSION = '000' "Planning Version (Operative or Simulation Version)
* NO_CREATE = "Indicator: No Creation of Object if it Does Not Exist
TABLES
* BREAKMODEL = "Structure for Break Pattern
* SHIFTFACTOR_X = "Change Parameter for Shift Factors
* SHIFTFACTOR_TEXT = "Structure for Shift Factors (Short Text)
* SHIFTFACTOR_TEXT_X = "Change Parameter for Shift Factors (Short Text)
* SHIFT = "Structure for Shift Definition
* SHIFT_X = "Change Parameter for Shift Definitions
* SHIFT_TEXT = "Structure for Shift Definitions (Short Text)
* SHIFT_TEXT_X = "Change Parameter for Shift Definitions (Short Text)
* SHIFTSEQ = "Structure for Shift Program
* SHIFTSEQ_X = "Change Parameter for API Shift Program
* SHIFTSEQ_TEXT = "Structure for Shift Program (Short Texts)
* BREAKMODEL_X = "Change Parameter: API Structure for Break Schema
* SHIFTSEQ_TEXT_X = "Change Parameter for Shift Programs (Short Texts)
* RETURN = "Return Parameter
* EXTENSION_IN = "Ref. structure for BAPI parameters ExtensionIn/ExtensionOut
* RATEMODEL = "Rate Model
* RATEMODEL_X = "Rate Model Change Parameters
* RATEMODEL_TEXT = "Rate Model Short Texts
* RATEMODEL_TEXT_X = "Rate Model Short Text Change Parameters
* BREAKMODEL_TEXT = "Structure for Break Pattern (Short Text)
* BREAKMODEL_TEXT_X = "Change Parameter for Break Pattern (Short Text)
* QUANMODEL = "Structure for Quantity/Rate Model
* QUANMODEL_X = "Change Parameter for Quantity/Rate Model
* QUANMODEL_TEXT = "Structure for Quantity/Rate Model (Short Text)
* QUANMODEL_TEXT_X = "Change Parameter for Quantity/Rate Model (Short Text)
* SHIFTFACTOR = "Structure for Shift Factors
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPL10004_001 User Exit for Method 'SaveMultiple' of Business Object BUS10004
EXIT_SAPL10004_002 User Exit for Method 'ChangeMultiple' of Business Object BUS10004
EXIT_SAPL10004_003 User Exit for Method 'GetList' of Business Object Bus10004
EXIT_SAPL10004_004 User Exit for Method 'BlockSaveMultiple' of Business Object BUS10004
EXIT_SAPL10004_005 User Exit for Method 'GetBlocks' of Business Object BUS10004
EXIT_SAPL10004_006 User Exit for Method 'GetCapacityProfile' of Business Object BUS10004
EXIT_SAPL10004_007 User Exit for Method 'GetLoad' of Business Object BUS10004
EXIT_SAPL10004_008 User Exit for Method 'SaveDefinitions' of Business Object BUS10004
EXIT_SAPL10004_009 User Exit for Method 'DeleteDefinitions' of Business Object BUS10004
EXIT_SAPL10004_010 User Exit for Method 'RemoveSubobject' of Business Object BUS10004
EXIT_SAPL10004_011 User Exit for Method 'ReadDefinitions' of Business Object BUS10004
IMPORTING Parameters details for BAPI_RSSRVAPS_SAVEDEFS
COMMIT_CONTROL - COMMIT Control
Data type: BAPI10004RSFLDS-COMMCTRLDefault: 'E'
Optional: No
Call by Reference: No ( called with pass by value option)
PLANNING_VERSION - Planning Version (Operative or Simulation Version)
Data type: BAPIGENFIELDS-VRSIOEXDefault: '000'
Optional: No
Call by Reference: No ( called with pass by value option)
NO_CREATE - Indicator: No Creation of Object if it Does Not Exist
Data type: BAPI10004RSFLDS-NO_CREATEOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_RSSRVAPS_SAVEDEFS
BREAKMODEL - Structure for Break Pattern
Data type: BAPI10004BRKMODINOptional: Yes
Call by Reference: Yes
SHIFTFACTOR_X - Change Parameter for Shift Factors
Data type: BAPI10004TIMEEFFINXOptional: Yes
Call by Reference: Yes
SHIFTFACTOR_TEXT - Structure for Shift Factors (Short Text)
Data type: BAPI10004TIMEEFFTINOptional: Yes
Call by Reference: Yes
SHIFTFACTOR_TEXT_X - Change Parameter for Shift Factors (Short Text)
Data type: BAPI10004TIMEEFFTINXOptional: Yes
Call by Reference: Yes
SHIFT - Structure for Shift Definition
Data type: BAPI10004TIMEINTINOptional: Yes
Call by Reference: Yes
SHIFT_X - Change Parameter for Shift Definitions
Data type: BAPI10004TIMEINTINXOptional: Yes
Call by Reference: Yes
SHIFT_TEXT - Structure for Shift Definitions (Short Text)
Data type: BAPI10004TIMEINTTINOptional: Yes
Call by Reference: Yes
SHIFT_TEXT_X - Change Parameter for Shift Definitions (Short Text)
Data type: BAPI10004TIMEINTTINXOptional: Yes
Call by Reference: Yes
SHIFTSEQ - Structure for Shift Program
Data type: BAPI10004TIMEMODINOptional: Yes
Call by Reference: Yes
SHIFTSEQ_X - Change Parameter for API Shift Program
Data type: BAPI10004TIMEMODINXOptional: Yes
Call by Reference: Yes
SHIFTSEQ_TEXT - Structure for Shift Program (Short Texts)
Data type: BAPI10004TIMEMODTINOptional: Yes
Call by Reference: Yes
BREAKMODEL_X - Change Parameter: API Structure for Break Schema
Data type: BAPI10004BRKMODINXOptional: Yes
Call by Reference: Yes
SHIFTSEQ_TEXT_X - Change Parameter for Shift Programs (Short Texts)
Data type: BAPI10004TIMEMODTINXOptional: Yes
Call by Reference: Yes
RETURN - Return Parameter
Data type: BAPIRET2Optional: Yes
Call by Reference: No ( called with pass by value option)
EXTENSION_IN - Ref. structure for BAPI parameters ExtensionIn/ExtensionOut
Data type: BAPIPAREXOptional: Yes
Call by Reference: Yes
RATEMODEL - Rate Model
Data type: BAPI10004RATEMODINOptional: Yes
Call by Reference: Yes
RATEMODEL_X - Rate Model Change Parameters
Data type: BAPI10004RATEMODINXOptional: Yes
Call by Reference: Yes
RATEMODEL_TEXT - Rate Model Short Texts
Data type: BAPI10004RATEMODTINOptional: Yes
Call by Reference: Yes
RATEMODEL_TEXT_X - Rate Model Short Text Change Parameters
Data type: BAPI10004RATEMODTINXOptional: Yes
Call by Reference: Yes
BREAKMODEL_TEXT - Structure for Break Pattern (Short Text)
Data type: BAPI10004BRKMODTINOptional: Yes
Call by Reference: Yes
BREAKMODEL_TEXT_X - Change Parameter for Break Pattern (Short Text)
Data type: BAPI10004BRKMODTINXOptional: Yes
Call by Reference: Yes
QUANMODEL - Structure for Quantity/Rate Model
Data type: BAPI10004QUANMODINOptional: Yes
Call by Reference: Yes
QUANMODEL_X - Change Parameter for Quantity/Rate Model
Data type: BAPI10004QUANMODINXOptional: Yes
Call by Reference: Yes
QUANMODEL_TEXT - Structure for Quantity/Rate Model (Short Text)
Data type: BAPI10004QUANMODTINOptional: Yes
Call by Reference: Yes
QUANMODEL_TEXT_X - Change Parameter for Quantity/Rate Model (Short Text)
Data type: BAPI10004QUANMODTINXOptional: Yes
Call by Reference: Yes
SHIFTFACTOR - Structure for Shift Factors
Data type: BAPI10004TIMEEFFINOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for BAPI_RSSRVAPS_SAVEDEFS 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: | ||||
| lt_breakmodel | TYPE STANDARD TABLE OF BAPI10004BRKMODIN, " | |||
| lv_commit_control | TYPE BAPI10004RSFLDS-COMMCTRL, " 'E' | |||
| lt_shiftfactor_x | TYPE STANDARD TABLE OF BAPI10004TIMEEFFINX, " | |||
| lt_shiftfactor_text | TYPE STANDARD TABLE OF BAPI10004TIMEEFFTIN, " | |||
| lt_shiftfactor_text_x | TYPE STANDARD TABLE OF BAPI10004TIMEEFFTINX, " | |||
| lt_shift | TYPE STANDARD TABLE OF BAPI10004TIMEINTIN, " | |||
| lt_shift_x | TYPE STANDARD TABLE OF BAPI10004TIMEINTINX, " | |||
| lt_shift_text | TYPE STANDARD TABLE OF BAPI10004TIMEINTTIN, " | |||
| lt_shift_text_x | TYPE STANDARD TABLE OF BAPI10004TIMEINTTINX, " | |||
| lt_shiftseq | TYPE STANDARD TABLE OF BAPI10004TIMEMODIN, " | |||
| lt_shiftseq_x | TYPE STANDARD TABLE OF BAPI10004TIMEMODINX, " | |||
| lt_shiftseq_text | TYPE STANDARD TABLE OF BAPI10004TIMEMODTIN, " | |||
| lt_breakmodel_x | TYPE STANDARD TABLE OF BAPI10004BRKMODINX, " | |||
| lv_planning_version | TYPE BAPIGENFIELDS-VRSIOEX, " '000' | |||
| lt_shiftseq_text_x | TYPE STANDARD TABLE OF BAPI10004TIMEMODTINX, " | |||
| lt_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lt_extension_in | TYPE STANDARD TABLE OF BAPIPAREX, " | |||
| lt_ratemodel | TYPE STANDARD TABLE OF BAPI10004RATEMODIN, " | |||
| lt_ratemodel_x | TYPE STANDARD TABLE OF BAPI10004RATEMODINX, " | |||
| lt_ratemodel_text | TYPE STANDARD TABLE OF BAPI10004RATEMODTIN, " | |||
| lt_ratemodel_text_x | TYPE STANDARD TABLE OF BAPI10004RATEMODTINX, " | |||
| lv_no_create | TYPE BAPI10004RSFLDS-NO_CREATE, " | |||
| lt_breakmodel_text | TYPE STANDARD TABLE OF BAPI10004BRKMODTIN, " | |||
| lt_breakmodel_text_x | TYPE STANDARD TABLE OF BAPI10004BRKMODTINX, " | |||
| lt_quanmodel | TYPE STANDARD TABLE OF BAPI10004QUANMODIN, " | |||
| lt_quanmodel_x | TYPE STANDARD TABLE OF BAPI10004QUANMODINX, " | |||
| lt_quanmodel_text | TYPE STANDARD TABLE OF BAPI10004QUANMODTIN, " | |||
| lt_quanmodel_text_x | TYPE STANDARD TABLE OF BAPI10004QUANMODTINX, " | |||
| lt_shiftfactor | TYPE STANDARD TABLE OF BAPI10004TIMEEFFIN. " |
|   CALL FUNCTION 'BAPI_RSSRVAPS_SAVEDEFS' "Create or Change Definitions |
| EXPORTING | ||
| COMMIT_CONTROL | = lv_commit_control | |
| PLANNING_VERSION | = lv_planning_version | |
| NO_CREATE | = lv_no_create | |
| TABLES | ||
| BREAKMODEL | = lt_breakmodel | |
| SHIFTFACTOR_X | = lt_shiftfactor_x | |
| SHIFTFACTOR_TEXT | = lt_shiftfactor_text | |
| SHIFTFACTOR_TEXT_X | = lt_shiftfactor_text_x | |
| SHIFT | = lt_shift | |
| SHIFT_X | = lt_shift_x | |
| SHIFT_TEXT | = lt_shift_text | |
| SHIFT_TEXT_X | = lt_shift_text_x | |
| SHIFTSEQ | = lt_shiftseq | |
| SHIFTSEQ_X | = lt_shiftseq_x | |
| SHIFTSEQ_TEXT | = lt_shiftseq_text | |
| BREAKMODEL_X | = lt_breakmodel_x | |
| SHIFTSEQ_TEXT_X | = lt_shiftseq_text_x | |
| RETURN | = lt_return | |
| EXTENSION_IN | = lt_extension_in | |
| RATEMODEL | = lt_ratemodel | |
| RATEMODEL_X | = lt_ratemodel_x | |
| RATEMODEL_TEXT | = lt_ratemodel_text | |
| RATEMODEL_TEXT_X | = lt_ratemodel_text_x | |
| BREAKMODEL_TEXT | = lt_breakmodel_text | |
| BREAKMODEL_TEXT_X | = lt_breakmodel_text_x | |
| QUANMODEL | = lt_quanmodel | |
| QUANMODEL_X | = lt_quanmodel_x | |
| QUANMODEL_TEXT | = lt_quanmodel_text | |
| QUANMODEL_TEXT_X | = lt_quanmodel_text_x | |
| SHIFTFACTOR | = lt_shiftfactor | |
| . " BAPI_RSSRVAPS_SAVEDEFS | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_RSSRVAPS_SAVEDEFS
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 COMMCTRL FROM BAPI10004RSFLDS INTO @DATA(ld_commit_control). | ||||
| DATA(ld_commit_control) | = 'E'. | |||
| "SELECT single VRSIOEX FROM BAPIGENFIELDS INTO @DATA(ld_planning_version). | ||||
| DATA(ld_planning_version) | = '000'. | |||
| "SELECT single NO_CREATE FROM BAPI10004RSFLDS INTO @DATA(ld_no_create). | ||||
Search for further information about these or an SAP related objects