johnson_yao tech note

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

TYPES: BEGIN OF SELEKTION,
         OBJECTCLAS LIKE CDHDR-OBJECTCLAS,
         OBJECTID   LIKE CDHDR-OBJECTID,
         USERNAME   LIKE CDHDR-USERNAME,
         FROM_DATE  LIKE CDHDR-UDATE,
         TO_DATE    LIKE CDHDR-UDATE,
         PLNTY      LIKE PLKO-PLNTY,
         PLANOBJEKTE TYPE I OCCURS 20,
       END OF SELEKTION.

DATA: icdred LIKE cdred OCCURS 100 WITH HEADER LINE.

  CALL FUNCTION 'CHANGEDOCUMENT_READ'
       EXPORTING
            objectclass                = selektion-objectclas
            objectid                   = selektion-objectid
            date_of_change             = '00000000'
            username                   = selektion-username
       TABLES
            editpos                    = icdred
       EXCEPTIONS
            no_position_found          = 1
            wrong_access_to_archive    = 2
            time_zone_conversion_error = 3
            OTHERS                     = 4.

  IF sy-subrc <> 0.
    MESSAGE s887(cd).
    EXIT.
  ENDIF.

for example: selektion-objectclas = '900N50026424'
                   selektion-objectid = 'PLAN'
                   selektion-username = ' '.

posted on 2011-05-11 17:03  johnson_yao  阅读(509)  评论(0编辑  收藏  举报