2011年4月8日 星期五

Change document

customer master object: (Block customer):
TABLE       CDHDR/CDPOS
OBJECTCLAS  = DEBI
OBJECTID    = <Customer number>
TCODE       = VD05

OBJECTCLAS

可以由底下 Table 取得:
SWECDOBTYP  指派更改文件 / 工作流程物件類型
TCDOB       變更文件建立的物件
FUNCTION C14O_CH_DOC_OBJ_NAME_GET:
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"       IMPORTING
*"             VALUE(I_TABLENAME) TYPE  ESP1_TAB_NAME
*"       EXPORTING
*"             VALUE(E_OBJ_NAME) LIKE  TCDOB-OBJECT
*"       EXCEPTIONS
*"              ILLEGAL_INPUT<
*"              CHNG_DOC_OBJ_NOT_FOUND
*"----------------------------------------------------------------------
CDNAMES_GET
Transport Chnge doc.obj. via shadow tab.

訂單文件修改查詢

範例程式:RVSCD100:
CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
  EXPORTING
    DATE_OF_CHANGE    = CDHDR-UDATE
    OBJECTCLASS       = CDHDR-OBJECTCLAS
    OBJECTID          = CDHDR-OBJECTID
    TIME_OF_CHANGE    = CDHDR-UTIME
    USERNAME          = CDHDR-USERNAME
  TABLES
    I_CDHDR           = ICDHDR
  EXCEPTIONS
    NO_POSITION_FOUND = 1
    OTHERS            = 2.

CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
  EXPORTING
    CHANGENUMBER      = ICDHDR-CHANGENR
    TABLEKEY          = CDPOS-TABKEY
    TABLENAME         = CDPOS-TABNAME
  IMPORTING
    HEADER            = CDHDR
  TABLES
    EDITPOS           = ICDSHW
  EXCEPTIONS
    NO_POSITION_FOUND = 1
    OTHERS            = 2.

沒有留言:

張貼留言