ABAP使用BDC过账提示BSEG-HKONT was transferred twice

情景:使用BDC函数产生会计凭证,单张产生没有问题,批量产生多张时报错。
BSEG-HKONT was transferred twice / Two accounts were transfered but not BSEG-HKONT.

原因:
‘POSTING_INTERFACE_START’ and ‘POSTING_INTERFACE_END’ should be used once. In between these two call ‘POSTING_INTERFACE_DOCUMENT’ can be used multiple times.
即’POSTING_INTERFACE_START’ and ‘POSTING_INTERFACE_END’应该放在Loop之外,POSTING_INTERFACE_DOCUMENT放在loop之内多次产生会计凭证。

参考:
https://archive.sap.com/discussions/thread/3266231

发表评论