SAP Function Modules

CK_F_CO_OBJECT_DISPLAY SAP Function module







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

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


Pattern for FM CK_F_CO_OBJECT_DISPLAY - CK F CO OBJECT DISPLAY





CALL FUNCTION 'CK_F_CO_OBJECT_DISPLAY' "
  EXPORTING
    kokrs_imp =                 " caufvd-kokrs  Controlling area of object
*   no_actuals = SPACE          "               Display of planned costs, no actual costs ('X')
    objnr_imp =                 " cospa-objnr   Object number
*   old_delete = 'X'            "               Deleting internal table of existing objects
*   header_imp =                " cki64a
*   owaer_imp = 'X'             "               Indic. for display in obj. currency
*   i_keko =                    " keko
* TABLES
*   subobjs_imp =               " jsto_pre
  EXCEPTIONS
    DATA_NOT_FOUND = 1          "               No CO data exist (neither actual nor planning)
    JOB_DOES_NOT_EXIST = 2      "               Report group does not exist
    NOT_GENERATED = 3           "               Report group is not latest
    NO_AUTHORITY = 4            "               No authorization for calling up the report
    .  "  CK_F_CO_OBJECT_DISPLAY

ABAP code example for Function Module CK_F_CO_OBJECT_DISPLAY





The ABAP code below is a full code listing to execute function module CK_F_CO_OBJECT_DISPLAY 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:
it_subobjs_imp  TYPE STANDARD TABLE OF JSTO_PRE,"TABLES PARAM
wa_subobjs_imp  LIKE LINE OF it_subobjs_imp .


DATA(ld_kokrs_imp) = some text here
DATA(ld_no_actuals) = 'some text here'.

DATA(ld_objnr_imp) = some text here
DATA(ld_old_delete) = 'some text here'.
DATA(ld_header_imp) = 'Check type of data required'.
DATA(ld_owaer_imp) = 'some text here'.
DATA(ld_i_keko) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_subobjs_imp to it_subobjs_imp. . CALL FUNCTION 'CK_F_CO_OBJECT_DISPLAY' EXPORTING kokrs_imp = ld_kokrs_imp * no_actuals = ld_no_actuals objnr_imp = ld_objnr_imp * old_delete = ld_old_delete * header_imp = ld_header_imp * owaer_imp = ld_owaer_imp * i_keko = ld_i_keko * TABLES * subobjs_imp = it_subobjs_imp EXCEPTIONS DATA_NOT_FOUND = 1 JOB_DOES_NOT_EXIST = 2 NOT_GENERATED = 3 NO_AUTHORITY = 4 . " CK_F_CO_OBJECT_DISPLAY
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 ELSEIF SY-SUBRC EQ 4. "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_kokrs_imp  TYPE CAUFVD-KOKRS ,
it_subobjs_imp  TYPE STANDARD TABLE OF JSTO_PRE ,
wa_subobjs_imp  LIKE LINE OF it_subobjs_imp,
ld_no_actuals  TYPE STRING ,
ld_objnr_imp  TYPE COSPA-OBJNR ,
ld_old_delete  TYPE STRING ,
ld_header_imp  TYPE CKI64A ,
ld_owaer_imp  TYPE STRING ,
ld_i_keko  TYPE KEKO .


ld_kokrs_imp = some text here

"populate fields of struture and append to itab
append wa_subobjs_imp to it_subobjs_imp.
ld_no_actuals = 'some text here'.

ld_objnr_imp = some text here
ld_old_delete = 'some text here'.
ld_header_imp = 'Check type of data required'.
ld_owaer_imp = 'some text here'.
ld_i_keko = '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 CK_F_CO_OBJECT_DISPLAY or its description.