SAP COM_ATTRIBUTE_READ Function Module for









COM_ATTRIBUTE_READ is a standard com attribute 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 com attribute read FM, simply by entering the name COM_ATTRIBUTE_READ into the relevant SAP transaction such as SE37 or SE38.

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



Function COM_ATTRIBUTE_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 'COM_ATTRIBUTE_READ'"
EXPORTING
* IV_ATTRIBUTE_ID = "Attribute
* IV_ATTRIBUTE_GUID = "
* IV_READ_FIXVAL_TEXT = 'X' "Logical Variable
* IV_READ_DDIC_INFO = "
* IV_LANGUAGE = SY-LANGU "Current Language
* IV_READ_HELP_ATTRIBUTES = OFF "Logical Variable
* READ_DEVCLASS = OFF "Logical Variable
* IV_AUTHORITY_CHECK = ON "Logical Variable
* IV_READ_FIXVAL = "

IMPORTING
ES_ATTRIBUTE = "Attribute
ET_ATTRIBUTE_RANGES = "Table Type for Attribute Intervals
ET_ATTRIBUTE_VALUES = "Table Type for Attribute Single Values
ET_HELP_ATTRIBUTES = "
EV_DEVCLASS = "Package for Transport Organizer

EXCEPTIONS
ATTRIBUTE_NOT_FOUND = 1 DDIC_OBJECT_NOT_FOUND = 2 INTERNAL_ERROR = 3 MISSING_IMPORT_PARAMETERS = 4 NO_AUTHORITY = 5 OTHERS = 6
.



IMPORTING Parameters details for COM_ATTRIBUTE_READ

IV_ATTRIBUTE_ID - Attribute

Data type: COMT_ATTR_ID_30
Optional: Yes
Call by Reference: Yes

IV_ATTRIBUTE_GUID -

Data type: COMT_ATTRIBUTE_GUID
Optional: Yes
Call by Reference: Yes

IV_READ_FIXVAL_TEXT - Logical Variable

Data type: COMT_BOOLEAN
Default: 'X'
Optional: Yes
Call by Reference: Yes

IV_READ_DDIC_INFO -

Data type: COMT_BOOLEAN
Optional: Yes
Call by Reference: Yes

IV_LANGUAGE - Current Language

Data type: SYLANGU
Default: SY-LANGU
Optional: Yes
Call by Reference: Yes

IV_READ_HELP_ATTRIBUTES - Logical Variable

Data type: COMT_BOOLEAN
Default: OFF
Optional: Yes
Call by Reference: Yes

READ_DEVCLASS - Logical Variable

Data type: COMT_BOOLEAN
Default: OFF
Optional: No
Call by Reference: Yes

IV_AUTHORITY_CHECK - Logical Variable

Data type: COMT_BOOLEAN
Default: ON
Optional: Yes
Call by Reference: Yes

IV_READ_FIXVAL -

Data type: COMT_BOOLEAN
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for COM_ATTRIBUTE_READ

ES_ATTRIBUTE - Attribute

Data type: COMT_ATTRIBUTE_16_LONG_ID
Optional: No
Call by Reference: Yes

ET_ATTRIBUTE_RANGES - Table Type for Attribute Intervals

Data type: COMT_ATTRIBUTE_RANGES_TAB
Optional: No
Call by Reference: Yes

ET_ATTRIBUTE_VALUES - Table Type for Attribute Single Values

Data type: COMT_ATTRIBUTE_VALUES_TAB
Optional: No
Call by Reference: Yes

ET_HELP_ATTRIBUTES -

Data type: COMT_ATTRIBUTE_TAB
Optional: No
Call by Reference: Yes

EV_DEVCLASS - Package for Transport Organizer

Data type: DEVCLASS
Optional: No
Call by Reference: Yes

EXCEPTIONS details

ATTRIBUTE_NOT_FOUND -

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

DDIC_OBJECT_NOT_FOUND -

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

INTERNAL_ERROR - An internal error has occurred

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

MISSING_IMPORT_PARAMETERS -

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

NO_AUTHORITY -

Data type:
Optional: No
Call by Reference: Yes

OTHERS -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for COM_ATTRIBUTE_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_es_attribute  TYPE COMT_ATTRIBUTE_16_LONG_ID, "   
lv_iv_attribute_id  TYPE COMT_ATTR_ID_30, "   
lv_attribute_not_found  TYPE COMT_ATTR_ID_30, "   
lv_iv_attribute_guid  TYPE COMT_ATTRIBUTE_GUID, "   
lv_et_attribute_ranges  TYPE COMT_ATTRIBUTE_RANGES_TAB, "   
lv_ddic_object_not_found  TYPE COMT_ATTRIBUTE_RANGES_TAB, "   
lv_internal_error  TYPE COMT_ATTRIBUTE_RANGES_TAB, "   
lv_et_attribute_values  TYPE COMT_ATTRIBUTE_VALUES_TAB, "   
lv_iv_read_fixval_text  TYPE COMT_BOOLEAN, "   'X'
lv_iv_read_ddic_info  TYPE COMT_BOOLEAN, "   
lv_et_help_attributes  TYPE COMT_ATTRIBUTE_TAB, "   
lv_missing_import_parameters  TYPE COMT_ATTRIBUTE_TAB, "   
lv_ev_devclass  TYPE DEVCLASS, "   
lv_iv_language  TYPE SYLANGU, "   SY-LANGU
lv_no_authority  TYPE SYLANGU, "   
lv_others  TYPE SYLANGU, "   
lv_iv_read_help_attributes  TYPE COMT_BOOLEAN, "   OFF
lv_read_devclass  TYPE COMT_BOOLEAN, "   OFF
lv_iv_authority_check  TYPE COMT_BOOLEAN, "   ON
lv_iv_read_fixval  TYPE COMT_BOOLEAN. "   

  CALL FUNCTION 'COM_ATTRIBUTE_READ'  "
    EXPORTING
         IV_ATTRIBUTE_ID = lv_iv_attribute_id
         IV_ATTRIBUTE_GUID = lv_iv_attribute_guid
         IV_READ_FIXVAL_TEXT = lv_iv_read_fixval_text
         IV_READ_DDIC_INFO = lv_iv_read_ddic_info
         IV_LANGUAGE = lv_iv_language
         IV_READ_HELP_ATTRIBUTES = lv_iv_read_help_attributes
         READ_DEVCLASS = lv_read_devclass
         IV_AUTHORITY_CHECK = lv_iv_authority_check
         IV_READ_FIXVAL = lv_iv_read_fixval
    IMPORTING
         ES_ATTRIBUTE = lv_es_attribute
         ET_ATTRIBUTE_RANGES = lv_et_attribute_ranges
         ET_ATTRIBUTE_VALUES = lv_et_attribute_values
         ET_HELP_ATTRIBUTES = lv_et_help_attributes
         EV_DEVCLASS = lv_ev_devclass
    EXCEPTIONS
        ATTRIBUTE_NOT_FOUND = 1
        DDIC_OBJECT_NOT_FOUND = 2
        INTERNAL_ERROR = 3
        MISSING_IMPORT_PARAMETERS = 4
        NO_AUTHORITY = 5
        OTHERS = 6
. " COM_ATTRIBUTE_READ




ABAP code using 7.40 inline data declarations to call FM COM_ATTRIBUTE_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.

 
 
 
 
 
 
 
 
DATA(ld_iv_read_fixval_text) = 'X'.
 
 
 
 
 
DATA(ld_iv_language) = SY-LANGU.
 
 
 
DATA(ld_iv_read_help_attributes) = OFF.
 
DATA(ld_read_devclass) = OFF.
 
DATA(ld_iv_authority_check) = ON.
 
 


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!