Dear experts hi,
My request is to get 2 oregon much existing unfastened items of a lawsuit and wide them utilizing ABAP and the effect to beryllium a diary introduction with nary lines.
I person tried the POSTING_INTERFACE_CLEARING but this gets stuck successful the Process Open Items screen. Doing immoderate debugging one noticed that determination isn't immoderate measurement to activate the items and the FM expects to participate information successful operation t_ftpost, but this is not my petition since doing this volition make different 2 lines debiting & crediting.
I americium present trying to usage AC_CLR_DOCUMENT_CREATE. I person managed to wide the documents but the generated papers has a azygous enactment with zero magnitude either a lawsuit oregon GL depending connected however you provender the FM.
This is however the FM is filled:
ls_acchd-glvor = 'RFBU'. ls_acchd-awtyp = 'BKPF'. ls_acchd-tcode = 'FB1D'. APPEND ls_acchd TO it_acchd. CLEAR: ls_acchd. g_posnr = 1. ls_accit-bukrs = bukrs. ls_accit-budat = sy-datum. ls_accit-bldat = sy-datum. ls_accit-wwert = sy-datum. ls_accit-blart = 'SA'. ls_accit-posnr = g_posnr. ls_accit-bschl = '50'. ls_accit-koart = 'S'. ls_accit-hkont = gl_account. * ls_accit-kunnr = kunnr. * ls_accit-bschl = '01'. * ls_accit-koart = 'D'. ls_accit-pswsl = 'EUR'. APPEND ls_accit TO it_accit. ls_acccr-posnr = g_posnr. ls_acccr-waers = 'EUR'. ls_acccr-curtp = '00'. APPEND ls_acccr TO it_acccr. ls_acccr-posnr = g_posnr. ls_acccr-waers = 'EUR'. ls_acccr-curtp = '10'. APPEND ls_acccr TO it_acccr. LOOP AT it_documents INTO ls_lines. ls_accclr_itm_key-bukrs = bukrs. ls_accclr_itm_key-koart = 'D'. ls_accclr_itm_key-konko = kunnr. ls_accclr_itm_key-belnr = ls_lines-belnr. ls_accclr_itm_key-gjahr = ls_lines-gjahr. ls_accclr_itm_key-buzei = ls_lines-buzei. APPEND ls_accclr_itm_key TO it_accclr_itm_key. g_posnr = g_posnr + 1. CLEAR: ls_lines,ls_accit,ls_accclr_itm_key,ls_bseg. ENDLOOP. CALL FUNCTION 'AC_CLR_DOCUMENT_CREATE' EXPORTING i_auglv = 'EINGZAHL' i_koart = 'D' i_bukrs = bukrs i_konko = kunnr TABLES t_acchd = it_acchd t_accit = it_accit t_acccr = it_acccr t_accclr_itm_key = it_accclr_itm_key EXCEPTIONS invalid_input = 1 invalid_selection = 2 account_missing = 3 account_not_oi_handled = 4 account_locked = 5 document_locked = 6 account_clr_internally = 7 OTHERS = 8. IF sy-subrc <> 0. * Implement suitable mistake handling here ENDIF.Do you cognize if determination is immoderate different solution for this? Batch Input is not an option.
Thank you,