cancel
Showing results for 
Search instead for 
Did you mean: 

fm

Former Member
0 Kudos

can anyone provide me with a function module to split a sentence into words

please hurry up its

urgent

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

STRING_SPLIT – Splits a string into smaller strings

SWA_STRING_SPLIT – Splits a string into smaller strings

TEXT_SPLIT – Splits text into smaller strings

Hope this helps, Do reward.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

1.FM:RSDG_WORD_WRAP

or

can please check this:

REPORT ZSTRING.

DATA: LENGTH TYPE I,

REMAINING_LENGTH TYPE I ,

NEXT_POINTER TYPE I ,

FIRST_HALF(25) TYPE C ,

SECOND_HALF(25) TYPE C ,

TEMP TYPE I .

PARAMETER: WORD(50) TYPE C . "INPUT WORD

START-OF-SELECTION.

LENGTH = STRLEN( WORD ). "Length of the input String

SEARCH WORD FOR '/'.

IF SY-SUBRC = 0 .

IF SY-FDPOS > 0.

MOVE WORD+0(SY-FDPOS) TO FIRST_HALF.

ENDIF.

TEMP = SY-FDPOS + 1.

IF TEMP LENGTH.

NEXT_POINTER = SY-FDPOS + 1.

REMAINING_LENGTH = ( LENGTH - SY-FDPOS ) - 1.

MOVE WORD+NEXT_POINTER(REMAINING_LENGTH) TO SECOND_HALF.

ENDIF.

ENDIF.

WRITE:/'Input String:', WORD

regards,

Shiva.