Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SMARTFORMS and printing labels from tables parameter

Former Member
0 Likes
822

I would like to pass a table to a smartform and print the data as labels. The labels would be 2 wide and 5 high. How can I print a label, go to the right print that label and then go down, repeat...

Thanks in advance!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
678

Hi Frank,

How many labels are there per Sheet.?

How many labels are there in each row.

Is it 1 x 1 then go on to down until end of Sheet or

1 x 2 ..?

I have done this requirement already.. please reply to my questions.

I would like to pass a table to a smartform and print the data as labels. The labels would be 2 wide and 5 high. How can I print a label, go to the right print that label and then go down, repeat...

Thanks in advance!

4 REPLIES 4
Read only

Former Member
0 Likes
679

Hi Frank,

How many labels are there per Sheet.?

How many labels are there in each row.

Is it 1 x 1 then go on to down until end of Sheet or

1 x 2 ..?

I have done this requirement already.. please reply to my questions.

Read only

0 Likes
678

The labels are 2 wide by 5 high.

Thanks.

Read only

0 Likes
678

Hi Frank,

Its very simple.

Take only one Main Window in your layout.

And Create LOOP Node. With in the LOOP node, create 2 TEMPLATEs to print left and right side Labels at a time.

So, when the LOOP is started, you have read the second record using Program lines node. Then you can print 2 labels in the row at a time. then for the second row lables..read the third and fourth records at a time..likewsie for upto 5 rows.

Within a single Loop, you are printing 10 records from internal table. Keep a flag to avoid printing of same records in the next loop.

Its very simple when you implement logic.

Let me know ifyou have any questions.

Ram

Read only

Former Member
0 Likes
678

hii

that your label data will be there in a internal table. Each record of your internal table has one label information.

1. Arrange 10 windows in page.

2. Declare index_variable globally to avail in all windows.

index_variable = 1.

Read itab index index_variable. Put data in window 1 as label.

index_variable = index_variable + 1.

Read itab index index_variable. Put data in window 2 as label.

index_variable = index_variable + 1.

Read itab index index_variable. Put data in window 3 as label.

continue 10 windows..

3. Next page continues with index_variable 11...and so on.

You can develop the way to put data as labels in this way even you have itab in different structure that i assumed.

chk this from link..

<b>

to pass table check this link

<b>

check this link too

<b>http://www.zebra.com/id/zebra/na/en/documentlibrary/misc/sap_smartforms_technical.File.tmp/13760L_SAP_Smart_Forms.pdf</b>

Regards

Naresh