Skip to Content
0
Former Member
Nov 14, 2012 at 04:03 PM

POSTING_INTERFACE_DOCUMENT for FB01/FBS1 BSEG-HKONT was transferred twice

1187 Views

Hello Community

I am using the function module with Batch Input

POSTING_INTERFACE_DOCUMENT

When I run the function once per loop, which equals one booking per Batch Input, it works perfectly fine. The problem is, that i have to put several bookings in one Batch Input. All i get there is the error message written above:

BSEG-HKONT was transferred twice

Now i'll show you how the internal table ftpost is filled and how I call the function:

Function:

CALL FUNCTION 'POSTING_INTERFACE_START'

EXPORTING

* I_CLIENT = SY-MANDT

i_function = 'B'

i_group = 'ZFI_BELEGE'

* I_HOLDDATE = ' '

* i_keep = 'X'

* i_mode = 'N'

* i_update = 'S'

i_user = sy-uname

* I_XBDCC = ' '

* EXCEPTIONS

* CLIENT_INCORRECT = 1

* FUNCTION_INVALID = 2

* GROUP_NAME_MISSING = 3

* MODE_INVALID = 4

* UPDATE_INVALID = 5

* OTHERS = 6

.

IF sy-subrc <> 0.

* Implement suitable error handling here

ENDIF.

CALL FUNCTION 'POSTING_INTERFACE_DOCUMENT'

EXPORTING

i_tcode = 'FB01'

* I_SGFUNCT = ' '

* I_NO_AUTH = ' '

TABLES

t_blntab = gt_blntab

t_ftpost = gt_ftpost2

t_fttax = gt_fttax

* EXCEPTIONS

* ACCOUNT_MISSING = 1

* COMPANY_CODE_MISSING = 2

* POSTING_KEY_INVALID = 3

* POSTING_KEY_MISSING = 4

* RECORD_TYPE_INVALID = 5

* TRANSACTION_CODE_INVALID = 6

* AMOUNT_FORMAT_ERROR = 7

* TOO_MANY_LINE_ITEMS = 8

* COMPANY_CODE_INVALID = 9

* SCREEN_NOT_FOUND = 10

* NO_AUTHORIZATION = 11

* OTHERS = 12

.

IF sy-subrc <> 0.

* Implement suitable error handling here

ENDIF.

CALL FUNCTION 'POSTING_INTERFACE_END'

* EXPORTING

* i_bdcimmed = 'X'

EXCEPTIONS

session_not_processable = 1

OTHERS = 2.

IF sy-subrc <> 0.

* Implement suitable error handling here

ENDIF.


Internal Table gt_ftpost2:

Zeile Typ Nr Feld Value 1 K 1 BKPF-BLDAT 31.08.2012 2 K 1 BKPF-BLART SB 3 K 1 BKPF-BUKRS 100 4 K 1 BKPF-BUDAT 31.08.2012 5 K 1 BKPF-WAERS CHF 6 P 1 RF05A-NEWBS 40 7 P 1 BSEG-HKONT 620450 8 P 1 BSEG-WRBTR 56426 9 P 1 COBL-GSBER 1110 10 P 1 COBL-AUFNR 100000 11 P 1 BSEG-MWSKZ 49 12 P 1 BSEG-SGTXT TA Umb. Freilieferungen 11.2012 13 P 2 RF05A-NEWBS 50 14 P 2 BSEG-HKONT 620000 15 P 2 BSEG-WRBTR 56426 16 P 2 COBL-GSBER 1110 17 P 2 COBL-AUFNR 100000 18 P 2 BSEG-MWSKZ 49 19 P 2 BSEG-SGTXT TA Umb. Freilieferungen 11.2012 20 K 2 BKPF-BLDAT 31.08.2012 21 K 2 BKPF-BLART SB 22 K 2 BKPF-BUKRS 100 23 K 2 BKPF-BUDAT 31.08.2012 24 K 2 BKPF-WAERS CHF 25 P 1 RF05A-NEWBS 40 26 P 1 BSEG-HKONT 620450 27 P 1 BSEG-WRBTR 14799 28 P 1 COBL-GSBER 1170 29 P 1 COBL-AUFNR 160000 30 P 1 BSEG-MWSKZ 49 31 P 1 BSEG-SGTXT TA Umb. Freilieferungen 11.2012 32 P 2 RF05A-NEWBS 50 33 P 2 BSEG-HKONT 620000 34 P 2 BSEG-WRBTR 14799 35 P 2 COBL-GSBER 1170 36 P 2 COBL-AUFNR 160000 37 P 2 BSEG-MWSKZ 49 38 P 2 BSEG-SGTXT TA Umb. Freilieferungen 11.2012

Does anyone know, where my exact error is and how to solve it correctly?

Greetings

Philippe