<?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: If Condition Not working. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-condition-not-working/m-p/6554844#M1430233</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;Your code is correct.&lt;/P&gt;&lt;P&gt;I think you need to Clear the data after Append.&lt;/P&gt;&lt;P&gt;Please check Document type &lt;STRONG&gt;BLART&lt;/STRONG&gt;  is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the below code....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

loop at itab.
itab1-kunnr  =  itab-kunnr.
itab1-belnr  = itab-belnr.
itab1-zuonr = itab-zuonr.
itab1-budat   = itab-budat.
itab1-blart =  itab-blart.
if itab-blart = 'RV'.
 itab1-dmbtr = itab-dmbtr.
elseif  itab-blart = 'DZ'.
itab1-dmbtr = itab-dmbtr1.
endif.
append itab1.

clear : itab,itab1.
endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arbind&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Feb 2010 09:31:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-02-02T09:31:53Z</dc:date>
    <item>
      <title>If Condition Not working.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-condition-not-working/m-p/6554842#M1430231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in my Below code this if condition is not working properly. Here i want data like when BLART = RV this time amount move in one field and if BLART = DZ this time amount move in different filed. so i got right data in my ALV but now this distribution is not done by me. So can you please help me out..........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; loop at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        move itab-kunnr to itab1-kunnr.&lt;/P&gt;&lt;P&gt;        move itab-belnr to itab1-belnr.&lt;/P&gt;&lt;P&gt;        MOVE itab-zuonr to itab1-zuonr.&lt;/P&gt;&lt;P&gt;        MOVE itab-budat to itab1-budat.&lt;/P&gt;&lt;P&gt;        MOVE itab-blart to itab1-blart.&lt;/P&gt;&lt;P&gt;        if itab-blart = 'RV'.&lt;/P&gt;&lt;P&gt;          MOVE itab-dmbtr to itab1-dmbtr.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;        if itab-blart = 'DZ'.&lt;/P&gt;&lt;P&gt;          MOVE itab-dmbtr to dmbtr1.&lt;/P&gt;&lt;P&gt;        endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        append itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;      endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2010 09:22:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-condition-not-working/m-p/6554842#M1430231</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-02T09:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: If Condition Not working.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-condition-not-working/m-p/6554843#M1430232</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;make sure BLART field is having either 'DZ' or 'RV' VALUE. Try like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

loop at itab.



move itab-kunnr to itab1-kunnr.
move itab-belnr to itab1-belnr.
MOVE itab-zuonr to itab1-zuonr.
MOVE itab-budat to itab1-budat.
MOVE itab-blart to itab1-blart.
if itab-blart = 'RV'.
MOVE itab-dmbtr to itab1-dmbtr.
elseif itab-blart = 'DZ'.
MOVE itab-dmbtr to itab1-dmbtr1.
endif.

append itab1.

endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2010 09:26:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-condition-not-working/m-p/6554843#M1430232</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2010-02-02T09:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: If Condition Not working.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-condition-not-working/m-p/6554844#M1430233</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;Your code is correct.&lt;/P&gt;&lt;P&gt;I think you need to Clear the data after Append.&lt;/P&gt;&lt;P&gt;Please check Document type &lt;STRONG&gt;BLART&lt;/STRONG&gt;  is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the below code....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

loop at itab.
itab1-kunnr  =  itab-kunnr.
itab1-belnr  = itab-belnr.
itab1-zuonr = itab-zuonr.
itab1-budat   = itab-budat.
itab1-blart =  itab-blart.
if itab-blart = 'RV'.
 itab1-dmbtr = itab-dmbtr.
elseif  itab-blart = 'DZ'.
itab1-dmbtr = itab-dmbtr1.
endif.
append itab1.

clear : itab,itab1.
endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arbind&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2010 09:31:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-condition-not-working/m-p/6554844#M1430233</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-02T09:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: If Condition Not working.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-condition-not-working/m-p/6554845#M1430234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what data type declare for your internal table fields (blart) , u have to decalre exact data type exactly what is in table data type to that field otherwise some times it will going wrong like data type mismatching  and etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first check data type of the field in your internal table.&lt;/P&gt;&lt;P&gt;then u will get solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2010 09:44:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-condition-not-working/m-p/6554845#M1430234</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-02T09:44:07Z</dc:date>
    </item>
  </channel>
</rss>

