<?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 f-43 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/f-43/m-p/2911071#M684995</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gurus, &lt;/P&gt;&lt;P&gt;I am working on an interface where I need to post an accounting document using 'f-43' and for this I have written the following code, the problem that I am facing right now is ...the posting keys that I am using is 31 and 41, but somehow when I run my program the document tht is being posted after that program shows me keys 40 and 50 instead of 31 and 40. So can you please guide me through. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  move:&lt;/P&gt;&lt;P&gt;    'RFBU'                  to documentheader-bus_act,&lt;/P&gt;&lt;P&gt;    it_input-doc_date2 to documentheader-doc_date,&lt;/P&gt;&lt;P&gt;    it_input_posdate2 to documentheader-pstng_date,&lt;/P&gt;&lt;P&gt;    it_input-doc_type  to documentheader-doc_type,&lt;/P&gt;&lt;P&gt;    it_input-bukrs     to documentheader-comp_code,&lt;/P&gt;&lt;P&gt;    it_input-pos_per   to documentheader-fis_period,&lt;/P&gt;&lt;P&gt;    it_inputfis_year  to documentheader-fisc_year,&lt;/P&gt;&lt;P&gt;    it_input-reference to documentheader-ref_doc_no,&lt;/P&gt;&lt;P&gt;    it_input-h_text    to documentheader-header_txt,&lt;/P&gt;&lt;P&gt;    syst-uname              to documentheader-username.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " add_header&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  add_entry&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; --&amp;gt;  p1        text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;lt;--  p2        text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM add_entry .&lt;/P&gt;&lt;P&gt;  if it_input_file-pos_key eq 31.&lt;/P&gt;&lt;P&gt;    move:&lt;/P&gt;&lt;P&gt;      v_count                 to glaccount-ITEMNO_ACC,&lt;/P&gt;&lt;P&gt;      it_input-glaccount to glaccount-gl_account,&lt;/P&gt;&lt;P&gt;      it_input-kostl     to glaccount-COSTCENTER,&lt;/P&gt;&lt;P&gt;      it_input-prctr     to glaccount-PROFIT_CTR,&lt;/P&gt;&lt;P&gt;      it_input-bus_area  to glaccount-bus_area,&lt;/P&gt;&lt;P&gt;      it_input-item_text to glaccount-ITEM_TEXT,&lt;/P&gt;&lt;P&gt;      it_input-assignment to glaccount-ALLOC_NMBR.&lt;/P&gt;&lt;P&gt;    append glaccount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    move:&lt;/P&gt;&lt;P&gt;      v_count                 to currencyamount-ITEMNO_ACC,&lt;/P&gt;&lt;P&gt;      it_input-currency  to currencyamount-CURRENCY,&lt;/P&gt;&lt;P&gt;      it_input-amount    to currencyamount-AMT_DOCCUR .&lt;/P&gt;&lt;P&gt;    append currencyamount.&lt;/P&gt;&lt;P&gt;    clear: glaccount, currencyamount.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;     move: v_count                to glaccount-ITEMNO_ACC,&lt;/P&gt;&lt;P&gt;          it_input-glaccount to glaccount-gl_account,&lt;/P&gt;&lt;P&gt;          it_input-kostl     to glaccount-COSTCENTER,&lt;/P&gt;&lt;P&gt;          it_input-prctr     to glaccount-PROFIT_CTR,&lt;/P&gt;&lt;P&gt;          it_input-bus_area  to glaccount-bus_area,&lt;/P&gt;&lt;P&gt;          it_input-item_text to glaccount-ITEM_TEXT,&lt;/P&gt;&lt;P&gt;          it_input-assignment to glaccount-ALLOC_NMBR.&lt;/P&gt;&lt;P&gt;    append glaccount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    move:&lt;/P&gt;&lt;P&gt;      v_count                 to currencyamount-ITEMNO_ACC,&lt;/P&gt;&lt;P&gt;      it_input-currency  to currencyamount-CURRENCY.&lt;/P&gt;&lt;P&gt;    currencyamount-AMT_DOCCUR = it_input-amount * -1.&lt;/P&gt;&lt;P&gt;    append currencyamount.&lt;/P&gt;&lt;P&gt;    clear: glaccount, currencyamount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my input file looks like this:&lt;/P&gt;&lt;P&gt;the heading are in this sequence:  pos_date(10),&lt;/P&gt;&lt;P&gt;        doc_type,&lt;/P&gt;&lt;P&gt;        pos_per,&lt;/P&gt;&lt;P&gt;        bukrs,&lt;/P&gt;&lt;P&gt;        h_text,&lt;/P&gt;&lt;P&gt;        currency,&lt;/P&gt;&lt;P&gt;        doc_date,&lt;/P&gt;&lt;P&gt;        reference,&lt;/P&gt;&lt;P&gt;        pos_key,&lt;/P&gt;&lt;P&gt;        lifnr,&lt;/P&gt;&lt;P&gt;        glaccount,&lt;/P&gt;&lt;P&gt;        amount,&lt;/P&gt;&lt;P&gt;        pay_term,&lt;/P&gt;&lt;P&gt;        pay_method,&lt;/P&gt;&lt;P&gt;        pay_block,&lt;/P&gt;&lt;P&gt;        pay_suppmethod,&lt;/P&gt;&lt;P&gt;        assignment,&lt;/P&gt;&lt;P&gt;        item_text,&lt;/P&gt;&lt;P&gt;        bus_area,&lt;/P&gt;&lt;P&gt;        kostl,&lt;/P&gt;&lt;P&gt;        prctr,&lt;/P&gt;&lt;P&gt;        seq_num,&lt;/P&gt;&lt;P&gt;        doc_date2,&lt;/P&gt;&lt;P&gt;        pos_date2,&lt;/P&gt;&lt;P&gt;        fis_year,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10/12/2007 KR 1000	USD 10/12/2007 1 31	100000 0000100000	1000 C AG2008&lt;/P&gt;&lt;P&gt;	                USD	         1 41	100000 0000636100	1000 0000200000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rajeev&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Oct 2007 18:03:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-15T18:03:29Z</dc:date>
    <item>
      <title>f-43</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f-43/m-p/2911071#M684995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gurus, &lt;/P&gt;&lt;P&gt;I am working on an interface where I need to post an accounting document using 'f-43' and for this I have written the following code, the problem that I am facing right now is ...the posting keys that I am using is 31 and 41, but somehow when I run my program the document tht is being posted after that program shows me keys 40 and 50 instead of 31 and 40. So can you please guide me through. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  move:&lt;/P&gt;&lt;P&gt;    'RFBU'                  to documentheader-bus_act,&lt;/P&gt;&lt;P&gt;    it_input-doc_date2 to documentheader-doc_date,&lt;/P&gt;&lt;P&gt;    it_input_posdate2 to documentheader-pstng_date,&lt;/P&gt;&lt;P&gt;    it_input-doc_type  to documentheader-doc_type,&lt;/P&gt;&lt;P&gt;    it_input-bukrs     to documentheader-comp_code,&lt;/P&gt;&lt;P&gt;    it_input-pos_per   to documentheader-fis_period,&lt;/P&gt;&lt;P&gt;    it_inputfis_year  to documentheader-fisc_year,&lt;/P&gt;&lt;P&gt;    it_input-reference to documentheader-ref_doc_no,&lt;/P&gt;&lt;P&gt;    it_input-h_text    to documentheader-header_txt,&lt;/P&gt;&lt;P&gt;    syst-uname              to documentheader-username.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " add_header&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  add_entry&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; --&amp;gt;  p1        text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;lt;--  p2        text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM add_entry .&lt;/P&gt;&lt;P&gt;  if it_input_file-pos_key eq 31.&lt;/P&gt;&lt;P&gt;    move:&lt;/P&gt;&lt;P&gt;      v_count                 to glaccount-ITEMNO_ACC,&lt;/P&gt;&lt;P&gt;      it_input-glaccount to glaccount-gl_account,&lt;/P&gt;&lt;P&gt;      it_input-kostl     to glaccount-COSTCENTER,&lt;/P&gt;&lt;P&gt;      it_input-prctr     to glaccount-PROFIT_CTR,&lt;/P&gt;&lt;P&gt;      it_input-bus_area  to glaccount-bus_area,&lt;/P&gt;&lt;P&gt;      it_input-item_text to glaccount-ITEM_TEXT,&lt;/P&gt;&lt;P&gt;      it_input-assignment to glaccount-ALLOC_NMBR.&lt;/P&gt;&lt;P&gt;    append glaccount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    move:&lt;/P&gt;&lt;P&gt;      v_count                 to currencyamount-ITEMNO_ACC,&lt;/P&gt;&lt;P&gt;      it_input-currency  to currencyamount-CURRENCY,&lt;/P&gt;&lt;P&gt;      it_input-amount    to currencyamount-AMT_DOCCUR .&lt;/P&gt;&lt;P&gt;    append currencyamount.&lt;/P&gt;&lt;P&gt;    clear: glaccount, currencyamount.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;     move: v_count                to glaccount-ITEMNO_ACC,&lt;/P&gt;&lt;P&gt;          it_input-glaccount to glaccount-gl_account,&lt;/P&gt;&lt;P&gt;          it_input-kostl     to glaccount-COSTCENTER,&lt;/P&gt;&lt;P&gt;          it_input-prctr     to glaccount-PROFIT_CTR,&lt;/P&gt;&lt;P&gt;          it_input-bus_area  to glaccount-bus_area,&lt;/P&gt;&lt;P&gt;          it_input-item_text to glaccount-ITEM_TEXT,&lt;/P&gt;&lt;P&gt;          it_input-assignment to glaccount-ALLOC_NMBR.&lt;/P&gt;&lt;P&gt;    append glaccount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    move:&lt;/P&gt;&lt;P&gt;      v_count                 to currencyamount-ITEMNO_ACC,&lt;/P&gt;&lt;P&gt;      it_input-currency  to currencyamount-CURRENCY.&lt;/P&gt;&lt;P&gt;    currencyamount-AMT_DOCCUR = it_input-amount * -1.&lt;/P&gt;&lt;P&gt;    append currencyamount.&lt;/P&gt;&lt;P&gt;    clear: glaccount, currencyamount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my input file looks like this:&lt;/P&gt;&lt;P&gt;the heading are in this sequence:  pos_date(10),&lt;/P&gt;&lt;P&gt;        doc_type,&lt;/P&gt;&lt;P&gt;        pos_per,&lt;/P&gt;&lt;P&gt;        bukrs,&lt;/P&gt;&lt;P&gt;        h_text,&lt;/P&gt;&lt;P&gt;        currency,&lt;/P&gt;&lt;P&gt;        doc_date,&lt;/P&gt;&lt;P&gt;        reference,&lt;/P&gt;&lt;P&gt;        pos_key,&lt;/P&gt;&lt;P&gt;        lifnr,&lt;/P&gt;&lt;P&gt;        glaccount,&lt;/P&gt;&lt;P&gt;        amount,&lt;/P&gt;&lt;P&gt;        pay_term,&lt;/P&gt;&lt;P&gt;        pay_method,&lt;/P&gt;&lt;P&gt;        pay_block,&lt;/P&gt;&lt;P&gt;        pay_suppmethod,&lt;/P&gt;&lt;P&gt;        assignment,&lt;/P&gt;&lt;P&gt;        item_text,&lt;/P&gt;&lt;P&gt;        bus_area,&lt;/P&gt;&lt;P&gt;        kostl,&lt;/P&gt;&lt;P&gt;        prctr,&lt;/P&gt;&lt;P&gt;        seq_num,&lt;/P&gt;&lt;P&gt;        doc_date2,&lt;/P&gt;&lt;P&gt;        pos_date2,&lt;/P&gt;&lt;P&gt;        fis_year,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10/12/2007 KR 1000	USD 10/12/2007 1 31	100000 0000100000	1000 C AG2008&lt;/P&gt;&lt;P&gt;	                USD	         1 41	100000 0000636100	1000 0000200000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rajeev&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2007 18:03:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f-43/m-p/2911071#M684995</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-15T18:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: f-43</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f-43/m-p/2911072#M684996</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 guess in your code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;move:
v_count to currencyamount-ITEMNO_ACC,
it_input-currency to currencyamount-CURRENCY.
currencyamount-AMT_DOCCUR = it_input-amount * -1.
append currencyamount.
clear: glaccount, currencyamount.

Change to 
currencyamount-AMT_DOCCUR = it_input-amount.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sriram Ponna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2007 18:19:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f-43/m-p/2911072#M684996</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-15T18:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: f-43</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/f-43/m-p/2911073#M684997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply, &lt;/P&gt;&lt;P&gt;but that it_input-amount * -1 is done to balance the credit entry or I can say to offset the entry posted by key 31. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;guide me through....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2007 18:22:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/f-43/m-p/2911073#M684997</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-15T18:22:11Z</dc:date>
    </item>
  </channel>
</rss>

