Skip to Content
0
Former Member
Feb 07, 2008 at 11:58 AM

concept of paging

10 Views

FORM PAGING USING CODE.

DATA: I TYPE I.

J TYPE I.

CASE CODE.

WHEN 'P--'. FLIGHTS-TOP_LINE = 1.

WHEN 'P-'. FLIGHTS-TOP_LINE = FLIGHTS-TOP_LINE - LINE_COUNT.

IF FLIGHTS-TOP_LINE LE 0.

FLIGHTS-TOP_LINE = 1. ENDIF.

WHEN 'P+'. I = FLIGHTS-TOP_LINE + LINE_COUNT.

J = FLIGHTS-LINES - LINE_COUNT + 1.

IF J LE 0.

J = 1. ENDIF.

IF I LE J.

FLIGHTS-TOP_LINE = I.

ELSE. FLIGHTS-TOP_LINE = J.

ENDIF.

WHEN 'P++'. FLIGHTS-TOP_LINE = FLIGHTS-LINES - LINE_COUNT + 1.

IF FLIGHTS-TOP_LINE LE 0.

FLIGHTS-TOP_LINE = 1. ENDIF.

ENDCASE.

ENDFORM.

WHAT'S STAND FOR P+, P, P--, P-. HERE IN THIS EXAMPLE WRITEN IN SAP LIBRARY.

NOTE: WHAT IS FLIGHTS-LINES HERE.