SAP K_COAS_TEXTS_READ Function Module for









K_COAS_TEXTS_READ is a standard k coas texts read SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for k coas texts read FM, simply by entering the name K_COAS_TEXTS_READ into the relevant SAP transaction such as SE37 or SE38.

Function Group: KAR1
Program Name: SAPLKAR1
Main Program: SAPLKAR1
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function K_COAS_TEXTS_READ pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'K_COAS_TEXTS_READ'"
EXPORTING
AUFNR_MAX = "Order number from
AUFNR_MIN = "Order number to
FIELD = "Field from COAS
* FLAG_INTERNAL_REPR = ' ' "
* MT_DATE = "

IMPORTING
DESCRIPTION = "Description
TEXT = "Text
FIELD_VALUE = "Field value (unformatted)

EXCEPTIONS
DESCRIPTION_NOT_FOUND = 1 FIELD_NOT_FOUND = 2 TEXT_NOT_FOUND = 3 TEXT_NOT_UNIQUE = 4
.



IMPORTING Parameters details for K_COAS_TEXTS_READ

AUFNR_MAX - Order number from

Data type: COAS-AUFNR
Optional: No
Call by Reference: No ( called with pass by value option)

AUFNR_MIN - Order number to

Data type: COAS-AUFNR
Optional: No
Call by Reference: No ( called with pass by value option)

FIELD - Field from COAS

Data type: DD03P-FIELDNAME
Optional: No
Call by Reference: No ( called with pass by value option)

FLAG_INTERNAL_REPR -

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

MT_DATE -

Data type: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for K_COAS_TEXTS_READ

DESCRIPTION - Description

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

TEXT - Text

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

FIELD_VALUE - Field value (unformatted)

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

DESCRIPTION_NOT_FOUND - No description found

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

FIELD_NOT_FOUND - Field not found / not supported

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

TEXT_NOT_FOUND - No text found

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

TEXT_NOT_UNIQUE - No unique text found

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for K_COAS_TEXTS_READ Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_aufnr_max  TYPE COAS-AUFNR, "   
lv_description  TYPE COAS, "   
lv_description_not_found  TYPE COAS, "   
lv_text  TYPE COAS, "   
lv_aufnr_min  TYPE COAS-AUFNR, "   
lv_field_not_found  TYPE COAS, "   
lv_field  TYPE DD03P-FIELDNAME, "   
lv_field_value  TYPE DD03P, "   
lv_text_not_found  TYPE DD03P, "   
lv_text_not_unique  TYPE DD03P, "   
lv_flag_internal_repr  TYPE DD03P, "   SPACE
lv_mt_date  TYPE SY-DATUM. "   

  CALL FUNCTION 'K_COAS_TEXTS_READ'  "
    EXPORTING
         AUFNR_MAX = lv_aufnr_max
         AUFNR_MIN = lv_aufnr_min
         FIELD = lv_field
         FLAG_INTERNAL_REPR = lv_flag_internal_repr
         MT_DATE = lv_mt_date
    IMPORTING
         DESCRIPTION = lv_description
         TEXT = lv_text
         FIELD_VALUE = lv_field_value
    EXCEPTIONS
        DESCRIPTION_NOT_FOUND = 1
        FIELD_NOT_FOUND = 2
        TEXT_NOT_FOUND = 3
        TEXT_NOT_UNIQUE = 4
. " K_COAS_TEXTS_READ




ABAP code using 7.40 inline data declarations to call FM K_COAS_TEXTS_READ

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

"SELECT single AUFNR FROM COAS INTO @DATA(ld_aufnr_max).
 
 
 
 
"SELECT single AUFNR FROM COAS INTO @DATA(ld_aufnr_min).
 
 
"SELECT single FIELDNAME FROM DD03P INTO @DATA(ld_field).
 
 
 
 
DATA(ld_flag_internal_repr) = ' '.
 
"SELECT single DATUM FROM SY INTO @DATA(ld_mt_date).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!