<?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: Regarding If condition in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-if-condition/m-p/5667749#M1288906</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;Check for INITIAL&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at i_final.
if i_final-augbl IS INITIAL .
loop at i_final1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 24 May 2009 08:51:23 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-24T08:51:23Z</dc:date>
    <item>
      <title>Regarding If condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-if-condition/m-p/5667745#M1288902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;clear i_final1.
refresh i_final1.
if i_final[] is not initial.
loop at i_final.
 *if i_final-augbl eq space* .
   loop at i_final1.
          i_final1-mblnr = i_final-mblnr.
          i_final1-mjahr = i_final-mjahr.
          i_final1-budat = i_final-budat.
          i_final1-xblnr = i_final-xblnr.
          i_final1-bldat = i_final-bldat.
          i_final1-frbnr = i_final-frbnr.
          i_final1-bktxt = i_final-bktxt.
          i_final1-lifnr = i_final-lifnr.
          i_final1-name  = i_final-name.
          i_final1-matnr = i_final-matnr.
          i_final1-maktx = i_final-maktx.
          i_final1-ebeln = i_final-ebeln.
          i_final1-aedat = i_final-aedat.
          i_final1-belnr = i_final-gjahr.

    endloop.
   endif.
 endloop.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to copy from one internal table to other internal table if a field is blank i tried using NULL and  ' '&lt;/P&gt;&lt;P&gt;but both of them are not working can anyone help me out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Matt on May 24, 2009 1:38 PM - added  tags&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 May 2009 07:47:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-if-condition/m-p/5667745#M1288902</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-24T07:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-if-condition/m-p/5667746#M1288903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Radhika,&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;  &lt;STRONG&gt;if i_final-augbl eq space&lt;/STRONG&gt; .&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;replace by&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if i_final-augbl eq ''.&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;don't put space between the single quotes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Shahid Malayil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 May 2009 08:05:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-if-condition/m-p/5667746#M1288903</guid>
      <dc:creator>shahid_malayil1</dc:creator>
      <dc:date>2009-05-24T08:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-if-condition/m-p/5667747#M1288904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try making use of &lt;STRONG&gt;if i_final-augbl is initial.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Also i find your &lt;STRONG&gt;append&lt;/STRONG&gt; statement missing in the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ankur Parab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 May 2009 08:14:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-if-condition/m-p/5667747#M1288904</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-24T08:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-if-condition/m-p/5667748#M1288905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have already tried it but it was not working!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 May 2009 08:45:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-if-condition/m-p/5667748#M1288905</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-24T08:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-if-condition/m-p/5667749#M1288906</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;Check for INITIAL&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at i_final.
if i_final-augbl IS INITIAL .
loop at i_final1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 May 2009 08:51:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-if-condition/m-p/5667749#M1288906</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-24T08:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-if-condition/m-p/5667750#M1288907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi try this code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at i_final1.&lt;/P&gt;&lt;P&gt;loop at i_final where augbl eq space .&lt;/P&gt;&lt;P&gt;i_final1-mblnr = i_final-mblnr.&lt;/P&gt;&lt;P&gt;i_final1-mjahr = i_final-mjahr.&lt;/P&gt;&lt;P&gt;i_final1-budat = i_final-budat.&lt;/P&gt;&lt;P&gt;i_final1-xblnr = i_final-xblnr.&lt;/P&gt;&lt;P&gt;i_final1-bldat = i_final-bldat.&lt;/P&gt;&lt;P&gt;i_final1-frbnr = i_final-frbnr.&lt;/P&gt;&lt;P&gt;i_final1-bktxt = i_final-bktxt.&lt;/P&gt;&lt;P&gt;i_final1-lifnr = i_final-lifnr.&lt;/P&gt;&lt;P&gt;i_final1-name = i_final-name.&lt;/P&gt;&lt;P&gt;i_final1-matnr = i_final-matnr.&lt;/P&gt;&lt;P&gt;i_final1-maktx = i_final-maktx.&lt;/P&gt;&lt;P&gt;i_final1-ebeln = i_final-ebeln.&lt;/P&gt;&lt;P&gt;i_final1-aedat = i_final-aedat.&lt;/P&gt;&lt;P&gt;i_final1-belnr = i_final-gjahr.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anil dasari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 May 2009 09:03:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-if-condition/m-p/5667750#M1288907</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-24T09:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-if-condition/m-p/5667751#M1288908</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;Use the below code. Note that i added append statement which was missing in your original code. Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear i_final1.&lt;/P&gt;&lt;P&gt;refresh i_final1.&lt;/P&gt;&lt;P&gt;if i_final[] is not initial.&lt;/P&gt;&lt;P&gt;loop at i_final.&lt;/P&gt;&lt;P&gt;if i_final-augbl eq space .&lt;/P&gt;&lt;P&gt;loop at i_final1.&lt;/P&gt;&lt;P&gt;i_final1-mblnr = i_final-mblnr.&lt;/P&gt;&lt;P&gt;i_final1-mjahr = i_final-mjahr.&lt;/P&gt;&lt;P&gt;i_final1-budat = i_final-budat.&lt;/P&gt;&lt;P&gt;i_final1-xblnr = i_final-xblnr.&lt;/P&gt;&lt;P&gt;i_final1-bldat = i_final-bldat.&lt;/P&gt;&lt;P&gt;i_final1-frbnr = i_final-frbnr.&lt;/P&gt;&lt;P&gt;i_final1-bktxt = i_final-bktxt.&lt;/P&gt;&lt;P&gt;i_final1-lifnr = i_final-lifnr.&lt;/P&gt;&lt;P&gt;i_final1-name = i_final-name.&lt;/P&gt;&lt;P&gt;i_final1-matnr = i_final-matnr.&lt;/P&gt;&lt;P&gt;i_final1-maktx = i_final-maktx.&lt;/P&gt;&lt;P&gt;i_final1-ebeln = i_final-ebeln.&lt;/P&gt;&lt;P&gt;i_final1-aedat = i_final-aedat.&lt;/P&gt;&lt;P&gt;i_final1-belnr = i_final-gjahr.&lt;/P&gt;&lt;P&gt;append i_final1 to i_final. &lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 May 2009 09:51:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-if-condition/m-p/5667751#M1288908</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-24T09:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-if-condition/m-p/5667752#M1288909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i_final-augbl is initial or i_final-augbl is null.&lt;/P&gt;&lt;P&gt;  loop at i_final1.&lt;/P&gt;&lt;P&gt;    ..&lt;/P&gt;&lt;P&gt;    ..&lt;/P&gt;&lt;P&gt;    append i_final1.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 May 2009 10:30:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-if-condition/m-p/5667752#M1288909</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-24T10:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-if-condition/m-p/5667753#M1288910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, typo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;append i_final1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;should be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;append i_final.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 May 2009 10:32:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-if-condition/m-p/5667753#M1288910</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-24T10:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-if-condition/m-p/5667754#M1288911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As Ankur Parab first pointed out, you've populated the ifinal1 header, but not appended it to the table.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using tables with header lines is not good programming.  It leads to confusion, because it is not immediately obvious when you refer to "ifinal1" whether you mean the table, or its header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Far better to declare a separate work area.  ( Which, incidentally, you are &lt;STRONG&gt;forced&lt;/STRONG&gt; to do in an objects context ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also note, that you've got your internal tables confused.  The first thing you do is refresh i_final1, then you want to LOOP through it?!  It makes no sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: ls_final1 LIKE LINE OF i_final1,
      ls_final  LIKE LINE OF i_final.
...
loop at i_final INTO ls_final.
---
   loop at i_final1 INTO ls_final1.
          ls_final1-mblnr = ls_final-mblnr.
 ...
      APPEND ls_final1 TO i_final1.
    endloop.
...
 endloop.
...
 &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Matt on May 24, 2009 1:45 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 May 2009 11:44:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-if-condition/m-p/5667754#M1288911</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2009-05-24T11:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding If condition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-if-condition/m-p/5667755#M1288912</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 think couple thinks should be clarified here:&lt;/P&gt;&lt;P&gt;1) Are &lt;STRONG&gt;i_final&lt;/STRONG&gt; and &lt;STRONG&gt;i_final1&lt;/STRONG&gt; of the same structure? If so, there should be not explicit addressing of components used, instead you should use &lt;EM&gt;move-corresponding&lt;/EM&gt; or even better use &lt;EM&gt;i_final[ ] = i_fnal1[ ]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) as explained by all posters above to check if &lt;STRONG&gt;i_final-augbl&lt;/STRONG&gt; holds some value use either if it &lt;EM&gt;is initial&lt;/EM&gt; or &lt;EM&gt;eq space&lt;/EM&gt; (if this is character type field)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) you are clearing &lt;STRONG&gt;i_final1&lt;/STRONG&gt; (content + header) at the beginning, so why do you &lt;EM&gt;loop at i_final1&lt;/EM&gt; later. It's empty there, that's why you can't append any entry to it. Processing simply never goes inside that, so no fields are moved to &lt;STRONG&gt;i_final1&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Considering above this is how the code should look like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
"emty your destination table
clear i_final1.
refresh i_final1.

"now move content from source table to your destination table
if i_final[] is not initial.
   loop at i_final.   "loop at source table
      if i_final-augbl is initial. "or eq space if character type
         move-corresponding i_final to i_final1.   "if structures differ a bit, but most components are same
         append i_final1.
      endif.
    endloop.
endif.

"another solution

"if structures are excatly the same and AUGBL is a key field
if i_final[] is not initial.
   i_final[] = i_final1[].   "copy entire content
endif.

"now delete those record which stay empty at field AUGBL
delete table i_final1 with key AUGBL = space.    "augbl must be a key field 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 May 2009 11:50:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-if-condition/m-p/5667755#M1288912</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-05-24T11:50:05Z</dc:date>
    </item>
  </channel>
</rss>

