‎2009 Nov 09 8:32 AM
When I use this standard function 'TR_SPLIT_TEXT' to split text.
If the text that i want to split is longer than length parameter (IV_LEN) 1 character, then it will cause a shortdump.
For example, my test data is IV_TEXT = 'ABCD' and IV_LEN = 3.
After execute function, it will occur Runtime Errors 'ASSIGN_LENGTH_0'.
Please help to suggest how to fix this shortdump. Thank you.
‎2009 Nov 09 9:52 AM
Hi
This is not suitable function module for splitting the text.
try TEXT_SPLIT function module for splitting text.
Regards
sateesh
‎2009 Nov 09 9:57 AM
Hi,
Why do you need a function module when SAP is providing you Simple SPLIT statement.
Regards,
Lakshman..
‎2009 Nov 09 10:05 AM
Why cant you write a logic.
parameters:pa_text type char255.
parameters:pa_pos type i.
types:begin of ty,
line type char255,
end of ty.
data:len type i.
data:cntr type i.
data:offset type i.
data:itab type table of ty.
data:wa type ty.
len = strlen( pa_text ).
cntr = ceil( len / pa_pos ).
offset = 0.
do cntr times.
if sy-index = cntr.
wa-line = pa_text+offset(*).
append wa to itab.
clear wa.
endif.
wa-line = pa_text+offset(pa_pos).
append wa to itab.
clear wa.
offset = offset + pa_pos.
enddo.
‎2009 Nov 11 3:00 AM
I want to fix shortdump in this function because it is being used in 2-3 programs in my system.So, I don't want to change source code in every program that use this function.
‎2009 Nov 11 3:17 AM
Hi
Take IV_LEN as type I or String.
if you dont want to change it take Temp Variable type String or type I.
First you do your operation and then pass it to IV_LEN
Cheeerz
Ram