ABAP–使用SAP提供的标准函数进行单值的输入[转载]

收集了SAP提供的标准函数进行单值的输入,供大家参考。

输入一个整形值
      value_int = node->get_int_value( ).
      CALL FUNCTION ‘CC_POPUP_INT_INPUT’
           EXPORTING
                property_name = property_name
           IMPORTING
                value_changed = value_changed
           CHANGING
                int_value     = value_int.
      IF value_changed IS INITIAL.
        EXIT.
      ENDIF.

日期输入
        lv_new_date    type d,
  call function ‘TR_POPUP_INPUT_DATE’
       exporting
            iv_title        = ‘Window Title’
            iv_description1 = ”
            iv_description2 = ”
            iv_date         = ls_e070use-validity
       importing
            ev_date         = lv_new_date
       exceptions
            others          = 1.

年月录入
    CALL FUNCTION ‘POPUP_TO_SELECT_MONTH’
      EXPORTING
        actual_month               = mf_monat
      IMPORTING
        selected_month             = mf_monat
        return_code                = mf_returncode
      EXCEPTIONS
        factory_calendar_not_found = 01
        holiday_calendar_not_found = 02
        month_not_found            = 03.

字符串录入
      CALL FUNCTION ‘CC_POPUP_STRING_INPUT’
           EXPORTING
                property_name = property_name
           IMPORTING
                value_changed = value_changed
           CHANGING
                string_value  = value_string.
      IF value_changed IS INITIAL.
        EXIT.
      ENDIF.

参考表字段任意类型值录入
    call function ‘POPUP_TO_GET_VALUE’
      EXPORTING
        fieldname           = ‘FILENAME’
        tabname             = ‘CFFILE’
        titel               = text-012
        valuein             = filename_phys
      IMPORTING
        answer              = answer
        valueout            = filename_phys_save
      EXCEPTIONS
        fieldname_not_found = 1
        others              = 2.

posted @ 2011-01-07 10:06  Kaming's SAP  阅读(462)  评论(0编辑  收藏  举报