on 11-08-2011 12:15 PM
Dear Experts ,
I am working on scripts,what my requirement is ,first 10 records should be printed in first page remainig all should be printed in next page.I adjusted the window size to fit only 10 records ,so remainig records are printing in next page.up to now okay.but how to do programatically.i tried like this
CALL FUNCTION 'OPEN_FORM'
EXPORTING
FORM = 'ZST1'.
loop at it_mara FROM 1 TO 10.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = '100'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
endloop.
LOOP AT IT_MARA FROM 11.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = '200'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'WIN'
endloop.
CALL FUNCTION 'CLOSE_FORM'.
Here i have created two pages in my form.first page contains 'MAIN' window with element '100'.
second page contains 'WIN' window with element '200'.after executing my driver program, internal table contains 300 records.but its displaying only 10 records in first page .is this right way?please help me out.
it's solved by calling control_form and passed new-page command
if count EQ 11.
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'NEW-PAGE'
EXCEPTIONS
UNOPENED = 1
UNSTARTED = 2
.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Use MAIN window for both text elements after writing the /e 100 in for form put PAGE-BREAK next to this statement write /e200.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Why dont you use protect - end protect with a condition.
IF record no <= 10.
protect.
endprotect.
endif.
That would restrict records on 1st page.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.