Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Triggering page in Sap script

Former Member
0 Likes
971

Hi

I have 3 pages,and 2 pages has main window.

last page is independent to these 2 pages and it has only one window(not main window)

My question is i need to trigger that last page after 2nd page.

I did like

IF &NEXTPAGE& EQ 0

&NEWPAGE& = 'LAST'

ENDIF.

Your help will be highly appreciated.

Thanks in advance

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
862

you use trigger by using the following statement.

/: IF &NEXTPAGE& EQ 0

/: NEW-PAGE 'LAST'

/: ENDIF

You should not give the NEW-PAGE command with & sign

7 REPLIES 7
Read only

Former Member
0 Likes
863

you use trigger by using the following statement.

/: IF &NEXTPAGE& EQ 0

/: NEW-PAGE 'LAST'

/: ENDIF

You should not give the NEW-PAGE command with & sign

Read only

0 Likes
862

Hi Sid,

Thanks for your Response,

Still not triggering the Last page.

Read only

0 Likes
862

May be the code for NEW page is in some text element and it is not being called,

Try the below option.

FIRST page attributes, set next page same as ‘SECOND’

SECOND page attributes, set next page same as ‘SECOND’

THIRD page attributes, set next page same as ‘THIRD’

Now in your print program, just before the close form

Call function module CONTROL_COMMAND, pass the NEW-PAGE as the command and new page as 'THIRD'.

The above function call will triger the independent THIRD page.

Read only

0 Likes
862

Hi Sid,

Iam using External subroutine,i dont have any FM .

Iam copying standard and iam adding one more page and iam including some Text.

No control form.

Thanks

Read only

0 Likes
862

One way is find the last write_form and its text element in the print program which is being called.

In Script go to that window and text element, at end of the text element call new page using

/: NEW-PAGE 'LAST'

Read only

0 Likes
862

You should not need any coding. For the LAST page set the 'LAST PAGE' attribute.

Read only

0 Likes
862

I am confusing with u r answer,How to set last page atribute in last page could you u please explain