SAP Function Modules

IWOA_NOTIFICATION_USAGE SAP Function module - PM Notification archiving: Usage test







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

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


Pattern for FM IWOA_NOTIFICATION_USAGE - IWOA NOTIFICATION USAGE





CALL FUNCTION 'IWOA_NOTIFICATION_USAGE' "PM Notification archiving: Usage test
  EXPORTING
    i_qmtyp =                   " tq80-qmtyp    Notification cat. "01,02,03"
*   i_status = 'I0167'          " jest-stat
*   i_days =                    " iwoa_days
* TABLES
*   i_qmart =                   " iwoa_rqmart   Notification type
*   i_qmnum =                   " iwoa_rqmnum   Notification Number
*   i_equnr =                   " iwoa_requnr   Equipment Number
*   i_tplnr =                   " iwoa_rtplnr   Functional location
*   i_matnr =                   " iwoa_rmatnr
*   i_mawerk =                  " iwoa_rmawerk
*   i_kunum =                   " iwoa_rkunum
*   i_auswirk =                 " iwoa_rauswirk
*   i_selc =                    " iwoa_selc     Selection table
    .  "  IWOA_NOTIFICATION_USAGE

ABAP code example for Function Module IWOA_NOTIFICATION_USAGE





The ABAP code below is a full code listing to execute function module IWOA_NOTIFICATION_USAGE 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:
it_i_qmart  TYPE STANDARD TABLE OF IWOA_RQMART,"TABLES PARAM
wa_i_qmart  LIKE LINE OF it_i_qmart ,
it_i_qmnum  TYPE STANDARD TABLE OF IWOA_RQMNUM,"TABLES PARAM
wa_i_qmnum  LIKE LINE OF it_i_qmnum ,
it_i_equnr  TYPE STANDARD TABLE OF IWOA_REQUNR,"TABLES PARAM
wa_i_equnr  LIKE LINE OF it_i_equnr ,
it_i_tplnr  TYPE STANDARD TABLE OF IWOA_RTPLNR,"TABLES PARAM
wa_i_tplnr  LIKE LINE OF it_i_tplnr ,
it_i_matnr  TYPE STANDARD TABLE OF IWOA_RMATNR,"TABLES PARAM
wa_i_matnr  LIKE LINE OF it_i_matnr ,
it_i_mawerk  TYPE STANDARD TABLE OF IWOA_RMAWERK,"TABLES PARAM
wa_i_mawerk  LIKE LINE OF it_i_mawerk ,
it_i_kunum  TYPE STANDARD TABLE OF IWOA_RKUNUM,"TABLES PARAM
wa_i_kunum  LIKE LINE OF it_i_kunum ,
it_i_auswirk  TYPE STANDARD TABLE OF IWOA_RAUSWIRK,"TABLES PARAM
wa_i_auswirk  LIKE LINE OF it_i_auswirk ,
it_i_selc  TYPE STANDARD TABLE OF IWOA_SELC,"TABLES PARAM
wa_i_selc  LIKE LINE OF it_i_selc .


SELECT single QMTYP
FROM TQ80
INTO @DATA(ld_i_qmtyp).


SELECT single STAT
FROM JEST
INTO @DATA(ld_i_status).

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

"populate fields of struture and append to itab
append wa_i_qmart to it_i_qmart.

"populate fields of struture and append to itab
append wa_i_qmnum to it_i_qmnum.

"populate fields of struture and append to itab
append wa_i_equnr to it_i_equnr.

"populate fields of struture and append to itab
append wa_i_tplnr to it_i_tplnr.

"populate fields of struture and append to itab
append wa_i_matnr to it_i_matnr.

"populate fields of struture and append to itab
append wa_i_mawerk to it_i_mawerk.

"populate fields of struture and append to itab
append wa_i_kunum to it_i_kunum.

"populate fields of struture and append to itab
append wa_i_auswirk to it_i_auswirk.

"populate fields of struture and append to itab
append wa_i_selc to it_i_selc. . CALL FUNCTION 'IWOA_NOTIFICATION_USAGE' EXPORTING i_qmtyp = ld_i_qmtyp * i_status = ld_i_status * i_days = ld_i_days * TABLES * i_qmart = it_i_qmart * i_qmnum = it_i_qmnum * i_equnr = it_i_equnr * i_tplnr = it_i_tplnr * i_matnr = it_i_matnr * i_mawerk = it_i_mawerk * i_kunum = it_i_kunum * i_auswirk = it_i_auswirk * i_selc = it_i_selc . " IWOA_NOTIFICATION_USAGE
IF SY-SUBRC EQ 0. "All OK 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_i_qmtyp  TYPE TQ80-QMTYP ,
it_i_qmart  TYPE STANDARD TABLE OF IWOA_RQMART ,
wa_i_qmart  LIKE LINE OF it_i_qmart,
ld_i_status  TYPE JEST-STAT ,
it_i_qmnum  TYPE STANDARD TABLE OF IWOA_RQMNUM ,
wa_i_qmnum  LIKE LINE OF it_i_qmnum,
ld_i_days  TYPE IWOA_DAYS ,
it_i_equnr  TYPE STANDARD TABLE OF IWOA_REQUNR ,
wa_i_equnr  LIKE LINE OF it_i_equnr,
it_i_tplnr  TYPE STANDARD TABLE OF IWOA_RTPLNR ,
wa_i_tplnr  LIKE LINE OF it_i_tplnr,
it_i_matnr  TYPE STANDARD TABLE OF IWOA_RMATNR ,
wa_i_matnr  LIKE LINE OF it_i_matnr,
it_i_mawerk  TYPE STANDARD TABLE OF IWOA_RMAWERK ,
wa_i_mawerk  LIKE LINE OF it_i_mawerk,
it_i_kunum  TYPE STANDARD TABLE OF IWOA_RKUNUM ,
wa_i_kunum  LIKE LINE OF it_i_kunum,
it_i_auswirk  TYPE STANDARD TABLE OF IWOA_RAUSWIRK ,
wa_i_auswirk  LIKE LINE OF it_i_auswirk,
it_i_selc  TYPE STANDARD TABLE OF IWOA_SELC ,
wa_i_selc  LIKE LINE OF it_i_selc.


SELECT single QMTYP
FROM TQ80
INTO ld_i_qmtyp.


"populate fields of struture and append to itab
append wa_i_qmart to it_i_qmart.

SELECT single STAT
FROM JEST
INTO ld_i_status.


"populate fields of struture and append to itab
append wa_i_qmnum to it_i_qmnum.
ld_i_days = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_equnr to it_i_equnr.

"populate fields of struture and append to itab
append wa_i_tplnr to it_i_tplnr.

"populate fields of struture and append to itab
append wa_i_matnr to it_i_matnr.

"populate fields of struture and append to itab
append wa_i_mawerk to it_i_mawerk.

"populate fields of struture and append to itab
append wa_i_kunum to it_i_kunum.

"populate fields of struture and append to itab
append wa_i_auswirk to it_i_auswirk.

"populate fields of struture and append to itab
append wa_i_selc to it_i_selc.

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