SAP Function Modules

CHECK_STRING_SUCCESSOR SAP Function module







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

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


Pattern for FM CHECK_STRING_SUCCESSOR - CHECK STRING SUCCESSOR





CALL FUNCTION 'CHECK_STRING_SUCCESSOR' "
  EXPORTING
    i_base_string =             " clike
    i_check_string =            " clike
    i_alphabet =                " syabcde       Constant: Alphabet (A,B,C,...)
*   i_digits = '0123456789'     " clike
*   i_special_chars = '-'       " c
*   i_with_second_digit = ' '   " xfeld         Checkbox
  EXCEPTIONS
    NOT_SUCCESSOR = 1           "
    STRINGS_EQUAL = 2           "
    BASE_STRING_WRONG = 3       "
    CHECK_STRING_WRONG = 4      "
    NOT_SAME_LENGTH = 5         "
    DIGITS_MISSING = 6          "
    WRONG_STRING = 7            "
    INTERNAL_ERROR = 8          "
    .  "  CHECK_STRING_SUCCESSOR

ABAP code example for Function Module CHECK_STRING_SUCCESSOR





The ABAP code below is a full code listing to execute function module CHECK_STRING_SUCCESSOR 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_i_base_string) = 'Check type of data required'.
DATA(ld_i_check_string) = 'Check type of data required'.
DATA(ld_i_alphabet) = 'some text here'.
DATA(ld_i_digits) = 'some text here'.
DATA(ld_i_special_chars) = 'some text here'.
DATA(ld_i_with_second_digit) = 'some text here'. . CALL FUNCTION 'CHECK_STRING_SUCCESSOR' EXPORTING i_base_string = ld_i_base_string i_check_string = ld_i_check_string i_alphabet = ld_i_alphabet * i_digits = ld_i_digits * i_special_chars = ld_i_special_chars * i_with_second_digit = ld_i_with_second_digit EXCEPTIONS NOT_SUCCESSOR = 1 STRINGS_EQUAL = 2 BASE_STRING_WRONG = 3 CHECK_STRING_WRONG = 4 NOT_SAME_LENGTH = 5 DIGITS_MISSING = 6 WRONG_STRING = 7 INTERNAL_ERROR = 8 . " CHECK_STRING_SUCCESSOR
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 ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 8. "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_i_base_string  TYPE CLIKE ,
ld_i_check_string  TYPE CLIKE ,
ld_i_alphabet  TYPE SYABCDE ,
ld_i_digits  TYPE CLIKE ,
ld_i_special_chars  TYPE C ,
ld_i_with_second_digit  TYPE XFELD .

ld_i_base_string = 'some text here'.
ld_i_check_string = 'some text here'.
ld_i_alphabet = 'some text here'.
ld_i_digits = 'some text here'.
ld_i_special_chars = 'some text here'.
ld_i_with_second_digit = '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 CHECK_STRING_SUCCESSOR or its description.