方法是从老白那么里学到的,呵呵.不过确实很妙.
下面是把从取到的符合条件的生产订单号利用BDC写进SELECT-OPTIONS的复杂选择上了.
FORM COOIS .
PERFORM BDC_DYNPRO USING 'PPIO_ENTRY' '1000'.
PERFORM BDC_FIELD USING 'BDC_OKCODE' '=%00212000001154945'.
PERFORM BDC_FIELD USING 'BDC_CURSOR' 'PPIO_ENTRY_SC1100-PPIO_LISTTYP'.
LOOP AT IT_TAB.
PERFORM BDC_DYNPRO USING 'SAPLALDB' '3000'.
PERFORM BDC_FIELD USING 'BDC_OKCODE' '=P+'.
PERFORM BDC_FIELD USING 'BDC_CURSOR' 'RSCSEL-SLOW_I(02)'.
PERFORM BDC_FIELD USING 'RSCSEL-SLOW_I(02)' IT_TAB-AUFNR .
ENDLOOP.
PERFORM BDC_DYNPRO USING 'SAPLALDB' '3000'.
PERFORM BDC_FIELD USING 'BDC_OKCODE' '=ACPT'.
CALL TRANSACTION 'COOIS' USING BDCDATA MODE 'E'.
ENDFORM. " COOIS
阅读(1000) | 评论(0) | 转发(0) |