<?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: Substitution with BAPI_ACC_DOCUMENT_POST in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/substitution-with-bapi-acc-document-post/m-p/6684377#M1450094</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This BAPI can be used to post financial documents (from outside or inside SAP), so it calls any logic that also applies when posting via FB01 and the likes. It does also call the substitution logic.&lt;/P&gt;&lt;P&gt;There might a different problem on your end that causes the substitution to not work as expected. Check if it works when posting the same stuff via FB01, also check the conditions.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Mar 2010 16:26:11 GMT</pubDate>
    <dc:creator>ThomasZloch</dc:creator>
    <dc:date>2010-03-03T16:26:11Z</dc:date>
    <item>
      <title>Substitution with BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/substitution-with-bapi-acc-document-post/m-p/6684374#M1450091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    i have a program in which is used the Bapi_acc_document_post. The problem is that the FI substitutions are not checked in the Bapi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone knows how to do that the bapi checks the fi substitution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Mar 2010 14:45:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/substitution-with-bapi-acc-document-post/m-p/6684374#M1450091</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-03T14:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: Substitution with BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/substitution-with-bapi-acc-document-post/m-p/6684375#M1450092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create a new BADI for definition ACC_DOCUMENT and in method Change try something like following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: I_EXTENSIONS  TYPE BAPIPAREX,
        I_ACCIT       TYPE ACCIT,
        I_ACCCR       TYPE ACCCR,
        I_TABNAME(30) TYPE C,
        I_FLDNAME(30) TYPE C.
  DATA : LT_BKPF    TYPE TABLE OF BKPF,
         LS_BKPF    TYPE          BKPF,
         LS_C_BKPF  TYPE          BKPF,
         LS_BSEG    TYPE          BSEG,
         LS_C_BSEG  TYPE          BSEG,
         LS_BAPIRET2 TYPE BAPIRET2,
         LT_BSEG    TYPE TABLE OF BSEG,
         SAVE_BINPT LIKE SY-BINPT,
         L_TABIX    LIKE SY-TABIX,
         LV_BUZEI(3) TYPE N,
         LV_XNEGP    TYPE XNEGP,
         LV_POSNR    TYPE POSNR_ACC.


  MOVE-CORRESPONDING C_ACCHD TO LS_BKPF.
  READ TABLE C_ACCIT INTO I_ACCIT INDEX 1.
  MOVE-CORRESPONDING I_ACCIT TO LS_BKPF.
  LOOP AT C_ACCCR INTO I_ACCCR WHERE CURTP = '00'.
    LS_BKPF-WAERS = I_ACCCR-WAERS.
    EXIT.
  ENDLOOP.
*****substitute header
  MOVE-CORRESPONDING LS_BKPF TO LS_C_BKPF.
  CALL FUNCTION 'FI_SUBSTITUTION_HEADER'
    EXPORTING
      I_BKPF        = LS_BKPF
   IMPORTING
     E_BKPF        =  LS_C_BKPF
*     E_SUBST       =
            .
  MOVE-CORRESPONDING LS_C_BKPF TO LS_BKPF.
  MOVE-CORRESPONDING LS_BKPF TO C_ACCHD.
  APPEND LS_BKPF TO LT_BKPF.
  CLEAR: SY-MSGTY,SY-SUBRC.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Mar 2010 15:42:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/substitution-with-bapi-acc-document-post/m-p/6684375#M1450092</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-03T15:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: Substitution with BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/substitution-with-bapi-acc-document-post/m-p/6684376#M1450093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which is the purpose of CALL FUNCTION 'FI_SUBSTITUTION_HEADER'?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Mar 2010 16:12:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/substitution-with-bapi-acc-document-post/m-p/6684376#M1450093</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-03T16:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: Substitution with BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/substitution-with-bapi-acc-document-post/m-p/6684377#M1450094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This BAPI can be used to post financial documents (from outside or inside SAP), so it calls any logic that also applies when posting via FB01 and the likes. It does also call the substitution logic.&lt;/P&gt;&lt;P&gt;There might a different problem on your end that causes the substitution to not work as expected. Check if it works when posting the same stuff via FB01, also check the conditions.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Mar 2010 16:26:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/substitution-with-bapi-acc-document-post/m-p/6684377#M1450094</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2010-03-03T16:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: Substitution with BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/substitution-with-bapi-acc-document-post/m-p/6684378#M1450095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As i know this BADI does not calls the validation and the substitutions it checks only the Standard SAP functionality.&lt;/P&gt;&lt;P&gt;the FM FI_SUBSTITUTION_HEADER calls the FI substitutions in header level also you can use the FM&lt;/P&gt;&lt;P&gt;FI_SUBSTITUTION_ITEM     for document items substitutions&lt;/P&gt;&lt;P&gt;FI_SUBSTITUTION_DOC     for  complete documents substitutions&lt;/P&gt;&lt;P&gt;FI_VALIDATION_HEADER  for document header validations&lt;/P&gt;&lt;P&gt;FI_VALIDATION_ITEM        for document items validation&lt;/P&gt;&lt;P&gt;FI_VALIDATION_DOC        for complete document validations&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Mar 2010 14:22:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/substitution-with-bapi-acc-document-post/m-p/6684378#M1450095</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-08T14:22:02Z</dc:date>
    </item>
  </channel>
</rss>

