Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Upload Program

Former Member
0 Likes
401

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
379

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

2 REPLIES 2
Read only

Former Member
0 Likes
379

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

Read only

Former Member
0 Likes
380

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