‎2010 Mar 22 8:42 AM
Hi Gurus,
I am working on a report to create clearing doc using FB05.
(Using POSTING_INTERFACE_CLEARING)
Whie executig the FM separately it works fine and the clearing doc is created.
But when the same is used in the report it returns the following error :
"The difference is too large for clearing".
I have searched a lot for the same scenario in SDN but couldn't find one.
i pass the following details into the FM.
ftpost-stype = 'K'.
ftpost-count = 1.
ftpost-fnam = 'BKPF-BLDAT'.
CONCATENATE sy-datum+4(2) sy-datum+6(2) sy-datum(4) INTO ftpost-fval SEPARATED BY '/'.
APPEND ftpost.
ftpost-fnam = 'BKPF-BUDAT'.
CONCATENATE sy-datum+4(2) sy-datum+6(2) sy-datum(4) INTO ftpost-fval SEPARATED BY '/'.
APPEND ftpost.
ftpost-fnam = 'BKPF-BLART'.
ftpost-fval = 'CL'.
APPEND ftpost.
ftpost-fnam = 'BKPF-BUKRS'.
ftpost-fval = gs_regup-bukrs.
APPEND ftpost.
ftpost-fnam = 'BKPF-WAERS'.
ftpost-fval = gs_regup-waers.
APPEND ftpost.
ftpost-fnam = 'BKPF-XBLNR'.
ftpost-fval = gs_regup-vblnr.
APPEND ftpost.
ftpost-stype = 'P'.
ftpost-count = 1 .
ftpost-fnam = 'BSEG-BSCHL'.
ftpost-fval = '50'.
APPEND ftpost.
ftpost-fnam = 'BSEG-WRBTR'.
ftpost-fval = gs_regup-wrbtr.
APPEND ftpost.
ftpost-fnam = 'BSEG-HKNOT'.
ftpost-fval = lv_acc_no .
APPEND ftpost.
ftpost-fnam = 'COBL-GSBER'.
ftpost-fval = gs_regup-gsber.
APPEND ftpost.
ftclear-agkoa = 'S'.
ftclear-xnops = 'X'.
ftclear-agbuk = gs_regup-bukrs.
ftclear-agkon = ls_bseg-hkont.
ftclear-selfd = 'BELNR'.
ftclear-selvon = gs_regup-vblnr.
APPEND ftclear.
CALL FUNCTION 'POSTING_INTERFACE_START'.
....
CALL FUNCTION 'POSTING_INTERFACE_CLEARING'
EXPORTING
i_auglv = auglv " UMBUCHNG
i_tcode = tcode " FB05
i_sgfunct =sgfunct " C
IMPORTING
e_msgid = lmsgid
e_msgno =msgno
e_msgty = sgty
e_msgv1 =msgv1
e_msgv2 =msgv2
e_msgv3 =msgv3
e_msgv4 =msgv4
e_subrc = subrc
TABLES
t_blntab = blntab
t_ftclear = ftclear
t_ftpost = ftpost
CALL FUNCTION 'POSTING_INTERFACE_END'
Thanks in Advance
- Deepan
Edited by: deepan adhi on Mar 22, 2010 9:50 AM
Edited by: deepan adhi on Mar 22, 2010 9:52 AM
‎2010 Apr 08 5:36 AM
Hello deepan,
Greetings.
"Difference is too large for clearing" is actually a success message which is treated as an error message when the BDC mode is "N"....try running the program in mode "A" or "E" . it would work fine.
Another important thing is that the FM works only for standard tab for which the credit and debit lines should tally. if you want to use the FM for residual items posting then you should enhance the FM (implici enhancement)t
‎2011 Feb 15 3:06 PM
Hi Satya ,
Could you please share more info on how to enhance the FM , as i have do a residual posting with dynpro 3100.
thank you for any information.
Vidya
‎2012 Feb 07 7:00 PM
Hello Vidya
Today I have the same requirement with the residual.
You solve your problem with the enhancement?
Could you please shared the code you use?
Thanks in advance.
‎2011 Feb 18 5:44 AM