还没有实现根据屏幕其他字段筛选搜索数据
*&---------------------------------------------------------------------*
*& Report Z_SEARCH_HELP_FSX
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT z_search_help_fsx.
DATA:BEGIN OF s_find,
dispo LIKE marc-dispo,
dsnam LIKE t024d-dsnam,
END OF s_find.
CALL SCREEN 100.
*&---------------------------------------------------------------------*
*& Module help_mod INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE help_mod INPUT.
DATA: selectfield LIKE help_info-fieldname,
it_fields LIKE help_value OCCURS 0 WITH HEADER LINE,
select_value LIKE help_info-fldvalue,
ld_tabix LIKE sy-tabix.
DATA screen_field LIKE dynpread OCCURS 0 WITH HEADER LINE.
DATA : BEGIN OF it_value OCCURS 0,
dispo LIKE t024d-dispo,
dsnam LIKE t024d-dsnam,
END OF it_value.
REFRESH: it_value, it_fields,screen_field.
*
SELECT dispo dsnam
INTO TABLE it_value
FROM t024d
WHERE werks = '1000'.
it_fields-tabname = 'T024D'.
it_fields-fieldname = 'DISPO'.
it_fields-selectflag = 'X'.
APPEND it_fields. CLEAR it_fields.
it_fields-tabname = 'T024D'.
it_fields-fieldname = 'DSNAM'.
it_fields-selectflag = ' '.
APPEND it_fields. CLEAR it_fields.
*
CALL FUNCTION 'HELP_VALUES_GET_NO_DD_NAME'
EXPORTING
selectfield = selectfield
IMPORTING
ind = ld_tabix
select_value = select_value
TABLES
fields = it_fields
full_table = it_value.
*
screen_field-fieldname = 'S_FIND-DISPO'.
WRITE select_value TO screen_field-fieldvalue LEFT-JUSTIFIED.
APPEND screen_field.
READ TABLE it_value WITH KEY dispo = select_value.
screen_field-fieldname = 'S_FIND-DSNAM'.
WRITE it_value-dsnam TO screen_field-fieldvalue LEFT-JUSTIFIED.
APPEND screen_field.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = sy-cprog
dynumb = '0100'
TABLES
dynpfields = screen_field.
ENDMODULE. " help_mod INPUT
**逻辑流
PROCESS BEFORE OUTPUT.
* MODULE STATUS_0100.
*
PROCESS AFTER INPUT.
* MODULE USER_COMMAND_0100.
PROCESS ON VALUE-REQUEST.
FIELD s_find-dispo MODULE help_mod.
**屏幕字段
只有一个MRP控制者字段S_FIND-DISPO
阅读(757) | 评论(0) | 转发(0) |