REPORT zthomas_range_package.
TABLES:ekko,ekpo.
DATA:lt_ekpo TYPE STANDARD TABLE OF ekpo,
lt_ekko TYPE STANDARD TABLE OF ekko.
RANGES:r_ebeln FOR ekko-ebeln.
FIELD-SYMBOLS: TYPE ekko.
DATA: lv_lines TYPE I.
DATA: lv_package TYPE i VALUE '1000'.
SELECT-OPTIONS:s_ebeln FOR ekko-ebeln.
SELECT * FROM ekko INTO TABLE lt_ekko WHERE ebeln IN s_ebeln.
DESCRIBE TABLE lt_ekko LINES lv_lines.
r_ebeln-SIGN = 'I'.
r_ebeln-option = 'EQ'.
IF lt_ekko IS NOT INITIAL.
LOOP AT lt_ekko ASSIGNING .
r_ebeln-low = -ebeln.
APPEND r_ebeln.
IF sy-tabix MOD lv_package = 0 OR sy-tabix = lv_lines.
SELECT * FROM ekpo APPENDING CORRESPONDING FIELDS OF TABLE lt_ekpo WHERE ebeln IN r_ebeln.
CLEAR:r_ebeln[].
ENDIF.
ENDLOOP.
ENDIF.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
* I_CALLBACK_PROGRAM = ' '
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
* I_CALLBACK_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME = 'ekpo'
* I_BACKGROUND_ID = ' '
* I_GRID_TITLE =
* I_GRID_SETTINGS =
* IS_LAYOUT =
* IT_FIELDCAT =
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* IT_SORT =
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
* I_SAVE = ' '
* IS_VARIANT =
* IT_EVENTS =
* IT_EVENT_EXIT =
* IS_PRINT =
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* I_HTML_HEIGHT_TOP = 0
* I_HTML_HEIGHT_END = 0
* IT_ALV_GRAPHICS =
* IT_HYPERLINK =
* IT_ADD_FIELDCAT =
* IT_EXCEPT_QINFO =
* IR_SALV_FULLSCREEN_ADAPTER =
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = lt_ekpo
* EXCEPTIONS
* PROGRAM_ERROR = 1
* OTHERS = 2
.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
阅读(3252) | 评论(0) | 转发(0) |