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

problem with character field

Former Member
0 Likes
1,225

hi experts,

i have two character fields with legth 18 each..values are 123 and 126.

i have to display in smartfrom as 123 to 126.

bcoz of 18 characters leght i am facing some place adjutment problem in smartfrom

so it is displaying as

' somespace 123to

126.

can any body plz help me how to acheive this?

Edited by: s veena on Jan 31, 2011 12:17 PM

11 REPLIES 11
Read only

Former Member
0 Likes
1,194

Try the key word CONDENSE.


   CONDENSE VARIABLE 

BR

Mishra

Read only

0 Likes
1,194

Hi mishra,

Thanks for giving reply

.

i have to display as

gv_sernr = 123 to 126 ( it should be one line).

but it is coming like

somespace 123to

126.

can you plz help me out....

Read only

0 Likes
1,194

I think you should search the forum or google about concatenation.

Or do F1 on CONCATENATE.

These are basic questions for a fresher, do some search or investigation on your issues you will get the result.

Regards

Mishra

Read only

0 Likes
1,194

Hi veena,

Condense it before concatenating or use as below;

&gv_sernr_from(C)& to &gv_sernr_to(C)

Regards,

Karthik D

Read only

0 Likes
1,194
gv_sernr = 123 to 126 ( it should be one line).
but it is coming like
somespace 123to
126.

>

> I think you should search the forum or google about concatenation.

> Or do F1 on CONCATENATE.

I'm not sure how CONCATENATE will serve here,but CONDENCE might do.

@ S veena: Can you please check the space on the window if this is sufficient to accommodate the whole value in one line.

Cheers,

Amit

Read only

0 Likes
1,194

For both variables use -->> shift var_nam LEFT DELETING LEADING '0'.

and then concatenate var1 ' to ' var2 into var3.

Read only

0 Likes
1,194

@Amit: Concatenate will serve if you concatenate those tow variable in to one..

Read only

0 Likes
1,194

my previous assumption was it is showing leading zeroes.

For space either you can use condense for both variables or shift var_nam LEFT DELETING LEADING ' '. and then concatenate using the way i have mentioned earlier.

Read only

Former Member
0 Likes
1,194

since its a character variable u can use condense statement to compress it

Read only

Former Member
0 Likes
1,194

Check with the layout size too.

You can do one thing: take another variable of char type and concatenate the two fields into it. with TO as a seperator.

also check with the length of the variable.

The box containing the varaible should be large enough to hold it.

Regards, Uttam

Read only

Former Member
0 Likes
1,194

Hi Veena,

write in smartform like this

&gv_sernr_from(CR)& to &gv_sernr_to(CR) " CR is used for condense as well as Right allignment

Regards,

Ganesh Reddy