SAP Function Modules

WAUF_ALLOCATION_TABLE_READ SAP Function module







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

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


Pattern for FM WAUF_ALLOCATION_TABLE_READ - WAUF ALLOCATION TABLE READ





CALL FUNCTION 'WAUF_ALLOCATION_TABLE_READ' "
  EXPORTING
    im_abeln =                  " auko-abeln
*   im_puffer_umgehen = SPACE   " rw00a-vbukz
  IMPORTING
    ex_auko =                   " rw00a
  TABLES
    im_ex_aupo =                " rw01a
    im_ex_aufg =                " rw03a
    im_ex_aufi =                " rw04a
    im_ex_aulw =                " rw14a
    im_ex_ausb =                " rw15a
*   im_ex_auvw =                " rw13a
*   im_ex_auvz =                " rw11a
    im_ex_auvt =                " rw16a
  EXCEPTIONS
    NO_ABELN = 1                "
    .  "  WAUF_ALLOCATION_TABLE_READ

ABAP code example for Function Module WAUF_ALLOCATION_TABLE_READ





The ABAP code below is a full code listing to execute function module WAUF_ALLOCATION_TABLE_READ 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_ex_auko  TYPE RW00A ,
it_im_ex_aupo  TYPE STANDARD TABLE OF RW01A,"TABLES PARAM
wa_im_ex_aupo  LIKE LINE OF it_im_ex_aupo ,
it_im_ex_aufg  TYPE STANDARD TABLE OF RW03A,"TABLES PARAM
wa_im_ex_aufg  LIKE LINE OF it_im_ex_aufg ,
it_im_ex_aufi  TYPE STANDARD TABLE OF RW04A,"TABLES PARAM
wa_im_ex_aufi  LIKE LINE OF it_im_ex_aufi ,
it_im_ex_aulw  TYPE STANDARD TABLE OF RW14A,"TABLES PARAM
wa_im_ex_aulw  LIKE LINE OF it_im_ex_aulw ,
it_im_ex_ausb  TYPE STANDARD TABLE OF RW15A,"TABLES PARAM
wa_im_ex_ausb  LIKE LINE OF it_im_ex_ausb ,
it_im_ex_auvw  TYPE STANDARD TABLE OF RW13A,"TABLES PARAM
wa_im_ex_auvw  LIKE LINE OF it_im_ex_auvw ,
it_im_ex_auvz  TYPE STANDARD TABLE OF RW11A,"TABLES PARAM
wa_im_ex_auvz  LIKE LINE OF it_im_ex_auvz ,
it_im_ex_auvt  TYPE STANDARD TABLE OF RW16A,"TABLES PARAM
wa_im_ex_auvt  LIKE LINE OF it_im_ex_auvt .


SELECT single ABELN
FROM AUKO
INTO @DATA(ld_im_abeln).


DATA(ld_im_puffer_umgehen) = some text here

"populate fields of struture and append to itab
append wa_im_ex_aupo to it_im_ex_aupo.

"populate fields of struture and append to itab
append wa_im_ex_aufg to it_im_ex_aufg.

"populate fields of struture and append to itab
append wa_im_ex_aufi to it_im_ex_aufi.

"populate fields of struture and append to itab
append wa_im_ex_aulw to it_im_ex_aulw.

"populate fields of struture and append to itab
append wa_im_ex_ausb to it_im_ex_ausb.

"populate fields of struture and append to itab
append wa_im_ex_auvw to it_im_ex_auvw.

"populate fields of struture and append to itab
append wa_im_ex_auvz to it_im_ex_auvz.

"populate fields of struture and append to itab
append wa_im_ex_auvt to it_im_ex_auvt. . CALL FUNCTION 'WAUF_ALLOCATION_TABLE_READ' EXPORTING im_abeln = ld_im_abeln * im_puffer_umgehen = ld_im_puffer_umgehen IMPORTING ex_auko = ld_ex_auko TABLES im_ex_aupo = it_im_ex_aupo im_ex_aufg = it_im_ex_aufg im_ex_aufi = it_im_ex_aufi im_ex_aulw = it_im_ex_aulw im_ex_ausb = it_im_ex_ausb * im_ex_auvw = it_im_ex_auvw * im_ex_auvz = it_im_ex_auvz im_ex_auvt = it_im_ex_auvt EXCEPTIONS NO_ABELN = 1 . " WAUF_ALLOCATION_TABLE_READ
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_ex_auko  TYPE RW00A ,
ld_im_abeln  TYPE AUKO-ABELN ,
it_im_ex_aupo  TYPE STANDARD TABLE OF RW01A ,
wa_im_ex_aupo  LIKE LINE OF it_im_ex_aupo,
ld_im_puffer_umgehen  TYPE RW00A-VBUKZ ,
it_im_ex_aufg  TYPE STANDARD TABLE OF RW03A ,
wa_im_ex_aufg  LIKE LINE OF it_im_ex_aufg,
it_im_ex_aufi  TYPE STANDARD TABLE OF RW04A ,
wa_im_ex_aufi  LIKE LINE OF it_im_ex_aufi,
it_im_ex_aulw  TYPE STANDARD TABLE OF RW14A ,
wa_im_ex_aulw  LIKE LINE OF it_im_ex_aulw,
it_im_ex_ausb  TYPE STANDARD TABLE OF RW15A ,
wa_im_ex_ausb  LIKE LINE OF it_im_ex_ausb,
it_im_ex_auvw  TYPE STANDARD TABLE OF RW13A ,
wa_im_ex_auvw  LIKE LINE OF it_im_ex_auvw,
it_im_ex_auvz  TYPE STANDARD TABLE OF RW11A ,
wa_im_ex_auvz  LIKE LINE OF it_im_ex_auvz,
it_im_ex_auvt  TYPE STANDARD TABLE OF RW16A ,
wa_im_ex_auvt  LIKE LINE OF it_im_ex_auvt.


SELECT single ABELN
FROM AUKO
INTO ld_im_abeln.


"populate fields of struture and append to itab
append wa_im_ex_aupo to it_im_ex_aupo.

ld_im_puffer_umgehen = some text here

"populate fields of struture and append to itab
append wa_im_ex_aufg to it_im_ex_aufg.

"populate fields of struture and append to itab
append wa_im_ex_aufi to it_im_ex_aufi.

"populate fields of struture and append to itab
append wa_im_ex_aulw to it_im_ex_aulw.

"populate fields of struture and append to itab
append wa_im_ex_ausb to it_im_ex_ausb.

"populate fields of struture and append to itab
append wa_im_ex_auvw to it_im_ex_auvw.

"populate fields of struture and append to itab
append wa_im_ex_auvz to it_im_ex_auvz.

"populate fields of struture and append to itab
append wa_im_ex_auvt to it_im_ex_auvt.

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