2005 Aug 04 7:44 PM
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.
2005 Aug 04 7:51 PM
you need not to do start_form and END_form for each page. Just comment the start_form and try.
regards,
Gagan
2005 Aug 04 7:55 PM
yeah i tried that way...but it din't do any good....
so i used start_form and end_form again for second page
2005 Aug 04 7:59 PM
2005 Aug 04 8:02 PM
2005 Aug 04 8:06 PM
Well, Did you comment out start_form, end_form for both pages. Don't use start_form End_form at all. There is no need of using this for triggering the page. If you have main window on both pages data overflows from one page to another if there is enough data for two pages.
2005 Aug 05 8:47 AM
Hi Scientila Choudary,
Your problem will be cleared once you remove start_form and end_form as these are not necessary.we have to use start_from and end_from when we are operating on different forms.Presently we are operating on only no need to use this.
Once your problem is solved please close this.