Application Development and Automation 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: 
Read only

Problem with clearing FM - POSTING_INTERFACE_CLEARING

Former Member
0 Likes
5,327

Hello,

We are using the above FM for clearing customer open items against the incoming payments.

This is working fine for some cases.

However for large volume ransactions, this does not work - When executed in background the program gives error "BDC_OPEN_GROUP, group .. is invalid".

Currently we are tyring to clear around 220000 open items against 1 payment document.

This function module works fine for all scenarios, however does not work only for for large volume transactions.

SAP does not provide any assistance for this issue as the function module is 'not released'

Given below is the code that we are using to call the function module:

CALL FUNCTION 'POSTING_INTERFACE_START'

EXPORTING

i_function = 'C'

i_group = l_group

i_mode = 'N'

i_update = 'S'

i_user = sy-uname

i_xbdcc = 'X'

EXCEPTIONS

client_incorrect = 1

function_invalid = 2

group_name_missing = 3

mode_invalid = 4

update_invalid = 5

OTHERS = 6.

    • Clear all the line items.

CALL FUNCTION 'POSTING_INTERFACE_CLEARING'

EXPORTING

i_auglv = c_auglv "value = UMBUCHNG

i_tcode = c_tcode "value = FB05

TABLES

t_blntab = t_blntab

t_ftclear = t_ftclear

t_ftpost = t_ftpost

t_fttax = t_fttax

EXCEPTIONS

clearing_procedure_invalid = 1

clearing_procedure_missing = 2

table_t041a_empty = 3

transaction_code_invalid = 4

amount_format_error = 5

too_many_line_items = 6

company_code_invalid = 7

screen_not_found = 8

no_authorization = 9

OTHERS = 10.

IF t_blntab[] IS INITIAL. " sy-subrc <> 0.

w_flag = 'X'.

w_indicator = 'U'.

ELSE.

CLEAR w_flag.

w_indicator = 'A'.

COMMIT WORK.

ENDIF.

CALL FUNCTION 'POSTING_INTERFACE_END'.

Any pointers regarding the solution for this problem will be of great help.

Thanks,

Sushil Joshi

9 REPLIES 9
Read only

Former Member
0 Likes
3,360

Sushil,

This is because you are limited to posting 999 lines at any one time. You will have to change your code to to ensure that FM POSTING_INTERFACE_CLEARING is called for every 999 lines.

Cheers,

Neil.

Read only

0 Likes
3,360

Hello Neil,

As I mentioned, we are using FM POSTING_INTERFACE_START, then POSTING_INTERFACE_CLEARING and POSTING_INTERFACE_CLOSE.

We have successfully tested this FMs for clearing documents over 50000 at a time, without splitting into sets of 999. Its only for this particular case that it is failing.

We have 1 payment document and rest others (over 200000) open items. So my question is - if we have to split for every 999 items, do we need to call the POSTING_INTERFACE_START, then call the FM POSTING_INTERFACE_CLEARING in a loop and at the end call POSTING_INTERFACE_CLOSE.

Will this post a single clearing document or a separate payment document for every set of 999 items ?

Please advise.

Thanks.

Read only

SujeetMishra
Active Contributor
0 Likes
3,360

Hello Sushil,

Please check counter for every 999 Line Items.after every 999th entry there should be FM POSTING_INTERFACE_CLEARING.

do like this.

Regrads,

Sujeet

Read only

0 Likes
3,360

Hello Sujeet,

As I mentioned, we are using FM POSTING_INTERFACE_START, then POSTING_INTERFACE_CLEARING and POSTING_INTERFACE_CLOSE.

We have successfully tested this FMs for clearing documents over 50000 at a time, without splitting into sets of 999. Its only for this particular case that it is failing.

We have 1 payment document and rest others (over 200000) open items. So my question is - if we have to split for every 999 items, do we need to call the POSTING_INTERFACE_START, then call the FM POSTING_INTERFACE_CLEARING in a loop and at the end call POSTING_INTERFACE_CLOSE.

Will this post a single clearing document or a separate payment document for every set of 999 items ?

Please advise.

Thanks.

Read only

0 Likes
3,360

Hello Sujeet, Neil,

We are using this FM only for clearing. We are not passing any line items in FTPOST, but only the header information. ftpost-stype = 'K' and ftpost-count = 1. We are not passing anything with ftpost-stype = 'P' which is for the line items. This is working for almost all scenarios. A clearing document gets created correctly by clearing the payment document against all applicable open invoices.

So when I say it fails for large volume, it is the open invoices that the FM is trying to clear against the payment document. So the clearing document created has only 2 line items, one for the payment and one for the total of all the 220000 open invoices. I am not sure how this is a problem with 999 line items.

Please advise.

Thanks,

Sushil Joshi

Read only

0 Likes
3,360

i guess, already u hv seen RFBIBL00 prog. for reference and its documentation.

thanq

Read only

Former Member
0 Likes
3,360

Hi Sushil,

That is an altogether different issue then. Apologies for causing confusion.

Just out of curiosity have you tried doing this manually via FB05 to see how the transaction reacts?

Cheers,

Neil.

Read only

Former Member
3,360

Hello Sushil

We are facing the same issue you had with the FB05 for large volume of items to be cleared

Did you find a solution other than split the posting and create multiple documents ?

Will you be able to share it?

Thanks for your help

Francisco

Read only

0 Likes
3,360

Hey

I am also facing the same problem you had with POSTING_INTERFACE_CLEARING

For a large amount of items to be cleared,

Did you find a solution other than splitting the posting and creating multiple documents?

Can you share it?

Thank you for your help

Chedva