SAP Function Modules

SCP_GET_CODEPAGE_PROPERTIES SAP Function module







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

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


Pattern for FM SCP_GET_CODEPAGE_PROPERTIES - SCP GET CODEPAGE PROPERTIES





CALL FUNCTION 'SCP_GET_CODEPAGE_PROPERTIES' "
  EXPORTING
    codepage =                  " tcp00-cpcodepage
  IMPORTING
    can_chinese =               " rststype-sel_ok
    can_jap_full =              " rststype-sel_ok
    can_jap_h_w_kana =          " rststype-sel_ok
    can_jap_level1 =            " rststype-sel_ok
    can_jap_level2 =            " rststype-sel_ok
    can_taiwanese =             " rststype-sel_ok
    can_korean =                " rststype-sel_ok
    can_unicode =               " rststype-sel_ok
  EXCEPTIONS
    CODEPAGE_UNKNOWN = 1        "
    .  "  SCP_GET_CODEPAGE_PROPERTIES

ABAP code example for Function Module SCP_GET_CODEPAGE_PROPERTIES





The ABAP code below is a full code listing to execute function module SCP_GET_CODEPAGE_PROPERTIES 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_can_chinese  TYPE RSTSTYPE-SEL_OK ,
ld_can_jap_full  TYPE RSTSTYPE-SEL_OK ,
ld_can_jap_h_w_kana  TYPE RSTSTYPE-SEL_OK ,
ld_can_jap_level1  TYPE RSTSTYPE-SEL_OK ,
ld_can_jap_level2  TYPE RSTSTYPE-SEL_OK ,
ld_can_taiwanese  TYPE RSTSTYPE-SEL_OK ,
ld_can_korean  TYPE RSTSTYPE-SEL_OK ,
ld_can_unicode  TYPE RSTSTYPE-SEL_OK .


SELECT single CPCODEPAGE
FROM TCP00
INTO @DATA(ld_codepage).
. CALL FUNCTION 'SCP_GET_CODEPAGE_PROPERTIES' EXPORTING codepage = ld_codepage IMPORTING can_chinese = ld_can_chinese can_jap_full = ld_can_jap_full can_jap_h_w_kana = ld_can_jap_h_w_kana can_jap_level1 = ld_can_jap_level1 can_jap_level2 = ld_can_jap_level2 can_taiwanese = ld_can_taiwanese can_korean = ld_can_korean can_unicode = ld_can_unicode EXCEPTIONS CODEPAGE_UNKNOWN = 1 . " SCP_GET_CODEPAGE_PROPERTIES
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_can_chinese  TYPE RSTSTYPE-SEL_OK ,
ld_codepage  TYPE TCP00-CPCODEPAGE ,
ld_can_jap_full  TYPE RSTSTYPE-SEL_OK ,
ld_can_jap_h_w_kana  TYPE RSTSTYPE-SEL_OK ,
ld_can_jap_level1  TYPE RSTSTYPE-SEL_OK ,
ld_can_jap_level2  TYPE RSTSTYPE-SEL_OK ,
ld_can_taiwanese  TYPE RSTSTYPE-SEL_OK ,
ld_can_korean  TYPE RSTSTYPE-SEL_OK ,
ld_can_unicode  TYPE RSTSTYPE-SEL_OK .


SELECT single CPCODEPAGE
FROM TCP00
INTO ld_codepage.

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