SAP Function Modules

TELNUMBER_STRUCT_TO_NORMAL SAP Function module







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

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


Pattern for FM TELNUMBER_STRUCT_TO_NORMAL - TELNUMBER STRUCT TO NORMAL





CALL FUNCTION 'TELNUMBER_STRUCT_TO_NORMAL' "
  EXPORTING
    country =                   " t005-land1    Country code
    telnumber =                 " adr2-tel_number
*   extension_in =              " adr2-tel_extens  Extension
*   wildcards = SPACE           " sphoptions-option1
  IMPORTING
    number_normal =             " adr2-telnr_long
    worst_error =               " addr_error-msg_type
* TABLES
*   messages =                  " addr_error    Error Messages
    .  "  TELNUMBER_STRUCT_TO_NORMAL

ABAP code example for Function Module TELNUMBER_STRUCT_TO_NORMAL





The ABAP code below is a full code listing to execute function module TELNUMBER_STRUCT_TO_NORMAL 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_number_normal  TYPE ADR2-TELNR_LONG ,
ld_worst_error  TYPE ADDR_ERROR-MSG_TYPE ,
it_messages  TYPE STANDARD TABLE OF ADDR_ERROR,"TABLES PARAM
wa_messages  LIKE LINE OF it_messages .


SELECT single LAND1
FROM T005
INTO @DATA(ld_country).


SELECT single TEL_NUMBER
FROM ADR2
INTO @DATA(ld_telnumber).


SELECT single TEL_EXTENS
FROM ADR2
INTO @DATA(ld_extension_in).


DATA(ld_wildcards) = some text here

"populate fields of struture and append to itab
append wa_messages to it_messages. . CALL FUNCTION 'TELNUMBER_STRUCT_TO_NORMAL' EXPORTING country = ld_country telnumber = ld_telnumber * extension_in = ld_extension_in * wildcards = ld_wildcards IMPORTING number_normal = ld_number_normal worst_error = ld_worst_error * TABLES * messages = it_messages . " TELNUMBER_STRUCT_TO_NORMAL
IF SY-SUBRC EQ 0. "All OK 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_number_normal  TYPE ADR2-TELNR_LONG ,
ld_country  TYPE T005-LAND1 ,
it_messages  TYPE STANDARD TABLE OF ADDR_ERROR ,
wa_messages  LIKE LINE OF it_messages,
ld_worst_error  TYPE ADDR_ERROR-MSG_TYPE ,
ld_telnumber  TYPE ADR2-TEL_NUMBER ,
ld_extension_in  TYPE ADR2-TEL_EXTENS ,
ld_wildcards  TYPE SPHOPTIONS-OPTION1 .


SELECT single LAND1
FROM T005
INTO ld_country.


"populate fields of struture and append to itab
append wa_messages to it_messages.

SELECT single TEL_NUMBER
FROM ADR2
INTO ld_telnumber.


SELECT single TEL_EXTENS
FROM ADR2
INTO ld_extension_in.


ld_wildcards = 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 TELNUMBER_STRUCT_TO_NORMAL or its description.