Application Development 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: 

sapscript blankspace

Former Member
0 Kudos

hi,

   sapscript is showing blank space at 8th line but in print preview it showing correct.

for ex:10210113  0010 shear           1501            0.00

          1768322    ***

          10210113  0020 shear            1501            1.00

          1768324    ***

           .

           at 8 th line

          10401167  0080 shear             1502           0.00

                                                      1768325       ****

  in 1768325 space is coming make indicator to move rigt,but in preview its showing correct aligned.

thanks in advance.

18 REPLIES 18

venkateswaran_k
Active Contributor
0 Kudos

It may be a trailing space in the variable

Use condense

&Variablename(C)&

former_member306787
Active Participant
0 Kudos

It shouldn't happen if you use the same paragraph formats.

Please check whether the normal and the indented lines are printed using the same paragraph format.

Also check whether the line above '1768325' isn't overflowing to the next line, causing the indentation.

Former Member
0 Kudos

Hi Vinod,

There may be two reasons for mis alignmnet .

1 The variable decalre is of long length

2. The space may be the issue

Please revert if any issues.

Thanks,
Seshadri.

Former Member
0 Kudos

hi all,

     sorry for late reply,i checked no space but issue is not solved.

former_member220028
Active Contributor
0 Kudos

Hi,

print preview is just a preview and can differ from the output of the printers. you will find more information in the forum.

most alignment issues in sap-script comes from tabulators. if a variable is longer then the space between 2 tabulators. it is using the next tab, what will lead to a wrong output. so maybe a variable is not print at its right place. also try to supress the trailling space.

also check the trailling space of all variables in this line.

regards

Stefan Seeburger

0 Kudos

Please use this as follows:

For example your variable name is   abcd   then give as  &abcd(C)&

Regards,

Venkat

Former Member
0 Kudos

hi,

done    &WA_tot-RUECK(C)& ,but still empty space is coming

Former Member
0 Kudos

Hi Vinodh,

As you mentioned that the still empty space is exists even if you keep the same command in the 8th line

1.Is this 8 line is the last line of the print layout?

2. Is there any  extra TAB SPACE is manitained?

3. Kindly check the value of the field in debug how it is appearing.

Thanks

S.Rajendranath

Former Member
0 Kudos

Hi Vinoth,

Kindly check how it is appearing in debug mode, if it is coming correct then try to remove that entry from the table and check next line is also behaving the same.

delete 8th entry and check 9th entry also behaving same.

if 9th works fine then issue with entry else check whether any tab space is happening remove commos infront of entries.

thanks,

Sathees Kannan

satyabrata_sahoo3
Contributor
0 Kudos

Hi

Try using &WA_tot-RUECK(CZ)& . If not work, check your Tab settings.

-Satya

0 Kudos

Hi Vinod

Can you paste the screenshot of the window. (where you specified the variable)

Also output of the page, (screenshot)

I want to see Paragraph settings in left.

Regards,

Venkat

0 Kudos

hi,

  as u said,i have attached screenshot of window.

in print preview,

but after taking print out

last line 768325 is coming below 1502 and dly1611/1611 disappear.

0 Kudos

In the script

where ever you mentioned wa_vals-cont  - make it as wa_vals-cont(C16)  - uniformly

Regards,

Venkat

0 Kudos

hi,

  i have done what you said now output like this

      10210113   0010  shear         1501              0.00

|      1768322     ***                                           0.00

       |

|      10210113  0020  shear          1501              0.00

       1768323   ***   

|      |

|      10401167  0030  press-brake 1502 BO123  0.00     

                                                1768324  ***

                                                 |

                                                 10401167  0040  press-brake   1502

                                                 1768325      ***

after 10401167 entire thing is shifted.

0 Kudos

I think it is because not all of your lines total to the same. What i mean is if you add up the length of all the fields in your first row for example, then you get: 29 + 5 + 5 +3 + 7 + 2 + 16 + 1 = 68. But not all your fields have defined lengths. I would chnage this so that they all add up to 68, or whatever value you decide i.e. where you have, for example WA_VALS-CONT, you need to put a length like the other fields. In other words similair to what Venkat above is saying, because when I look at your lines they are not all adding up to the same length.

0 Kudos

Yes Vinod,

As Glen Said, please maintain the equal line length at all if conditions.

Thanks Glen

Regards,

Venkat

Former Member
0 Kudos

hi,

 

issue happen only in main 01 window,if i take only one order then value are coming correct in main window.

0 Kudos

Yes, it is because it is not reaching the other parts of your IF statement which contain differing lengths, but as soon as you hit these pieces of code it is going to fall over. Just my opinion.