Why you think this FM only works for list alv? How about this code?
LOOP AT I_DATA INTO WATAB.
V_TABIX = SY-TABIX.
CLEAR: IT_SENTENCE [].
CALL FUNCTION 'RKD_WORD_WRAP'
EXPORTING
TEXTLINE = WATAB-EMP_NAME
OUTPUTLEN = C_LEN
TABLES
OUT_LINES = IT_SENTENCE
EXCEPTIONS
OUTPUTLEN_TOO_LARGE = 1
OTHERS = 2
.
IF SY-SUBRC eq 0.
IF NOT IT_SENTENCE IS INITIAL.
LOOP AT TABLE IT_SENTENCE INTO WA_WORD .
WATAB-EMP_NAME1 = WA_WORD-EMP.
APPEND I_DATA 2 FROM WATAB.
ENDLOOP.
ENDIF.
ENDIF.
ENDLOOP.
Grid ALV output I_DATA2, not need that 'LINE OUTPUT' event any more. And 'SORT' function do not make sence here.
Regards,
Archer