首先基本步驟仍是簡單介紹下ide
SHBD測試
以MI09爲例spa
回車進去後orm
先點新建blog
一直保證填寫的數據在第一行圖片
是爲了防止一直日後填數據的時候丟掉數據,有時候僅僅是屏幕顯示的問題,都有可能丟掉數據。一直點新建,能夠保證數據永遠在第一行錄製it
錄完後,再點新建io
而後再點保存form
完成錄製class
至於後續跟進錄屏生成或者本身寫代碼部分,不作贅述
附錄:本身寫bdc程序的時候用到的form代碼
*------------------------------------------------------------------*
* 錄入屏幕號
* -->PV_PROGRAM 程序名
* -->PV_DYNPRO 屏幕號
*------------------------------------------------------------------*
FORM FRM_BDC_DYNPRO USING PV_PROGRAM
PV_DYNPRO.
CLEAR GT_BDCDATA.
GT_BDCDATA-PROGRAM = PV_PROGRAM.
GT_BDCDATA-DYNPRO = PV_DYNPRO.
GT_BDCDATA-DYNBEGIN = 'X'.
APPEND GT_BDCDATA.
ENDFORM. " BDC_DYNPRO
*-------------------------------------------------------------------*
*錄入字段
* PV_FNAM 字段名稱 PV_FVAL 字段值
*-------------------------------------------------------------------*
FORM FRM_BDC_FIELD USING PV_FNAM
PV_FVAL.
DATA: LV_VALUE TYPE CHAR20.
LV_VALUE = PV_FVAL.
CONDENSE: LV_VALUE.
CLEAR GT_BDCDATA.
GT_BDCDATA-FNAM = PV_FNAM.
GT_BDCDATA-FVAL = LV_VALUE.
APPEND GT_BDCDATA.
ENDFORM. "frm_bdc_field
* BDC
DATA: BEGIN OF GT_BDCDATA OCCURS 0.
INCLUDE STRUCTURE BDCDATA.
DATA: END OF GT_BDCDATA.
DATA: GT_MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
DATA: LS_BDCOPT TYPE CTU_PARAMS.
最後調用call transaction
LS_BDCOPT-DISMODE = 'N'. "N,A,E* 三種模式 測試使用A模式能夠全屏跟蹤
LS_BDCOPT-UPDMODE = 'S'. "S,L
LS_BDCOPT-CATTMODE = SPACE.
LS_BDCOPT-DEFSIZE = 'X'.
LS_BDCOPT-RACOMMIT = 'X'.
LS_BDCOPT-NOBINPT = 'X'.
LS_BDCOPT-NOBIEND = 'X'.
CALL TRANSACTION 'MI09' USING GT_BDCDATA[]
OPTIONS FROM LS_BDCOPT
MESSAGES INTO GT_MESSTAB [].
CLEAR GT_BDCDATA[]. "每次處理完成一批必須清空錄屏數據表
CLEAR GT_MESSTAB [].
寫在最後的話:如今ECC可能還用BDC,以後恐怕用BDC的時候會愈來愈少,畢竟這個靈活性不夠,會有更多的其餘解決方案。