SAP CMAC_EXPECT_GRDOC_EVALUATE Function Module for Create Expected Grants Evaluation Document









CMAC_EXPECT_GRDOC_EVALUATE is a standard cmac expect grdoc evaluate 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 Expected Grants Evaluation Document 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 cmac expect grdoc evaluate FM, simply by entering the name CMAC_EXPECT_GRDOC_EVALUATE into the relevant SAP transaction such as SE37 or SE38.

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



Function CMAC_EXPECT_GRDOC_EVALUATE 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 'CMAC_EXPECT_GRDOC_EVALUATE'"Create Expected Grants Evaluation Document
EXPORTING
* IV_MASSRUN = ' ' "Indicator: Mass Run
* IV_FIKEY = "Reconciliation Key for General Ledger
IS_GR_HEADER = "Grant Document Header
* IT_GR_ITEMS_TOTALS = "Grant Document Items for BRF event context

IMPORTING
ET_FIKEY = "Reconciliation Key

CHANGING
CT_GR_ITEMS = "Grant Document Items
CT_LOG_TAB = "Error Structure Table

EXCEPTIONS
NUMBER_GET_ERROR = 1 DOC_CREATE_ERROR = 2 DOC_UPDATE_ERROR = 3 BAPI_CALL_ERROR = 4
.



IMPORTING Parameters details for CMAC_EXPECT_GRDOC_EVALUATE

IV_MASSRUN - Indicator: Mass Run

Data type: CMAC_XMASSRUN
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_FIKEY - Reconciliation Key for General Ledger

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

IS_GR_HEADER - Grant Document Header

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

IT_GR_ITEMS_TOTALS - Grant Document Items for BRF event context

Data type: CMAC_GRDOC_ITEMS_TAB
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for CMAC_EXPECT_GRDOC_EVALUATE

ET_FIKEY - Reconciliation Key

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

CHANGING Parameters details for CMAC_EXPECT_GRDOC_EVALUATE

CT_GR_ITEMS - Grant Document Items

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

CT_LOG_TAB - Error Structure Table

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

EXCEPTIONS details

NUMBER_GET_ERROR - Fail to generate document number

Data type:
Optional: No
Call by Reference: Yes

DOC_CREATE_ERROR - Fail to create new document

Data type:
Optional: No
Call by Reference: Yes

DOC_UPDATE_ERROR - Fail to update old document

Data type:
Optional: No
Call by Reference: Yes

BAPI_CALL_ERROR - Fail to call the BAPI

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for CMAC_EXPECT_GRDOC_EVALUATE 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_et_fikey  TYPE CMAC_FIKEY_T, "   
lv_iv_massrun  TYPE CMAC_XMASSRUN, "   SPACE
lv_ct_gr_items  TYPE CMAC_GRDOC_ITEMS_TAB, "   
lv_number_get_error  TYPE CMAC_GRDOC_ITEMS_TAB, "   
lv_iv_fikey  TYPE FIKEY_KK, "   
lv_ct_log_tab  TYPE HRIQ_ERROR_STRUCTURE, "   
lv_doc_create_error  TYPE HRIQ_ERROR_STRUCTURE, "   
lv_is_gr_header  TYPE CMAC_GRDOC_HEADER, "   
lv_doc_update_error  TYPE CMAC_GRDOC_HEADER, "   
lv_bapi_call_error  TYPE CMAC_GRDOC_HEADER, "   
lv_it_gr_items_totals  TYPE CMAC_GRDOC_ITEMS_TAB. "   

  CALL FUNCTION 'CMAC_EXPECT_GRDOC_EVALUATE'  "Create Expected Grants Evaluation Document
    EXPORTING
         IV_MASSRUN = lv_iv_massrun
         IV_FIKEY = lv_iv_fikey
         IS_GR_HEADER = lv_is_gr_header
         IT_GR_ITEMS_TOTALS = lv_it_gr_items_totals
    IMPORTING
         ET_FIKEY = lv_et_fikey
    CHANGING
         CT_GR_ITEMS = lv_ct_gr_items
         CT_LOG_TAB = lv_ct_log_tab
    EXCEPTIONS
        NUMBER_GET_ERROR = 1
        DOC_CREATE_ERROR = 2
        DOC_UPDATE_ERROR = 3
        BAPI_CALL_ERROR = 4
. " CMAC_EXPECT_GRDOC_EVALUATE




ABAP code using 7.40 inline data declarations to call FM CMAC_EXPECT_GRDOC_EVALUATE

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.

 
DATA(ld_iv_massrun) = ' '.
 
 
 
 
 
 
 
 
 
 


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!