‎2007 Aug 27 4:15 AM
Hi Experts,
I have to write an upload program where I need to validate the no. of characters in a field.
There are 255 characters for a field, I need to ensure that user while uploading user does not upload more than 255 characters.
Thanks in Advance,
Regards,
Irfan
‎2007 Aug 27 5:30 AM
Hi Irfan,
When you are uploading the file, u will be using an internal table. so make sure that the internal table field contains the char (255). so when uploading the text it will upload till the 255 characters only rest will be left.
Thanks
Yogesh
‎2007 Aug 27 4:21 AM
Hi Irfan,
if you are validating it in a report just check for the 255 characters if it more than 255 characters display a message.
Logic.
data : ch type char255,
ch1 type c.
ch = field+0(255).
ch1 = field+255(1).
if ch1 is not initial.
display message.
endif.
if you want to do the validation in a screen.
do it on some button click event.
if it is in the selection screen you ahve events for that.
Award points if this is helpful.
Regards,
Ravi G
‎2007 Aug 27 5:30 AM
Hi Irfan,
When you are uploading the file, u will be using an internal table. so make sure that the internal table field contains the char (255). so when uploading the text it will upload till the 255 characters only rest will be left.
Thanks
Yogesh