cancel
Showing results for 
Search instead for 
Did you mean: 

Printing data in two colums

Former Member
0 Kudos

Hi Friends,

I got a scenario like. Printing data in Two Colums.

Ex:

1 6

2 7

3 8

4 9

5 10

Please help me to solve.

thanks in advance.

Regards,

Kumar.

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member203305
Active Contributor
0 Kudos

hi,

an easy way to solve ur problem. Have a look this code, it'll give u an idea how to solve it.


loop at ur_table.
l_count = l_count + 1.
l_mod = l_count mod 2.
* Impar
  if l_mod = 1.
move-corresponding ur_table
          to st_device-columna1. 
*Par
 elseif l_mod = 0.
     move-corresponding ur_table
          to st_device-columna2.
endif.
     append st_device .
endloop.

Regards

Former Member
0 Kudos

Why not construct an internal table with page no., col1 value , col2 value and pass that to the SmartForms? Simple coding fix, then just lay down the rows in the internal table.

Former Member
0 Kudos

Hi,

Plz change your dynamic template as per the requirement of output in yr smartform. this will done for yr header information of table and now for the data to be dispaly in the table in cloumn change in the static portion of the table as the requirement of yr output.

Regards,

Akg

Edited by: akg.amit on Mar 26, 2011 6:44 AM

former_member196280
Active Contributor
0 Kudos

If you are using smartform

If the number of rows are fixed then you can do this by creating templet with 2 columns.

If the number of rows is not fixed then you can create a table with line contaninig two columns.

In SAPscript.

You can define tab inside the paragraph format.

Regards,

SaiRam

Former Member
0 Kudos

Hi ,

I am Using SMARTFORMS.

Its not Fixed Rows.

EX:

Page-1

1 7

2 8

3 9

4 10

5 11

6 12

Page-2

13 19

14 20

15 21

16

17

18

Like this i need to print. Please help me.

Regards,

Kumar.

Former Member
0 Kudos

Hi Nivas,

Try this logic!!!

Create a line type with 2 columns in table in your main window. I hope the no of rows has to be fixed for the 1st column (i.e. if data overflows from 1st column than only it has to print in 2nd column). Create 2 text elements for 2 columns respectively & pass same value in both the text elements( ex: &number&).

Now set your condition accordingly in both the text elements condition tab. Create a program line inside your table loop and set a counter for every item. each time divide the counter by no of your max line items that can b printed in 1 column.

I hope you got the logic now how to resolve this issue.

Do appreciate if found helpful.

BR,

Vinit