SAP GRRM_API_MONTECARLO_STRUCTURE Function Module for Simulation Details for the selected Simulation
GRRM_API_MONTECARLO_STRUCTURE is a standard grrm api montecarlo structure SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Simulation Details for the selected Simulation 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 grrm api montecarlo structure FM, simply by entering the name GRRM_API_MONTECARLO_STRUCTURE into the relevant SAP transaction such as SE37 or SE38.
Function Group: GRRM_ADVANCED_ANALYTICS
Program Name: SAPLGRRM_ADVANCED_ANALYTICS
Main Program: SAPLGRRM_ADVANCED_ANALYTICS
Appliation area:
Release date: 11-Nov-2008
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function GRRM_API_MONTECARLO_STRUCTURE 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 'GRRM_API_MONTECARLO_STRUCTURE'"Simulation Details for the selected Simulation.
EXPORTING
IV_SIMULATION_ID = "Object ID
IMPORTING
EV_RETURN_CODE = "Natural number
EV_SIMULATION_DATA = "
TABLES
* ET_MESSAGES = "Error Messages
* ET_RESULT = "Table type for simulation webservice data
IMPORTING Parameters details for GRRM_API_MONTECARLO_STRUCTURE
IV_SIMULATION_ID - Object ID
Data type: GRFN_API_OBJECT_IDOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for GRRM_API_MONTECARLO_STRUCTURE
EV_RETURN_CODE - Natural number
Data type: INT4Optional: No
Call by Reference: No ( called with pass by value option)
EV_SIMULATION_DATA -
Data type: XSTRINGOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for GRRM_API_MONTECARLO_STRUCTURE
ET_MESSAGES - Error Messages
Data type: BAPIRET2_TABOptional: Yes
Call by Reference: Yes
ET_RESULT - Table type for simulation webservice data
Data type: GRRM_T_API_SIM_WEBSERVICE_DATAOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for GRRM_API_MONTECARLO_STRUCTURE 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_et_messages | TYPE STANDARD TABLE OF BAPIRET2_TAB, " | |||
| lv_ev_return_code | TYPE INT4, " | |||
| lv_iv_simulation_id | TYPE GRFN_API_OBJECT_ID, " | |||
| lt_et_result | TYPE STANDARD TABLE OF GRRM_T_API_SIM_WEBSERVICE_DATA, " | |||
| lv_ev_simulation_data | TYPE XSTRING. " |
|   CALL FUNCTION 'GRRM_API_MONTECARLO_STRUCTURE' "Simulation Details for the selected Simulation |
| EXPORTING | ||
| IV_SIMULATION_ID | = lv_iv_simulation_id | |
| IMPORTING | ||
| EV_RETURN_CODE | = lv_ev_return_code | |
| EV_SIMULATION_DATA | = lv_ev_simulation_data | |
| TABLES | ||
| ET_MESSAGES | = lt_et_messages | |
| ET_RESULT | = lt_et_result | |
| . " GRRM_API_MONTECARLO_STRUCTURE | ||
ABAP code using 7.40 inline data declarations to call FM GRRM_API_MONTECARLO_STRUCTURE
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