on 09-25-2009 1:01 PM
hi,
in my out put in maindow the addition of 12lines( all values 150, so 150 multiply with 12) value is 1800 but i am getting 1950,it is calculating next page one line value (150) .
I DONT KNOW WHY IT IS ADDING another one line vaue to the first page instaead of 1800 it is showing 1950.
can some body tell it is the probleam in program or form itself??
please help
Hi,
There might be 13 lines place in your main window, decrease the window size or use conditional break statements.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
see this example...
Give conditions like number of line items to be displayed per page and then give next-page.
FORM main_form .
LOOP AT t_flight INTO fs_flight.
w_sum = w_sum + fs_flight-price.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'FLIGHT'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
AT LAST.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'GRAND_TOTAL'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
EXIT.
ENDAT.
ADD 1 TO w_index.
IF w_index GT 5. " Give the required condition
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'PAGE_TOTAL'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'NEW-PAGE'
EXCEPTIONS
UNOPENED = 1
UNSTARTED = 2
OTHERS = 3
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
w_index = 1.
ENDIF.
ENDLOOP.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.