SAP Function Modules

WTAD_ADDI_SUPPLIER_SEARCH SAP Function module







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

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


Pattern for FM WTAD_ADDI_SUPPLIER_SEARCH - WTAD ADDI SUPPLIER SEARCH





CALL FUNCTION 'WTAD_ADDI_SUPPLIER_SEARCH' "
  EXPORTING
    fi_additional =             " mara-matnr
*   fi_addibelnr =              " wtadab-addibelnr
*   fi_addiposnr =              " wtadab-addiposnr
*   fi_addistunr =              " wtadab-addistunr
*   fi_addilfdnr =              " wtadab-lfdnr
*   fi_error_proc = ' '         " twtfma-addipoact
*   fi_lifnr =                  " lfa1-lifnr
*   fi_lifnr_ekorg =            " t024e-ekorg
*   fi_addi_ekorg =             " t024e-ekorg
*   fi_werks =                  " t001w-werks
  TABLES
    fet_additional_sources =    " src_determ
  EXCEPTIONS
    ADDITIONAL_IS_NO_ADDITIONAL = 1  "
    NO_ADDITIONAL_SUPPLIER_FOUND = 2  "
    SUPPLIER_HAS_NO_ADDI_PARTNERS = 3  "
    ADDI_SUPPLIER_NOT_FOR_LIFNR = 4  "
    .  "  WTAD_ADDI_SUPPLIER_SEARCH

ABAP code example for Function Module WTAD_ADDI_SUPPLIER_SEARCH





The ABAP code below is a full code listing to execute function module WTAD_ADDI_SUPPLIER_SEARCH 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_fet_additional_sources  TYPE STANDARD TABLE OF SRC_DETERM,"TABLES PARAM
wa_fet_additional_sources  LIKE LINE OF it_fet_additional_sources .


SELECT single MATNR
FROM MARA
INTO @DATA(ld_fi_additional).


SELECT single ADDIBELNR
FROM WTADAB
INTO @DATA(ld_fi_addibelnr).


SELECT single ADDIPOSNR
FROM WTADAB
INTO @DATA(ld_fi_addiposnr).


SELECT single ADDISTUNR
FROM WTADAB
INTO @DATA(ld_fi_addistunr).


SELECT single LFDNR
FROM WTADAB
INTO @DATA(ld_fi_addilfdnr).


SELECT single ADDIPOACT
FROM TWTFMA
INTO @DATA(ld_fi_error_proc).


SELECT single LIFNR
FROM LFA1
INTO @DATA(ld_fi_lifnr).


SELECT single EKORG
FROM T024E
INTO @DATA(ld_fi_lifnr_ekorg).


SELECT single EKORG
FROM T024E
INTO @DATA(ld_fi_addi_ekorg).


SELECT single WERKS
FROM T001W
INTO @DATA(ld_fi_werks).


"populate fields of struture and append to itab
append wa_fet_additional_sources to it_fet_additional_sources. . CALL FUNCTION 'WTAD_ADDI_SUPPLIER_SEARCH' EXPORTING fi_additional = ld_fi_additional * fi_addibelnr = ld_fi_addibelnr * fi_addiposnr = ld_fi_addiposnr * fi_addistunr = ld_fi_addistunr * fi_addilfdnr = ld_fi_addilfdnr * fi_error_proc = ld_fi_error_proc * fi_lifnr = ld_fi_lifnr * fi_lifnr_ekorg = ld_fi_lifnr_ekorg * fi_addi_ekorg = ld_fi_addi_ekorg * fi_werks = ld_fi_werks TABLES fet_additional_sources = it_fet_additional_sources EXCEPTIONS ADDITIONAL_IS_NO_ADDITIONAL = 1 NO_ADDITIONAL_SUPPLIER_FOUND = 2 SUPPLIER_HAS_NO_ADDI_PARTNERS = 3 ADDI_SUPPLIER_NOT_FOR_LIFNR = 4 . " WTAD_ADDI_SUPPLIER_SEARCH
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 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_fi_additional  TYPE MARA-MATNR ,
it_fet_additional_sources  TYPE STANDARD TABLE OF SRC_DETERM ,
wa_fet_additional_sources  LIKE LINE OF it_fet_additional_sources,
ld_fi_addibelnr  TYPE WTADAB-ADDIBELNR ,
ld_fi_addiposnr  TYPE WTADAB-ADDIPOSNR ,
ld_fi_addistunr  TYPE WTADAB-ADDISTUNR ,
ld_fi_addilfdnr  TYPE WTADAB-LFDNR ,
ld_fi_error_proc  TYPE TWTFMA-ADDIPOACT ,
ld_fi_lifnr  TYPE LFA1-LIFNR ,
ld_fi_lifnr_ekorg  TYPE T024E-EKORG ,
ld_fi_addi_ekorg  TYPE T024E-EKORG ,
ld_fi_werks  TYPE T001W-WERKS .


SELECT single MATNR
FROM MARA
INTO ld_fi_additional.


"populate fields of struture and append to itab
append wa_fet_additional_sources to it_fet_additional_sources.

SELECT single ADDIBELNR
FROM WTADAB
INTO ld_fi_addibelnr.


SELECT single ADDIPOSNR
FROM WTADAB
INTO ld_fi_addiposnr.


SELECT single ADDISTUNR
FROM WTADAB
INTO ld_fi_addistunr.


SELECT single LFDNR
FROM WTADAB
INTO ld_fi_addilfdnr.


SELECT single ADDIPOACT
FROM TWTFMA
INTO ld_fi_error_proc.


SELECT single LIFNR
FROM LFA1
INTO ld_fi_lifnr.


SELECT single EKORG
FROM T024E
INTO ld_fi_lifnr_ekorg.


SELECT single EKORG
FROM T024E
INTO ld_fi_addi_ekorg.


SELECT single WERKS
FROM T001W
INTO ld_fi_werks.

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