cancel
Showing results for 
Search instead for 
Did you mean: 

Number of records on new page

Former Member
0 Kudos

Hi All,

In smartform I have a requirement in which I have data in the internal table like below:

Column1 Column2

001 Value1

001 Value2

001 Value3

002 Value4

002 Value5

002 Value4

Is it possible somehow that whenever value of the column1 changes data should start coming in new page for example first three records(001) and rest of the records(002) come on new page.

What should I make use of, I am currently using Loop in which I can not use command, but if I use template I can use the command. After this problem I have another problem, I have the data in the secondary window and system is not allowing to create command in secondary window in template.

I can not make use of the main window here, kindly give me some suggestions.

Thanks,

Mark

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks Nick for your suggestion, I know what you mean let me try to implement this kind of logic and if I am stuck into something then I will again shoot and ask question to you.

Once again thanks for you kind look-into my problem.

Thanks,

Mark

Former Member
0 Kudos

Hi Nick,

Thanks for your suggestion.

What I have in my smartform is three pages. Page one contains the static details, page 2 which is the next page of page one contains dynamic selection and here data is displayed with the help of loop(data exists in the internal table) and third page which is the last page and also contains dynamic selection as I mentioned above it will contain n number of records. Now logic is something like let the data of second page to continue(Real data is inside the main window) and once the data gets finished of the main window on second page then call the third page in which set of some records should come on new page(As I mentinoned in my first post).

What currently I am doing is I have the secondary window in my last page and when data is finished in the second page I am calling in at last the command which is calling the third page and this is how the data inside the secondary window flows from the third page onwards. Now since I need the functionality of the new page from third page( I mean when all the data of main window inside the second page finishes) for the set of records which are same, here the problem is coming since I am trying to make use of the command in the secondary window on third page, system is not letting me do this since window is not a main window on third page, but on the other hand I can not make use of the main window on the third page since I do not require the data of main window on third page also.

How should I do it. Hope I am clear in my views, any clues.........

Thanks,

Mark

Former Member
0 Kudos

Hi Mark,

Does your second page and your last page have a very different layout? My thought is to actually include the elements currently in your last page at the end of the main window and delete the last page.

The MAIN window will then flow something like this;

Current MAIN processing.

At the end of the current processing trigger a new page (page2 again)

Loop and template from your last page

Within the loop whenever your column1 value changes trigger a new page (page2 again)

Once your loop is complete the form ends.

If your page2 and last page have a different layout you may still be able to use this approach, you will just need to create a global flag that is changed between your current main process and the loop process. You can then apply this flag as a condition on the windows which differ between your page2 and lastpage.

Let me know if any of this is not clear.

Regards,

Nick

Former Member
0 Kudos

Hi Mark,

As your MAIN window is presumably being used for some other purpose this gets a bit tricky. There's nothing available that can trigger a new page outside of the MAIN window (as I'm sure you've discovered), so if the logic in your main window only results in (let's say) 2 pages, you can trigger additional pages but these will be static. If the table in your question would result in a variable number of pages greater than the number created by the main window it's hard to see how this can be achieved.

If you could explain the role of the main window currently and if there's a relation between the data in the main window and the table in your question there may be a way of extending the main window to provide the functionality.

Regards,

Nick