SAP Function Modules

CO_RE_GET_LTXT_DATA_DIRECT SAP Function module







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

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


Pattern for FM CO_RE_GET_LTXT_DATA_DIRECT - CO RE GET LTXT DATA DIRECT





CALL FUNCTION 'CO_RE_GET_LTXT_DATA_DIRECT' "
  EXPORTING
*   type =                      " core_obj_type
*   aufnr =                     " aufk-aufnr    Order Number
*   aufpl =                     " afvc-aufpl    Task list number of operations in the order
*   rsnum =                     " resb-rsnum    Number of Reservation / Dependent Requirement
    tdid =                      " thead-tdid    Text ID
    tdname =                    " thead-tdname  Name
    tdobject =                  " thead-tdobject  Texts: Application Object
    tdspras =                   " thead-tdspras  Language Key
  IMPORTING
    headline =                  " thead
  TABLES
    linetab =                   " tline
  EXCEPTIONS
    ARCHIVE_NOT_FOUND = 1       "
    OBJECT_NOT_FOUND = 2        "
    .  "  CO_RE_GET_LTXT_DATA_DIRECT

ABAP code example for Function Module CO_RE_GET_LTXT_DATA_DIRECT





The ABAP code below is a full code listing to execute function module CO_RE_GET_LTXT_DATA_DIRECT 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_headline  TYPE THEAD ,
it_linetab  TYPE STANDARD TABLE OF TLINE,"TABLES PARAM
wa_linetab  LIKE LINE OF it_linetab .

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

SELECT single AUFNR
FROM AUFK
INTO @DATA(ld_aufnr).


SELECT single AUFPL
FROM AFVC
INTO @DATA(ld_aufpl).


SELECT single RSNUM
FROM RESB
INTO @DATA(ld_rsnum).


DATA(ld_tdid) = some text here

DATA(ld_tdname) = some text here

DATA(ld_tdobject) = some text here

DATA(ld_tdspras) = Check type of data required

"populate fields of struture and append to itab
append wa_linetab to it_linetab. . CALL FUNCTION 'CO_RE_GET_LTXT_DATA_DIRECT' EXPORTING * type = ld_type * aufnr = ld_aufnr * aufpl = ld_aufpl * rsnum = ld_rsnum tdid = ld_tdid tdname = ld_tdname tdobject = ld_tdobject tdspras = ld_tdspras IMPORTING headline = ld_headline TABLES linetab = it_linetab EXCEPTIONS ARCHIVE_NOT_FOUND = 1 OBJECT_NOT_FOUND = 2 . " CO_RE_GET_LTXT_DATA_DIRECT
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 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_headline  TYPE THEAD ,
ld_type  TYPE CORE_OBJ_TYPE ,
it_linetab  TYPE STANDARD TABLE OF TLINE ,
wa_linetab  LIKE LINE OF it_linetab,
ld_aufnr  TYPE AUFK-AUFNR ,
ld_aufpl  TYPE AFVC-AUFPL ,
ld_rsnum  TYPE RESB-RSNUM ,
ld_tdid  TYPE THEAD-TDID ,
ld_tdname  TYPE THEAD-TDNAME ,
ld_tdobject  TYPE THEAD-TDOBJECT ,
ld_tdspras  TYPE THEAD-TDSPRAS .

ld_type = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_linetab to it_linetab.

SELECT single AUFNR
FROM AUFK
INTO ld_aufnr.


SELECT single AUFPL
FROM AFVC
INTO ld_aufpl.


SELECT single RSNUM
FROM RESB
INTO ld_rsnum.


ld_tdid = some text here

ld_tdname = some text here

ld_tdobject = some text here

ld_tdspras = Check type of data required

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