WTAD_READ_ADDI_4_MATNR 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 WTAD_READ_ADDI_4_MATNR into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
AEMM
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'WTAD_READ_ADDI_4_MATNR' "
* EXPORTING
* matnr = " mara-matnr
* flag_addiprass_always = 'X' " c
* flag_addiprass_promo_only = 'X' " c
* flag_addiprass_promo_never = 'X' " c
* read_flag = 'M' " c
* read_mamt = ' ' " c
* read_variants = 'X' " c
* aktnr = " wakh-aktnr
* promo_date = " sy-datum
* fi_sm_transaction = '000' " twzla-keytr
* fi_plant = " t001w-werks
* fi_quantity = " mseg-menge
* fi_unit_of_measure = " t006-msehi
* fi_addi_application = '' " twtctrl-addiappl
* fi_sd_doc = " vbak-vbeln
* fi_itm_number = " vbap-posnr
* fi_sd_doc_cat = " vbtyp
* fi_sd_ref_copy = " xfeld
* i_no_expl_sart = SPACE " c
* TABLES
* iwtaddi = " wtaddi
* iwtaddi_pr = " addi_wtaddi_pr
* imamt = " mamt
* imara = " mara
* fet_matnrs_and_quant = " wsos_stuli
* fet_wtadab = " wtadab
* fet_wtadabt = " wtadabt
EXCEPTIONS
WRONG_CALL = 1 "
DB_ERROR = 2 "
. " WTAD_READ_ADDI_4_MATNR
The ABAP code below is a full code listing to execute function module WTAD_READ_ADDI_4_MATNR 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).
| it_iwtaddi | TYPE STANDARD TABLE OF WTADDI,"TABLES PARAM |
| wa_iwtaddi | LIKE LINE OF it_iwtaddi , |
| it_iwtaddi_pr | TYPE STANDARD TABLE OF ADDI_WTADDI_PR,"TABLES PARAM |
| wa_iwtaddi_pr | LIKE LINE OF it_iwtaddi_pr , |
| it_imamt | TYPE STANDARD TABLE OF MAMT,"TABLES PARAM |
| wa_imamt | LIKE LINE OF it_imamt , |
| it_imara | TYPE STANDARD TABLE OF MARA,"TABLES PARAM |
| wa_imara | LIKE LINE OF it_imara , |
| it_fet_matnrs_and_quant | TYPE STANDARD TABLE OF WSOS_STULI,"TABLES PARAM |
| wa_fet_matnrs_and_quant | LIKE LINE OF it_fet_matnrs_and_quant , |
| it_fet_wtadab | TYPE STANDARD TABLE OF WTADAB,"TABLES PARAM |
| wa_fet_wtadab | LIKE LINE OF it_fet_wtadab , |
| it_fet_wtadabt | TYPE STANDARD TABLE OF WTADABT,"TABLES PARAM |
| wa_fet_wtadabt | LIKE LINE OF it_fet_wtadabt . |
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_matnr | TYPE MARA-MATNR , |
| it_iwtaddi | TYPE STANDARD TABLE OF WTADDI , |
| wa_iwtaddi | LIKE LINE OF it_iwtaddi, |
| ld_flag_addiprass_always | TYPE C , |
| it_iwtaddi_pr | TYPE STANDARD TABLE OF ADDI_WTADDI_PR , |
| wa_iwtaddi_pr | LIKE LINE OF it_iwtaddi_pr, |
| ld_flag_addiprass_promo_only | TYPE C , |
| it_imamt | TYPE STANDARD TABLE OF MAMT , |
| wa_imamt | LIKE LINE OF it_imamt, |
| ld_flag_addiprass_promo_never | TYPE C , |
| it_imara | TYPE STANDARD TABLE OF MARA , |
| wa_imara | LIKE LINE OF it_imara, |
| ld_read_flag | TYPE C , |
| it_fet_matnrs_and_quant | TYPE STANDARD TABLE OF WSOS_STULI , |
| wa_fet_matnrs_and_quant | LIKE LINE OF it_fet_matnrs_and_quant, |
| ld_read_mamt | TYPE C , |
| it_fet_wtadab | TYPE STANDARD TABLE OF WTADAB , |
| wa_fet_wtadab | LIKE LINE OF it_fet_wtadab, |
| ld_read_variants | TYPE C , |
| it_fet_wtadabt | TYPE STANDARD TABLE OF WTADABT , |
| wa_fet_wtadabt | LIKE LINE OF it_fet_wtadabt, |
| ld_aktnr | TYPE WAKH-AKTNR , |
| ld_promo_date | TYPE SY-DATUM , |
| ld_fi_sm_transaction | TYPE TWZLA-KEYTR , |
| ld_fi_plant | TYPE T001W-WERKS , |
| ld_fi_quantity | TYPE MSEG-MENGE , |
| ld_fi_unit_of_measure | TYPE T006-MSEHI , |
| ld_fi_addi_application | TYPE TWTCTRL-ADDIAPPL , |
| ld_fi_sd_doc | TYPE VBAK-VBELN , |
| ld_fi_itm_number | TYPE VBAP-POSNR , |
| ld_fi_sd_doc_cat | TYPE VBTYP , |
| ld_fi_sd_ref_copy | TYPE XFELD , |
| ld_i_no_expl_sart | TYPE C . |
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 WTAD_READ_ADDI_4_MATNR or its description.