<?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: POSTING_INTERFACE_DOCUMENT sample code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/posting-interface-document-sample-code/m-p/3611194#M869945</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the below link for the sample code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[http://www.jt77.com/development2/programming-02712.html|http://www.jt77.com/development2/programming-02712.html]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Balaji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Mar 2008 12:43:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-17T12:43:19Z</dc:date>
    <item>
      <title>POSTING_INTERFACE_DOCUMENT sample code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/posting-interface-document-sample-code/m-p/3611193#M869944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.. Can anyone send a sample code which uses fm POSTING_INTERFACE_DOCUMENT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2008 12:26:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/posting-interface-document-sample-code/m-p/3611193#M869944</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-17T12:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: POSTING_INTERFACE_DOCUMENT sample code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/posting-interface-document-sample-code/m-p/3611194#M869945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the below link for the sample code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[http://www.jt77.com/development2/programming-02712.html|http://www.jt77.com/development2/programming-02712.html]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Balaji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2008 12:43:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/posting-interface-document-sample-code/m-p/3611194#M869945</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-17T12:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: POSTING_INTERFACE_DOCUMENT sample code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/posting-interface-document-sample-code/m-p/3611195#M869946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The standard report EWUMFPST has a form described as "Individuals Document" wich calls this function, from line 318.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*----------------------------------------------------------------------*
*     FORM  BUCHEN_BELEG.                                              *
*----------------------------------------------------------------------*
*     Einzelnen Beleg buchen                                           *
*----------------------------------------------------------------------*
form buchen_beleg.

  data: help_counter_before type i, help_counter_after type i.
  data: help_subrc like sy-subrc.
  describe table blntab lines help_counter_before.
  help_subrc = 1.
  clear belegnummer.

  sort ftpost by stype count.
  clear blntab.                                             "note174346
  call function 'POSTING_INTERFACE_DOCUMENT'
       exporting
           i_tcode                  = 'FBB1'
*          i_tcode                  = 'FB01'
          i_sgfunct                = 'C'
       importing
            e_msgid                  = i_msgid
            e_msgno                  = i_msgno
            e_msgty                  = i_msgty
            e_msgv1                  = i_msgv1
            e_msgv2                  = i_msgv2
            e_msgv3                  = i_msgv3
            e_msgv4                  = i_msgv4
            e_subrc                  = i_subrc
       tables
            t_blntab                 = blntab
            t_ftpost                 = ftpost
            t_fttax                  = fttax
       exceptions
            account_missing          = 1
            company_code_missing     = 2
            posting_key_invalid      = 3
            posting_key_missing      = 4
            record_type_invalid      = 5
            transaction_code_invalid = 6
            amount_format_error      = 7
            too_many_line_items      = 8
            others                   = 9.

  if sy-subrc eq 0.
    perform append_msg using '1' '' sy-msgty sy-msgid sy-msgno
                          i_msgv1 i_msgv2 i_msgv3 i_msgv4.
    describe table blntab lines help_counter_after.
    if help_counter_after &amp;gt; help_counter_before.
      read table blntab index help_counter_after.
      if sy-subrc = 0. help_subrc = 0. endif.
    endif.
    if help_subrc = 0 and blntab-belnr ne space.
      belegnummer = blntab-belnr.
      bukrs = blntab-bukrs.
      gjahr = blntab-gjahr.
      perform update_belnr.
      perform update_ewummfi.
    else.
      help_subrc = 1.
    endif.
  else.
    help_subrc = 1.
    case sy-subrc.
      when 1.
        perform append_msg using '2' '' 'A' 'FR' '451'
                   'ACCOUNT_MISSING' '' '' ''.
      when 2.
        perform append_msg using '2' '' 'A' 'FR' '451'
                'COMPANY_CODE_MISSING' '' '' ' '.
      when 3.
        perform append_msg using '2' '' 'A' 'FR' '451'
               'POSTING_KEY_INVALID' '' '' ''.
      when 4.
        perform append_msg using '2' '' 'A'  'FR' '451'
                'POSTING_KEY_MISSING' '' '' ''.
      when 5.
        perform append_msg using '2' '' 'A' 'FR' '451'
               'RECORD_TYPE_INVALID' '' '' ''.
      when 6.
        perform append_msg using '2' '' 'A'  'FR' '451'
                 'TRANSACTION_CODE_INVALID' '' '' ''.
    endcase.
  endif.

  if help_subrc = 1.
    perform skb1_xintb_setzen. "reset the changed account datas
    result = 'E'.
    perform finish_program using result upda.
    perform write_prot_and_exit.
  endif.
endform.                    "BUCHEN_BELEG
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it can help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2008 13:04:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/posting-interface-document-sample-code/m-p/3611195#M869946</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-17T13:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: POSTING_INTERFACE_DOCUMENT sample code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/posting-interface-document-sample-code/m-p/3611196#M869947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the snippet. Can you also give the way you populated ftpost. I am facing issues there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2008 13:10:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/posting-interface-document-sample-code/m-p/3611196#M869947</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-17T13:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: POSTING_INTERFACE_DOCUMENT sample code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/posting-interface-document-sample-code/m-p/3611197#M869948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can fill it using the field name as a string (like 'BKPF-BLDAT') and the value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code sample in program EWUMFPST:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

*...

PERFORM BUCHEN_FELD USING 'BKPF-BLDAT' ARB1-FVAL.

*...

form buchen_feld using fnam fval.

  check fval NE space.
  ftpost-fnam = fnam.
  write fval to ftpost-fval.
  append ftpost.

endform.                    "BUCHEN_FELD

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Mar 2008 13:31:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/posting-interface-document-sample-code/m-p/3611197#M869948</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-17T13:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: POSTING_INTERFACE_DOCUMENT sample code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/posting-interface-document-sample-code/m-p/3611198#M869949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the below code snipplet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

  LOOP AT BU_TAB.
    AT NEW BUKRS.
      PERFORM GET_GEGENBUCHUNG.
    ENDAT.
*    at new bukrs.
*      if new_kopf = space.
*        perform buchen_kopf .
*        new_kopf = 'X'.
*      endif.
*    endat.

*    AT NEW waers.
    AT NEW CURTP.
      PERFORM GET_CURRENCY_INFORMATION.
      IF NEW_KOPF = SPACE.
        PERFORM BUCHEN_KOPF .
        NEW_KOPF = 'X'.
      ENDIF.
    ENDAT.
*   Zuordnung Zeile-Beleg merken.
    PERFORM ZUORDNUNG_BELEG.
*   Beträge summieren / buchen bei Belegüberlauf
    ADD-CORRESPONDING BU_TAB TO BU_SUM.
    IF  BU_SUM-DMBTR &amp;gt; MAX_BTR_B OR
        BU_SUM-DMBE2 &amp;gt; MAX_BTR_B OR
        BU_SUM-DMBE3 &amp;gt; MAX_BTR_B OR
       BU_SUM-POS &amp;gt; MAX_POS.
      PERFORM BUCHEN_BELEG.
      PERFORM BUCHEN_KOPF.
      MOVE-CORRESPONDING BU_TAB TO BU_SUM.
    ENDIF.
*   Belegzeile übertragen
    PERFORM BUCHEN_POS.
*   Buchen
    AT END OF WAERS.
      BUKRS = BU_TAB-BUKRS.
      PERFORM BUCHEN_BELEG.
      CLEAR NEW_KOPF.
    ENDAT.
  ENDLOOP.

ENDFORM.                    "BUCHEN

FORM BUCHEN_KOPF.

* Initialisieren für neuen Beleg (Belegkopf)
  CLEAR BU_SUM.
  REFRESH FTPOST.
  CLEAR FTPOST.
  FTPOST-STYPE = 'K'.
  FTPOST-COUNT = 1.

* Feldzuweisungen
  WRITE SY-DATUM TO ARB1-FVAL DD/MM/YYYY.               "Belegdatum
  PERFORM BUCHEN_FELD USING 'BKPF-BLDAT' ARB1-FVAL.
  PERFORM BUCHEN_FELD USING 'BKPF-BLART' BELEGART.     "Belegart
  PERFORM BUCHEN_FELD USING 'BKPF-BUKRS' BU_TAB-BUKRS.   "Buchungskreis
  WRITE SY-DATUM TO ARB1-FVAL DD/MM/YYYY.                "Buchungsdatum
  PERFORM BUCHEN_FELD USING 'BKPF-BUDAT' ARB1-FVAL.
  PERFORM BUCHEN_FELD USING 'BKPF-XBLNR' REFERENZ.
*  perform buchen_feld using 'BKPF-BKTXT' arb1-fval.
  PERFORM BUCHEN_FELD USING 'BKPF-WAERS' BU_TAB-OWAER.   "Währung

* Initialisieren für Belegpositionen
  CLEAR FTPOST.
  FTPOST-STYPE = 'P'.

ENDFORM.                    "BUCHEN_KOPF

FORM BUCHEN_FELD USING FNAM FVAL.

  CHECK FVAL &amp;lt;&amp;gt; SPACE.
  FTPOST-FNAM = FNAM.
  WRITE FVAL TO FTPOST-FVAL.
  APPEND FTPOST.

ENDFORM.                    "BUCHEN_FELD


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps. Check the source code of the report &lt;STRONG&gt;EWUMFPST&lt;/STRONG&gt; for more details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Balaji&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 06:00:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/posting-interface-document-sample-code/m-p/3611198#M869949</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T06:00:54Z</dc:date>
    </item>
  </channel>
</rss>

