美文网首页
snro 获得数据

snro 获得数据

作者: 阿努比斯1117 | 来源:发表于2018-12-13 16:39 被阅读0次
*--------------------------------------------------------------------*
*加锁
*--------------------------------------------------------------------*
  CALL FUNCTION 'NUMBER_RANGE_ENQUEUE'
    EXPORTING
      object           = 'ZTEST'
    EXCEPTIONS
      foreign_lock     = 1
      object_not_found = 2
      system_failure   = 3
      OTHERS           = 4.
  IF sy-subrc = 0.
*--------------------------------------------------------------------
*得到号码
*--------------------------------------------------------------------
    CALL FUNCTION 'NUMBER_GET_NEXT'
      EXPORTING
        nr_range_nr             = '01'
        object                  = 'ZTEST'
*       QUANTITY                = '1'
*       SUBOBJECT               = ' '
*       TOYEAR                  = '0000'
*       IGNORE_BUFFER           = ' '
      IMPORTING
        number                  = LV_NUM
*       QUANTITY                =
*       RETURNCODE              =
      EXCEPTIONS
        interval_not_found      = 1
        number_range_not_intern = 2
        object_not_found        = 3
        quantity_is_0           = 4
        quantity_is_not_1       = 5
        interval_overflow       = 6
        buffer_overflow         = 7
        OTHERS                  = 8.
*--------------------------------------------------------------------
*解锁
*--------------------------------------------------------------------
    CALL FUNCTION 'NUMBER_RANGE_DEQUEUE'
      EXPORTING
        object           = ZTEST
      EXCEPTIONS
        object_not_found = 1
        OTHERS           = 2.
  ENDIF.

相关文章

网友评论

      本文标题:snro 获得数据

      本文链接:https://www.haomeiwen.com/subject/ngsbhqtx.html