<?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: BAPI_ACC_DOCUMENT_POST  for FB50 posting in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708085#M1578786</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you tried my piece of code.. comment these three and see.. Don't use sy-subrc check, go for reading return table as i have used.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
ls_header-obj_type = p_objtyp.
ls_header-obj_key = p_objkey.
ls_header-obj_sys = p_objsys.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Feb 2011 08:56:17 GMT</pubDate>
    <dc:creator>former_member404244</dc:creator>
    <dc:date>2011-02-04T08:56:17Z</dc:date>
    <item>
      <title>BAPI_ACC_DOCUMENT_POST  for FB50 posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708074#M1578775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using BAPI_ACC_DOCUMENT_POST  for FB50 posting . In return [] I am getting message saying "Document posted successfully: ZBKPF OFDOPN7111901 0000000100" . Ahter this I have used 'BAPI_TRANSACTION_COMMIT' but when I am checking in BKPF I am not getting any records. It seems the database is not getting updated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shweta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 11:37:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708074#M1578775</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-03T11:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST  for FB50 posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708075#M1578776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to pass WAIT = 'X' in the function mdoule "BAPI_TRANSACTION_COMMIT" and see.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 11:42:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708075#M1578776</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2011-02-03T11:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST  for FB50 posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708076#M1578777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes I am passing WAIT = X.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is it due to wait time?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 11:53:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708076#M1578777</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-03T11:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST  for FB50 posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708077#M1578778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After doing that also the record is not updated?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 12:08:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708077#M1578778</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2011-02-03T12:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST  for FB50 posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708078#M1578779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No its not updating. I even gave Wait time of 10 secs eventhough its not&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 12:36:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708078#M1578779</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-03T12:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST  for FB50 posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708079#M1578780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After executing your program, can you check transaction FB03 to see the latest accouting document created.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 13:06:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708079#M1578780</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-03T13:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST  for FB50 posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708080#M1578781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;No it is not showing anything in FB03.&lt;/P&gt;&lt;P&gt;I am very confused , actually Bapi is not even updating the FI tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Shweta&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Shweta . on Feb 4, 2011 6:33 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Feb 2011 05:32:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708080#M1578781</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-04T05:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST  for FB50 posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708081#M1578782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the contents in RETURN structure ? Does it contain the record with message id RW and message no : 605 (Document posted successfully) ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Feb 2011 05:51:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708081#M1578782</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-04T05:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST  for FB50 posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708082#M1578783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you please paste your code..Please have alook at the below code for your reference which works perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

* Prepare Header Information
      wa_dochead-bus_act    = text-018.
      wa_dochead-username   = sy-uname.
      wa_dochead-comp_code  = p_comp.
      wa_dochead-pstng_date = wa_bseg_temp-budat.
      wa_dochead-doc_date   = sy-datum.
      wa_dochead-fisc_year  = lv_year.
      wa_dochead-doc_type   = lc_zi.
      wa_dochead-ref_doc_no = text-019.
      wa_dochead-header_txt = text-027.


* Prepare Item information
      wa_accgl-itemno_acc = lv_count.
      wa_accgl-gl_account = wa_bseg_temp-hkont.
      wa_accgl-costcenter = p_cost.
      wa_accgl-pstng_date = wa_bseg_temp-budat.
      wa_accgl-value_date = sy-datum.
      wa_accgl-acct_type  = 'S'.
      wa_accgl-fisc_year  = lv_year.
      wa_accgl-de_cre_ind = wa_bseg_temp-shkzg.
      wa_accgl-bus_area   = wa_bseg_temp-gsber.
      APPEND wa_accgl TO t_accgl.

* Prepare Currency Information
      wa_curramt-itemno_acc = lv_count.
      wa_curramt-currency   = wa_bkpf-waers.
      IF wa_bseg_temp-shkzg EQ 'S'.
        wa_curramt-amt_doccur = wa_bseg_temp-wrbtr.
      ELSEIF wa_bseg_temp-shkzg EQ 'H'.
        wa_curramt-amt_doccur = wa_bseg_temp-wrbtr * -1.
      ENDIF.
      APPEND wa_curramt TO t_curramt.

      CLEAR : wa_curramt,
              wa_accgl,
              wa_bseg_temp.

      lv_count = lv_count + 1.

*    ENDLOOP.

      AT END OF budat.
*  Call bapi for posting document.
        IF t_accgl[] IS NOT INITIAL.

          CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
            EXPORTING
              documentheader = wa_dochead
            TABLES
              accountgl      = t_accgl
              currencyamount = t_curramt
              return         = t_return1.

          APPEND LINES OF t_return1 TO t_return.

          READ TABLE t_return1 WITH KEY type = 'S' TRANSPORTING NO FIELDS.
          IF sy-subrc EQ 0.
            w_success = c_x.
            CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
              EXPORTING
                wait = 'X'.
            v_hold_time = sy-uzeit.
          ELSE.
            CLEAR w_success.
            CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.

          ENDIF .
        ENDIF. " t_accgl IS INITIAL
        CLEAR : wa_dochead.
        REFRESH : t_accgl,
                  t_curramt,
                  t_return1.


      ENDAT.
    ENDLOOP. " bseg TMP
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Feb 2011 05:51:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708082#M1578783</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2011-02-04T05:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST  for FB50 posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708083#M1578784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just use BAPI 'BAPI_TRANSACTION_COMMIT' without giving any exporting parameter and check it once and also check the READ statement on t_return1  whether the sy-subrc value is zero or not in debugging.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;shivraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Feb 2011 07:17:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708083#M1578784</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-04T07:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST  for FB50 posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708084#M1578785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using below code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Header&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ls_header-obj_type = p_objtyp.&lt;/P&gt;&lt;P&gt;  ls_header-obj_key = p_objkey.&lt;/P&gt;&lt;P&gt;  ls_header-obj_sys = p_objsys.&lt;/P&gt;&lt;P&gt;  ls_header-bus_act = p_busact.&lt;/P&gt;&lt;P&gt;  ls_header-username = p_usernm.&lt;/P&gt;&lt;P&gt;  ls_header-header_txt = p_txt.&lt;/P&gt;&lt;P&gt;  ls_header-comp_code = p_compcd.&lt;/P&gt;&lt;P&gt;  ls_header-doc_date = p_docdte.&lt;/P&gt;&lt;P&gt;  ls_header-pstng_date = p_pstgdt.&lt;/P&gt;&lt;P&gt;  ls_header-trans_date = p_trnsdt.&lt;/P&gt;&lt;P&gt;  ls_header-fisc_year = p_fy.&lt;/P&gt;&lt;P&gt;  ls_header-fis_period = p_period.&lt;/P&gt;&lt;P&gt;  ls_header-doc_type = p_doctyp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Accounting Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CLEAR ls_account.&lt;/P&gt;&lt;P&gt;  ls_account-itemno_acc = p_item.&lt;/P&gt;&lt;P&gt;  ls_account-gl_account = p_gl_acc.&lt;/P&gt;&lt;P&gt;  ls_account-stat_con = p_acctyp.&lt;/P&gt;&lt;P&gt;  ls_account-co_busproc = p_busprc.&lt;/P&gt;&lt;P&gt;  APPEND ls_account TO lt_account.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR ls_account.&lt;/P&gt;&lt;P&gt;  ls_account-itemno_acc = p_item2.&lt;/P&gt;&lt;P&gt;  ls_account-gl_account = p_glacc2.&lt;/P&gt;&lt;P&gt;  ls_account-stat_con = p_actyp2.&lt;/P&gt;&lt;P&gt;  ls_account-co_busproc = p_busprc.&lt;/P&gt;&lt;P&gt;  ls_account-func_area = p_func.&lt;/P&gt;&lt;P&gt;  APPEND ls_account TO lt_account.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Currency Table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CLEAR ls_currency.&lt;/P&gt;&lt;P&gt;  ls_currency-itemno_acc = p_item.&lt;/P&gt;&lt;P&gt;  ls_currency-curr_type = p_curtyp.&lt;/P&gt;&lt;P&gt;  ls_currency-currency = p_curncy.&lt;/P&gt;&lt;P&gt;  ls_currency-currency_iso = p_dctype.&lt;/P&gt;&lt;P&gt;  ls_currency-amt_doccur = p_amdccr.&lt;/P&gt;&lt;P&gt;  APPEND ls_currency TO lt_currency.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR ls_currency.&lt;/P&gt;&lt;P&gt;  ls_currency-itemno_acc = p_item2.&lt;/P&gt;&lt;P&gt;  ls_currency-curr_type = p_crtyp2.&lt;/P&gt;&lt;P&gt;  ls_currency-currency = p_crncy2.&lt;/P&gt;&lt;P&gt;  ls_currency-currency_iso = p_dcype2.&lt;/P&gt;&lt;P&gt;  ls_currency-amt_doccur = p_amdcr2.&lt;/P&gt;&lt;P&gt;  APPEND ls_currency TO lt_currency.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Criteria&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CLEAR ls_criteria.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; ls_criteria-itemno_acc = p_item2.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; ls_criteria-fieldname = p_fldnam.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; ls_criteria-character = p_char.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; APPEND ls_criteria TO lt_criteria.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&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          = ls_header&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CUSTOMERCPD             =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CONTRACTHEADER          =&lt;/P&gt;&lt;/LI&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                =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OBJ_KEY                 =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OBJ_SYS                 =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      accountgl               = lt_account&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ACCOUNTRECEIVABLE       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ACCOUNTPAYABLE          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ACCOUNTTAX              =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      currencyamount          = lt_currency&lt;/P&gt;&lt;P&gt;    CRITERIA                = lt_criteria&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  VALUEFIELD              =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  EXTENSION1              =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      return                  = lt_return&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PAYMENTCARD             =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CONTRACTITEM            =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  EXTENSION2              =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  REALESTATE              =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ACCOUNTWT               =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   COMMIT WORK and wait.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; WAIT UP TO 10 SECONDS.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        wait = 'X'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried it with exporting parameter in BAPI_TRANSACTION _COMMIT also &lt;/P&gt;&lt;P&gt;But it is not shouing any record in BKPF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Shweta&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Shweta . on Feb 4, 2011 9:37 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Feb 2011 08:36:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708084#M1578785</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-04T08:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST  for FB50 posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708085#M1578786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you tried my piece of code.. comment these three and see.. Don't use sy-subrc check, go for reading return table as i have used.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
ls_header-obj_type = p_objtyp.
ls_header-obj_key = p_objkey.
ls_header-obj_sys = p_objsys.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Feb 2011 08:56:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708085#M1578786</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2011-02-04T08:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST  for FB50 posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708086#M1578787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nagaraj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I commented these 3 line I am getting below error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error in document: BKPFF $ ERP100&lt;/P&gt;&lt;P&gt;FI/CO interface: Inconsistent FI/CO document header data for updating&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your code how you are getting BKPF and BSEG values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Shweta . on Feb 4, 2011 10:07 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Feb 2011 09:05:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708086#M1578787</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-04T09:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST  for FB50 posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708087#M1578788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ok then uncomment it and do the read for the return table and see if you are getting any error in the return table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bseg and bkpf data comes from same bseg and bkpf tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Feb 2011 09:11:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708087#M1578788</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2011-02-04T09:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST  for FB50 posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708088#M1578789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: gs_documentheader  TYPE  bapiache09, "Header
      gs_accountgl  TYPE  bapiacgl09,
      gt_accountgl  TYPE TABLE OF   bapiacgl09,
      gs_currencyamount TYPE bapiaccr09 ,
      gt_currencyamount TYPE  TABLE OF  bapiaccr09,
      gs_return TYPE bapiret2,
      gt_return TYPE TABLE OF  bapiret2.
DATA: v_itemno_acc LIKE   gs_accountgl-itemno_acc,
      gv_year TYPE char04 .

TYPES : BEGIN OF ty_data,
        level TYPE i,
*        dtype like  gs_documentheader-doc_type,      " Doc Type
        bukrs LIKE  gs_documentheader-comp_code,     " Company Code
        monat LIKE  gs_documentheader-fis_period,    " Period
        year LIKE  gs_documentheader-fisc_year,      " Fiscal Year
        rmwi LIKE gs_documentheader-bus_act,         " Transaction Area

  "Item
*        ITEMNO_ACC like   gs_accountgl-ITEMNO_ACC,   " Item In GL A/C
        kostl LIKE  gs_accountgl-costcenter,         " Cost Center
*        prctr like gs_accountgl-profit_ctr ,         " Profit Center
        mat LIKE gs_accountgl-gl_account,            " Gl Account
*        pstng_date  like    gs_accountgl-pstng_date, " Psoting Date
*         ITEM_TEXT	like gs_accountgl-ITEM_TEXT,

*        cposnr like gs_currencyamount-itemno_acc,     " Item Number
*        pswsl like  gs_currencyamount-currency ,      " Currency
        amt LIKE gs_currencyamount-amt_doccur ,       "Amount

     END OF ty_data.

DATA : gt_data TYPE TABLE OF ty_data ,
       gs_data TYPE ty_data.

DATA v_int type i.


**---selection screen
PARAMETERS:p_file TYPE ibipparms-path OBLIGATORY.
*
**---f4 help for the file from PC
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
*
  PERFORM get_f4help.
*
*--start-of-selection .
START-OF-SELECTION.
*
  PERFORM upload_file_itab.
  CLEAR v_int.
  LOOP AT gt_data INTO gs_data.
    if v_int eq 3.
      v_int = 0.
    endif.
    IF gs_data-level = 0.
      v_int = v_int + 1.
*      CLEAR v_ITEMNO_ACC.
      CLEAR gs_documentheader.
* Fill the data for docheader for BAPI
      gs_documentheader-pstng_date =  '20100331'.
      gs_documentheader-doc_type =   'SA'.
      gs_documentheader-comp_code = gs_data-bukrs.          "'1947'.
      gs_documentheader-doc_date = '20100331'.
      gs_documentheader-username = sy-uname.
*      gs_documentheader-ref_doc_no = 'reference'.
      gs_documentheader-fis_period = gs_data-monat.         " '01'.
      gs_documentheader-fisc_year =  gs_data-year.          "'2009'.
      gs_documentheader-bus_act =  gs_data-rmwi.                 "'RFBU'.
*
    ELSEIF gs_data-level = 1.
*for each line item
      v_int = v_int + 1.
      v_itemno_acc = v_itemno_acc + 1.

      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = v_itemno_acc
        IMPORTING
          output = v_itemno_acc.

      gs_accountgl-itemno_acc = v_itemno_acc.          " '0000000003'.
      gs_accountgl-costcenter = gs_data-kostl.           "'DEPT A'.
*      gs_accountgl-profit_ctr = gs_data-prctr .
      gs_accountgl-gl_account = gs_data-mat.           "'0000400000'.
      gs_accountgl-pstng_date =  '20100331'." gs_data-pstng_date.           "'20090401'.
      gs_accountgl-item_text = 'Initial Upload'.
      APPEND gs_accountgl TO gt_accountgl.
      CLEAR gs_accountgl.
*
*      gs_accountgl-ITEMNO_ACC = gs_data-ITEMNO_ACC  " '0000000004'.
*      gs_accountgl-costcenter = 'DEPT A'.
*      gs_accountgl-profit_ctr = gs_data-prctr .
*      gs_accountgl-gl_account = '0000410000'.
*      gs_accountgl-pstng_date = '20090401'.
*
*      APPEND gs_accountgl TO gt_accountgl.
*      CLEAR gs_accountgl.

      gs_currencyamount-itemno_acc = v_itemno_acc. " '0000000003'.
      gs_currencyamount-currency = 'INR'.
      gs_currencyamount-amt_doccur = gs_data-amt.           " 5000.


      APPEND gs_currencyamount TO gt_currencyamount.
      CLEAR gs_currencyamount.

*      gs_currencyamount-ITEMNO_ACC = '0000000004'.
*      gs_currencyamount-currency = 'INR'.
*      gs_currencyamount-amt_doccur = -5000.
*
*      APPEND gs_currencyamount TO gt_currencyamount.
*      CLEAR gs_currencyamount.

      IF v_int EQ 3.
        CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
          EXPORTING
            documentheader = gs_documentheader
          TABLES
            accountgl      = gt_accountgl
            currencyamount = gt_currencyamount
            return         = gt_return.
        BREAK-POINT.
        READ TABLE gt_return INTO  gs_return WITH KEY type = 'E'.

        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            wait = 'X'.
        COMMIT WORK.
      ENDIF.


    ENDIF.

  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this code in my this code wored fine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Feb 2011 09:27:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708088#M1578789</guid>
      <dc:creator>KiranJ</dc:creator>
      <dc:date>2011-02-04T09:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST  for FB50 posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708089#M1578790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shweta,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try posting a document through the BAPI itself first in SE37.&lt;/P&gt;&lt;P&gt;If it works then there is some problem in your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Manish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Feb 2011 13:55:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708089#M1578790</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-04T13:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST  for FB50 posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708090#M1578791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a question:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has been recently altered a numerical range of financial documents using transaction code SNRO?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That might be one reason for the error you reported.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rafael Rojas.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Feb 2011 14:52:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708090#M1578791</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-04T14:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST  for FB50 posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708091#M1578792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sree99 - What object type (obj_type) are you usign in your code?  BKPFF?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Feb 2011 15:05:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708091#M1578792</guid>
      <dc:creator>jim_kasper</dc:creator>
      <dc:date>2011-02-04T15:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST  for FB50 posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708092#M1578793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your report is perfect you just declare and pass only     &lt;STRONG&gt;extension1&lt;/STRONG&gt;  as follow:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
daa : extension1 LIKE bapiacextc   OCCURS 0 WITH HEADER LINE,

CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
      EXPORTING
        documentheader = documentheader
      TABLES
        accountgl      = accountgl
        currencyamount = currencyamount
        return         = return
        extension1     = extension1
      EXCEPTIONS
        OTHERS         = 1.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Feb 2011 07:14:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708092#M1578793</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-05T07:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_ACC_DOCUMENT_POST  for FB50 posting</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708093#M1578794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a difficulty in passing the extensiom parameter.&lt;/P&gt;&lt;P&gt;What is this extension [] parameter for and what I would be required to pass in it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Feb 2011 06:46:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-acc-document-post-for-fb50-posting/m-p/7708093#M1578794</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-07T06:46:26Z</dc:date>
    </item>
  </channel>
</rss>

