cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with printing one variable in one line in smartforms

Former Member
0 Kudos

Hi,

Please help me. It's my first time to use smartforms, and my problem is that I am trying to print one variable on one line and I just don't know why the variable splits and prints the other half on the next line. On my paragraph format, I only chose the "Left-aligned" as my alignment choice and line spacing as one. I used a character format for the variable just to make it bold. The width of the window is 19.9cm. Please, really hope someone could help me. Thanks.

Moderator message - Moved to the correct forum

Edited by: Rob Burbank on Oct 13, 2009 9:16 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If you are still facing the problem then just try once by removing the (C) in the fields. (C) is used for condensing a field.

Try to write this way.

SURNAME <E1>&wa_surname&

FIRSTNAME <E1>&wa_fname&

MIDDLE NAME <E1>&wa_midname&

Hope this will help u.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi, here are the variable declarations and in the structure I used, I declared the 3 variables just the same as this as well.

nachn LIKE p0002-nachn,

vorna LIKE p0002-vorna,

midnm LIKE p0002-midnm,

Since I am having problems with variable "vorna", what I did is I declared as like this:

vorna(40).

This is what I did in the structured table as well, declared it as 40 characters. It did work, I'm just not satisfied with the work around I did.

Hope you could share some more. Thanks.

Former Member
0 Kudos

Hi all. Thanks for the replies. I used the data element with 40 characters and the firstname is just 18 characters. In declaring the itab-firstname, i used (40). I also tried LIKE data element. Oh please, please, help me. Thanks.

Former Member
0 Kudos

can u show ur exact code of declaration of three names ? The variable seeks whole space as it may be 40 here + hard coded text, even if it is populated with a smaller value. i.e. variable declared with 40 characters will take space of 40 characters to print even if its populated with less than 40 character.

Former Member
0 Kudos

Yes. There are actually 3 variables on that window:

SURNAME <E1>&wa_surname(C)&</>

FIRSTNAME <E1>&wa_fname(C)&</>

MIDDLE NAME <E1>&wa_midname(C)&</>

The variable for the firstname is the one being split to the next line. It's like half of the firstname is combined with the middlename as shown in the example:

FIRSTNAME FIRST

MIDDLE NAME NAME MIDDLE NAME

When it should be:

FIRSTNAME FIRST NAME

MIDDLE NAME MIDDLE NAME

Thanks.

Former Member
0 Kudos

Check for the output length of the data type associated with the variable first name.... the amount of space available/window width may not be sufficient. Check with reducing the no. of characters while declaring the data type for first name variable. U will have to optimize between output length (directly dependent on declaration) and the width of column. If the output length of associated data type is more than available window width data flows to next line.

Former Member
0 Kudos

see the windows width in form layout.

if the width is sufficient then .. are you printing anything else in the window?