cancel
Showing results for 
Search instead for 
Did you mean: 

Display a total result on a window at the latest page (Page First or Next)

Former Member
0 Kudos

Hello SAP Community Network,

I would like to display some results on the latest page of the listing with a smartform.

With the impossibility to compare &SYSF-PAGE& with & SYSF-FORMPAGES&, i would like to know how i can do to detect when the page ( First or Next ) is the latest in order to display my result.

May be i have to use ' And Additional Event', but i don't know how to use it ?!

If somebody could help me, please ?

My name is Philippe HAON from SBO-Medasys Consulting.

Best Regards,

Philippe

Accepted Solutions (1)

Accepted Solutions (1)

Abhijit74
Active Contributor
0 Kudos

Hi,

No need to check first or next. To display a total result on a window at the latest page it will be better if you use the final window.

for details : [Check this blog|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/2203%3Fpage%3Dlast%26x-showcontent%3Doff%26x-order%3Ddate%26x-maxdepth%3D0] [original link is broken] [original link is broken] [original link is broken];

Thanks,

Abhijit

Answers (4)

Answers (4)

Former Member
0 Kudos

Hello SAP Expert,

Good news, i managed to find a solution for my problem.

The problem was to display a window on the last page (Page First or Next ).

As you can not put the condition 'sfsy-page eq SFSY-FORMPAGES' on conditions of a window in order to detect the last page,

I decided to create program lines in the window that contains the table to be displayed.

The program is :

Global datas : wl_exit type char1.

Input Parameters : wl_exit

Output Parameters : wl_exit

if sfsy-page eq SFSY-FORMPAGES.

wl_exit = 'X'.

endif.

The condition of the table is : WL_EXIT = 'X' to display the table that is containing datas.

Hope you understand,

Best Regards,

Philippe

Former Member
0 Kudos

Thanks for your replies.

Sincerly,

Philippe

Sandra_Rossi
Active Contributor
0 Kudos

Could you please give a feedback how you solved finally? (please read forum rules if you didn't yet)

Former Member
0 Kudos

Hello SAP Experts,

It works partially.

When i get several pages, the window - type final window - appears at the end of the listing.

But when i get only one page, it does not appear on the first page whereas when i have several pages it works correctly.

It is necessary that it works on every case.

May be must i change the type of the window on the page 'FIRST' ?

I selected the box 'Before Only the main window' only on the page 'FIRST'.

Must i select this box on the page 'Next' ?

Best Regards,

Philippe HAON

former_member203305
Active Contributor
0 Kudos

Hi,

Welcome to SDN Forum.

Check the conditions of the total windows, set the flag that says "Only before end of MAIN"

doing that, the windows will be displayed on the last page.

Regards