Application Development 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: 

sapscript multiple pages

Former Member
0 Kudos

hello friends,

If I need the same header and footer content in all pages do i have to create separate windows in each and every page,create text elements again or is there any other approach.

plz guide me

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Create the HEADER window and the FOOTER window, and then just include these windows in each page.

Regards,

Rich Heilman

4 REPLIES 4

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Create the HEADER window and the FOOTER window, and then just include these windows in each page.

Regards,

Rich Heilman

0 Kudos

Once you have the windows created, click on the PAGES button, then double click on the page that you want to include the window on. It should be now the color "blue". Click on the page windows button. This will show you the windoes that you currently have included on this page. Click edit, create element. This will give you a drop down with all the windows which are a valialbe for you to include, choose HEADER. Now enter the standard attributes at the bottom of the screen. That's it.

Regards,

Rich Heilman

0 Kudos

thank you.

plz help me in this too

The code below is for two pages.

Problem is that...My second page is not triggering.

In the layout

for Fist page

attributes.

page: FIRST

next page: SECOND

for second page

attributes.

page:SECOND

next page: SECOND

REPORT ZNEW1 .

TABLES: MARA.

DATA: BEGIN OF ITAB OCCURS 0,

MATNR LIKE MARA-MATNR,

ERSDA LIKE MARA-ERSDA,

ERNAM LIKE MARA-ERNAM,

LAEDA LIKE MARA-LAEDA,

END OF ITAB.

SELECT * FROM MARA INTO CORRESPONDING FIELDS OF table ITAB

WHERE VPSTA = 'K'.

CALL FUNCTION 'OPEN_FORM'

EXPORTING

*DEVICE = ' '

DIALOG = 'X'

FORM = 'ZNEWLAY1'

LANGUAGE = SY-LANGU

EXCEPTIONS

OTHERS = 1.

call function 'START_FORM'

EXPORTING

FORM = 'ZNEWLAY1'

  • LANGUAGE = ' '

STARTPAGE = 'FIRST'

  • PROGRAM = ' '

  • MAIL_APPL_OBJECT =

  • IMPORTING

  • LANGUAGE =

  • EXCEPTIONS

UNOPENED = 1

OTHERS = 2.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'HEADER'

  • FUNCTION = 'SET'

  • TYPE = 'BODY'

WINDOW = 'HEADER'

EXCEPTIONS

UNOPENED = 1

OTHERS = 2.

call function 'WRITE_FORM'

EXPORTING

ELEMENT = 'LOGO'

  • FUNCTION = 'SET'

  • TYPE = 'BODY'

WINDOW = 'LOGO'

EXCEPTIONS

UNOPENED = 4

OTHERS = 9.

LOOP AT ITAB.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'MAIN'

  • FUNCTION = 'SET'

  • TYPE = 'BODY'

WINDOW = 'MAIN'

EXCEPTIONS

UNOPENED = 1

OTHERS = 2

.

ENDLOOP.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'FOOTER'

  • FUNCTION = 'SET'

  • TYPE = 'BODY'

WINDOW = 'FOOTER'

EXCEPTIONS

UNOPENED = 1

OTHERS = 2.

call function 'END_FORM'

EXCEPTIONS

UNOPENED = 1

BAD_PAGEFORMAT_FOR_PRINT = 2

OTHERS = 3.

call function 'START_FORM'

EXPORTING

  • ARCHIVE_INDEX =

FORM = 'ZNEWLAY1'

  • LANGUAGE = ' '

STARTPAGE = 'SECOND'

  • PROGRAM = ' '

  • MAIL_APPL_OBJECT =

EXCEPTIONS

UNOPENED = 1

OTHERS = 2.

call function 'WRITE_FORM'

EXPORTING

ELEMENT = 'MAIN'

  • FUNCTION = 'SET'

  • TYPE = 'BODY'

WINDOW = 'MAIN'

EXCEPTIONS

UNOPENED = 1

OTHERS = 2.

call function 'END_FORM'

EXCEPTIONS

UNOPENED = 1

BAD_PAGEFORMAT_FOR_PRINT = 2

OTHERS = 3.

CALL FUNCTION 'CLOSE_FORM'

EXCEPTIONS

UNOPENED = 1

OTHERS = 2.

Former Member
0 Kudos

You can attach same window to multiple pages.

First of all create window for header. Then goto page and then click on Edit > create Element and attach the window you want to attach.

regards,

Gagan