SAP SCP_INIT_NLS Function Module for









SCP_INIT_NLS is a standard scp init nls SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 scp init nls FM, simply by entering the name SCP_INIT_NLS into the relevant SAP transaction such as SE37 or SE38.

Function Group: SCP8
Program Name: SAPLSCP8
Main Program:
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function SCP_INIT_NLS 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 'SCP_INIT_NLS'"
EXPORTING
DB_CODEPAGE = "Database codepage
COUNTRY = "Country
DB_LANG = "
LANGUAGES = "
* ENFORCE_INSERT = ' ' "
* CHECK_ONLY = ' ' "

IMPORTING
TABLES_CONSISTENT = "

TABLES
* PROFILE_HINTS = "
* TCP0C_EXTRACT = "

EXCEPTIONS
DATABASE_NOT_EMPTY = 1 BAD_CODEPAGE = 2 BAD_COUNTRY = 3 BAD_LANGUAGE = 4 INSERT_ERROR = 5 BAD_LANGUAGES = 6
.



IMPORTING Parameters details for SCP_INIT_NLS

DB_CODEPAGE - Database codepage

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

COUNTRY - Country

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

DB_LANG -

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

LANGUAGES -

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

ENFORCE_INSERT -

Data type: RSTSTYPE-SEL_OK
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

CHECK_ONLY -

Data type: RSTSTYPE-SEL_OK
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for SCP_INIT_NLS

TABLES_CONSISTENT -

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

TABLES Parameters details for SCP_INIT_NLS

PROFILE_HINTS -

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

TCP0C_EXTRACT -

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

EXCEPTIONS details

DATABASE_NOT_EMPTY -

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

BAD_CODEPAGE -

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

BAD_COUNTRY -

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

BAD_LANGUAGE -

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

INSERT_ERROR -

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

BAD_LANGUAGES -

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

Copy and paste ABAP code example for SCP_INIT_NLS 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_db_codepage  TYPE TCPDB-CPTRANSFLD, "   
lt_profile_hints  TYPE STANDARD TABLE OF ABAPTEXT, "   
lv_tables_consistent  TYPE RSTSTYPE-SEL_OK, "   
lv_database_not_empty  TYPE RSTSTYPE, "   
lv_country  TYPE TCP0D-COUNTRY, "   
lv_bad_codepage  TYPE TCP0D, "   
lt_tcp0c_extract  TYPE STANDARD TABLE OF ABAPTEXT, "   
lv_db_lang  TYPE T002-SPRAS, "   
lv_bad_country  TYPE T002, "   
lv_languages  TYPE LANGIMP-LANGVECT, "   
lv_bad_language  TYPE LANGIMP, "   
lv_insert_error  TYPE LANGIMP, "   
lv_enforce_insert  TYPE RSTSTYPE-SEL_OK, "   ' '
lv_check_only  TYPE RSTSTYPE-SEL_OK, "   ' '
lv_bad_languages  TYPE RSTSTYPE. "   

  CALL FUNCTION 'SCP_INIT_NLS'  "
    EXPORTING
         DB_CODEPAGE = lv_db_codepage
         COUNTRY = lv_country
         DB_LANG = lv_db_lang
         LANGUAGES = lv_languages
         ENFORCE_INSERT = lv_enforce_insert
         CHECK_ONLY = lv_check_only
    IMPORTING
         TABLES_CONSISTENT = lv_tables_consistent
    TABLES
         PROFILE_HINTS = lt_profile_hints
         TCP0C_EXTRACT = lt_tcp0c_extract
    EXCEPTIONS
        DATABASE_NOT_EMPTY = 1
        BAD_CODEPAGE = 2
        BAD_COUNTRY = 3
        BAD_LANGUAGE = 4
        INSERT_ERROR = 5
        BAD_LANGUAGES = 6
. " SCP_INIT_NLS




ABAP code using 7.40 inline data declarations to call FM SCP_INIT_NLS

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.

"SELECT single CPTRANSFLD FROM TCPDB INTO @DATA(ld_db_codepage).
 
 
"SELECT single SEL_OK FROM RSTSTYPE INTO @DATA(ld_tables_consistent).
 
 
"SELECT single COUNTRY FROM TCP0D INTO @DATA(ld_country).
 
 
 
"SELECT single SPRAS FROM T002 INTO @DATA(ld_db_lang).
 
 
"SELECT single LANGVECT FROM LANGIMP INTO @DATA(ld_languages).
 
 
 
"SELECT single SEL_OK FROM RSTSTYPE INTO @DATA(ld_enforce_insert).
DATA(ld_enforce_insert) = ' '.
 
"SELECT single SEL_OK FROM RSTSTYPE INTO @DATA(ld_check_only).
DATA(ld_check_only) = ' '.
 
 


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!