SAP ISU_GET_CONS_EXIST_CONTRACT Function Module for Sample Module: Get Consumption Values for Existing Contract









ISU_GET_CONS_EXIST_CONTRACT is a standard isu get cons exist contract SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Sample Module: Get Consumption Values for Existing Contract 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 isu get cons exist contract FM, simply by entering the name ISU_GET_CONS_EXIST_CONTRACT into the relevant SAP transaction such as SE37 or SE38.

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



Function ISU_GET_CONS_EXIST_CONTRACT 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 'ISU_GET_CONS_EXIST_CONTRACT'"Sample Module: Get Consumption Values for Existing Contract
EXPORTING
X_CONTRACT = "Contract
* X_DOC_NUMBER = 6 "Number of documents to be checked
* X_STARTDATE = SY-DATUM "Start Date
* X_FLAG_ANOTHER_TRY = 'X' "Alternative PC Determination
* X_INSTALLATION = "Installation
* X_DIVISION = "Division

IMPORTING
Y_F_NO_PREV_CONSUMP = "Indicator: No previous consumption
YT_PREV_CONSUMP_ACT = "Actual historic consumption
YT_PREV_CONSUMP_SIM = "Simulated (historic) consumption
YT_TE222 = "Table Type TE222

EXCEPTIONS
GENERAL_FAULT = 1
.



IMPORTING Parameters details for ISU_GET_CONS_EXIST_CONTRACT

X_CONTRACT - Contract

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

X_DOC_NUMBER - Number of documents to be checked

Data type: INT3
Default: 6
Optional: Yes
Call by Reference: Yes

X_STARTDATE - Start Date

Data type: E_START_DATE
Default: SY-DATUM
Optional: Yes
Call by Reference: Yes

X_FLAG_ANOTHER_TRY - Alternative PC Determination

Data type: KENNZX
Default: 'X'
Optional: Yes
Call by Reference: Yes

X_INSTALLATION - Installation

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

X_DIVISION - Division

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

EXPORTING Parameters details for ISU_GET_CONS_EXIST_CONTRACT

Y_F_NO_PREV_CONSUMP - Indicator: No previous consumption

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

YT_PREV_CONSUMP_ACT - Actual historic consumption

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

YT_PREV_CONSUMP_SIM - Simulated (historic) consumption

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

YT_TE222 - Table Type TE222

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

EXCEPTIONS details

GENERAL_FAULT - General fault

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for ISU_GET_CONS_EXIST_CONTRACT 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_x_contract  TYPE VERTRAG, "   
lv_general_fault  TYPE VERTRAG, "   
lv_y_f_no_prev_consump  TYPE KENNZX, "   
lv_x_doc_number  TYPE INT3, "   6
lv_yt_prev_consump_act  TYPE CONSUMPTION_BY_TYPE_T, "   
lv_x_startdate  TYPE E_START_DATE, "   SY-DATUM
lv_yt_prev_consump_sim  TYPE CONSUMPTION_BY_TYPE_T, "   
lv_yt_te222  TYPE ITE222, "   
lv_x_flag_another_try  TYPE KENNZX, "   'X'
lv_x_installation  TYPE ANLAGE, "   
lv_x_division  TYPE SPARTE. "   

  CALL FUNCTION 'ISU_GET_CONS_EXIST_CONTRACT'  "Sample Module: Get Consumption Values for Existing Contract
    EXPORTING
         X_CONTRACT = lv_x_contract
         X_DOC_NUMBER = lv_x_doc_number
         X_STARTDATE = lv_x_startdate
         X_FLAG_ANOTHER_TRY = lv_x_flag_another_try
         X_INSTALLATION = lv_x_installation
         X_DIVISION = lv_x_division
    IMPORTING
         Y_F_NO_PREV_CONSUMP = lv_y_f_no_prev_consump
         YT_PREV_CONSUMP_ACT = lv_yt_prev_consump_act
         YT_PREV_CONSUMP_SIM = lv_yt_prev_consump_sim
         YT_TE222 = lv_yt_te222
    EXCEPTIONS
        GENERAL_FAULT = 1
. " ISU_GET_CONS_EXIST_CONTRACT




ABAP code using 7.40 inline data declarations to call FM ISU_GET_CONS_EXIST_CONTRACT

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_x_doc_number) = 6.
 
 
DATA(ld_x_startdate) = SY-DATUM.
 
 
 
DATA(ld_x_flag_another_try) = 'X'.
 
 
 


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!