SAP Function Modules

ISU_PREPARE_ORDER SAP Function module - Prepares Processing of Waste Disposal Orders







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

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


Pattern for FM ISU_PREPARE_ORDER - ISU PREPARE ORDER





CALL FUNCTION 'ISU_PREPARE_ORDER' "Prepares Processing of Waste Disposal Orders
  EXPORTING
*   x_order =                   " ewa_order_head-ordernr  Internal ID of Waste Disposal Order
*   x_wmode =                   " regen-wmode   Processing Mode (1 = Display, 2 = Change, 3 = Create...)
*   x_upd_online =              " regen-upd_online  Update online
*   x_no_dialog =               " regen-no_dialog  Suppress maintenance screens
*   x_route =                   " ewaobjh-route  Route Number
    x_from =                    " sy-datum      Date and Time, Current (Application Server) Date
*   x_to =                      " sy-datum      Date and Time, Current (Application Server) Date
*   x_anlage =                  " ewaobj-anlage  Installation
*   x_sdaufnr =                 " ser02-sdaufnr  Sales Document
*   x_container =               " equi-equnr    Equipment Number
*   x_servloc =                 " ewaobj-servloc  Location of Container
*   x_smorder =                 " t_isuwa_sorder
*   x_bulk_order =              " isuwa_bulk_order  Transfer Structure for Data on Bulk Refuse Order
*   x_log_handle =              " balloghndl    Application Log: Log Handle
*   x_simulation = SPACE        " kennzx        Indicator
*   x_obj_status =              " cl_isu_wa_dispsl_order_common  General Methods for Managing Waste Disposal Orders
*   x_wdo_bpem =                " cl_isu_wa_order_bpem  BPEM Waste Disposal Order
  IMPORTING
    y_order =                   " isu_order_dates  Structure of Waste Disposal Order Dates
* TABLES
*   yt_orders =                 " isu_order_dates  Structure of Waste Disposal Order Dates
*   xt_routes =                 " isu_ranges    Structure: Select Options
*   xt_code =                   " isu_ranges    Structure: Select Options
*   xt_area =                   " isu_ranges    Structure: Select Options
*   xt_servfreq =               " v_ewaobj      Generated Table for View &
* CHANGING
*   xy_obj =                    " isuwa_order
*   xy_bulk_order =             " isuwa_bulk_order  Transfer Structure for Data on Bulk Refuse Order
  EXCEPTIONS
    NOT_FOUND = 1               "
    SYSTEM_ERROR = 2            "
    .  "  ISU_PREPARE_ORDER

ABAP code example for Function Module ISU_PREPARE_ORDER





The ABAP code below is a full code listing to execute function module ISU_PREPARE_ORDER 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_order  TYPE ISU_ORDER_DATES ,
it_yt_orders  TYPE STANDARD TABLE OF ISU_ORDER_DATES,"TABLES PARAM
wa_yt_orders  LIKE LINE OF it_yt_orders ,
it_xt_routes  TYPE STANDARD TABLE OF ISU_RANGES,"TABLES PARAM
wa_xt_routes  LIKE LINE OF it_xt_routes ,
it_xt_code  TYPE STANDARD TABLE OF ISU_RANGES,"TABLES PARAM
wa_xt_code  LIKE LINE OF it_xt_code ,
it_xt_area  TYPE STANDARD TABLE OF ISU_RANGES,"TABLES PARAM
wa_xt_area  LIKE LINE OF it_xt_area ,
it_xt_servfreq  TYPE STANDARD TABLE OF V_EWAOBJ,"TABLES PARAM
wa_xt_servfreq  LIKE LINE OF it_xt_servfreq .

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

SELECT single ORDERNR
FROM EWA_ORDER_HEAD
INTO @DATA(ld_x_order).


DATA(ld_x_wmode) = some text here

DATA(ld_x_upd_online) = some text here

DATA(ld_x_no_dialog) = some text here

SELECT single ROUTE
FROM EWAOBJH
INTO @DATA(ld_x_route).

DATA(ld_x_from) = '20210129'.
DATA(ld_x_to) = '20210129'.

SELECT single ANLAGE
FROM EWAOBJ
INTO @DATA(ld_x_anlage).


SELECT single SDAUFNR
FROM SER02
INTO @DATA(ld_x_sdaufnr).


SELECT single EQUNR
FROM EQUI
INTO @DATA(ld_x_container).


SELECT single SERVLOC
FROM EWAOBJ
INTO @DATA(ld_x_servloc).

DATA(ld_x_smorder) = '20210129'.
DATA(ld_x_bulk_order) = '20210129'.
DATA(ld_x_log_handle) = '20210129'.
DATA(ld_x_simulation) = '20210129'.
DATA(ld_x_obj_status) = '20210129'.
DATA(ld_x_wdo_bpem) = '20210129'.

"populate fields of struture and append to itab
append wa_yt_orders to it_yt_orders.

"populate fields of struture and append to itab
append wa_xt_routes to it_xt_routes.

"populate fields of struture and append to itab
append wa_xt_code to it_xt_code.

"populate fields of struture and append to itab
append wa_xt_area to it_xt_area.

"populate fields of struture and append to itab
append wa_xt_servfreq to it_xt_servfreq. . CALL FUNCTION 'ISU_PREPARE_ORDER' EXPORTING * x_order = ld_x_order * x_wmode = ld_x_wmode * x_upd_online = ld_x_upd_online * x_no_dialog = ld_x_no_dialog * x_route = ld_x_route x_from = ld_x_from * x_to = ld_x_to * x_anlage = ld_x_anlage * x_sdaufnr = ld_x_sdaufnr * x_container = ld_x_container * x_servloc = ld_x_servloc * x_smorder = ld_x_smorder * x_bulk_order = ld_x_bulk_order * x_log_handle = ld_x_log_handle * x_simulation = ld_x_simulation * x_obj_status = ld_x_obj_status * x_wdo_bpem = ld_x_wdo_bpem IMPORTING y_order = ld_y_order * TABLES * yt_orders = it_yt_orders * xt_routes = it_xt_routes * xt_code = it_xt_code * xt_area = it_xt_area * xt_servfreq = it_xt_servfreq * CHANGING * xy_obj = ld_xy_obj * xy_bulk_order = ld_xy_bulk_order EXCEPTIONS NOT_FOUND = 1 SYSTEM_ERROR = 2 . " ISU_PREPARE_ORDER
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 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 ISUWA_ORDER ,
ld_y_order  TYPE ISU_ORDER_DATES ,
ld_x_order  TYPE EWA_ORDER_HEAD-ORDERNR ,
it_yt_orders  TYPE STANDARD TABLE OF ISU_ORDER_DATES ,
wa_yt_orders  LIKE LINE OF it_yt_orders,
ld_xy_bulk_order  TYPE ISUWA_BULK_ORDER ,
ld_x_wmode  TYPE REGEN-WMODE ,
it_xt_routes  TYPE STANDARD TABLE OF ISU_RANGES ,
wa_xt_routes  LIKE LINE OF it_xt_routes,
ld_x_upd_online  TYPE REGEN-UPD_ONLINE ,
it_xt_code  TYPE STANDARD TABLE OF ISU_RANGES ,
wa_xt_code  LIKE LINE OF it_xt_code,
ld_x_no_dialog  TYPE REGEN-NO_DIALOG ,
it_xt_area  TYPE STANDARD TABLE OF ISU_RANGES ,
wa_xt_area  LIKE LINE OF it_xt_area,
ld_x_route  TYPE EWAOBJH-ROUTE ,
it_xt_servfreq  TYPE STANDARD TABLE OF V_EWAOBJ ,
wa_xt_servfreq  LIKE LINE OF it_xt_servfreq,
ld_x_from  TYPE SY-DATUM ,
ld_x_to  TYPE SY-DATUM ,
ld_x_anlage  TYPE EWAOBJ-ANLAGE ,
ld_x_sdaufnr  TYPE SER02-SDAUFNR ,
ld_x_container  TYPE EQUI-EQUNR ,
ld_x_servloc  TYPE EWAOBJ-SERVLOC ,
ld_x_smorder  TYPE T_ISUWA_SORDER ,
ld_x_bulk_order  TYPE ISUWA_BULK_ORDER ,
ld_x_log_handle  TYPE BALLOGHNDL ,
ld_x_simulation  TYPE KENNZX ,
ld_x_obj_status  TYPE CL_ISU_WA_DISPSL_ORDER_COMMON ,
ld_x_wdo_bpem  TYPE CL_ISU_WA_ORDER_BPEM .

ld_xy_obj = '20210129'.

SELECT single ORDERNR
FROM EWA_ORDER_HEAD
INTO ld_x_order.


"populate fields of struture and append to itab
append wa_yt_orders to it_yt_orders.
ld_xy_bulk_order = '20210129'.

ld_x_wmode = some text here

"populate fields of struture and append to itab
append wa_xt_routes to it_xt_routes.

ld_x_upd_online = some text here

"populate fields of struture and append to itab
append wa_xt_code to it_xt_code.

ld_x_no_dialog = some text here

"populate fields of struture and append to itab
append wa_xt_area to it_xt_area.

SELECT single ROUTE
FROM EWAOBJH
INTO ld_x_route.


"populate fields of struture and append to itab
append wa_xt_servfreq to it_xt_servfreq.
ld_x_from = '20210129'.
ld_x_to = '20210129'.

SELECT single ANLAGE
FROM EWAOBJ
INTO ld_x_anlage.


SELECT single SDAUFNR
FROM SER02
INTO ld_x_sdaufnr.


SELECT single EQUNR
FROM EQUI
INTO ld_x_container.


SELECT single SERVLOC
FROM EWAOBJ
INTO ld_x_servloc.

ld_x_smorder = '20210129'.
ld_x_bulk_order = '20210129'.
ld_x_log_handle = '20210129'.
ld_x_simulation = '20210129'.
ld_x_obj_status = '20210129'.
ld_x_wdo_bpem = '20210129'.

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