cancel
Showing results for 
Search instead for 
Did you mean: 

Labels printing in new page after every iteration

Former Member
0 Kudos

Hi all,

I have to print vendor addresses in labels 64 * 34 mm(total 24 in number, 8 * 3) on a page. I am passing the vendor numbers to the smartform. in smartforms fetching address numbers of the vendor using query and storing it in an internal table. after that under a loop node( address numbers are being looped), program lines are written to determine the position of the address ie sy-tabix / 24. there is a template under it under which the address nodes are being displayed. the addresses are coming properly but after every iteration the page gets changed. for 24 vendor addresses i am getting 24 pages of output instead of 1 page. how to counter that.

Regards,

Mallick

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Labels printing in new page after every iteration has been solved. If anybody has any queries he/she can email me.

Former Member
0 Kudos

Dear Debopriyo,

I have been trying to print Excise No. & Date on pre-printed Material Stickers thru SapScript. Each sticker is of (4X2.5inch) (widthXheight) dimension and there are two such stickers in a row on my sticker roll. The Excise No. & Date has to be printed at the bottom of these stickers.

To accommodate the preprinted portion of the stickers, I have inserted blank lines (with /) in the page. This setting works well for the first page, but doesn't pass-on to the next page.

In other words this inserted space doesn't get reflected on the second page and the very first label on the second page starts from the very first line while it should leave a space of about 2 inches before printing the Excise No. and Date.

What shall you suggest in this case. I understand that it's very difficult to get a feel of the problem by only going thru a mail. If you don't mind please give me your emai-id so that I could send a scanned copy of the sticker also to you to understand my requirement better.

Regards,

Alok.

Former Member
0 Kudos

Dear Alok,

Make as many main windows as number of labels on a page. Place the main windows as they are printed on the page by adjusting left, upper, right margin on page-windows. Depending on the label size you put as many blank lines and keep the required number of lines reserved for displaying Excise No. & date. Use protect and endprotect so that the writings on a label don't spill over to the next one. I am sending what I have done to your email-id alok.neel@hotmail.com. Hope having a look at it, you might be able to do it properly. My email-id is dpitguru@gmail.com.

With

Former Member
0 Kudos

Dear All,

Thanks for your cooperation. Girish, your suggestion is absolutely bang on. I used SAPSCRIPT to print labels. By creating the same number of main windows as the number of labels on the page. And called 'Open_form', 'Write form' and close_form to print the labels. Shivakumar, even your suggestion is correct. Yes the labels got printed in each new page after every iteration because I put table under loop instead of loop under table. But the problem with putting loop under table as suggested by you is that the page break does not take place automatically, only one page gets displayed in the output. If the number of outputs we get is greater than number of labels on a page, the previous values on that particular position gets overwritten by the previous one. So, you have to write some code in driver program for that. Girish and Shivakumar, I will definitely reward you people points for your valuable suggestion. Srikanth, i will mail to you the rstxscrp of that SAPSCRIPT layout,rogram for calling the program and the external program I used for fetching data's (ITCSY).

thanks a lot.

Debopriyo

Former Member
0 Kudos

Hi,

Use the table to loop instead of using loop to pass the value and this will not trigger the new page until the present page is full.

if you have any issue, let me know

Regards

Shiva

Former Member
0 Kudos

pleas use you loop data in the smartform routine itself ...

like don't close the page ....

in script

open_form

loop at itab.

write_form .

endloop.

close_form ..

so that the allt he loop data will be printer and then it was closed ....like that do it in the smartform call the loop in the same window ...

Girish

Former Member
0 Kudos

Hi Deb,

I have a similar kind of prob, Can you tell me if you got your problem solved, If yes Can you help me with it. You can reach me as well on sri.sap@hotmail.com