cancel
Showing results for 
Search instead for 
Did you mean: 

Smartform to print table of contents page

Former Member
0 Kudos

Hello,

I am developing a smartform to print price catalogs. As part of this I need to print table of contents in the first page with certain catagoriers and page numbers. The problem here is that I wouldn't know which category will start on which page until I process the entire form. I have tried one approach where I defined the window in first page as 'Final Window', collect all the page numbers from the subsequent pages and print them in this 'final window'. But the issue is this table of contents can go for more than one page. I can't do a 'Go to new page' in a secondary window and defining it as a main window will not be processed as a 'final window'. If i processed this table of contents page at the end of all pages, I am not sure if there is a way to change the sequence of pages again at the end. Please share your suggestions.

Thanks..

Accepted Solutions (0)

Answers (1)

Answers (1)

gaurav_sharan
Explorer
0 Kudos

Hi,

In order to print properly based on category, you have to first build correct internal table that the way you want to print on pages. For example: lets say you want to print category 1 along with its price details in first page and category 2 related fields in second page as so on.

Then first step should be use program lines and build and internal table with category 1 and its field should be populated first then category 2 in the table. After you successfully prepare internal table lets say IT_TAB then use table and loop it using IT_TAB. In side table line you can trigger next page command when category changes to 2.

Hope this should solve your issue.

Thanks & Regards,

Gaurav.

Former Member
0 Kudos

Hello,

I know how to capture the categories and page numbers and thats what I am doing but my question was to how I can print this on the first page. Please read my thread and share some ideas.

Former Member
0 Kudos

Well i dont really see a way to do this properly.

But i got an idea how to overcome it. admitting that it is not a nice idea but still.

You could process these kind of form twice. First time into nirvana, getting and storing the informations you need to print on you TOC. and well then printing it a second time, restoring you previously stored information about the TOC and then print it.

former_member338644
Discoverer
0 Kudos

Dear All,

I know it is bit late but I am in the same situation were I need to print Table of content on the first page. Its challenging to print the TOC in several pages dynamically in several pages.

However, I would like to ask our former member who has given the solution to print the form twice. First time in to nirvana and second time active. I am wondering, how you have executed the form which actually doesn't get printed.

Thanks and Regards,