‎2014 Feb 24 6:34 AM
HI Experts,
I am facing alingnment issue in sap script.
when the output is of size 5, ie 90.91, its exactly below gross amount, but if the amount is more than 5 digits, for example 12390.91, the aligment is disturbed,,, my requitrement is,, as and when the size of the amount changes, for example, 43445462.50 etc.. it should align left side exacty under the heading, with the last digit bieng fixed at that place.i have tried giving tabs with right alignment, but its not working.
I tried with -7.2ZI as well but it didn't work.
thr ideal output should be as follows:
gross amount
12390.91
1254577587.12
90.91
Pelase help me to solve this issue.
Regards,
A.T.
‎2014 Feb 24 8:03 AM
Hi Ashish
As a thumb rule all amount should be right aliged. So you will have to play with your header and item both. For example you can give little less space for amount at item field and then move your amount header towards right will solve your problem
Nabheet
‎2014 Feb 24 7:57 AM
Hello Ashish,
Try like below by placing R in the editor for right alignment
= &KOMVD-KBETR(10R)&,,&v_dto(6R)&%,,<PP>&KOMVD-KWERT(R)&
‎2014 Feb 24 9:11 AM
Hi TP,
Thanks for reply .I am checking ,will let you know.
Regards,
AT
‎2014 Feb 24 8:03 AM
Hi Ashish
As a thumb rule all amount should be right aliged. So you will have to play with your header and item both. For example you can give little less space for amount at item field and then move your amount header towards right will solve your problem
Nabheet
‎2014 Feb 24 11:46 AM
Nabheet i tried right alignment also but i am not able to understand why its not working.
‎2014 Feb 24 11:52 AM
After trying right alignment at item level did you try change the header text position via tabs... I believe both header and item are having different paragraph format as we may need to adjust header position
Please attach screenshot of output and paragraph formats which you are using
Nabheet
‎2014 Feb 24 9:14 AM
Oh great!!! I guess you are the first one in SCN to call me as TP. Please check and let me know, whether it works.
‎2014 Feb 24 11:39 AM
‎2014 Feb 24 9:19 AM
Hi Ashish,
All amount should be right aligned. Also don't hard code in your sapscript. For lengthiest value it could cause problematic.
You can achieve this by creating a new paragraph format with different tab position of each column mentioning specifically right aligned for amount value column.
Thanks and regards
Srimanta
‎2014 Feb 24 11:52 AM
Gross Amount header seems to be in Left or Center aligned. Make it right aligned so as the amount field.
Also you can use &<amount>(c)& to compress the unwanted space in the variable.
‎2014 Feb 25 5:41 AM
Hi All,
i would be displaying number of digits equal to 10 or less than 10. but it has to be under the heading instead of moving rightwards.
ie.
GROSS AMOUNT GROSS AMOUNT
812.77 812.77
GROSS AMOUNT GROSS AMOUNT
7812345.87 7812345.87
in case of multiple line items, the amount has to be one below the other with right alignment as shown below
GROSS AMOUNT
12390.91
1254577587.12
90.91
currently its working fine for amount 90.91 i.e. five digits
please have a look at code snippet
header
item data
paragraph format T6 has 4 tabs
paragraph format P1 has 6 tabs
‎2014 Feb 25 7:16 AM
Hi Ashish
Why are you not using tab for Gross amount in header...? You should use for all fields in header to get proper positioning. Dont use space.
Please change it and check
Nabheet
‎2014 Feb 26 6:25 AM
Hi All,
i changed the 'SIGN' alignment to 'RIGHT' and now it is looking good.
Thanks for you supports.