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

Visible Length

Former Member
0 Likes
2,633

hi,

when i declare a parameter of length 20 and gave a visible length 15. when i try to display the entries in the parameter it is giving me only the 15 characters instead of all the characters entered. (SAP 4.7EE)

code snippet:

Report yxyz.

parameter:

p_name(20) type c visible length 15.

write:/ p_name.

when i enter a value ABCDEFGHIJKLMNOPQRST

the result will be ABCDEFGHIJKLMNO.

11 REPLIES 11
Read only

Former Member
0 Likes
1,535

hi ,

see whatever you said may be correct but if you try same snipett on any other system you will get correct result....

you might have got it due to some patche errors.

regards.

mohit

Read only

GauthamV
Active Contributor
0 Likes
1,535

Hi,

That addition Shortens only the visible length of a parameter field on the selection screeen.

I checked your same code and iam getting full ABCDEFGHIJKLMNOPQRST.

Read only

Former Member
0 Likes
1,535

i tried it but still it gives me the same. i am working in SAP 4.7 version.

Read only

GauthamV
Active Contributor
0 Likes
1,535

Hi,

I also checked in 4.7 version only....

Read only

Former Member
0 Likes
1,535

Hi,

The problem is with the patches.

i got the answer.

thanks for the help.

Read only

Former Member
0 Likes
1,535

it is obvious that it will show the visible length only...you should omit that portion...


parameter:
p_name(20) type c.

Use the code above like that...

Read only

Former Member
0 Likes
1,535

Hi

I tried out your code. It works fine for me. If the problem continues, then try using a breakpoint or debugger and check if the value is changing anywhere. Are you using these lines together or is there some other code in between?

Hope this helps

Regards,

Jayanthi.K

Read only

Former Member
0 Likes
1,535

Hi

I checked your code in my system and it's giving the whole string of 20 characters.

Check the output length of the parameter during debugging.

Pushpraj

Read only

dev_parbutteea
Active Contributor
0 Likes
1,535

Hi,

Maybe because you specified VISIBLE LENGTH 15, you can see only the first 15 characters.

If you would click on the field on the selection screen, you would see that it contains the full 20 characters but its only that there is space to display only the first 15 characters on the screen.

Regards,

Dev.

Read only

Former Member
0 Likes
1,535

Hi Sarves,

The code is working absolutely fine rather than the parameter declaration what you havew given try out

p_name(20) type c.

the addition visible length(vlen) defines the visible length of the input field as vlen, whereby vlen is entered directly as a positive number.

If vlen is smaller than the length of the parameter and smaller than the maximum visible length, the input field is displayed in the length defined in vlen, with movable content.

Otherwise, the addition is ignored.

Hope you got the concept and the relavant solution

Thanks and Regards

Srikanth.P

Read only

Former Member
0 Likes
1,535

Hi,

Look my friend the basic concept of using visible length is to display the specified length of the parameter in the basic list.

i.e if u specify visible length of 15 characters than u can only view 15 characters. It's a way that u hide your string at display time.

the statement visible length truncates the string starting from rigth to left.

if u think u got the answer to your query.

Regards