cancel
Showing results for 
Search instead for 
Did you mean: 

issuein sapscript alignment

Former Member
0 Kudos
295

Hi,

I my SAP script, with the line items, the first column aligned properly, while coming to second line the quantity and amount fields are misplaced by 2 characters with the previous column.

For eg:

column1 column2 column3 column4 column5

1 234 345678 89 22345908

2 234 434 89 3498

the output is coming like this.

but my output shud be,

column1 column2 column3 column4 column5

1 234 345678 89 22345908

2 234 434 89 3498

Also after this i want 1 blank line.

Please kindly help to solve this issue.

Advance thanks,

Karthik.

<MOVED BY MODERATOR TO THE CORRECT FORUM>

Edited by: Alvaro Tejada Galindo on Dec 17, 2009 10:45 AM

View Entire Topic
Former Member

Hi,

To avoid such thing always specify the number of character spaces to be allocated for the values. To do this

use &VARIABLE(MAX LENGTH)&

Variable - name of the variable used to print the value

Max Length - The character length of the variable ( as maintained in the Table ).

In ur case it will be as


P1 &col1(10)& &col2(15)& &col3(15)& &col4(20)&

The above code will allocate the specified amount of length for each column and hence will avoid the misplacement of the text.

Also for more formatting options go through this link :[ Formatting Options in SAPscript|http://help.sap.com/saphelp_nw70/helpdata/en/d1/802d7d454211d189710000e8322d00/frameset.htm]

Hope this solves ur problem.

Regards,

Bhavesh.

Former Member
0 Kudos

Thanks for ur Reply, Issue solved.

Regards,

Karthik

Former Member
0 Kudos

but in case if 1 or 2 column is blank then its shifting the column and alignment.

TT1992
Discoverer
0 Kudos
ill comment 15 years later.... but THANKS SO VERY MUCH