对于屏幕字段的下拉CODE

  1. 定义一个数据库表,装载着list下拉下的内容

    2.   定义该数据库表类型的内表,结构体

 

    3.   调用所在屏幕  CALL SCREEN 9000.

 

    4.   在PAI后面增加:

                                  PROCESS ON VALUE-REQUEST.
                                  FIELD LIST_01 MODULE CREATE_DROPDOWN_LIST.

 

                                  list_01是屏幕字段,指定listbox,功能码

 

    5.   程序中代码: 
          MODULE CREATE_DROPDOWN_LIST INPUT.
  

          SELECT  PROJID PROJNAME

                   FROM ZBC400_PROJ_113

                        INTO CORRESPONDING FIELDS OF TABLE ITAB_PROJ.
    

          CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
              EXPORTING
              *        DDIC_STRUCTURE         = ' '
                        RETFIELD               = 'PROJID'
              *        PVALKEY                = ' '
              *        DYNPPROG               = ' '
              *        DYNPNR                 = ' '
              *        DYNPROFIELD            = ' '
              *        STEPL                  = 0
              *        WINDOW_TITLE           =
              *        VALUE                  = ' '
                        VALUE_ORG              = 'S'
              *        MULTIPLE_CHOICE        = ' '
              *        DISPLAY                = ' '
              *        CALLBACK_PROGRAM       = ' '
              *        CALLBACK_FORM          = ' '
              *        MARK_TAB               =
              *      IMPORTING
              *        USER_RESET             =
              TABLES
                         VALUE_TAB              = ITAB_PROJ
              *        FIELD_TAB              =
              *        RETURN_TAB             =
              *        DYNPFLD_MAPPING        =
              EXCEPTIONS
                        PARAMETER_ERROR        = 1
                       NO_VALUES_FOUND        = 2
                       OTHERS                 = 3
                        .
              IF SY-SUBRC <> 0.
              * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
              ENDIF.
         ENDMODULE.

你可能感兴趣的:(数据库,list,Module,dropdown,callback,structure)