SAP COI2_READ_OBJECT Function Module for NOTRANSL: Read an object (e.g Person)









COI2_READ_OBJECT is a standard coi2 read object SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Read an object (e.g Person) processing and below is the pattern details for this FM, 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 coi2 read object FM, simply by entering the name COI2_READ_OBJECT into the relevant SAP transaction such as SE37 or SE38.

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



Function COI2_READ_OBJECT 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 'COI2_READ_OBJECT'"NOTRANSL: Read an object (e.g Person)
EXPORTING
* PLVAR_IMP = "
* STORE_IMP = 'X' "
* CHECK_STRU_AUTH_IMP = 'X' "
* READ_DB_IMP = ' ' "
OTYPE_IMP = "
OBJID_IMP = "
* REALO_IMP = "
* ISTAT_IMP = "
BEGDA_IMP = "
ENDDA_IMP = "
* LANGU_IMP = "
* OINTERVAL_IMP = 'X' "

IMPORTING
OBEG_EXP = "
OEND_EXP = "
OSTAT_EXP = "
HISTO_EXP = "
SHORT_EXP = "
STEXT_EXP = "
TISTAT_EXP = "
TLANGU_EXP = "

EXCEPTIONS
NOT_FOUND = 1
.




Customer Function user exits

Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.
EXIT_SAPLCOI2_001 CO12: Changing of People Found
EXIT_SAPLCOI2_002 COI2 Alternative Procurement of Personnel Availability Data

IMPORTING Parameters details for COI2_READ_OBJECT

PLVAR_IMP -

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

STORE_IMP -

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

CHECK_STRU_AUTH_IMP -

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

READ_DB_IMP -

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

OTYPE_IMP -

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

OBJID_IMP -

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

REALO_IMP -

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

ISTAT_IMP -

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

BEGDA_IMP -

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

ENDDA_IMP -

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

LANGU_IMP -

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

OINTERVAL_IMP -

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

EXPORTING Parameters details for COI2_READ_OBJECT

OBEG_EXP -

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

OEND_EXP -

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

OSTAT_EXP -

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

HISTO_EXP -

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

SHORT_EXP -

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

STEXT_EXP -

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

TISTAT_EXP -

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

TLANGU_EXP -

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

EXCEPTIONS details

NOT_FOUND -

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

Copy and paste ABAP code example for COI2_READ_OBJECT 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_obeg_exp  TYPE ENDDATUM, "   
lv_not_found  TYPE ENDDATUM, "   
lv_plvar_imp  TYPE PLVAR, "   
lv_store_imp  TYPE CHAR1, "   'X'
lv_check_stru_auth_imp  TYPE CHAR1, "   'X'
lv_read_db_imp  TYPE CHAR1, "   SPACE
lv_oend_exp  TYPE BEGDATUM, "   
lv_otype_imp  TYPE OTYPE, "   
lv_objid_imp  TYPE HROBJID, "   
lv_ostat_exp  TYPE ISTAT_D, "   
lv_histo_exp  TYPE HISTO, "   
lv_realo_imp  TYPE REALO, "   
lv_istat_imp  TYPE ISTAT_D, "   
lv_short_exp  TYPE SHORT_D, "   
lv_begda_imp  TYPE BEGDATUM, "   
lv_stext_exp  TYPE STEXT, "   
lv_endda_imp  TYPE ENDDATUM, "   
lv_tistat_exp  TYPE ISTAT_D, "   
lv_langu_imp  TYPE SYLANGU, "   
lv_tlangu_exp  TYPE SYLANGU, "   
lv_ointerval_imp  TYPE CHAR1. "   'X'

  CALL FUNCTION 'COI2_READ_OBJECT'  "NOTRANSL: Read an object (e.g Person)
    EXPORTING
         PLVAR_IMP = lv_plvar_imp
         STORE_IMP = lv_store_imp
         CHECK_STRU_AUTH_IMP = lv_check_stru_auth_imp
         READ_DB_IMP = lv_read_db_imp
         OTYPE_IMP = lv_otype_imp
         OBJID_IMP = lv_objid_imp
         REALO_IMP = lv_realo_imp
         ISTAT_IMP = lv_istat_imp
         BEGDA_IMP = lv_begda_imp
         ENDDA_IMP = lv_endda_imp
         LANGU_IMP = lv_langu_imp
         OINTERVAL_IMP = lv_ointerval_imp
    IMPORTING
         OBEG_EXP = lv_obeg_exp
         OEND_EXP = lv_oend_exp
         OSTAT_EXP = lv_ostat_exp
         HISTO_EXP = lv_histo_exp
         SHORT_EXP = lv_short_exp
         STEXT_EXP = lv_stext_exp
         TISTAT_EXP = lv_tistat_exp
         TLANGU_EXP = lv_tlangu_exp
    EXCEPTIONS
        NOT_FOUND = 1
. " COI2_READ_OBJECT




ABAP code using 7.40 inline data declarations to call FM COI2_READ_OBJECT

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_store_imp) = 'X'.
 
DATA(ld_check_stru_auth_imp) = 'X'.
 
DATA(ld_read_db_imp) = ' '.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
DATA(ld_ointerval_imp) = 'X'.
 


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!