CHANGE_DOCUMENT 深藏阁楼爱情的钟 2021-11-22 15:54 208阅读 0赞 [CHANGE\_DOCUMENT][CHANGE_DOCUMENT] (2010-08-13 10:31) [标签][Link 1]: [DOCUMENT][] [CHANGE][] 分类: [SAP ABAP][] FUNCTION ZFUN\_UDP\_AC\_DOC\_ZUONR. \*"---------------------------------------------------------------------- \*"\*"Local interface: \*" IMPORTING \*" VALUE(BUKRS) TYPE BUKRS OPTIONAL \*" VALUE(GJAHR) TYPE GJAHR OPTIONAL \*" VALUE(BELNR) TYPE BELNR\_D OPTIONAL \*" VALUE(XREF1\_HD) TYPE XREF1\_HD OPTIONAL \*"---------------------------------------------------------------------- \* Global data declarations SELECT SINGLE \* FROM BSEG WHERE BUKRS = BUKRS AND GJAHR = GJAHR AND BELNR = BELNR. IF SY-SUBRC = 0 . SELECT \* FROM BKPF INTO CORRESPONDING FIELDS OF TABLE T\_BKPF WHERE BUKRS = BUKRS AND GJAHR = GJAHR AND BELNR = BELNR. IF SY-SUBRC NE 0 . EXIT. ENDIF. SELECT \* FROM BSEG INTO CORRESPONDING FIELDS OF TABLE T\_BSEG FOR ALL ENTRIES IN T\_BKPF WHERE BELNR = T\_BKPF-BELNR AND BUKRS = T\_BKPF-BUKRS AND GJAHR = T\_BKPF-GJAHR. LOOP AT T\_BKPF. T\_BKPF-XREF1\_HD = XREF1\_HD. MODIFY T\_BKPF TRANSPORTING XREF1\_HD . ENDLOOP. CALL FUNCTION 'CHANGE\_DOCUMENT' TABLES T\_BKDF = T\_BKDF T\_BKPF = T\_BKPF T\_BSEC = T\_BSEC T\_BSED = T\_BSED T\_BSEG = T\_BSEG T\_BSET = T\_BSET. ENDIF. ENDFUNCTION. 转载于:https://www.cnblogs.com/andyfurong/archive/2011/04/02/2002956.html [CHANGE_DOCUMENT]: http://blog.chinaunix.net/ [Link 1]: http://blog.chinaunix.net/space.php?uid=15016030&do=tag [DOCUMENT]: http://blog.chinaunix.net/space.php?uid=15016030&do=tag&id=6965 [CHANGE]: http://blog.chinaunix.net/space.php?uid=15016030&do=tag&id=5936 [SAP ABAP]: http://blog.chinaunix.net/space.php?uid=15016030&do=blog&frmd=0&classid=110&view=me
还没有评论,来说两句吧...