SAP Function Modules

K_KKRAMERK_CLASSIFY SAP Function module







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

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


Pattern for FM K_KKRAMERK_CLASSIFY - K KKRAMERK CLASSIFY





CALL FUNCTION 'K_KKRAMERK_CLASSIFY' "
  EXPORTING
    clmodus =                   "               Call mode: 1=Implicit, 2=Explicit, 3=Generate
*   dynpro_header = SPACE       " rmcl1         Header for characteristic valuation screen
    hiart =                     " tkkra-hiart   Hierarchy type
*   imp_afko = SPACE            " afko          Master record table: AFKP
*   imp_afpo = SPACE            " afpo          Master record table: AFPO
*   imp_aufk = SPACE            " aufk          Master record table: AUFK
*   imp_proj = SPACE            " proj          Master record table: PROJ
*   imp_prps = SPACE            " prps          Master record table: PRPS
*   imp_mara = SPACE            " mara          Master record table: AFKP
*   trstatus = 3                "               Transaction: 1=Create, 2=Change, 3=Display
*   ref_object = SPACE          " kkramerk-objnr  CO object number of reference object
*   imp_kkrmkpr = SPACE         " kkrmkpr       Characteristic structure (project)
*   imp_kkrobid = SPACE         " kkrobid       Identification (CO object)
*   rule = SPACE                "               Valuation rule
*   no_init_flag = SPACE        "               In: Do not initialize classification
  IMPORTING
    clstatus =                  " tclc-statu    Assignment status
    ok_code =                   " sy-ucomm      OK code from classification dialog step
    uflag =                     " rmclk-updat   Indicator: Update in classif. dialog step
  EXCEPTIONS
    CLASSIFICATION_LOCKED = 1   "               Classification is currently blocked
    CLDAT_NOT_GENERATED = 2     "               Classification data not yet generated
    GENERATION_NOT_ALLOWABLE = 3  "             Generating run is not allowed
    WRONG_HIERARCHY_TYPE = 4    "               Hierarchy type is not supported
    CLCUST_NOT_GENERATED = 5    "               Customizing entries for classification are incorrect
    NO_AUTH_KLART = 6           "               Not authorized for this class type
    .  "  K_KKRAMERK_CLASSIFY

ABAP code example for Function Module K_KKRAMERK_CLASSIFY





The ABAP code below is a full code listing to execute function module K_KKRAMERK_CLASSIFY 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_clstatus  TYPE TCLC-STATU ,
ld_ok_code  TYPE SY-UCOMM ,
ld_uflag  TYPE RMCLK-UPDAT .

DATA(ld_clmodus) = 'some text here'.
DATA(ld_dynpro_header) = 'Check type of data required'.

SELECT single HIART
FROM TKKRA
INTO @DATA(ld_hiart).

DATA(ld_imp_afko) = 'Check type of data required'.
DATA(ld_imp_afpo) = 'Check type of data required'.
DATA(ld_imp_aufk) = 'Check type of data required'.
DATA(ld_imp_proj) = 'Check type of data required'.
DATA(ld_imp_prps) = 'Check type of data required'.
DATA(ld_imp_mara) = 'Check type of data required'.
DATA(ld_trstatus) = 'some text here'.

DATA(ld_ref_object) = some text here
DATA(ld_imp_kkrmkpr) = 'Check type of data required'.
DATA(ld_imp_kkrobid) = 'Check type of data required'.
DATA(ld_rule) = 'some text here'.
DATA(ld_no_init_flag) = 'some text here'. . CALL FUNCTION 'K_KKRAMERK_CLASSIFY' EXPORTING clmodus = ld_clmodus * dynpro_header = ld_dynpro_header hiart = ld_hiart * imp_afko = ld_imp_afko * imp_afpo = ld_imp_afpo * imp_aufk = ld_imp_aufk * imp_proj = ld_imp_proj * imp_prps = ld_imp_prps * imp_mara = ld_imp_mara * trstatus = ld_trstatus * ref_object = ld_ref_object * imp_kkrmkpr = ld_imp_kkrmkpr * imp_kkrobid = ld_imp_kkrobid * rule = ld_rule * no_init_flag = ld_no_init_flag IMPORTING clstatus = ld_clstatus ok_code = ld_ok_code uflag = ld_uflag EXCEPTIONS CLASSIFICATION_LOCKED = 1 CLDAT_NOT_GENERATED = 2 GENERATION_NOT_ALLOWABLE = 3 WRONG_HIERARCHY_TYPE = 4 CLCUST_NOT_GENERATED = 5 NO_AUTH_KLART = 6 . " K_KKRAMERK_CLASSIFY
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 ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "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_clstatus  TYPE TCLC-STATU ,
ld_clmodus  TYPE STRING ,
ld_ok_code  TYPE SY-UCOMM ,
ld_dynpro_header  TYPE RMCL1 ,
ld_uflag  TYPE RMCLK-UPDAT ,
ld_hiart  TYPE TKKRA-HIART ,
ld_imp_afko  TYPE AFKO ,
ld_imp_afpo  TYPE AFPO ,
ld_imp_aufk  TYPE AUFK ,
ld_imp_proj  TYPE PROJ ,
ld_imp_prps  TYPE PRPS ,
ld_imp_mara  TYPE MARA ,
ld_trstatus  TYPE STRING ,
ld_ref_object  TYPE KKRAMERK-OBJNR ,
ld_imp_kkrmkpr  TYPE KKRMKPR ,
ld_imp_kkrobid  TYPE KKROBID ,
ld_rule  TYPE STRING ,
ld_no_init_flag  TYPE STRING .

ld_clmodus = 'some text here'.
ld_dynpro_header = 'Check type of data required'.

SELECT single HIART
FROM TKKRA
INTO ld_hiart.

ld_imp_afko = 'Check type of data required'.
ld_imp_afpo = 'Check type of data required'.
ld_imp_aufk = 'Check type of data required'.
ld_imp_proj = 'Check type of data required'.
ld_imp_prps = 'Check type of data required'.
ld_imp_mara = 'Check type of data required'.
ld_trstatus = 'some text here'.

ld_ref_object = some text here
ld_imp_kkrmkpr = 'Check type of data required'.
ld_imp_kkrobid = 'Check type of data required'.
ld_rule = 'some text here'.
ld_no_init_flag = 'some text here'.

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