<?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 PROBLEM WHILE UPDATING HSN_SAC  FIELD IN BSEG USING BAPI BAPI_ACC_DOCUMENT_POST in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-updating-hsn-sac-field-in-bseg-using-bapi-bapi-acc-document/m-p/530209#M19299</link>
    <description>&lt;P&gt;I am trying to post S1 document using BAPI BAPI_ACC_DOCUMENT_POST .&lt;/P&gt;
  &lt;P&gt;i am able to post S1 document with GST &amp;amp; SGST i.e 9%+ 9% as manually i am passing amount at respective line item .&lt;/P&gt;
  &lt;P&gt;My Problem is : I want to Pass hsn_sac code to be updated in Bseg table so i am using BADI "BADI_ACC_DOCUMENT" .now HSN_SAC code gets updated by my below logic ,&lt;/P&gt;
  &lt;P&gt;but when i check Lineitem in bseg after s1 document is posted HSN_SAC gets updated but at the same time BUZID ,MWART also gets updated with value 'T' &amp;amp; 'V' respectively . which actually should not get updated as that line is not Tax line entry .&lt;/P&gt;
  &lt;P&gt;it is base amount entry for Vendor . Professional fees .&lt;/P&gt;
  &lt;P&gt;if i comment code "Wa_accit-taxit = 'X' " then my HSN_SAC also does not gets updated .&lt;/P&gt;
  &lt;P&gt;how to avoid update in BUZID &amp;amp; mwart field in bseg .&lt;/P&gt;
  &lt;P&gt;Example .&lt;/P&gt;
  &lt;P&gt;My code in BADI is :&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;if sy-tcode ='ZF130'.

READTABLE c_extension2 INTO wa_extension WITHKEY VALUEPART1 = '0000000002'.

IF wa_extension-valuepart2 ='40'. 

LOOPAT c_accit INTO wa_accit WHERE POSNR ='0000000002'.

wa_accit-taxit ='X'.
wa_accit-HSN_SAC = wa_extension-valuepart3."

 "This is HSN_CODE i want to update 

 MODIFY c_accit FROM wa_accit TRANSPORTING taxit hsn_sac.endloop.

endif.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Need Help in this Case&lt;/P&gt;
  &lt;P&gt;Regards&lt;/P&gt;
  &lt;P&gt;Deepak Dhamat&lt;/P&gt;</description>
    <pubDate>Wed, 15 Nov 2017 08:58:22 GMT</pubDate>
    <dc:creator>deepak_dhamat</dc:creator>
    <dc:date>2017-11-15T08:58:22Z</dc:date>
    <item>
      <title>PROBLEM WHILE UPDATING HSN_SAC  FIELD IN BSEG USING BAPI BAPI_ACC_DOCUMENT_POST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-updating-hsn-sac-field-in-bseg-using-bapi-bapi-acc-document/m-p/530209#M19299</link>
      <description>&lt;P&gt;I am trying to post S1 document using BAPI BAPI_ACC_DOCUMENT_POST .&lt;/P&gt;
  &lt;P&gt;i am able to post S1 document with GST &amp;amp; SGST i.e 9%+ 9% as manually i am passing amount at respective line item .&lt;/P&gt;
  &lt;P&gt;My Problem is : I want to Pass hsn_sac code to be updated in Bseg table so i am using BADI "BADI_ACC_DOCUMENT" .now HSN_SAC code gets updated by my below logic ,&lt;/P&gt;
  &lt;P&gt;but when i check Lineitem in bseg after s1 document is posted HSN_SAC gets updated but at the same time BUZID ,MWART also gets updated with value 'T' &amp;amp; 'V' respectively . which actually should not get updated as that line is not Tax line entry .&lt;/P&gt;
  &lt;P&gt;it is base amount entry for Vendor . Professional fees .&lt;/P&gt;
  &lt;P&gt;if i comment code "Wa_accit-taxit = 'X' " then my HSN_SAC also does not gets updated .&lt;/P&gt;
  &lt;P&gt;how to avoid update in BUZID &amp;amp; mwart field in bseg .&lt;/P&gt;
  &lt;P&gt;Example .&lt;/P&gt;
  &lt;P&gt;My code in BADI is :&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;if sy-tcode ='ZF130'.

READTABLE c_extension2 INTO wa_extension WITHKEY VALUEPART1 = '0000000002'.

IF wa_extension-valuepart2 ='40'. 

LOOPAT c_accit INTO wa_accit WHERE POSNR ='0000000002'.

wa_accit-taxit ='X'.
wa_accit-HSN_SAC = wa_extension-valuepart3."

 "This is HSN_CODE i want to update 

 MODIFY c_accit FROM wa_accit TRANSPORTING taxit hsn_sac.endloop.

endif.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Need Help in this Case&lt;/P&gt;
  &lt;P&gt;Regards&lt;/P&gt;
  &lt;P&gt;Deepak Dhamat&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 08:58:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-updating-hsn-sac-field-in-bseg-using-bapi-bapi-acc-document/m-p/530209#M19299</guid>
      <dc:creator>deepak_dhamat</dc:creator>
      <dc:date>2017-11-15T08:58:22Z</dc:date>
    </item>
  </channel>
</rss>

