<?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: Document is not getting posted correctly. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/document-is-not-getting-posted-correctly/m-p/2898660#M681594</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 the BAPI call use the command SET UPDATE LOCAL. This will force the update to happen without time delay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Cheers&lt;/P&gt;&lt;P&gt; VJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Oct 2007 19:33:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-16T19:33:55Z</dc:date>
    <item>
      <title>Document is not getting posted correctly.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/document-is-not-getting-posted-correctly/m-p/2898659#M681593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I m trying to post a GL document using the BAPI_ACC_DOCUMENT_POST and try to the reverse the document using code generated by shdb of transaction FB08. The problem is that when i execute the program with out any break points the program stops at FB08 saying the document is either not posted or in the archive but when im doing the same with breakpoints in it, its posting correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Guys this is little urgent.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 19:31:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/document-is-not-getting-posted-correctly/m-p/2898659#M681593</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T19:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: Document is not getting posted correctly.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/document-is-not-getting-posted-correctly/m-p/2898660#M681594</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 the BAPI call use the command SET UPDATE LOCAL. This will force the update to happen without time delay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Cheers&lt;/P&gt;&lt;P&gt; VJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 19:33:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/document-is-not-getting-posted-correctly/m-p/2898660#M681594</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T19:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: Document is not getting posted correctly.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/document-is-not-getting-posted-correctly/m-p/2898661#M681595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Make sure you commit work and wait after the BAPI call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 19:34:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/document-is-not-getting-posted-correctly/m-p/2898661#M681595</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T19:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Document is not getting posted correctly.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/document-is-not-getting-posted-correctly/m-p/2898662#M681596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried to call this statement soon after the bapi_transaction_commit and it still stops at fb08 saying that the document is not present in that fiscal year or is stored in the archive and when i hit save over thers its getting posted.&lt;/P&gt;&lt;P&gt;I do not understand why its not posting with out stopping at that point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Heres the code where iam calling those two subroutines where posting and reverse posting occurs. can you look at the code and tell me if theres any mistake.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM Posting_Data_Prepare .&lt;/P&gt;&lt;P&gt;  select single logsys  from t000 into logsys where mandt = sy-mandt.&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    g_docheader-obj_sys = logsys.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;*Header data.&lt;/P&gt;&lt;P&gt;  g_docheader-obj_type = 'BKPFF'.&lt;/P&gt;&lt;P&gt;  g_docheader-obj_key = '$'.&lt;/P&gt;&lt;P&gt;  g_docheader-username = sy-uname.&lt;/P&gt;&lt;P&gt;  g_docheader-header_txt = 'GL POSITNG'.&lt;/P&gt;&lt;P&gt;  g_docheader-comp_code = pos_ccod.&lt;/P&gt;&lt;P&gt;  g_docheader-bus_act  = 'RFBU'.&lt;/P&gt;&lt;P&gt;  if pos_ddat is initial.&lt;/P&gt;&lt;P&gt;    g_docheader-doc_date = sy-datum.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    g_docheader-doc_date = pos_ddat.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  g_docheader-doc_type = pos_type.&lt;/P&gt;&lt;P&gt;  if not pos_dnum is initial.&lt;/P&gt;&lt;P&gt;    g_docheader-ac_doc_no = pos_dnum.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  if pos_pdat is initial.&lt;/P&gt;&lt;P&gt;    g_docheader-pstng_date = sy-datum.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    g_docheader-pstng_date = pos_pdat.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Header data End.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  loop at bestand.&lt;/P&gt;&lt;P&gt;    clear: grir_amount,&lt;/P&gt;&lt;P&gt;            iniv_amount,&lt;/P&gt;&lt;P&gt;            utp_amount.&lt;/P&gt;&lt;P&gt;    perform clear_internal_tables.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Item Account Details.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    perform Get_Item_Account.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Currency and Amount Details for Normal Posting.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    perform Get_Item_Amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    perform GL_Posting.&lt;/P&gt;&lt;P&gt;    perform gl_posting_rev.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt; loop at gi_return1.&lt;/P&gt;&lt;P&gt;   write: gi_return1-message.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;ENDFORM.                    " Posting_Data_Prepare&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM GL_Posting .&lt;/P&gt;&lt;P&gt;*data: p1(30),p2(30),p3(30),p4(40),p5(30),p6(30),p7(1) value ' '.&lt;/P&gt;&lt;P&gt;clear p5.&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          =   g_docheader&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;/UL&gt;&lt;P&gt;         IMPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         OBJ_TYPE                =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;           OBJ_KEY                 =  p5&lt;/P&gt;&lt;UL&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               =  gi_accountgl&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          =  gi_amount&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         CRITERIA                =&lt;/P&gt;&lt;/LI&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                  =  gi_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;/UL&gt;&lt;P&gt;                 .&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  WAIT          =&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;  RETURN        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Preparing header for the reversal&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SET UPDATE TASK LOCAL.&lt;/P&gt;&lt;P&gt;loop at gi_return into g_return.&lt;/P&gt;&lt;P&gt;  append g_return to gi_return1.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " GL_Posting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM gl_posting_rev .&lt;/P&gt;&lt;P&gt;refresh bdcdata.&lt;/P&gt;&lt;P&gt;*split g_return-message at p7 into p1 p2 p3 p4 p5 p6.&lt;/P&gt;&lt;P&gt;condense p5 no-gaps.&lt;/P&gt;&lt;P&gt;*select single belnr from bkpf into doc_num&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; where awkey eq p5 and&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; bukrs = pos_ccod .&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;doc_num = p5(10).&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPMF05A' '0105'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR' 'BSIS-MONAT'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RF05A-BELNS' DOC_NUM.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BKPF-BUKRS' POS_CCOD.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'RF05A-GJAHS' ''.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'UF05A-STGRD' '02'.&lt;/P&gt;&lt;P&gt;POS_DAT = POS_PDAT + 1.&lt;/P&gt;&lt;P&gt;concatenate pos_dat&lt;EM&gt;6(2) pos_dat&lt;/EM&gt;4(2) pos_dat(4) into dat.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BSIS-BUDAT' dat.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE' '=BU'.&lt;/P&gt;&lt;P&gt;call transaction 'FB08' using bdcdata&lt;/P&gt;&lt;P&gt;                             update c_s&lt;/P&gt;&lt;P&gt;                             mode c_e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " gl_posting_rev&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 20:22:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/document-is-not-getting-posted-correctly/m-p/2898662#M681596</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T20:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: Document is not getting posted correctly.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/document-is-not-getting-posted-correctly/m-p/2898663#M681597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Change the commit to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
   EXPORTING
     WAIT = 'X'.                                "&amp;lt;========
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 20:39:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/document-is-not-getting-posted-correctly/m-p/2898663#M681597</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T20:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: Document is not getting posted correctly.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/document-is-not-getting-posted-correctly/m-p/2898664#M681598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks rob that was helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 20:51:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/document-is-not-getting-posted-correctly/m-p/2898664#M681598</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T20:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Document is not getting posted correctly.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/document-is-not-getting-posted-correctly/m-p/2898665#M681599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad it worked for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2007 20:52:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/document-is-not-getting-posted-correctly/m-p/2898665#M681599</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-16T20:52:41Z</dc:date>
    </item>
  </channel>
</rss>

