SAP Function Modules

ISU_BILLING_DATA_COLLECTION SAP Function module - INTERNAL: Determine Contracts for All Billing Selection Conditions







ISU_BILLING_DATA_COLLECTION is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name ISU_BILLING_DATA_COLLECTION into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: EA02
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM ISU_BILLING_DATA_COLLECTION - ISU BILLING DATA COLLECTION





CALL FUNCTION 'ISU_BILLING_DATA_COLLECTION' "INTERNAL: Determine Contracts for All Billing Selection Conditions
* EXPORTING
*   x_maxcount = 0              " regen-maxcount  Counter
*   x_actual =                  " regen-actual
*   x_abrvorg =                 " ebisid-abrvorg  Billing Transaction
*   x_sparte =                  " ebisid-sparte  Division
*   x_bukrs =                   " ebisid-bukrs  Company Code
*   x_abrdats =                 " ebisid-abrdats  Billing Target Date
*   x_ab =                      " erchz-ab      Date from which period consumption is valid
*   x_simulation =              " erch-simulation  Indicator: billing simulation
*   x_use_instal =              " regen-kennzx
*   x_massmode =                " regen-kennzx
*   x_preptoo =                 " kennzx        Indicator
  IMPORTING
    y_count =                   " erchz-lratestep
* TABLES
*   xt_contract =               " isu_ranges
*   xt_instal =                 " isu_ranges
*   xt_vkont =                  " isu_ranges
*   xt_portion =                " isu_ranges
*   xt_abrvorg =                " isu_ranges
*   xt_sparte =                 " isu_ranges
*   xt_bukrs =                  " isu_ranges
*   yt_ever =                   " ever
*   yt_etrg =                   " etrg          Billing Order
*   yt_etrg_del_inst =          " etrg
*   yt_ever_billfinit =         " ever          IS-U Contract
  EXCEPTIONS
    NO_CONTRACT_FOUND = 1       "
    NO_TRIGGER_FOUND = 2        "
    SYSTEM_ERROR = 3            "               System Error
    GENERAL_FAULT = 4           "               General Error
    .  "  ISU_BILLING_DATA_COLLECTION

ABAP code example for Function Module ISU_BILLING_DATA_COLLECTION





The ABAP code below is a full code listing to execute function module ISU_BILLING_DATA_COLLECTION including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_y_count  TYPE ERCHZ-LRATESTEP ,
it_xt_contract  TYPE STANDARD TABLE OF ISU_RANGES,"TABLES PARAM
wa_xt_contract  LIKE LINE OF it_xt_contract ,
it_xt_instal  TYPE STANDARD TABLE OF ISU_RANGES,"TABLES PARAM
wa_xt_instal  LIKE LINE OF it_xt_instal ,
it_xt_vkont  TYPE STANDARD TABLE OF ISU_RANGES,"TABLES PARAM
wa_xt_vkont  LIKE LINE OF it_xt_vkont ,
it_xt_portion  TYPE STANDARD TABLE OF ISU_RANGES,"TABLES PARAM
wa_xt_portion  LIKE LINE OF it_xt_portion ,
it_xt_abrvorg  TYPE STANDARD TABLE OF ISU_RANGES,"TABLES PARAM
wa_xt_abrvorg  LIKE LINE OF it_xt_abrvorg ,
it_xt_sparte  TYPE STANDARD TABLE OF ISU_RANGES,"TABLES PARAM
wa_xt_sparte  LIKE LINE OF it_xt_sparte ,
it_xt_bukrs  TYPE STANDARD TABLE OF ISU_RANGES,"TABLES PARAM
wa_xt_bukrs  LIKE LINE OF it_xt_bukrs ,
it_yt_ever  TYPE STANDARD TABLE OF EVER,"TABLES PARAM
wa_yt_ever  LIKE LINE OF it_yt_ever ,
it_yt_etrg  TYPE STANDARD TABLE OF ETRG,"TABLES PARAM
wa_yt_etrg  LIKE LINE OF it_yt_etrg ,
it_yt_etrg_del_inst  TYPE STANDARD TABLE OF ETRG,"TABLES PARAM
wa_yt_etrg_del_inst  LIKE LINE OF it_yt_etrg_del_inst ,
it_yt_ever_billfinit  TYPE STANDARD TABLE OF EVER,"TABLES PARAM
wa_yt_ever_billfinit  LIKE LINE OF it_yt_ever_billfinit .


DATA(ld_x_maxcount) = 123

DATA(ld_x_actual) = some text here

DATA(ld_x_abrvorg) = some text here

DATA(ld_x_sparte) = some text here

DATA(ld_x_bukrs) = some text here

DATA(ld_x_abrdats) = 20210129

DATA(ld_x_ab) = 20210129

SELECT single SIMULATION
FROM ERCH
INTO @DATA(ld_x_simulation).


DATA(ld_x_use_instal) = some text here

DATA(ld_x_massmode) = some text here
DATA(ld_x_preptoo) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_xt_contract to it_xt_contract.

"populate fields of struture and append to itab
append wa_xt_instal to it_xt_instal.

"populate fields of struture and append to itab
append wa_xt_vkont to it_xt_vkont.

"populate fields of struture and append to itab
append wa_xt_portion to it_xt_portion.

"populate fields of struture and append to itab
append wa_xt_abrvorg to it_xt_abrvorg.

"populate fields of struture and append to itab
append wa_xt_sparte to it_xt_sparte.

"populate fields of struture and append to itab
append wa_xt_bukrs to it_xt_bukrs.

"populate fields of struture and append to itab
append wa_yt_ever to it_yt_ever.

"populate fields of struture and append to itab
append wa_yt_etrg to it_yt_etrg.

"populate fields of struture and append to itab
append wa_yt_etrg_del_inst to it_yt_etrg_del_inst.

"populate fields of struture and append to itab
append wa_yt_ever_billfinit to it_yt_ever_billfinit. . CALL FUNCTION 'ISU_BILLING_DATA_COLLECTION' * EXPORTING * x_maxcount = ld_x_maxcount * x_actual = ld_x_actual * x_abrvorg = ld_x_abrvorg * x_sparte = ld_x_sparte * x_bukrs = ld_x_bukrs * x_abrdats = ld_x_abrdats * x_ab = ld_x_ab * x_simulation = ld_x_simulation * x_use_instal = ld_x_use_instal * x_massmode = ld_x_massmode * x_preptoo = ld_x_preptoo IMPORTING y_count = ld_y_count * TABLES * xt_contract = it_xt_contract * xt_instal = it_xt_instal * xt_vkont = it_xt_vkont * xt_portion = it_xt_portion * xt_abrvorg = it_xt_abrvorg * xt_sparte = it_xt_sparte * xt_bukrs = it_xt_bukrs * yt_ever = it_yt_ever * yt_etrg = it_yt_etrg * yt_etrg_del_inst = it_yt_etrg_del_inst * yt_ever_billfinit = it_yt_ever_billfinit EXCEPTIONS NO_CONTRACT_FOUND = 1 NO_TRIGGER_FOUND = 2 SYSTEM_ERROR = 3 GENERAL_FAULT = 4 . " ISU_BILLING_DATA_COLLECTION
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_y_count  TYPE ERCHZ-LRATESTEP ,
ld_x_maxcount  TYPE REGEN-MAXCOUNT ,
it_xt_contract  TYPE STANDARD TABLE OF ISU_RANGES ,
wa_xt_contract  LIKE LINE OF it_xt_contract,
it_xt_instal  TYPE STANDARD TABLE OF ISU_RANGES ,
wa_xt_instal  LIKE LINE OF it_xt_instal,
ld_x_actual  TYPE REGEN-ACTUAL ,
it_xt_vkont  TYPE STANDARD TABLE OF ISU_RANGES ,
wa_xt_vkont  LIKE LINE OF it_xt_vkont,
ld_x_abrvorg  TYPE EBISID-ABRVORG ,
ld_x_sparte  TYPE EBISID-SPARTE ,
it_xt_portion  TYPE STANDARD TABLE OF ISU_RANGES ,
wa_xt_portion  LIKE LINE OF it_xt_portion,
ld_x_bukrs  TYPE EBISID-BUKRS ,
it_xt_abrvorg  TYPE STANDARD TABLE OF ISU_RANGES ,
wa_xt_abrvorg  LIKE LINE OF it_xt_abrvorg,
ld_x_abrdats  TYPE EBISID-ABRDATS ,
it_xt_sparte  TYPE STANDARD TABLE OF ISU_RANGES ,
wa_xt_sparte  LIKE LINE OF it_xt_sparte,
ld_x_ab  TYPE ERCHZ-AB ,
it_xt_bukrs  TYPE STANDARD TABLE OF ISU_RANGES ,
wa_xt_bukrs  LIKE LINE OF it_xt_bukrs,
ld_x_simulation  TYPE ERCH-SIMULATION ,
it_yt_ever  TYPE STANDARD TABLE OF EVER ,
wa_yt_ever  LIKE LINE OF it_yt_ever,
ld_x_use_instal  TYPE REGEN-KENNZX ,
it_yt_etrg  TYPE STANDARD TABLE OF ETRG ,
wa_yt_etrg  LIKE LINE OF it_yt_etrg,
ld_x_massmode  TYPE REGEN-KENNZX ,
it_yt_etrg_del_inst  TYPE STANDARD TABLE OF ETRG ,
wa_yt_etrg_del_inst  LIKE LINE OF it_yt_etrg_del_inst,
ld_x_preptoo  TYPE KENNZX ,
it_yt_ever_billfinit  TYPE STANDARD TABLE OF EVER ,
wa_yt_ever_billfinit  LIKE LINE OF it_yt_ever_billfinit.


ld_x_maxcount = 123

"populate fields of struture and append to itab
append wa_xt_contract to it_xt_contract.

"populate fields of struture and append to itab
append wa_xt_instal to it_xt_instal.

ld_x_actual = some text here

"populate fields of struture and append to itab
append wa_xt_vkont to it_xt_vkont.

ld_x_abrvorg = some text here

ld_x_sparte = some text here

"populate fields of struture and append to itab
append wa_xt_portion to it_xt_portion.

ld_x_bukrs = some text here

"populate fields of struture and append to itab
append wa_xt_abrvorg to it_xt_abrvorg.

ld_x_abrdats = 20210129

"populate fields of struture and append to itab
append wa_xt_sparte to it_xt_sparte.

ld_x_ab = 20210129

"populate fields of struture and append to itab
append wa_xt_bukrs to it_xt_bukrs.

SELECT single SIMULATION
FROM ERCH
INTO ld_x_simulation.


"populate fields of struture and append to itab
append wa_yt_ever to it_yt_ever.

ld_x_use_instal = some text here

"populate fields of struture and append to itab
append wa_yt_etrg to it_yt_etrg.

ld_x_massmode = some text here

"populate fields of struture and append to itab
append wa_yt_etrg_del_inst to it_yt_etrg_del_inst.
ld_x_preptoo = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_yt_ever_billfinit to it_yt_ever_billfinit.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name ISU_BILLING_DATA_COLLECTION or its description.