Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

POSTING_INTERFACE_CLEARING - More than two accounts were transferred

Former Member
0 Kudos

Hi, i'm in need of some help, i'm running the bapi POSTING_INTERFACE_CLEARING with the next parameters:

and filled the table t_ftpost with the following data:

wich gives the error # F8021 "Two or more accounts were transferred "

i need to run the tcode fb05 with this bapi to insert header data and more than one position!

please help me.

Thanks for your time and help.

1 ACCEPTED SOLUTION

Former Member

solved by own, it seems i'm passing wrong values to this fm in tcode se37 i created a z program and ran it smoothly.

14 REPLIES 14

former_member182371
Active Contributor

Hi,

message F8121 is raised in include LFIPIF00, routine FORM position_uebertragen:

put a break-point there and check what is going on

check bfeeb8ed7fa64a7d95efc21f74a8c135's answer in this thread too:

How to fill POSTING_INTERFACE_CLEARING ?

Best regards,

Pablo

0 Kudos

Hello pablo thanks for your answer i already checked it via debugg and got there it seems i got 3 or more accounts the mayor account and some customer accounts

the thing is i'm not supposed to add the accounts for every position as in my data? how do i add more than one position with the same customer account and mayor account?

coleti
Active Contributor

Dear Adrian,

The FM POSTING_INTERFACE_CLEARING is using to clear open item mngt accounts and it does not make sense to use it without filling out T_FTCLEAR table.

In your first screen I could see that the T_FTCLEAR table is empty, so the FM is not clearing nothing.

Former Member
0 Kudos

Gabriel thanks for your answer, im using this data to see how this works this bapi gives as an output a batch input which i'm still trying to figure out, i'm not yet clearing any documents the problem is in the positions of the data for posting documents on tcode fb05 thats why i just added data to the table t_ftpost i need to know how to add more than one position for a document (see data on image), because it only recognizes one position and one header data, and gives the error that more that one account has been added, i'm trying post and after that clear some documents when i figure out how to add more than one position.

coleti
Active Contributor
0 Kudos

Dear Adrian,

The Clearing FM will post and clear both together. If you need to post the document first and than clear it, I suggest you to use the BAPI_ACC_DOCUMENT_POST to post a FI Document.

Best regards,

Gabriel Coleti

former_member182371
Active Contributor

Hi,

check this blog:

FB05 through FM, POSTING_INTERFACE_CLEARING

This is the documentation of the fm:

FU POSTING_INTERFACE_CLEARING
____________________________________________________
Short Text
Post with clearing (FB05) using internal posting interface


Function module 'POSTING_INTERFACE_CLEARING' creates a batch input transaction (or Call Transaction ... Using ...) for a document to be posted using transaction FB05.


The document header data and the data for the bank postings are transferred to table FTPOST. The rules for filling table FTPOST are described in the documentation for function module 'POSTING_INTERFACE_DOCUMENT'.


The selection data for the clearing transaction is transferred to table FTPOST.


Note the following rules:


The AGKOA (Account type) field in each FTCLEAR line must be filled.
The field AGKON (Account number) should only NOT be filled, if either the field 'BELNR' (Document number) or the field 'XBLNR' (Reference document number) is used as a selection criterion. Otherwise the account number must be specified in each FTCLEAR line.
The field AGBUK (Company code) must be filled in each FTCLEAR line.
The selection criterion in field SELFD is a character field of length 5. The field names from the document index can be used.
Processing with 'Call Transaction ... Using '


If processing takes place with 'Call Transaction .. Using', the initiator can see whether processing was successful by looking at the export parameter 'SUBRC'.


SUBRC = 0 means that the document was posted. The document number is stored in table T_BLNTAB. For intercompany documents, several document numbers are stored here.


SUBRC <> 0 means that the document could not be posted. Information concerning the error which has arisen is returned via the message fields MSGID, MSGNO, etc.


Parameters
I_AUGLV
I_TCODE
I_SGFUNCT
I_NO_AUTH
I_XSIMU
E_MSGID
E_MSGNO
E_MSGTY
E_MSGV1
E_MSGV2
E_MSGV3
E_MSGV4
E_SUBRC
T_BLNTAB
T_FTCLEAR
T_FTPOST
T_FTTAX


Exceptions
CLEARING_PROCEDURE_INVALID
CLEARING_PROCEDURE_MISSING
TABLE_T041A_EMPTY
TRANSACTION_CODE_INVALID
AMOUNT_FORMAT_ERROR
TOO_MANY_LINE_ITEMS
COMPANY_CODE_INVALID
SCREEN_NOT_FOUND

Best regards,

Pablo

0 Kudos

I already referred to that blog, so i was able to fill some data on the bapi to test it, but it does not give the explanation with an example:

  • The data must be transferred in the following sequence:
  • Document header data ( K 1)
  • Document item 1 ( P 1)
  • Document item 2 ( P 2) etc.
  • The field names are the same as those used on the entry screen (e.g. ‘BKPF-WAERS’, ‘BSEG-WRBTR’, ‘COBL-GSBER’…).
  • Suppose if it Cost Center / Profit Center – its COBL-KOSTL and COBL-PRCTR
  • The footer data can be transferred using the following fields:
  • Posting key: RF05A-NEWBS or BSEG-BSCHL
  • Account number: RF05A-NEWKO or BSEG-KONTO
    or BSEG-KUNNR (for customer accounts)
    or BSEG-LIFNR (for vendor accounts)
    or BSEG-HKONT (for G/L accounts)

I think i'm following these rules to fill the table t_ftpost but i get that error. 😞

former_member182371
Active Contributor
0 Kudos

1.- Here is another sample i found googling (it looks good):

Pagos parciales vía POSTING_INTERFACE_END

2.- you can have a look too at this fm:

WSPY_P_PMNT_CLEARING_POST

3.- or even at

Routine posting_interface_clearing_mm of Include RFFMCANCEL_FUND_FORMS_CLASS_AP

Best regards,

Pablo

0 Kudos

still just one position for the posting document i need an example with more than one, thanks for your time pablo

former_member182371
Active Contributor
0 Kudos

Hi,

is this what your looking for?

Best regards,

Pablo

this is what i'm trying to do

get 2 positions here via bapi

Former Member

solved by own, it seems i'm passing wrong values to this fm in tcode se37 i created a z program and ran it smoothly.

0 Kudos

Until now I have not been able to make compensation between 2 BPs, I have only achieved transfer with compensation, that is, the BAPI only works for me when I compose and generate a new open item, the most recommended is to perform development through batch input / call transaction, additionally the bapi does not work with invoice reference.

Regards.

Erick Ordoñez

0 Kudos

How you added 2 records, can you please share the details with us.

I want to post document with customer, vendor and GL records.