SAP RSUT_DATATYPE_GET_CHAR_LENGTH Function Module for
RSUT_DATATYPE_GET_CHAR_LENGTH is a standard rsut datatype get char length 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 rsut datatype get char length FM, simply by entering the name RSUT_DATATYPE_GET_CHAR_LENGTH into the relevant SAP transaction such as SE37 or SE38.
Function Group: RSUT
Program Name: SAPLRSUT
Main Program: SAPLRSUT
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function RSUT_DATATYPE_GET_CHAR_LENGTH 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 'RSUT_DATATYPE_GET_CHAR_LENGTH'".
EXPORTING
I_DATATYPE = "
* I_WITH_DELIMITERS = "
* I_MAX_DOUBLED_DELIMITERS = 0 "
* I_LENGTH = "
* I_DECIMALS = "
* I_WITHOUT_SIGN = "
* I_EXTERNAL_REPRESENTATION = "
* I_OUTPUT_LENGTH = "
* I_SIGN_LENGTH = 1 "
* I_SIGN_REPRESENTATION = '-' "
* I_WITHOUT_GROUPING = "
IMPORTING
E_CHAR_LENGTH = "
E_WITH_SIGN = "
EXCEPTIONS
ILLEGAL_DATATYPE = 1 ILLEGAL_LENGTH = 2 ILLEGAL_DECIMALS = 3
IMPORTING Parameters details for RSUT_DATATYPE_GET_CHAR_LENGTH
I_DATATYPE -
Data type: DD03P-DATATYPEOptional: No
Call by Reference: Yes
I_WITH_DELIMITERS -
Data type: RPYGSGF-FLAGOptional: Yes
Call by Reference: Yes
I_MAX_DOUBLED_DELIMITERS -
Data type: IOptional: Yes
Call by Reference: Yes
I_LENGTH -
Data type: IOptional: Yes
Call by Reference: Yes
I_DECIMALS -
Data type: IOptional: Yes
Call by Reference: Yes
I_WITHOUT_SIGN -
Data type: RPYGSGF-FLAGOptional: Yes
Call by Reference: Yes
I_EXTERNAL_REPRESENTATION -
Data type: RPYGSGF-FLAGOptional: Yes
Call by Reference: Yes
I_OUTPUT_LENGTH -
Data type: IOptional: Yes
Call by Reference: Yes
I_SIGN_LENGTH -
Data type: IDefault: 1
Optional: Yes
Call by Reference: Yes
I_SIGN_REPRESENTATION -
Data type: CDefault: '-'
Optional: Yes
Call by Reference: Yes
I_WITHOUT_GROUPING -
Data type: RPYGSGF-FLAGOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for RSUT_DATATYPE_GET_CHAR_LENGTH
E_CHAR_LENGTH -
Data type: IOptional: No
Call by Reference: Yes
E_WITH_SIGN -
Data type: SY-INPUTOptional: No
Call by Reference: Yes
EXCEPTIONS details
ILLEGAL_DATATYPE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ILLEGAL_LENGTH -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ILLEGAL_DECIMALS -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RSUT_DATATYPE_GET_CHAR_LENGTH 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_i_datatype | TYPE DD03P-DATATYPE, " | |||
lv_e_char_length | TYPE I, " | |||
lv_illegal_datatype | TYPE I, " | |||
lv_i_with_delimiters | TYPE RPYGSGF-FLAG, " | |||
lv_i_max_doubled_delimiters | TYPE I, " 0 | |||
lv_i_length | TYPE I, " | |||
lv_e_with_sign | TYPE SY-INPUT, " | |||
lv_illegal_length | TYPE SY, " | |||
lv_i_decimals | TYPE I, " | |||
lv_illegal_decimals | TYPE I, " | |||
lv_i_without_sign | TYPE RPYGSGF-FLAG, " | |||
lv_i_external_representation | TYPE RPYGSGF-FLAG, " | |||
lv_i_output_length | TYPE I, " | |||
lv_i_sign_length | TYPE I, " 1 | |||
lv_i_sign_representation | TYPE C, " '-' | |||
lv_i_without_grouping | TYPE RPYGSGF-FLAG. " |
  CALL FUNCTION 'RSUT_DATATYPE_GET_CHAR_LENGTH' " |
EXPORTING | ||
I_DATATYPE | = lv_i_datatype | |
I_WITH_DELIMITERS | = lv_i_with_delimiters | |
I_MAX_DOUBLED_DELIMITERS | = lv_i_max_doubled_delimiters | |
I_LENGTH | = lv_i_length | |
I_DECIMALS | = lv_i_decimals | |
I_WITHOUT_SIGN | = lv_i_without_sign | |
I_EXTERNAL_REPRESENTATION | = lv_i_external_representation | |
I_OUTPUT_LENGTH | = lv_i_output_length | |
I_SIGN_LENGTH | = lv_i_sign_length | |
I_SIGN_REPRESENTATION | = lv_i_sign_representation | |
I_WITHOUT_GROUPING | = lv_i_without_grouping | |
IMPORTING | ||
E_CHAR_LENGTH | = lv_e_char_length | |
E_WITH_SIGN | = lv_e_with_sign | |
EXCEPTIONS | ||
ILLEGAL_DATATYPE = 1 | ||
ILLEGAL_LENGTH = 2 | ||
ILLEGAL_DECIMALS = 3 | ||
. " RSUT_DATATYPE_GET_CHAR_LENGTH |
ABAP code using 7.40 inline data declarations to call FM RSUT_DATATYPE_GET_CHAR_LENGTH
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 DATATYPE FROM DD03P INTO @DATA(ld_i_datatype). | ||||
"SELECT single FLAG FROM RPYGSGF INTO @DATA(ld_i_with_delimiters). | ||||
"SELECT single INPUT FROM SY INTO @DATA(ld_e_with_sign). | ||||
"SELECT single FLAG FROM RPYGSGF INTO @DATA(ld_i_without_sign). | ||||
"SELECT single FLAG FROM RPYGSGF INTO @DATA(ld_i_external_representation). | ||||
DATA(ld_i_sign_length) | = 1. | |||
DATA(ld_i_sign_representation) | = '-'. | |||
"SELECT single FLAG FROM RPYGSGF INTO @DATA(ld_i_without_grouping). | ||||
Search for further information about these or an SAP related objects