SAP Function Modules

LTAK_READ SAP Function module - Select from table LTAK - 2nd layer







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

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


Pattern for FM LTAK_READ - LTAK READ





CALL FUNCTION 'LTAK_READ' "Select from table LTAK - 2nd layer
  EXPORTING
*   i_lgnum =                   " ltak-lgnum    Warehouse number / warehouse complex
*   i_tanum =                   " ltak-tanum    Transfer order number
*   i_vbeln =                   " ltak-vbeln    Sales and distribution document number
*   i_queue =                   " ltak-queue    Queue
*   line_exist = ' '            " c             if 'x' check only if line exsists
*   chosen_sort =               " c
*   i_kquit =                   " ltak-kquit    Indicator: confirmation
    i_which_select =            " i
  IMPORTING
    o_answr =                   " c             send out 'x' for line exsists in table
  TABLES
    e_ltak =                    " ltak          WM transfer order header
  EXCEPTIONS
    NO_ENTRY_FOUND = 1          "
    NO_PARAMETERS_FOUND = 2     "
    FUNCTION_NOT_EXIST = 3      "
    .  "  LTAK_READ

ABAP code example for Function Module LTAK_READ





The ABAP code below is a full code listing to execute function module LTAK_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_o_answr  TYPE C ,
it_e_ltak  TYPE STANDARD TABLE OF LTAK,"TABLES PARAM
wa_e_ltak  LIKE LINE OF it_e_ltak .


SELECT single LGNUM
FROM LTAK
INTO @DATA(ld_i_lgnum).


SELECT single TANUM
FROM LTAK
INTO @DATA(ld_i_tanum).


SELECT single VBELN
FROM LTAK
INTO @DATA(ld_i_vbeln).


SELECT single QUEUE
FROM LTAK
INTO @DATA(ld_i_queue).

DATA(ld_line_exist) = 'Check type of data required'.
DATA(ld_chosen_sort) = 'Check type of data required'.

SELECT single KQUIT
FROM LTAK
INTO @DATA(ld_i_kquit).

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

"populate fields of struture and append to itab
append wa_e_ltak to it_e_ltak. . CALL FUNCTION 'LTAK_READ' EXPORTING * i_lgnum = ld_i_lgnum * i_tanum = ld_i_tanum * i_vbeln = ld_i_vbeln * i_queue = ld_i_queue * line_exist = ld_line_exist * chosen_sort = ld_chosen_sort * i_kquit = ld_i_kquit i_which_select = ld_i_which_select IMPORTING o_answr = ld_o_answr TABLES e_ltak = it_e_ltak EXCEPTIONS NO_ENTRY_FOUND = 1 NO_PARAMETERS_FOUND = 2 FUNCTION_NOT_EXIST = 3 . " LTAK_READ
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 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_o_answr  TYPE C ,
ld_i_lgnum  TYPE LTAK-LGNUM ,
it_e_ltak  TYPE STANDARD TABLE OF LTAK ,
wa_e_ltak  LIKE LINE OF it_e_ltak,
ld_i_tanum  TYPE LTAK-TANUM ,
ld_i_vbeln  TYPE LTAK-VBELN ,
ld_i_queue  TYPE LTAK-QUEUE ,
ld_line_exist  TYPE C ,
ld_chosen_sort  TYPE C ,
ld_i_kquit  TYPE LTAK-KQUIT ,
ld_i_which_select  TYPE I .


SELECT single LGNUM
FROM LTAK
INTO ld_i_lgnum.


"populate fields of struture and append to itab
append wa_e_ltak to it_e_ltak.

SELECT single TANUM
FROM LTAK
INTO ld_i_tanum.


SELECT single VBELN
FROM LTAK
INTO ld_i_vbeln.


SELECT single QUEUE
FROM LTAK
INTO ld_i_queue.

ld_line_exist = 'Check type of data required'.
ld_chosen_sort = 'Check type of data required'.

SELECT single KQUIT
FROM LTAK
INTO ld_i_kquit.

ld_i_which_select = 'Check type of data required'.

SAP Documentation for FM LTAK_READ


This function retrieves information from the table LTAK (WM transfer order header data). ...See here for full SAP fm documentation








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