SAP /SAPAPO/DM_PROD_MATRES_GET Function Module for Read Resource Consumption/Materials from liveCache









/SAPAPO/DM_PROD_MATRES_GET is a standard /sapapo/dm prod matres get SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Read Resource Consumption/Materials from liveCache 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 /sapapo/dm prod matres get FM, simply by entering the name /SAPAPO/DM_PROD_MATRES_GET into the relevant SAP transaction such as SE37 or SE38.

Function Group: /SAPAPO/DM_PROD
Program Name: /SAPAPO/SAPLDM_PROD
Main Program: /SAPAPO/SAPLDM_PROD
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function /SAPAPO/DM_PROD_MATRES_GET 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 '/SAPAPO/DM_PROD_MATRES_GET'"Read Resource Consumption/Materials from liveCache
EXPORTING
IV_VERSION = "
* IV_SIMSESSION = "GUID zur Identifikation transaktionale Simulations-Session
IV_START_TIME = "
IV_END_TIME = "
IT_BUCKDF = "
IT_RESOURCES = "
IT_RESID = "
IC_DATABASE = "

CHANGING
* CT_RESMAT = "
* CT_CAP_REQS = "Tabelle mit Kapazitätsbedarfen für die Plantafelanzeige

EXCEPTIONS
LC_CONNECT_FAILED = 1 LC_COM_ERROR = 2 LC_APPL_ERROR = 3
.



IMPORTING Parameters details for /SAPAPO/DM_PROD_MATRES_GET

IV_VERSION -

Data type: /SAPAPO/MSNPIO-VERSION
Optional: No
Call by Reference: No ( called with pass by value option)

IV_SIMSESSION - GUID zur Identifikation transaktionale Simulations-Session

Data type: /SAPAPO/OM_SIMSESSION
Optional: Yes
Call by Reference: Yes

IV_START_TIME -

Data type: TZNTSTMPS
Optional: No
Call by Reference: No ( called with pass by value option)

IV_END_TIME -

Data type: TZNTSTMPS
Optional: No
Call by Reference: No ( called with pass by value option)

IT_BUCKDF -

Data type: /SAPAPO/MSNP_BUCKDF_TAB
Optional: No
Call by Reference: No ( called with pass by value option)

IT_RESOURCES -

Data type: /SAPAPO/MSNP_RESOURCES_TAB
Optional: No
Call by Reference: No ( called with pass by value option)

IT_RESID -

Data type: /SAPAPO/OM_RESID_TAB
Optional: No
Call by Reference: No ( called with pass by value option)

IC_DATABASE -

Data type: /SAPAPO/SNPDBFLAG
Optional: No
Call by Reference: No ( called with pass by value option)

CHANGING Parameters details for /SAPAPO/DM_PROD_MATRES_GET

CT_RESMAT -

Data type: /SAPAPO/MSNP_RESMAT_TAB
Optional: Yes
Call by Reference: No ( called with pass by value option)

CT_CAP_REQS - Tabelle mit Kapazitätsbedarfen für die Plantafelanzeige

Data type: /SAPAPO/OM_CAP_REQ_PT_TAB
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

LC_CONNECT_FAILED -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

LC_COM_ERROR -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

LC_APPL_ERROR -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for /SAPAPO/DM_PROD_MATRES_GET 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_ct_resmat  TYPE /SAPAPO/MSNP_RESMAT_TAB, "   
lv_iv_version  TYPE /SAPAPO/MSNPIO-VERSION, "   
lv_lc_connect_failed  TYPE /SAPAPO/MSNPIO, "   
lv_ct_cap_reqs  TYPE /SAPAPO/OM_CAP_REQ_PT_TAB, "   
lv_lc_com_error  TYPE /SAPAPO/OM_CAP_REQ_PT_TAB, "   
lv_iv_simsession  TYPE /SAPAPO/OM_SIMSESSION, "   
lv_iv_start_time  TYPE TZNTSTMPS, "   
lv_lc_appl_error  TYPE TZNTSTMPS, "   
lv_iv_end_time  TYPE TZNTSTMPS, "   
lv_it_buckdf  TYPE /SAPAPO/MSNP_BUCKDF_TAB, "   
lv_it_resources  TYPE /SAPAPO/MSNP_RESOURCES_TAB, "   
lv_it_resid  TYPE /SAPAPO/OM_RESID_TAB, "   
lv_ic_database  TYPE /SAPAPO/SNPDBFLAG. "   

  CALL FUNCTION '/SAPAPO/DM_PROD_MATRES_GET'  "Read Resource Consumption/Materials from liveCache
    EXPORTING
         IV_VERSION = lv_iv_version
         IV_SIMSESSION = lv_iv_simsession
         IV_START_TIME = lv_iv_start_time
         IV_END_TIME = lv_iv_end_time
         IT_BUCKDF = lv_it_buckdf
         IT_RESOURCES = lv_it_resources
         IT_RESID = lv_it_resid
         IC_DATABASE = lv_ic_database
    CHANGING
         CT_RESMAT = lv_ct_resmat
         CT_CAP_REQS = lv_ct_cap_reqs
    EXCEPTIONS
        LC_CONNECT_FAILED = 1
        LC_COM_ERROR = 2
        LC_APPL_ERROR = 3
. " /SAPAPO/DM_PROD_MATRES_GET




ABAP code using 7.40 inline data declarations to call FM /SAPAPO/DM_PROD_MATRES_GET

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 VERSION FROM /SAPAPO/MSNPIO INTO @DATA(ld_iv_version).
 
 
 
 
 
 
 
 
 
 
 
 


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!