SAP AGG_DATA_M Function Module for Aggregated data for a single supplier in multiple time periods (month)









AGG_DATA_M is a standard agg data m SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Aggregated data for a single supplier in multiple time periods (month) 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 agg data m FM, simply by entering the name AGG_DATA_M into the relevant SAP transaction such as SE37 or SE38.

Function Group: RSBCTSDPR_EXPORT
Program Name: SAPLRSBCTSDPR_EXPORT
Main Program: SAPLRSBCTSDPR_EXPORT
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function AGG_DATA_M 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 'AGG_DATA_M'"Aggregated data for a single supplier in multiple time periods (month)
IMPORTING
PV_QUERYCUBE = "Cube name

TABLES
PARAMETER_OF_SELECTION = "name value pairs
PT_MDX_STATEMENT = "MDX Statement

EXCEPTIONS
ERROR_CONVERTING_TIME_FORMAT = 1 ERROR_WHEN_GETTING_VAR_INFO = 2 WRONG_PARAM_COUNT_FOR_RANGE = 3 MANDATORY_VAR_IS_EMPTY = 4
.



EXPORTING Parameters details for AGG_DATA_M

PV_QUERYCUBE - Cube name

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

TABLES Parameters details for AGG_DATA_M

PARAMETER_OF_SELECTION - name value pairs

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

PT_MDX_STATEMENT - MDX Statement

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

EXCEPTIONS details

ERROR_CONVERTING_TIME_FORMAT - Time Format is incorrect

Data type:
Optional: No
Call by Reference: Yes

ERROR_WHEN_GETTING_VAR_INFO - Error when reading variables

Data type:
Optional: No
Call by Reference: Yes

WRONG_PARAM_COUNT_FOR_RANGE - correct param count is 1 or 2

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

MANDATORY_VAR_IS_EMPTY - no value for mandatory var available

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

Copy and paste ABAP code example for AGG_DATA_M 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_pv_querycube  TYPE RRTCUBE, "   
lt_parameter_of_selection  TYPE STANDARD TABLE OF RSBCTSDPR_T_NAME_VALUE_IOBJ, "   
lv_error_converting_time_format  TYPE RSBCTSDPR_T_NAME_VALUE_IOBJ, "   
lt_pt_mdx_statement  TYPE STANDARD TABLE OF BAPI6111MDX, "   
lv_error_when_getting_var_info  TYPE BAPI6111MDX, "   
lv_wrong_param_count_for_range  TYPE BAPI6111MDX, "   
lv_mandatory_var_is_empty  TYPE BAPI6111MDX. "   

  CALL FUNCTION 'AGG_DATA_M'  "Aggregated data for a single supplier in multiple time periods (month)
    IMPORTING
         PV_QUERYCUBE = lv_pv_querycube
    TABLES
         PARAMETER_OF_SELECTION = lt_parameter_of_selection
         PT_MDX_STATEMENT = lt_pt_mdx_statement
    EXCEPTIONS
        ERROR_CONVERTING_TIME_FORMAT = 1
        ERROR_WHEN_GETTING_VAR_INFO = 2
        WRONG_PARAM_COUNT_FOR_RANGE = 3
        MANDATORY_VAR_IS_EMPTY = 4
. " AGG_DATA_M




ABAP code using 7.40 inline data declarations to call FM AGG_DATA_M

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!