<?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: Error in BAPI_ACC_DOCUMENT_POST in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-acc-document-post/m-p/5434566#M1246786</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes,&lt;/P&gt;&lt;P&gt;but how should I fill the three field mentioned above? I don't know if there are known values or they depends from something. Please be patient with me I am new in this world (that is very very wide)&lt;/P&gt;&lt;P&gt;this are the fields I set in header:&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;x_invheader-bus_act = 'RFBU'.                  "Business Transaction
  x_invheader-username = sy-uname.               "User name
  x_invheader-header_txt = 'prova bapi'. "Document Header Text
  x_invheader-comp_code = 'TES1'.                "Company Code
  x_invheader-doc_date = '20090401'.             "Document Date in Document
  x_invheader-pstng_date = '20090401'.           "Posting Date in the Document
  x_invheader-doc_type = '01'.                   "Reference Document Number
  x_invheader-ref_doc_no = 'FATT'.               "Reference Document Number
  x_invheader-ac_doc_no = '200115'.
  x_invheader-fisc_year = '2009'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Gabriele&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Gabriele Montori on Apr 1, 2009 4:24 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Gabriele Montori on Apr 1, 2009 4:25 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Apr 2009 14:22:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-01T14:22:21Z</dc:date>
    <item>
      <title>Error in BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-acc-document-post/m-p/5434563#M1246783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to use the bapi in the subject following other post on the sdn, but I get this error message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error in document:  200111 AC_DOC_NO&lt;/P&gt;&lt;P&gt;E&lt;/P&gt;&lt;P&gt;Required field OBJ_TYPE was not transferred in parameter DOCUMENTHEADER&lt;/P&gt;&lt;P&gt;E&lt;/P&gt;&lt;P&gt;Required field OBJ_KEY was not transferred in parameter DOCUMENTHEADER&lt;/P&gt;&lt;P&gt;E&lt;/P&gt;&lt;P&gt;Required field OBJ_SYS was not transferred in parameter DOCUMENTHEADER&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I have to initialize some fields, but I don't know how.&lt;/P&gt;&lt;P&gt;Can anybody pleas help me or explain me what is missing and how can I fix it?&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;Gabriele&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2009 13:52:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-acc-document-post/m-p/5434563#M1246783</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-01T13:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Error in BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-acc-document-post/m-p/5434564#M1246784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DOCUMENTHEADER is a mandatory structure, so pass all the values, its asking for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2009 13:55:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-acc-document-post/m-p/5434564#M1246784</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2009-04-01T13:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: Error in BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-acc-document-post/m-p/5434565#M1246785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;data:
obj_type like bapiache02-obj_type,
obj_key like bapiache02-obj_key,
obj_sys like bapiache02-obj_sys,
documentheader like bapiache08,

accountgl like bapiacgl08
occurs 0 with header line,
currencyamount like bapiaccr08
occurs 0 with header line,
return like bapiret2
occurs 0 with header line,
extension1 like bapiextc
occurs 0 with header line,

t_edidd like edidd occurs 0 with header line,
bapi_retn_info like bapiret2 occurs 0 with header line.
data: error_flag.

documentheader-username = sy-uname.
documentheader-header_txt = 'Test using BAPI'.
documentheader-comp_code = '1000'.
documentheader-doc_date = sy-datum.
documentheader-pstng_date = sy-datum.
documentheader-doc_type = 'SA'.

accountgl-itemno_acc = '1'.
accountgl-gl_account = '0000160100'.
accountgl-comp_code = '1000'.
accountgl-pstng_date = sy-datum.
accountgl-doc_type = 'SA'.
accountgl-profit_ctr = '0000010000'.
append accountgl.

accountgl-itemno_acc = '2'.
accountgl-gl_account = '0000160100'.
accountgl-comp_code = '1000'.
accountgl-pstng_date = sy-datum.
accountgl-doc_type = 'SA'.
accountgl-profit_ctr = '0000010000'.
append accountgl.

currencyamount-itemno_acc = '1'.
currencyamount-currency = 'GBP'.
currencyamount-amt_doccur = '100.00'.
append currencyamount.

currencyamount-itemno_acc = '2'.
currencyamount-currency = 'GBP'.
currencyamount-amt_doccur = '-100.00'.
append currencyamount.

* call BAPI-function in this system *
call function 'BAPI_ACC_GL_POSTING_POST'
exporting
documentheader = documentheader
* importing
* obj_type = obj_type
* obj_key = obj_key
* obj_sys = obj_sys
tables
accountgl = accountgl
currencyamount = currencyamount
return = return
extension1 = extension1
exceptions
others = 1.
if sy-subrc &amp;lt;&amp;gt; 0.
message e999(re) with 'Problem occured'.
else.
loop at return.
if not return is initial.
clear bapi_retn_info.
move-corresponding return to bapi_retn_info.
if return-type = 'A' or return-type = 'E'.
error_flag = 'X'.
endif.
append bapi_retn_info.
endif.
endloop.
if error_flag = 'X'.
message e999(re) with 'Problem occured'.
rollback work.
else.
commit work.
endif.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;source: &lt;A href="http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bapi_acc_document_post-622561" target="test_blank"&gt;http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bapi_acc_document_post-622561&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2009 13:58:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-acc-document-post/m-p/5434565#M1246785</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-01T13:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Error in BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-acc-document-post/m-p/5434566#M1246786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes,&lt;/P&gt;&lt;P&gt;but how should I fill the three field mentioned above? I don't know if there are known values or they depends from something. Please be patient with me I am new in this world (that is very very wide)&lt;/P&gt;&lt;P&gt;this are the fields I set in header:&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;x_invheader-bus_act = 'RFBU'.                  "Business Transaction
  x_invheader-username = sy-uname.               "User name
  x_invheader-header_txt = 'prova bapi'. "Document Header Text
  x_invheader-comp_code = 'TES1'.                "Company Code
  x_invheader-doc_date = '20090401'.             "Document Date in Document
  x_invheader-pstng_date = '20090401'.           "Posting Date in the Document
  x_invheader-doc_type = '01'.                   "Reference Document Number
  x_invheader-ref_doc_no = 'FATT'.               "Reference Document Number
  x_invheader-ac_doc_no = '200115'.
  x_invheader-fisc_year = '2009'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Gabriele&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Gabriele Montori on Apr 1, 2009 4:24 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Gabriele Montori on Apr 1, 2009 4:25 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2009 14:22:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-acc-document-post/m-p/5434566#M1246786</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-01T14:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error in BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-acc-document-post/m-p/5434567#M1246787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;your functional consultant should provide you some test data to test it...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2009 15:01:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-acc-document-post/m-p/5434567#M1246787</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2009-04-01T15:01:52Z</dc:date>
    </item>
  </channel>
</rss>

