cancel
Showing results for 
Search instead for 
Did you mean: 

How to write two item in the same line?

Former Member
0 Kudos

In the smartforms,how to write two item in the same line?

eg

_______________________________________________

1 ************* 2 *****************

_______________________________________________

3 ************** 4 ******************

_______________________________________________

5 ***************

_______________________________________________

Anyone got any idea to do this.

Thanks in advance

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi

Create the 3 line types in the table and create the cells display the data as per your requirement.

Regards,

Sravanthi

Former Member
0 Kudos

Hi,

From the output you have provided i believe you have still the line just after printing the first item and then the folder for the second item as Append directly.

Pull down the line into the folder for the second item and make it as New Paragraph.

While all other nodes in the folder for the second item as Append Directly.

Also make sure the total width of the table is sufficient for the two items.

Also the line type is to be designed accordingly to accomodate the two items.

Regards,

Ram

Former Member
0 Kudos

Hi,

In the smartform the main windows is 20cm.I use the table output my data.Because the output is two item in same line,I define two rows in the table line type.

Question:

Should I define the table width 20cm?

In the main area of table , should I define two folders and each of folder include a line? The second item I had already defined as Append Directly,but the item 1 and item 2 don't in the same line.

Regards

Former Member
0 Kudos

You can try the old system aproach, as smartforms inherited some of sapscript mechanism and it still has them inside. In Smarstyles declare one of tabulator at the aproppiate distance and then in your form enter the old text editor and use

field1,,field2

field3,,field4

field5

Former Member
0 Kudos

Hi,

Yes it can be done using program lines just at the end of loop inside the table node.

In program lines , capture the item no. in a local variable declared in the global declaration.

copy the entire nodes to print an item and paste once again under the already existing nodes in a folder .

use the condition for the folder as new item no. not equal to the value stored in the local variable.

Make sure that the item folder to print the second item should have Append Directly in all its nodes.

Regards,

Ram

Former Member
0 Kudos

Hi Ram,

I have tried according your reply.But the result like below.

1 *********

_____________________ 2 **************

3 ************

_____________________4 *****************

(I use the line instead of the space.)

Do you get any idea to do this?

Thanks in advance

Former Member
0 Kudos

Hi,

are you using the same paragraph format for both.1,3 or 2,4 .

try to use different paragraph formats for both.

line take you to another line so better use different paragraph formats.

or play with paragraph formats in smartstyles(Indent and Spacing).

Thanks,

Sree.

naimesh_patel
Active Contributor
0 Kudos

First of all create as many cells as the total number of columns for TWO rows. E.g. if you have 4 fields in your internal table than create 8 cells in your table line.

Now, Put some program lines which can read next line in the table. Like for the same example, you have to put the code in the cell number 5 to read the second line which you want to print in cell 5, 6, 7 and 8.

Now, you need to avoid printing this second line twice - in the next row. For this you can set some flag (in the program lines of the cell 5) and check when you start printing the cell 1. If the flag is set, unset the flag and don't print.

Regards

Naimesh Patel

Former Member
0 Kudos

Hello Maserati Zheng ,

Please check if the concatenate statement can be used...

we can do like

concatenate line1 line2 into internaltable-line separated by SPACE.

it will have the same effect in the same window

in the looping logic we need to make sure that only 2 lines are concatenated

Hope it helps

Regards

Byju

Madhurivs23
Participant
0 Kudos

in driver program the, split the internal table into it_odd and it_even numbers .

take two windows side by side in smartform,

write 2 loops for two internal tables in the two windows.

rgds

Madhuri