DYNP_VALUES_READ
屏幕字段的某些值,比如想根據某個值A,來限定另外一個值B的內容的時候,用到“DYNP_VALUES_READ”FUN,先取得A的內容。
在?AT?SELECTION-SCREEN?ON?VALUE-REQUEST?FOR? XXX 事件中使用。
例如:
????? PARAMETERS:?p_file?LIKE?rlgrap-filename
??????????????DEFAULT?'D:\XIAOXIE\'?OBLIGATORY.??
AT?SELECTION-SCREEN?ON?VALUE-REQUEST?FOR?p_file.
??PERFORM?f4_file_search?USING?',*.*??,*.*.'
???????????????????????????????'O'
???????????????????????????????'ChooseFile......'.
???DATA?:?lv_dyname???LIKE?d020s-prog,
?????????lv_dynumb???LIKE?d020s-dnum.
??DATA?:?s1(30).
??FIELD-SYMBOLS?<lfs>.
??CLEAR?:?gt_dynfields[],?gt_dynfields.
??GET?CURSOR?FIELD?gt_dynfields-fieldname.
??APPEND?gt_dynfields.
??CALL?FUNCTION?'DYNP_VALUES_READ'
????EXPORTING
??????dyname???????????????=?sy-repid
??????dynumb???????????????=?sy-dynnr
????TABLES
??????dynpfields???????????=?gt_dynfields
????EXCEPTIONS
??????invalid_abapworkarea?=?1
??????invalid_dynprofield??=?2
??????invalid_dynproname???=?3
??????invalid_dynpronummer?=?4
??????invalid_request??????=?5
??????no_fielddescription??=?6
??????invalid_parameter????=?7
??????undefind_error???????=?8
??????double_conversion????=?9
??????OTHERS???????????????=?10.
??IF?sy-subrc?NE?0.
????MESSAGE?ID?sy-msgid?TYPE?'S'?NUMBER?sy-msgno
????????????WITH?sy-msgv1?sy-msgv2?sy-msgv3?sy-msgv4.
??ENDIF.
總結
以上是生活随笔為你收集整理的DYNP_VALUES_READ的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 鱼儿和水的灵魂
- 下一篇: ABAP:DYNP_VALUES_REA