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

Error executing "BAPI_ACC_DOCUMENT_CHECK"

Former Member
0 Likes
652

Hi

When I try to execute FM "BAPI_ACC_DOCUMENT_CHECK" I get this message:

0. Error in document: BKPFF $ ECDCLNT220

0. Balance in transaction currency

What I must to check?


*    First record
          wa_detalle-MANDT = sy-mandt.
          wa_detalle-BUZEI = vbuzei.
          wa_detalle-BUKRS = vbukrs.
          wa_detalle-GSBER = '0'.
          wa_detalle-GJAHR = ANOFISC.
          wa_detalle-KOART =  'D'.
          wa_detalle-WERKS = ' '.
          wa_detalle-BSCHL =  '01'.
          wa_detalle-WRBTR = ti_archivo-linea+16(12).
          wa_detalle-SGTXT = NUMFACT.  " ???
          wa_detalle-MWSKZ =  ti_archivo-linea+40(2).
          wa_detalle-kunnr = '0000100006'.
          wa_detalle-SAKNR    = ''.
          wa_detalle-ZTERM    = 'TP03'.
          wa_detalle-KOKRS    = 'CC01'.
          wa_detalle-PRCTR    = ''.
          wa_detalle-ZUONR    = ' '.
          wa_detalle-ZLOTE    = v_lote.
          wa_detalle-mwskz    = 'I5'.
          wa_detalle-ZARCHIVO = wa_fn-filename.
          APPEND wa_detalle TO ti_detalle. CLEAR wa_detalle.

*    Second record
          ADD 1 to vbuzei.
          wa_detalle-MANDT = sy-mandt.
          wa_detalle-BUZEI = vbuzei.
          wa_detalle-BUKRS = vbukrs.
          wa_detalle-GSBER = vgsber.
          wa_detalle-GJAHR = ANOFISC.
          wa_detalle-KOART =  'D'.
          wa_detalle-WERKS = ' '.

          wa_detalle-BSCHL =  '40'.
          wa_detalle-WRBTR = ti_archivo-linea+28(12).
          wa_detalle-SGTXT = NUMFACT.  " ???
          wa_detalle-MWSKZ =  ti_archivo-linea+40(2).
                    wa_detalle-kunnr = '0000100006'.
          wa_detalle-KUNNR = ''.
          wa_detalle-SAKNR    = '0411000011'.
          wa_detalle-ZTERM    = 'TP03'.
          wa_detalle-KOKRS    = 'CC01'.
          wa_detalle-PRCTR    = 'CCNGEA0001'.
          wa_detalle-ZUONR    = ' '.
          wa_detalle-ZLOTE    = v_lote.
          wa_detalle-mwskz    = 'I5'.
          wa_detalle-ZARCHIVO = wa_fn-filename.
          APPEND wa_detalle TO ti_detalle. CLEAR wa_detalle.

*   Third record
          ADD 1 to vbuzei.
          wa_detalle-MANDT = sy-mandt.
          wa_detalle-BUZEI = vbuzei.
          wa_detalle-BUKRS = vbukrs.
          wa_detalle-GSBER = vgsber.
          wa_detalle-GJAHR = ANOFISC.
          wa_detalle-KOART =  'D'.
          wa_detalle-WERKS = ' '.
          wa_detalle-BSCHL =  '50'.
          wa_detalle-WRBTR = ti_archivo-linea+42(14).
          wa_detalle-SGTXT = NUMFACT.  " ???
          wa_detalle-MWSKZ =  ti_archivo-linea+40(2).
                    wa_detalle-kunnr = '0000100006'.
          wa_detalle-KUNNR = ''.
          wa_detalle-SAKNR    = '0411000011'.
          wa_detalle-ZTERM    = 'TP03'.
          wa_detalle-KOKRS    = 'CC01'.
          wa_detalle-PRCTR    = 'CCNGEA0001'.
          wa_detalle-ZUONR    = ' '.
          wa_detalle-ZLOTE    = v_lote.
          wa_detalle-mwskz    = 'I5'.
          wa_detalle-ZARCHIVO = wa_fn-filename.
          APPEND wa_detalle TO ti_detalle. CLEAR wa_detalle.
          CLEAR: vbuzei.

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
599

The 2nd error: there is difference amount left between credit & debit......so, try to make the balance as zero. Make the value negative based on the posting key. In debug mode, change the amounts, then u will get an idea.

I guess, if u fix the 2nd error, automatically, 1st will b fixed.

thanq

Edited by: SAP ABAPer on Mar 20, 2009 8:35 PM

3 REPLIES 3
Read only

Former Member
0 Likes
600

The 2nd error: there is difference amount left between credit & debit......so, try to make the balance as zero. Make the value negative based on the posting key. In debug mode, change the amounts, then u will get an idea.

I guess, if u fix the 2nd error, automatically, 1st will b fixed.

thanq

Edited by: SAP ABAPer on Mar 20, 2009 8:35 PM

Read only

0 Likes
599

Thanks SAP ABAPer I'll check and let you know...

Read only

0 Likes
599

Solved: Period Closed in DEV environment.