<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Problems with 'BAPI_ACC_DOCUMENT_POST' in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-bapi-acc-document-post/m-p/849847#M45988</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think Brad is right.&lt;/P&gt;&lt;P&gt;A working test program will give you some idea.&lt;/P&gt;&lt;P&gt;Then you can take it from there .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report z_test_bapi_gl_ac_doc LINE-SIZE 200.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;      obj_type like bapiache02-obj_type,&lt;/P&gt;&lt;P&gt;      obj_key like bapiache02-obj_key,&lt;/P&gt;&lt;P&gt;      obj_sys like bapiache02-obj_sys,&lt;/P&gt;&lt;P&gt;      documentheader like bapiache08,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      accountgl like bapiacgl08&lt;/P&gt;&lt;P&gt;                  occurs 0 with header line,&lt;/P&gt;&lt;P&gt;      currencyamount like bapiaccr08&lt;/P&gt;&lt;P&gt;                  occurs 0 with header line,&lt;/P&gt;&lt;P&gt;      return like bapiret2&lt;/P&gt;&lt;P&gt;                  occurs 0 with header line,&lt;/P&gt;&lt;P&gt;      extension1 like bapiextc&lt;/P&gt;&lt;P&gt;                  occurs 0 with header line,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      t_edidd  like edidd occurs 0 with header line,&lt;/P&gt;&lt;P&gt;      bapi_retn_info  like bapiret2 occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data: error_flag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*documentheader-obj_type     = 'BKPFF'.&lt;/P&gt;&lt;P&gt;*documentheader-obj_key      = '18000000002002004'.&lt;/P&gt;&lt;P&gt;*documentheader-obj_type     = 'BKPFF'.&lt;/P&gt;&lt;P&gt;*documentheader-obj_key      = '180000000010002004'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*documentheader-obj_sys      = 'RD1CLNT200'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;documentheader-username     = sy-uname.&lt;/P&gt;&lt;P&gt;documentheader-header_txt   = 'Test using BAPI'.&lt;/P&gt;&lt;P&gt;documentheader-comp_code    = '1000'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*documentheader-ac_doc_no&lt;/P&gt;&lt;P&gt;*documentheader-fisc_year    = '2005'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;documentheader-doc_date     = sy-datum.&lt;/P&gt;&lt;P&gt;documentheader-pstng_date   = sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;documentheader-doc_type    = 'SA'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*documentheader-ref_doc_no&lt;/P&gt;&lt;P&gt;*documentheader-compo_acc&lt;/P&gt;&lt;P&gt;*documentheader-reason_rev&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;accountgl-itemno_acc = '1'.&lt;/P&gt;&lt;P&gt;accountgl-gl_account = '0000160100'.&lt;/P&gt;&lt;P&gt;accountgl-comp_code = '1000'.&lt;/P&gt;&lt;P&gt;accountgl-pstng_date = sy-datum.&lt;/P&gt;&lt;P&gt;accountgl-doc_type   = 'SA'.&lt;/P&gt;&lt;P&gt;accountgl-profit_ctr = '0000010000'.&lt;/P&gt;&lt;P&gt;append accountgl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;accountgl-itemno_acc = '2'.&lt;/P&gt;&lt;P&gt;accountgl-gl_account = '0000160100'.&lt;/P&gt;&lt;P&gt;accountgl-comp_code = '1000'.&lt;/P&gt;&lt;P&gt;accountgl-pstng_date = sy-datum.&lt;/P&gt;&lt;P&gt;accountgl-doc_type   = 'SA'.&lt;/P&gt;&lt;P&gt;accountgl-profit_ctr = '0000010000'.&lt;/P&gt;&lt;P&gt;append accountgl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;currencyamount-itemno_acc = '1'.&lt;/P&gt;&lt;P&gt;currencyamount-currency = 'GBP'.&lt;/P&gt;&lt;P&gt;currencyamount-amt_doccur = '100.00'.&lt;/P&gt;&lt;P&gt;append currencyamount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;currencyamount-itemno_acc = '2'.&lt;/P&gt;&lt;P&gt;currencyamount-currency = 'GBP'.&lt;/P&gt;&lt;P&gt;currencyamount-amt_doccur = '-100.00'.&lt;/P&gt;&lt;P&gt;append currencyamount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  call BAPI-function in this system    &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call function 'BAPI_ACC_GL_POSTING_POST'&lt;/P&gt;&lt;P&gt;     exporting&lt;/P&gt;&lt;P&gt;          documentheader = documentheader&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    importing&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         obj_type       = obj_type&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         obj_key        = obj_key&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         obj_sys        = obj_sys&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     tables&lt;/P&gt;&lt;P&gt;          accountgl      = accountgl&lt;/P&gt;&lt;P&gt;          currencyamount = currencyamount&lt;/P&gt;&lt;P&gt;          return         = return&lt;/P&gt;&lt;P&gt;          extension1     = extension1&lt;/P&gt;&lt;P&gt;     exceptions&lt;/P&gt;&lt;P&gt;          others         = 1.&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  message e999(re) with  'Problem occured'.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;      loop at return.&lt;/P&gt;&lt;P&gt;          if not return is initial.&lt;/P&gt;&lt;P&gt;          clear bapi_retn_info.&lt;/P&gt;&lt;P&gt;          move-corresponding return to bapi_retn_info.&lt;/P&gt;&lt;P&gt;          if return-type = 'A' or return-type = 'E'.&lt;/P&gt;&lt;P&gt;            error_flag = 'X'.&lt;/P&gt;&lt;P&gt;          endif.&lt;/P&gt;&lt;P&gt;          append bapi_retn_info.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;      endloop.&lt;/P&gt;&lt;P&gt;  if error_flag = 'X'.&lt;/P&gt;&lt;P&gt;     message e999(re) with  'Problem occured'.&lt;/P&gt;&lt;P&gt;     rollback work.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;  commit work.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 May 2005 15:48:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-05-19T15:48:43Z</dc:date>
    <item>
      <title>Problems with 'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-bapi-acc-document-post/m-p/849845#M45986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there !!&lt;/P&gt;&lt;P&gt;I got this problem , from a report I need to simulate the FB01 transactio to crate a document, I tried the 2 bapi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'BAPI_ACC_DOCUMENT_POST'&lt;/P&gt;&lt;P&gt;'BAPI_ACC_GL_POSTING_POST'&lt;/P&gt;&lt;P&gt;but seems that there is some problem and no documents aer created , can someone help me , &lt;/P&gt;&lt;P&gt;After the bapi's launch in the return table I found this 2 lines of errors:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E - RW - 609  - Error in document: BKPFF 164356&lt;/P&gt;&lt;P&gt;E - F5 - 702  - Balance in transaction currency      &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**********************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  THIS THE SOURCE CODE&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;**********************************************************&lt;/P&gt;&lt;P&gt;data: tb_header like bapiache09 occurs 0 with header line,&lt;/P&gt;&lt;P&gt;      tb_return like bapiret2 occurs 0 with header line,&lt;/P&gt;&lt;P&gt;      tb_camount like bapiaccr09 occurs 0 with header line,&lt;/P&gt;&lt;P&gt;      tb_account like bapiacgl09 occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;header&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;    move: 'D1' to tb_header-doc_type,&lt;/P&gt;&lt;P&gt;          'BKPFF' to tb_header-obj_type,&lt;/P&gt;&lt;P&gt;          sy-uzeit to tb_header-obj_key,&lt;/P&gt;&lt;P&gt;          sy-datum to tb_header-doc_date,&lt;/P&gt;&lt;P&gt;          'XXXX' to tb_header-comp_code,&lt;/P&gt;&lt;P&gt;          sy-uname to tb_header-username,&lt;/P&gt;&lt;P&gt;          'RFBU' to tb_header-bus_act,&lt;/P&gt;&lt;P&gt;          sy-datum to tb_header-pstng_date .&lt;/P&gt;&lt;P&gt;    append tb_header.&lt;/P&gt;&lt;P&gt;***&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;amount&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;    move: 1 to tb_camount-itemno_acc,&lt;/P&gt;&lt;P&gt;          "my_amount" to tb_camount-amt_doccur,&lt;/P&gt;&lt;P&gt;          'EUR' to tb_camount-currency.&lt;/P&gt;&lt;P&gt;    append tb_camount. clear tb_camount.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;    move: 2 to tb_camount-itemno_acc,&lt;/P&gt;&lt;P&gt;          "my_amount" to tb_camount-amt_doccur,&lt;/P&gt;&lt;P&gt;          'EUR' to tb_camount-currency.&lt;/P&gt;&lt;P&gt;    append tb_camount.clear tb_camount.&lt;/P&gt;&lt;P&gt;***&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;Item&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;    call function 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;      exporting&lt;/P&gt;&lt;P&gt;        input  = pr_hkonp&lt;/P&gt;&lt;P&gt;      importing&lt;/P&gt;&lt;P&gt;        output = tb_account-gl_account.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    move: 1 to tb_account-itemno_acc,&lt;/P&gt;&lt;P&gt;          sy-datum to tb_account-pstng_date,&lt;/P&gt;&lt;P&gt;          '40' to tb_account-acttype.&lt;/P&gt;&lt;P&gt;    append tb_account.clear tb_account.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;    call function 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;      exporting&lt;/P&gt;&lt;P&gt;        input  = pr_hkonr&lt;/P&gt;&lt;P&gt;      importing&lt;/P&gt;&lt;P&gt;        output = tb_account-gl_account.&lt;/P&gt;&lt;P&gt;***&lt;/P&gt;&lt;P&gt;    move: 2 to tb_account-itemno_acc,&lt;/P&gt;&lt;P&gt;          pr_hkonr to tb_account-gl_account,&lt;/P&gt;&lt;P&gt;          sy-datum to tb_account-pstng_date,&lt;/P&gt;&lt;P&gt;          pr_aufnr to tb_account-orderid,&lt;/P&gt;&lt;P&gt;          '50' to tb_account-acttype.&lt;/P&gt;&lt;P&gt;    append tb_account.clear tb_account.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;    call function 'BAPI_ACC_DOCUMENT_POST'&lt;/P&gt;&lt;P&gt;      exporting&lt;/P&gt;&lt;P&gt;        documentheader          = tb_header&lt;/P&gt;&lt;P&gt;     importing&lt;/P&gt;&lt;P&gt;        obj_type                = va_obj_type&lt;/P&gt;&lt;P&gt;        obj_key                 = va_obj_key&lt;/P&gt;&lt;P&gt;     tables&lt;/P&gt;&lt;P&gt;        accountgl               = tb_account&lt;/P&gt;&lt;P&gt;        currencyamount          = tb_camount&lt;/P&gt;&lt;P&gt;        return                  = tb_return.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;    if va_obj_key ne '$'.&lt;/P&gt;&lt;P&gt;      call function 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;        importing&lt;/P&gt;&lt;P&gt;          return = return.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2005 14:50:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-bapi-acc-document-post/m-p/849845#M45986</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-19T14:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with 'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-bapi-acc-document-post/m-p/849846#M45987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pino,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at the long text of your error, ot seems that your line items don't balance.  Have you double checked your ACCOUNTGL and CURRENCYAMOUNT parameters?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2005 15:17:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-bapi-acc-document-post/m-p/849846#M45987</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-19T15:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with 'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-bapi-acc-document-post/m-p/849847#M45988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think Brad is right.&lt;/P&gt;&lt;P&gt;A working test program will give you some idea.&lt;/P&gt;&lt;P&gt;Then you can take it from there .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report z_test_bapi_gl_ac_doc LINE-SIZE 200.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;      obj_type like bapiache02-obj_type,&lt;/P&gt;&lt;P&gt;      obj_key like bapiache02-obj_key,&lt;/P&gt;&lt;P&gt;      obj_sys like bapiache02-obj_sys,&lt;/P&gt;&lt;P&gt;      documentheader like bapiache08,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      accountgl like bapiacgl08&lt;/P&gt;&lt;P&gt;                  occurs 0 with header line,&lt;/P&gt;&lt;P&gt;      currencyamount like bapiaccr08&lt;/P&gt;&lt;P&gt;                  occurs 0 with header line,&lt;/P&gt;&lt;P&gt;      return like bapiret2&lt;/P&gt;&lt;P&gt;                  occurs 0 with header line,&lt;/P&gt;&lt;P&gt;      extension1 like bapiextc&lt;/P&gt;&lt;P&gt;                  occurs 0 with header line,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      t_edidd  like edidd occurs 0 with header line,&lt;/P&gt;&lt;P&gt;      bapi_retn_info  like bapiret2 occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data: error_flag.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*documentheader-obj_type     = 'BKPFF'.&lt;/P&gt;&lt;P&gt;*documentheader-obj_key      = '18000000002002004'.&lt;/P&gt;&lt;P&gt;*documentheader-obj_type     = 'BKPFF'.&lt;/P&gt;&lt;P&gt;*documentheader-obj_key      = '180000000010002004'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*documentheader-obj_sys      = 'RD1CLNT200'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;documentheader-username     = sy-uname.&lt;/P&gt;&lt;P&gt;documentheader-header_txt   = 'Test using BAPI'.&lt;/P&gt;&lt;P&gt;documentheader-comp_code    = '1000'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*documentheader-ac_doc_no&lt;/P&gt;&lt;P&gt;*documentheader-fisc_year    = '2005'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;documentheader-doc_date     = sy-datum.&lt;/P&gt;&lt;P&gt;documentheader-pstng_date   = sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;documentheader-doc_type    = 'SA'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*documentheader-ref_doc_no&lt;/P&gt;&lt;P&gt;*documentheader-compo_acc&lt;/P&gt;&lt;P&gt;*documentheader-reason_rev&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;accountgl-itemno_acc = '1'.&lt;/P&gt;&lt;P&gt;accountgl-gl_account = '0000160100'.&lt;/P&gt;&lt;P&gt;accountgl-comp_code = '1000'.&lt;/P&gt;&lt;P&gt;accountgl-pstng_date = sy-datum.&lt;/P&gt;&lt;P&gt;accountgl-doc_type   = 'SA'.&lt;/P&gt;&lt;P&gt;accountgl-profit_ctr = '0000010000'.&lt;/P&gt;&lt;P&gt;append accountgl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;accountgl-itemno_acc = '2'.&lt;/P&gt;&lt;P&gt;accountgl-gl_account = '0000160100'.&lt;/P&gt;&lt;P&gt;accountgl-comp_code = '1000'.&lt;/P&gt;&lt;P&gt;accountgl-pstng_date = sy-datum.&lt;/P&gt;&lt;P&gt;accountgl-doc_type   = 'SA'.&lt;/P&gt;&lt;P&gt;accountgl-profit_ctr = '0000010000'.&lt;/P&gt;&lt;P&gt;append accountgl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;currencyamount-itemno_acc = '1'.&lt;/P&gt;&lt;P&gt;currencyamount-currency = 'GBP'.&lt;/P&gt;&lt;P&gt;currencyamount-amt_doccur = '100.00'.&lt;/P&gt;&lt;P&gt;append currencyamount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;currencyamount-itemno_acc = '2'.&lt;/P&gt;&lt;P&gt;currencyamount-currency = 'GBP'.&lt;/P&gt;&lt;P&gt;currencyamount-amt_doccur = '-100.00'.&lt;/P&gt;&lt;P&gt;append currencyamount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  call BAPI-function in this system    &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call function 'BAPI_ACC_GL_POSTING_POST'&lt;/P&gt;&lt;P&gt;     exporting&lt;/P&gt;&lt;P&gt;          documentheader = documentheader&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    importing&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         obj_type       = obj_type&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         obj_key        = obj_key&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         obj_sys        = obj_sys&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     tables&lt;/P&gt;&lt;P&gt;          accountgl      = accountgl&lt;/P&gt;&lt;P&gt;          currencyamount = currencyamount&lt;/P&gt;&lt;P&gt;          return         = return&lt;/P&gt;&lt;P&gt;          extension1     = extension1&lt;/P&gt;&lt;P&gt;     exceptions&lt;/P&gt;&lt;P&gt;          others         = 1.&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  message e999(re) with  'Problem occured'.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;      loop at return.&lt;/P&gt;&lt;P&gt;          if not return is initial.&lt;/P&gt;&lt;P&gt;          clear bapi_retn_info.&lt;/P&gt;&lt;P&gt;          move-corresponding return to bapi_retn_info.&lt;/P&gt;&lt;P&gt;          if return-type = 'A' or return-type = 'E'.&lt;/P&gt;&lt;P&gt;            error_flag = 'X'.&lt;/P&gt;&lt;P&gt;          endif.&lt;/P&gt;&lt;P&gt;          append bapi_retn_info.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;      endloop.&lt;/P&gt;&lt;P&gt;  if error_flag = 'X'.&lt;/P&gt;&lt;P&gt;     message e999(re) with  'Problem occured'.&lt;/P&gt;&lt;P&gt;     rollback work.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;  commit work.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2005 15:48:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-bapi-acc-document-post/m-p/849847#M45988</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-19T15:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with 'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-bapi-acc-document-post/m-p/849848#M45989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all for the answer the problem was on the amount , I thought that the item field tb_account-acttype was referred to the posting key and so the sign of the amount.&lt;/P&gt;&lt;P&gt;Now the bapi create the document and I'd like to have another info about the document number, I noted that the ones created by the 'FB01' have 10 digits numbers (like this "0100000006") while the documents created by my program are only 6 digit long ("101850") what I must change to my code to use the "standard" numeration range ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2005 09:40:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-bapi-acc-document-post/m-p/849848#M45989</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-23T09:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with 'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-bapi-acc-document-post/m-p/849849#M45990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pino,&lt;/P&gt;&lt;P&gt;try that :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM ALPHAFORMAT(SAPFS000) USING belnr belnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2005 09:51:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-bapi-acc-document-post/m-p/849849#M45990</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2005-05-23T09:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with 'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-bapi-acc-document-post/m-p/849850#M45991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pino,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you sure its not a 10 digit number?  Maybe the L_OBJ_KEY parameter returns it like "101850", but in the database its "0000101850".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer the following thread: &lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="40839"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you don't pass an accounting document number it will generate one from the internal number range.  This should be the same range as other accounting documents.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2005 09:55:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-bapi-acc-document-post/m-p/849850#M45991</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-23T09:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with 'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-bapi-acc-document-post/m-p/849851#M45992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you but my problem is that I'd like an assignment related to to the document type range managed by the bapi and not a format conversion. &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2005 10:08:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-bapi-acc-document-post/m-p/849851#M45992</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-23T10:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with 'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-bapi-acc-document-post/m-p/849852#M45993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pino,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i do'nt understand the problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can check the number range with ta's &amp;lt;b&amp;gt;OBA7&amp;lt;/b&amp;gt; (doc-types)&lt;/P&gt;&lt;P&gt;and &amp;lt;b&amp;gt;FBN1&amp;lt;/b&amp;gt; (number range)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2005 10:25:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-bapi-acc-document-post/m-p/849852#M45993</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2005-05-23T10:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with 'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-bapi-acc-document-post/m-p/849853#M45994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Brad in the discussion there was a relation to a note that solved my problem &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2005 10:37:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-bapi-acc-document-post/m-p/849853#M45994</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-23T10:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with 'BAPI_ACC_DOCUMENT_POST'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-bapi-acc-document-post/m-p/849854#M45995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pino,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please close the thread then.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just click on either "Solved problem" next to one of the responses, or "Solved it on my own" next to your original post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2005 10:47:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-with-bapi-acc-document-post/m-p/849854#M45995</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-23T10:47:22Z</dc:date>
    </item>
  </channel>
</rss>

