SAP Function Modules

ISU_WA_PREPARE_ORDERDOWNLOAD SAP Function module - Prepare Download of Waste Disposal Orders







ISU_WA_PREPARE_ORDERDOWNLOAD 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_WA_PREPARE_ORDERDOWNLOAD 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_WA_PREPARE_ORDERDOWNLOAD - ISU WA PREPARE ORDERDOWNLOAD





CALL FUNCTION 'ISU_WA_PREPARE_ORDERDOWNLOAD' "Prepare Download of Waste Disposal Orders
  EXPORTING
*   x_formkey =                 " efrm-formkey
*   x_formclass =               " efrm-formclass
    x_route =                   " ewaroute-route  Route Number
  IMPORTING
    y_orders =                  " isuwa_t_eorder
    y_route =                   " ewaroute      Header Table of Route
  TABLES
*   x_order =                   " efg_ranges    Structure: Select Options
*   x_area =                    " efg_ranges    Structure: Select Options
    x_period =                  " efg_ranges    Structure: Select Options
*   x_orderpos =                " efg_ranges    Structure: Select Options
*   x_range_cust1 =             " efg_ranges    Structure: Select Options
*   x_range_cust2 =             " efg_ranges    Structure: Select Options
*   x_range_cust3 =             " efg_ranges    Structure: Select Options
*   x_range_cust4 =             " efg_ranges    Structure: Select Options
  EXCEPTIONS
    GENERAL_FAULT = 1           "
    NOT_FOUND = 2               "
    .  "  ISU_WA_PREPARE_ORDERDOWNLOAD

ABAP code example for Function Module ISU_WA_PREPARE_ORDERDOWNLOAD





The ABAP code below is a full code listing to execute function module ISU_WA_PREPARE_ORDERDOWNLOAD 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_orders  TYPE ISUWA_T_EORDER ,
ld_y_route  TYPE EWAROUTE ,
it_x_order  TYPE STANDARD TABLE OF EFG_RANGES,"TABLES PARAM
wa_x_order  LIKE LINE OF it_x_order ,
it_x_area  TYPE STANDARD TABLE OF EFG_RANGES,"TABLES PARAM
wa_x_area  LIKE LINE OF it_x_area ,
it_x_period  TYPE STANDARD TABLE OF EFG_RANGES,"TABLES PARAM
wa_x_period  LIKE LINE OF it_x_period ,
it_x_orderpos  TYPE STANDARD TABLE OF EFG_RANGES,"TABLES PARAM
wa_x_orderpos  LIKE LINE OF it_x_orderpos ,
it_x_range_cust1  TYPE STANDARD TABLE OF EFG_RANGES,"TABLES PARAM
wa_x_range_cust1  LIKE LINE OF it_x_range_cust1 ,
it_x_range_cust2  TYPE STANDARD TABLE OF EFG_RANGES,"TABLES PARAM
wa_x_range_cust2  LIKE LINE OF it_x_range_cust2 ,
it_x_range_cust3  TYPE STANDARD TABLE OF EFG_RANGES,"TABLES PARAM
wa_x_range_cust3  LIKE LINE OF it_x_range_cust3 ,
it_x_range_cust4  TYPE STANDARD TABLE OF EFG_RANGES,"TABLES PARAM
wa_x_range_cust4  LIKE LINE OF it_x_range_cust4 .


SELECT single FORMKEY
FROM EFRM
INTO @DATA(ld_x_formkey).


SELECT single FORMCLASS
FROM EFRM
INTO @DATA(ld_x_formclass).


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


"populate fields of struture and append to itab
append wa_x_order to it_x_order.

"populate fields of struture and append to itab
append wa_x_area to it_x_area.

"populate fields of struture and append to itab
append wa_x_period to it_x_period.

"populate fields of struture and append to itab
append wa_x_orderpos to it_x_orderpos.

"populate fields of struture and append to itab
append wa_x_range_cust1 to it_x_range_cust1.

"populate fields of struture and append to itab
append wa_x_range_cust2 to it_x_range_cust2.

"populate fields of struture and append to itab
append wa_x_range_cust3 to it_x_range_cust3.

"populate fields of struture and append to itab
append wa_x_range_cust4 to it_x_range_cust4. . CALL FUNCTION 'ISU_WA_PREPARE_ORDERDOWNLOAD' EXPORTING * x_formkey = ld_x_formkey * x_formclass = ld_x_formclass x_route = ld_x_route IMPORTING y_orders = ld_y_orders y_route = ld_y_route TABLES * x_order = it_x_order * x_area = it_x_area x_period = it_x_period * x_orderpos = it_x_orderpos * x_range_cust1 = it_x_range_cust1 * x_range_cust2 = it_x_range_cust2 * x_range_cust3 = it_x_range_cust3 * x_range_cust4 = it_x_range_cust4 EXCEPTIONS GENERAL_FAULT = 1 NOT_FOUND = 2 . " ISU_WA_PREPARE_ORDERDOWNLOAD
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_y_orders  TYPE ISUWA_T_EORDER ,
ld_x_formkey  TYPE EFRM-FORMKEY ,
it_x_order  TYPE STANDARD TABLE OF EFG_RANGES ,
wa_x_order  LIKE LINE OF it_x_order,
ld_y_route  TYPE EWAROUTE ,
ld_x_formclass  TYPE EFRM-FORMCLASS ,
it_x_area  TYPE STANDARD TABLE OF EFG_RANGES ,
wa_x_area  LIKE LINE OF it_x_area,
ld_x_route  TYPE EWAROUTE-ROUTE ,
it_x_period  TYPE STANDARD TABLE OF EFG_RANGES ,
wa_x_period  LIKE LINE OF it_x_period,
it_x_orderpos  TYPE STANDARD TABLE OF EFG_RANGES ,
wa_x_orderpos  LIKE LINE OF it_x_orderpos,
it_x_range_cust1  TYPE STANDARD TABLE OF EFG_RANGES ,
wa_x_range_cust1  LIKE LINE OF it_x_range_cust1,
it_x_range_cust2  TYPE STANDARD TABLE OF EFG_RANGES ,
wa_x_range_cust2  LIKE LINE OF it_x_range_cust2,
it_x_range_cust3  TYPE STANDARD TABLE OF EFG_RANGES ,
wa_x_range_cust3  LIKE LINE OF it_x_range_cust3,
it_x_range_cust4  TYPE STANDARD TABLE OF EFG_RANGES ,
wa_x_range_cust4  LIKE LINE OF it_x_range_cust4.


SELECT single FORMKEY
FROM EFRM
INTO ld_x_formkey.


"populate fields of struture and append to itab
append wa_x_order to it_x_order.

SELECT single FORMCLASS
FROM EFRM
INTO ld_x_formclass.


"populate fields of struture and append to itab
append wa_x_area to it_x_area.

SELECT single ROUTE
FROM EWAROUTE
INTO ld_x_route.


"populate fields of struture and append to itab
append wa_x_period to it_x_period.

"populate fields of struture and append to itab
append wa_x_orderpos to it_x_orderpos.

"populate fields of struture and append to itab
append wa_x_range_cust1 to it_x_range_cust1.

"populate fields of struture and append to itab
append wa_x_range_cust2 to it_x_range_cust2.

"populate fields of struture and append to itab
append wa_x_range_cust3 to it_x_range_cust3.

"populate fields of struture and append to itab
append wa_x_range_cust4 to it_x_range_cust4.

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