cancel
Showing results for 
Search instead for 
Did you mean: 

how to keep starting point of each column as fixed in sap script

0 Kudos

Hi all,

I am creating a table in sap script which is having 4 columns.

The problem is that I want to keep the starting point of each column as fixed.

eg the first col should start from 3 rd row, secood column from 20th row .

I am not able to do so using tabs as the second column's alignment gets disturbed if the content of the first column is small; for a particular row.

Kindly help me and guide me how i can do this

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member209685
Participant
0 Kudos

Hi subhabrata,

I assume you have the problem when the value of a column is to long, in that case the columns for that row all move one step to the right.

As far as I know the simplest solution is to make the columns as wide as the maximum value you will be for thatcolumn. If that is not possible. Chop the value at a defined length, you can do this by specifiying the maximum length in brackets as the last part of the variable name just before the &. Like this &MY_VAR(10)&. So even if the contents of MYVAR is 20 character long it will now only print the first 10.

Cheers
   Adi

nabheetscn
Active Contributor
0 Kudos

Can you please quote your question clearly again. Using tabs we are able to fix the positioning. It does not matter whether we have value in prEvious field or not. Please clarify first column 3rd row and 2nd column 20 row not clear.

Nabheet

0 Kudos

Hi Nabheet,

I mean that the contents of the first column should start after 3 spaces from the leftmost part of the screen and the second column should start after 20 spaces from the leftmost part of the screen.Hope now u understood.Thanks in advance.

naresh_bammidi
Contributor
0 Kudos

Hi,

Try using Tabs while printing the data in script.if suppose,you are printing MATNR,ERNAM on script.for that your code in your script is as follows.

AS ,,&IT_MARA-MATNR&,,&IT_MARA-ERNAM&

Under Paragraph format AS ,create tabs as below

1      3    ch     "  content of the first column would start after 3 space

2      20  ch     " content of the second column would start after 20 space

accordingly adjust the tab positions, apply those tabs into script by using  Double comma as i mentioned in the above code snippet.i hope this would resolve your issue.

with regards

Naresh Bammidi