SAP Function Modules

ISU_UNIT_PREPARE SAP Function module - Preparation of Meter Reading Unit







ISU_UNIT_PREPARE 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_UNIT_PREPARE into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM ISU_UNIT_PREPARE - ISU UNIT PREPARE





CALL FUNCTION 'ISU_UNIT_PREPARE' "Preparation of Meter Reading Unit
  EXPORTING
    x_ableinh =                 " te418-termschl
    x_adatsoll =                " te418-adatsoll  Scheduled Meter Reading Date
    x_zuorddat =                " te418-zuorddat
    x_abrdats =                 " te417-abrdats  Scheduled billing date
    x_zuorddatr =               " te417-zuorddat
    x_ablesgr =                 " te418-ablesgr  Meter Reading Reason
*   x_te418 =                   " te418
*   x_te417 =                   " te417
*   x_upd_online =              " regen-upd_online  Indicator: Update Online
*   x_no_dialog =               " regen-no_dialog  Indicator: no dialog
*   x_karenzprfg = 'X'          " regen-upd_online
*   x_ignore_prep = ' '         " regen-upd_online
*   x_gplartts = ' '            " eabld-gplartts
*   x_action =                  " isu17_meterread-contr-action
*   x_called_by_massakt = SPACE  " regen-kennzx
  IMPORTING
    y_db_update =               " regen-db_update  Indicator: data change
    y_inst_counter =            " rel01-prep_counter
    y_cont_counter =            " rel01-prep_counter
* TABLES
*   xt_range_anlage =           " ranges_anlage
* CHANGING
*   xy_obj =                    " isu17_meterread
*   xy_bp =                     " rea00-break
*   xy_count =                  " isu17_meterread_statistic
  EXCEPTIONS
    NOT_FOUND = 1               "
    FOREIGN_LOCK = 2            "
    INTERNAL_ERROR = 3          "               Internal Error
    INPUT_ERROR = 4             "               Error During Entry Check
    EXISTING = 5                "               Object Already Exists
    NUMBER_ERROR = 6            "               Error in number assignment
    GENERAL_FAULT = 7           "               General Error
    SYSTEM_ERROR = 8            "               System Error
    .  "  ISU_UNIT_PREPARE

ABAP code example for Function Module ISU_UNIT_PREPARE





The ABAP code below is a full code listing to execute function module ISU_UNIT_PREPARE 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_db_update  TYPE REGEN-DB_UPDATE ,
ld_y_inst_counter  TYPE REL01-PREP_COUNTER ,
ld_y_cont_counter  TYPE REL01-PREP_COUNTER ,
it_xt_range_anlage  TYPE STANDARD TABLE OF RANGES_ANLAGE,"TABLES PARAM
wa_xt_range_anlage  LIKE LINE OF it_xt_range_anlage .

DATA(ld_xy_obj) = 'Check type of data required'.

DATA(ld_xy_bp) = some text here
DATA(ld_xy_count) = 'Check type of data required'.

SELECT single TERMSCHL
FROM TE418
INTO @DATA(ld_x_ableinh).


SELECT single ADATSOLL
FROM TE418
INTO @DATA(ld_x_adatsoll).


SELECT single ZUORDDAT
FROM TE418
INTO @DATA(ld_x_zuorddat).


SELECT single ABRDATS
FROM TE417
INTO @DATA(ld_x_abrdats).


SELECT single ZUORDDAT
FROM TE417
INTO @DATA(ld_x_zuorddatr).


SELECT single ABLESGR
FROM TE418
INTO @DATA(ld_x_ablesgr).

DATA(ld_x_te418) = 'Check type of data required'.
DATA(ld_x_te417) = 'Check type of data required'.

DATA(ld_x_upd_online) = some text here

DATA(ld_x_no_dialog) = some text here

DATA(ld_x_karenzprfg) = some text here

DATA(ld_x_ignore_prep) = some text here

DATA(ld_x_gplartts) = some text here

DATA(ld_x_action) = some text here

DATA(ld_x_called_by_massakt) = some text here

"populate fields of struture and append to itab
append wa_xt_range_anlage to it_xt_range_anlage. . CALL FUNCTION 'ISU_UNIT_PREPARE' EXPORTING x_ableinh = ld_x_ableinh x_adatsoll = ld_x_adatsoll x_zuorddat = ld_x_zuorddat x_abrdats = ld_x_abrdats x_zuorddatr = ld_x_zuorddatr x_ablesgr = ld_x_ablesgr * x_te418 = ld_x_te418 * x_te417 = ld_x_te417 * x_upd_online = ld_x_upd_online * x_no_dialog = ld_x_no_dialog * x_karenzprfg = ld_x_karenzprfg * x_ignore_prep = ld_x_ignore_prep * x_gplartts = ld_x_gplartts * x_action = ld_x_action * x_called_by_massakt = ld_x_called_by_massakt IMPORTING y_db_update = ld_y_db_update y_inst_counter = ld_y_inst_counter y_cont_counter = ld_y_cont_counter * TABLES * xt_range_anlage = it_xt_range_anlage * CHANGING * xy_obj = ld_xy_obj * xy_bp = ld_xy_bp * xy_count = ld_xy_count EXCEPTIONS NOT_FOUND = 1 FOREIGN_LOCK = 2 INTERNAL_ERROR = 3 INPUT_ERROR = 4 EXISTING = 5 NUMBER_ERROR = 6 GENERAL_FAULT = 7 SYSTEM_ERROR = 8 . " ISU_UNIT_PREPARE
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 ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 8. "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_xy_obj  TYPE ISU17_METERREAD ,
ld_y_db_update  TYPE REGEN-DB_UPDATE ,
ld_x_ableinh  TYPE TE418-TERMSCHL ,
it_xt_range_anlage  TYPE STANDARD TABLE OF RANGES_ANLAGE ,
wa_xt_range_anlage  LIKE LINE OF it_xt_range_anlage,
ld_xy_bp  TYPE REA00-BREAK ,
ld_y_inst_counter  TYPE REL01-PREP_COUNTER ,
ld_x_adatsoll  TYPE TE418-ADATSOLL ,
ld_xy_count  TYPE ISU17_METERREAD_STATISTIC ,
ld_y_cont_counter  TYPE REL01-PREP_COUNTER ,
ld_x_zuorddat  TYPE TE418-ZUORDDAT ,
ld_x_abrdats  TYPE TE417-ABRDATS ,
ld_x_zuorddatr  TYPE TE417-ZUORDDAT ,
ld_x_ablesgr  TYPE TE418-ABLESGR ,
ld_x_te418  TYPE TE418 ,
ld_x_te417  TYPE TE417 ,
ld_x_upd_online  TYPE REGEN-UPD_ONLINE ,
ld_x_no_dialog  TYPE REGEN-NO_DIALOG ,
ld_x_karenzprfg  TYPE REGEN-UPD_ONLINE ,
ld_x_ignore_prep  TYPE REGEN-UPD_ONLINE ,
ld_x_gplartts  TYPE EABLD-GPLARTTS ,
ld_x_action  TYPE ISU17_METERREAD-CONTR-ACTION ,
ld_x_called_by_massakt  TYPE REGEN-KENNZX .

ld_xy_obj = 'Check type of data required'.

SELECT single TERMSCHL
FROM TE418
INTO ld_x_ableinh.


"populate fields of struture and append to itab
append wa_xt_range_anlage to it_xt_range_anlage.

ld_xy_bp = some text here

SELECT single ADATSOLL
FROM TE418
INTO ld_x_adatsoll.

ld_xy_count = 'Check type of data required'.

SELECT single ZUORDDAT
FROM TE418
INTO ld_x_zuorddat.


SELECT single ABRDATS
FROM TE417
INTO ld_x_abrdats.


SELECT single ZUORDDAT
FROM TE417
INTO ld_x_zuorddatr.


SELECT single ABLESGR
FROM TE418
INTO ld_x_ablesgr.

ld_x_te418 = 'Check type of data required'.
ld_x_te417 = 'Check type of data required'.

ld_x_upd_online = some text here

ld_x_no_dialog = some text here

ld_x_karenzprfg = some text here

ld_x_ignore_prep = some text here

ld_x_gplartts = some text here

ld_x_action = some text here

ld_x_called_by_massakt = some text here

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_UNIT_PREPARE or its description.