02-27-2009 11:01 AM
Hi developers,
I am new at Sapscript and I'm having a lot of troubles trying to understand how to use tabs ',,'.
I set the position for tabs but I really don't understand how it works... (My aim is to make the column of a table aligned).
Wich is the relation between what I wrote into this position and what i display?
Does this: '',,&field_name1&,,&field_name2&,," write field_name1 in the first position and field_name2 in the second one? Do I have to use different notation? (like repeating ,, twice ',,,,' or three times ',,,,,,' for second and third position and so on...)
...As you understand I'm really confused!!
Thanks,
Simone
02-27-2009 11:18 AM
Hi,
,, means one tab
,, &field1& means field1 would be displayed in 2nd tab position.
,,,,&field1&means field1 would be displayed in 3rd tab position.
Regards.
02-27-2009 11:04 AM
Hi Simone,
&fieldname(20)& it will automatically take 20 characters and it will get automatically aligned.
And ',,' 2 togetther is considered as one tab.But the best way to do it is Give that field a particular max. length. It will automatically fall in place.
Much Regards,
Amuktha.
Edited by: Amuktha Naraparaju on Feb 27, 2009 12:07 PM
02-27-2009 11:07 AM
Hi,
I can see how you're confused, anyone who's every worked with SAPscript will understand.
It may help to think of this as you would MS Word, but essentially your understanding is correct. The line starts at the first character, if you first have ,, it will tab to the first tab stop then output the field. The next ,, will go to the next tab UNLESS the field is longer than the space between tabs in which can you'll be at the third tab. If you want to jump multiple tabs you would specify ,, multiple times.
Good luck,
Nick
02-27-2009 11:18 AM
Hi,
,, means one tab
,, &field1& means field1 would be displayed in 2nd tab position.
,,,,&field1&means field1 would be displayed in 3rd tab position.
Regards.
02-27-2009 12:00 PM
Hi,
Regarding your query:-
Does this: '',,&field_name1&,,&field_name2&,," write field_name1 in the first position and field_name2 in the second one.
You are absolutely right.
Now suppose you want to position the first field_name1 in the second tab position ( defined in the corresponding paragraph ) then you will use ,,,,&field_name1& If you want to position at say 5th tab posistion then it should be ,,,,,,,,,,(total 10,)&field_name1& etc etc
As mentioned by the previous post, just remember ,, means 1 tab position. Thus if you count total no of ,, appearing before the field, that will give you the tab position where that particular field is being positioned.
I hope this helps,
Regards
Raju chitale