SAP Function Modules

K_OBJECT_INFORMATION_GET SAP Function module - Determine Information on a Controlling Object







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

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


Pattern for FM K_OBJECT_INFORMATION_GET - K OBJECT INFORMATION GET





CALL FUNCTION 'K_OBJECT_INFORMATION_GET' "Determine Information on a Controlling Object
  EXPORTING
    i_objnr =                   " coep-objnr    Object Number
*   i_gjahr =                   " coep-gjahr    Fiscal Year
  IMPORTING
    e_obart =                   " ionr-obart    Object Type
    e_kokrs =                   " coep-kokrs    Controlling Area
    e_bukrs =                   " coep-bukrs    Company Code
    e_fikrs =                   " fm01-fikrs    FM Area
    e_owaer =                   " coep-owaer    Object Currency
    e_curtp =                   " acccr-curtp   Currency Type of the Object Currency
    e_curk1 =                   "               Key 1 for Currency Type
    e_curk2 =                   "               Key 2 for Currency Type
  EXCEPTIONS
    OBJECT_NOT_FOUND = 1        "               Object Not Found
    OBJECT_CURRENCY_INCONSISTENT = 2  "         Object Currency Does Not Match Currency Type
    ORGUNIT_ERROR = 3           "               Inconsistency in an Organizational Unit
    .  "  K_OBJECT_INFORMATION_GET

ABAP code example for Function Module K_OBJECT_INFORMATION_GET





The ABAP code below is a full code listing to execute function module K_OBJECT_INFORMATION_GET 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_e_obart  TYPE IONR-OBART ,
ld_e_kokrs  TYPE COEP-KOKRS ,
ld_e_bukrs  TYPE COEP-BUKRS ,
ld_e_fikrs  TYPE FM01-FIKRS ,
ld_e_owaer  TYPE COEP-OWAER ,
ld_e_curtp  TYPE ACCCR-CURTP ,
ld_e_curk1  TYPE STRING ,
ld_e_curk2  TYPE STRING .


SELECT single OBJNR
FROM COEP
INTO @DATA(ld_i_objnr).


SELECT single GJAHR
FROM COEP
INTO @DATA(ld_i_gjahr).
. CALL FUNCTION 'K_OBJECT_INFORMATION_GET' EXPORTING i_objnr = ld_i_objnr * i_gjahr = ld_i_gjahr IMPORTING e_obart = ld_e_obart e_kokrs = ld_e_kokrs e_bukrs = ld_e_bukrs e_fikrs = ld_e_fikrs e_owaer = ld_e_owaer e_curtp = ld_e_curtp e_curk1 = ld_e_curk1 e_curk2 = ld_e_curk2 EXCEPTIONS OBJECT_NOT_FOUND = 1 OBJECT_CURRENCY_INCONSISTENT = 2 ORGUNIT_ERROR = 3 . " K_OBJECT_INFORMATION_GET
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_e_obart  TYPE IONR-OBART ,
ld_i_objnr  TYPE COEP-OBJNR ,
ld_e_kokrs  TYPE COEP-KOKRS ,
ld_i_gjahr  TYPE COEP-GJAHR ,
ld_e_bukrs  TYPE COEP-BUKRS ,
ld_e_fikrs  TYPE FM01-FIKRS ,
ld_e_owaer  TYPE COEP-OWAER ,
ld_e_curtp  TYPE ACCCR-CURTP ,
ld_e_curk1  TYPE STRING ,
ld_e_curk2  TYPE STRING .


SELECT single OBJNR
FROM COEP
INTO ld_i_objnr.


SELECT single GJAHR
FROM COEP
INTO ld_i_gjahr.

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