主要利用了,AT SELECTION-SCREEN ON VALUE-REQUEST
编写自己的 trigger POV 事件.更加灵活
*&---------------------------------------------------------------------*
*& Report Z_SEARCH_HELP
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT Z_SEARCH_HELP NO STANDARD PAGE HEADING.
TABLES: pa0001.
parameters: ppernr type pa0001-pernr .
DATA: i_return TYPE ddshretval OCCURS 0 WITH HEADER LINE,
c TYPE c VALUE 'S'.
* Search Help for Ppernr-low
AT SELECTION-SCREEN ON VALUE-REQUEST for ppernr.
message 'request value?' type 'I'.
TYPES: BEGIN OF t_pernr,
pernr LIKE pa0001-pernr,
ename LIKE pa0001-ename,
END OF t_pernr.
DATA: it_pa0001 TYPE STANDARD TABLE OF t_pernr WITH HEADER LINE.
SELECT pernr ename from pa0001
INTO CORRESPONDING FIELDS OF TABLE it_pa0001
where pa0001~endda = '99991231' .
* WHERE zsdo~kunnr IN sokunnr.
DELETE it_pa0001 WHERE pernr = '00000000'.
SORT it_pa0001 BY pernr.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'PERNR'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'PERNR'
value_org = c
TABLES
value_tab = it_pa0001
return_tab = i_return.