Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Obsolete Function Module

Former Member
0 Likes
953

Hi,

Can anybofy please let me know the replacement for the Obsolete Function Module STRING_LENGTH.

Regards

4 REPLIES 4
Read only

Former Member
0 Likes
795

You can do either this way > strlen(itab-matnr)

or

use SWA_STRINGLENGTH_GET Fm.

do reward if solved.

Amit.

Edited by: Jony on Apr 28, 2008 9:46 AM

Read only

Former Member
0 Likes
795

Hi,

You can use..

Method:cl_abap_list_utilities=>dynamic_output_length( string )

Reward if found helpful

Read only

0 Likes
795

hey why dnt u use the command STRLEN

it will be much easier and faster

Read only

Former Member
0 Likes
795

Hi,

check the code below.

DATA : L_STRING TYPE STRING,

LENGTH TYPE I.

L_STRING = 'ASDFGHJK'.

CALL FUNCTION 'STRING_LENGTH'

EXPORTING

STRING = L_STRING

IMPORTING

LENGTH = LENGTH

.

WRITE : / LENGTH.

replacement :

CALL METHOD CL_ABAP_LIST_UTILITIES=>DYNAMIC_OUTPUT_LENGTH

EXPORTING

FIELD = L_STRING

RECEIVING

LEN = LENGTH

.

WRITE : / LENGTH.

REWARD IF USEFUL