This website is not affiliated with, sponsored by, or approved by SAP AG.

Repeating pages

Development SAPscript/ Smartforms

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

Repeating pages

Postby Bebop » Tue Feb 07, 2012 9:27 am

Hi folks,

here's what I want to do: I want to pass an internal table with data to a Smartforms form. For each line of this table I want to print one page. They all look the same.

Now, I have a PAGE_FIRST page with a MAIN window.
At the end of the MAIN window I have a line of code that reads the next line of the table. If not successful it sets a flag (global var)

Then follows a command with the condition that this flag is not set.
The command states "Go to page PAGE_FIRST". Now, it adds one empty page and ends the form all together.

But I want this command to do a Steely Dan: "Back, Jack, Do it again".
How can I do that ???

Best regards
Frank
Bebop
 
Posts: 79
Joined: Mon Jun 06, 2011 9:13 am

Re: Repeating pages

Postby Gothmog » Tue Feb 07, 2012 9:51 am

Are you using a Loop node on the internal table for your Go to page PAGE_FIRST Command nodes ?
68 74 74 70 3a 2f 2f 74 69 6e 79 75 72 6c 2e 63 6f 6d 2f 62 64 6f 37 6d 77 67
Gothmog
 
Posts: 1941
Joined: Wed Sep 12, 2007 4:46 am
Location: Probably not home

Re: Repeating pages

Postby Bebop » Tue Feb 07, 2012 9:54 am

Hey, just found that out myself. Of course I have to do a loop and use the command as page break as long as sfsy-page is smaller than the total number of lines in the table.

I was just thinking the wrong way.

Thanks a lot !
Frank
Bebop
 
Posts: 79
Joined: Mon Jun 06, 2011 9:13 am

Re: Repeating pages

Postby Gothmog » Tue Feb 07, 2012 10:37 am

You don't even need to check the page number, if you do that in a loop on the internal table. :)
68 74 74 70 3a 2f 2f 74 69 6e 79 75 72 6c 2e 63 6f 6d 2f 62 64 6f 37 6d 77 67
Gothmog
 
Posts: 1941
Joined: Wed Sep 12, 2007 4:46 am
Location: Probably not home

Re: Repeating pages

Postby Bebop » Tue Feb 07, 2012 10:40 am

Well, if I don't then I'll have an empty page at the end.

PAGE_FIRST
MAIN
LOOP
TXT1
TXT2
[...]
COMMAND PAGE_BREAK

After the last loop it would do another page break.

Thanks a lot !
Frank
Bebop
 
Posts: 79
Joined: Mon Jun 06, 2011 9:13 am


Return to SAPscript/Smartforms

Who is online

Users browsing this forum: No registered users and 3 guests





loading...


This website is not affiliated with, sponsored by, or approved by SAP AG.