2006 Feb 19 4:14 AM
Hi,
I am getting data in one of the line of internal table which is greater than ceratin say 50 characters.
If that data is greater than 50 characters then I want to truncate remaining charaters after 50.
How do I do it ?
Hi,
I am getting data in one of the line of internal table which is greater than ceratin say 50 characters.
If that data is greater than 50 characters then I want to truncate remaining charaters after 50.
How do I do it ?
2006 Feb 19 4:50 AM
That is easy. While populating data you can handle taht.
ITAB-STRING = G_STRING+0(50).
Here ITAB-STRING is your internal table field which is 50 characters long.
G_STRING is actual string which can have any length.
2006 Feb 19 6:18 AM
hi Tushar ,
you can do this,
Loop at itab into wa.
len = strlen ( wa-string1 ).
if len gt 50.
wa-string1 = wa-string1+(50).
modify table itab from wa transporting string1.
endif.
endloop.
regards
satesh
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |