cancel
Showing results for 
Search instead for 
Did you mean: 

Sapscript Printing

Former Member
0 Kudos

Hi All,

Can any one tell me how we can make field properly alligned in sapscript. I used &field1(C)& and &field2(10)& to reserve spaces but it is also failing when any of the fields length increases.

Please suggest me how to ovecome this problem.

Thanks.

Shweta.

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

Hi shwetha,

Based on the fields increase the window size and define the character format and check the tab position.

Write the code in form as follows:

/:<C1> &var1&<c1>

Hope this helps you

Regards,

Rajani

Former Member
0 Kudos

Hi Swetha,

Check the unit of measure set for the tab positions, i guess it is CM try to adjust accordingly

or

change the unit of measure to CH (characters) so that it will be easy for you to set the tab positions ( tab position will be as per the data that is displayed, if you are using (C) formatting they consider the maximum length).

regards

padma

Former Member
0 Kudos

Hi Padma,

When I am trying to increase tab position it is not allowing me to increase the position position of tab it is by default set to 1 I dont know why it is happening, any idea on this..

Former Member
0 Kudos

Hi Shweta,

I dont know what is your output of SAP Script. But in case when there is possibility of one field to exceed in length, then better to place each fileds in a separate window.

Former Member
0 Kudos

Hi,

declare the field as

data: w_var(15) type c.

(or)

data: w_var type string.

Regards,

jaya

Former Member
0 Kudos

Hi Shweta,

I assume you are using paragraph formats with tabs, right?

In this case, please make sure that the tabs have the left or right alignment specified (not center), depending on how you want to align it.

If you're not using tabs, make sure that the paragraph format is left aligned or right if you want. If you have set this up correctly, for the same length of the field (like &field2(10)&), it will be definitely correctly aligned.

Best regards,

George

Former Member
0 Kudos

Hi George,

I am not using Tab in my paragraph format . Paragraph format is left alligned and I am using length with the field. but I dont know why it is not reserving space when ever any of the field length increases the complete allignment of that row gets changed.

I tried using paragraph format left alligned and also tried with the Tab positions . but nothing is happening.

Thanks.

Shweta

Former Member
0 Kudos

Hi Shweta,

Well, in this case, I believe your row is looking something like:

&var1& &var2& Text &var3& .......

In this case, please have all the variables with a length specification, like &var1(10)& ... This never happened in my experience, if you specify the length for all the variables, to not be aligned.

Best regards,

George

Former Member
0 Kudos

My row looks like:

&var1(10)& &var2(10)& &Text(40) &var3(10)& .......

Former Member
0 Kudos

Hi again,

I've just tested this in my system and it worked out just fine. The only explanation I can think of is that the text your are writing on one row is overflown to the second one and this is why you experience this. If this is so, try to restrict the number of chars for one row to a number accepted by your window.

If this is not so, then it will surely be solved if you use tabs in your paragraph formats.

Best regards,

George

P.S.: By the way, I've noticed in your example that your forgot the last & when writing &Text(40) variable. It should have been &Text(40)& or without & signs if it's not a variable. Look out for this kind of error in your text lines.

Former Member
0 Kudos

HI George,

Still I am not able to get out of the problem:(

I am doing in the same way but not getting .

I will beiefly explain what is actually happening.

I am having 7 fields to display in main window in a line.

for each field I am defining length say &field1(10)& so it should reserve 10 characters but it is not.

as if I give &field1(5)& then allignment changes all fields get shifted to left.

But if I pass space from program with my field for eg &field1(5)&&space(5)& where field space is containing 5 spaces. then it reserves space of 10 .

what I concluded is script is not reserving spaces for number of characters it is reserving only spaces for the number of characters existing in the feield and remaining spaces are not considered .

If possible please provide me some suggestions.

Thanks.

Shweta

Former Member
0 Kudos

Dear Shweta,

You can use tab position in the paragraph format with right, left and center alignment.

Try with this you will find your desired alignment.

Thanks .

Regards,

Vijay

former_member242255
Active Contributor
0 Kudos

you can use the paragraph format and align the output fields in script