POPUP_GET_VALUES & POPUP_GET_VALUES_USER_HELP 金额灰色不可输入

 

 金额字段需要将参考的货币也放到fields表中。

"货币字段没有使用
DATA:
  lt_sval   TYPE STANDARD TABLE OF sval,
  lw_sval   TYPE sval.

lw_sval-tabname = 'BSIS'.
lw_sval-fieldname = 'WRBTR'.
APPEND lw_sval TO lt_sval.
CLEAR lw_sval.

*lw_sval-tabname = 'BSIS'.
*lw_sval-fieldname = 'WAERS'.
*lw_sval-field_attr = '04'.   "隐藏货币字段
*APPEND lw_sval TO lt_sval.

CALL FUNCTION 'POPUP_GET_VALUES'
  EXPORTING
    popup_title     = 'TEST'
  TABLES
    fields          = lt_sval
  EXCEPTIONS
    error_in_fields = 1
    OTHERS          = 2.
IF sy-subrc <> 0.
  
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

 

 

DATA:
  lt_sval   TYPE STANDARD TABLE OF sval,
  lw_sval   TYPE sval.

lw_sval-tabname = 'BSIS'.
lw_sval-fieldname = 'WRBTR'.
APPEND lw_sval TO lt_sval.
CLEAR lw_sval.

lw_sval-tabname = 'BSIS'.
lw_sval-fieldname = 'WAERS'.
lw_sval-field_attr = '04'.   "隐藏货币字段
APPEND lw_sval TO lt_sval.

CALL FUNCTION 'POPUP_GET_VALUES'
  EXPORTING
    popup_title     = 'TEST'
  TABLES
    fields          = lt_sval
  EXCEPTIONS
    error_in_fields = 1
    OTHERS          = 2.
IF sy-subrc <> 0.

* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

 

posted @ 2021-08-17 10:59  做梦都笑醒  阅读(250)  评论(0编辑  收藏  举报