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

Table Entry length

Former Member
0 Likes
515

HI all,

Please let me know the logic when user enters value in ZTABLE and he should be able to enter only either 6 or 8 digits of value else throw a error message.I have created a event generator for the same but m not able to find how to calculate the entered value length for the same table.

3 REPLIES 3
Read only

Former Member
0 Likes
479

Hi,



data : len type i.
data : name type string.


name = 'some values'.

len = strlen ( name ).

if len LT 6 and len GT 8
"Error.
endif.

Thanks,

Sriram Ponna.

Read only

0 Likes
479

There is a small error in above code, as you mentioned you want 6 or 8 characters as valid entry so you should change the above IF condition like this


if len = 6 OR len = 8.
"Error.
endif.

Read only

Former Member
0 Likes
479

k