‎2009 Feb 04 4:33 AM
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.
‎2009 Feb 04 4:38 AM
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
‎2009 Feb 04 4:40 AM
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.
‎2009 Feb 04 5:17 AM
i tried it but still it gives me the same. i am working in SAP 4.7 version.
‎2009 Feb 04 5:22 AM
‎2009 Feb 07 7:44 AM
Hi,
The problem is with the patches.
i got the answer.
thanks for the help.
‎2009 Feb 04 4:40 AM
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...
‎2009 Feb 04 4:43 AM
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
‎2009 Feb 04 4:45 AM
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
‎2009 Feb 04 4:47 AM
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.
‎2009 Feb 04 4:50 AM
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
‎2009 Feb 04 4:56 AM
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