SAP /MRSS/OPT_OPTIMIZE_NEXT_STOPS Function Module for Optimizes the Remaining Day for a Given Resource









/MRSS/OPT_OPTIMIZE_NEXT_STOPS is a standard /mrss/opt optimize next stops SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Optimizes the Remaining Day for a Given Resource 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 /mrss/opt optimize next stops FM, simply by entering the name /MRSS/OPT_OPTIMIZE_NEXT_STOPS into the relevant SAP transaction such as SE37 or SE38.

Function Group: /MRSS/OPT_SERVICES
Program Name: /MRSS/SAPLOPT_SERVICES
Main Program: /MRSS/SAPLOPT_SERVICES
Appliation area:
Release date: 25-Mar-2011
Mode(Normal, Remote etc): Normal Function Module
Update:



Function /MRSS/OPT_OPTIMIZE_NEXT_STOPS 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 '/MRSS/OPT_OPTIMIZE_NEXT_STOPS'"Optimizes the Remaining Day for a Given Resource
EXPORTING
IV_RESOURCE_GUID = "Resource GUID
IREF_APPLICATION = "Scheduling Engine Application: Planning Board
IV_OPT_SCENARIO = "Optimization Scenario Key
IV_NOW = "Current Time

IMPORTING
EV_FAILED = "Boolean Variable
ET_MESSAGES = "Message Table
.



IMPORTING Parameters details for /MRSS/OPT_OPTIMIZE_NEXT_STOPS

IV_RESOURCE_GUID - Resource GUID

Data type: /MRSS/T_GUID
Optional: No
Call by Reference: Yes

IREF_APPLICATION - Scheduling Engine Application: Planning Board

Data type: /MRSS/CL_SGE_APPLICATION_MNT
Optional: No
Call by Reference: Yes

IV_OPT_SCENARIO - Optimization Scenario Key

Data type: /MRSS/T_OPT_SCENARIO_KEY
Optional: No
Call by Reference: Yes

IV_NOW - Current Time

Data type: TIMESTAMP
Optional: No
Call by Reference: Yes

EXPORTING Parameters details for /MRSS/OPT_OPTIMIZE_NEXT_STOPS

EV_FAILED - Boolean Variable

Data type: /MRSS/T_BOOLEAN
Optional: No
Call by Reference: Yes

ET_MESSAGES - Message Table

Data type: /MRSS/T_MESSAGE_TAB
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for /MRSS/OPT_OPTIMIZE_NEXT_STOPS 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_ev_failed  TYPE /MRSS/T_BOOLEAN, "   
lv_iv_resource_guid  TYPE /MRSS/T_GUID, "   
lv_et_messages  TYPE /MRSS/T_MESSAGE_TAB, "   
lv_iref_application  TYPE /MRSS/CL_SGE_APPLICATION_MNT, "   
lv_iv_opt_scenario  TYPE /MRSS/T_OPT_SCENARIO_KEY, "   
lv_iv_now  TYPE TIMESTAMP. "   

  CALL FUNCTION '/MRSS/OPT_OPTIMIZE_NEXT_STOPS'  "Optimizes the Remaining Day for a Given Resource
    EXPORTING
         IV_RESOURCE_GUID = lv_iv_resource_guid
         IREF_APPLICATION = lv_iref_application
         IV_OPT_SCENARIO = lv_iv_opt_scenario
         IV_NOW = lv_iv_now
    IMPORTING
         EV_FAILED = lv_ev_failed
         ET_MESSAGES = lv_et_messages
. " /MRSS/OPT_OPTIMIZE_NEXT_STOPS




ABAP code using 7.40 inline data declarations to call FM /MRSS/OPT_OPTIMIZE_NEXT_STOPS

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.

 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!