Skip to Content
author's profile photo Former Member
Former Member

POSTING_INTERFACE_DOCUMENT for FB01/FBS1 BSEG-HKONT was transferred twice

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


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 14, 2012 at 08:21 PM

    hello,

    'POSTING_INTERFACE_START' and 'POSTING_INTERFACE_END' should be used once. In between these two call 'POSTING_INTERFACE_DOCUMENT' can be used multiple times.

    best regards,

    swanand

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.