<?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: alv report problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-problem/m-p/3184047#M758109</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 can suggest on esimple solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have data in itab.&lt;/P&gt;&lt;P&gt;the declare &lt;/P&gt;&lt;P&gt;data:begin itab_flg occurs 0.&lt;/P&gt;&lt;P&gt; include structure itab.&lt;/P&gt;&lt;P&gt;data:flg(1),&lt;/P&gt;&lt;P&gt;  end of itab_flg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:v_index like sy-tabix.&lt;/P&gt;&lt;P&gt;data:v_maktx like makt-maktx.&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort itab by maktx. "f2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move-corresponding itab to itab_flg.&lt;/P&gt;&lt;P&gt;append itab_flg.&lt;/P&gt;&lt;P&gt;clear itab_flg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab_flg.&lt;/P&gt;&lt;P&gt;clear :v_index,v_maktx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_index = sy-tabix +  1.&lt;/P&gt;&lt;P&gt;v_maktx = itab_flg-maktx.&lt;/P&gt;&lt;P&gt;read itab_flg index v_index.&lt;/P&gt;&lt;P&gt; if sy-subrc = 0  and v_maktx =  itab_flg-maktx .&lt;/P&gt;&lt;P&gt; itab_flg-flg = 'X'.&lt;/P&gt;&lt;P&gt;modify itab_flg index v_index.&lt;/P&gt;&lt;P&gt;clear itab_flg.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab_flg where flg = 'X'.&lt;/P&gt;&lt;P&gt;itab_flg-maktx = ' '. "Null value.&lt;/P&gt;&lt;P&gt;modify itab_flg.&lt;/P&gt;&lt;P&gt;clear itab_flg.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh:itab.clear:itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Move-corresponding itab_flg to itab.&lt;/P&gt;&lt;P&gt;Append itab.&lt;/P&gt;&lt;P&gt;clear itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now in this itab you have the data required for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Sivaparvathi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward points if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Dec 2007 11:33:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-13T11:33:43Z</dc:date>
    <item>
      <title>alv report problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-problem/m-p/3184045#M758107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've populated an internal table which is showing values suppose like below.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;f1 f2 f3 f4.&lt;/P&gt;&lt;P&gt;1 a b 10&lt;/P&gt;&lt;P&gt;1 a b 20&lt;/P&gt;&lt;P&gt;1 a h 40&lt;/P&gt;&lt;P&gt;2 b c 30&lt;/P&gt;&lt;P&gt;2 b c 40&lt;/P&gt;&lt;P&gt;3 c d 50&lt;/P&gt;&lt;P&gt;3 c d 60&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;consider: &lt;/P&gt;&lt;P&gt;f1 as matnr-article number&lt;/P&gt;&lt;P&gt;f2 as maktx-article description.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now for every new matnr (having new maktx) only new matnr and new maktx will be printed, duplicate matnr and maktx won't be displayed. Those fields will display null actually. But corresponding f3 and f4 will be printed as it is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so values in the next internal table will be like following:&lt;/P&gt;&lt;P&gt;f1 f2 f3 f4.&lt;/P&gt;&lt;P&gt;1 a  b 10&lt;/P&gt;&lt;P&gt;N N b 20&lt;/P&gt;&lt;P&gt;N N h 40&lt;/P&gt;&lt;P&gt;2 b  c 30&lt;/P&gt;&lt;P&gt;N N c 40&lt;/P&gt;&lt;P&gt;3  c  d 50&lt;/P&gt;&lt;P&gt;N N d  60&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider N as null. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kindly help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can i populate such internal table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2007 10:41:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-problem/m-p/3184045#M758107</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-13T10:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: alv report problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-problem/m-p/3184046#M758108</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;take two variables, and give first data of itab..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in loop compare it with new value and if same use modify statement and refresh that two variables with new value..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think it should work...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2007 11:09:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-problem/m-p/3184046#M758108</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-13T11:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: alv report problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-problem/m-p/3184047#M758109</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 can suggest on esimple solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have data in itab.&lt;/P&gt;&lt;P&gt;the declare &lt;/P&gt;&lt;P&gt;data:begin itab_flg occurs 0.&lt;/P&gt;&lt;P&gt; include structure itab.&lt;/P&gt;&lt;P&gt;data:flg(1),&lt;/P&gt;&lt;P&gt;  end of itab_flg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:v_index like sy-tabix.&lt;/P&gt;&lt;P&gt;data:v_maktx like makt-maktx.&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort itab by maktx. "f2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move-corresponding itab to itab_flg.&lt;/P&gt;&lt;P&gt;append itab_flg.&lt;/P&gt;&lt;P&gt;clear itab_flg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab_flg.&lt;/P&gt;&lt;P&gt;clear :v_index,v_maktx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_index = sy-tabix +  1.&lt;/P&gt;&lt;P&gt;v_maktx = itab_flg-maktx.&lt;/P&gt;&lt;P&gt;read itab_flg index v_index.&lt;/P&gt;&lt;P&gt; if sy-subrc = 0  and v_maktx =  itab_flg-maktx .&lt;/P&gt;&lt;P&gt; itab_flg-flg = 'X'.&lt;/P&gt;&lt;P&gt;modify itab_flg index v_index.&lt;/P&gt;&lt;P&gt;clear itab_flg.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab_flg where flg = 'X'.&lt;/P&gt;&lt;P&gt;itab_flg-maktx = ' '. "Null value.&lt;/P&gt;&lt;P&gt;modify itab_flg.&lt;/P&gt;&lt;P&gt;clear itab_flg.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh:itab.clear:itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Move-corresponding itab_flg to itab.&lt;/P&gt;&lt;P&gt;Append itab.&lt;/P&gt;&lt;P&gt;clear itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now in this itab you have the data required for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Sivaparvathi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward points if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2007 11:33:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-problem/m-p/3184047#M758109</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-13T11:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: alv report problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-problem/m-p/3184048#M758110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai Cinthia,&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: lv_f1 type matnr,&lt;/P&gt;&lt;P&gt;      lv_f2 type maktx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort &amp;lt;internaltable&amp;gt; by f1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at &amp;lt;internaltable&amp;gt;.&lt;/P&gt;&lt;P&gt;clear: lv_f1, lv_f2.&lt;/P&gt;&lt;P&gt;lv_f1 = &amp;lt;internaltable&amp;gt;-f1.&lt;/P&gt;&lt;P&gt;lv_f2 = &amp;lt;internaltable&amp;gt;-f2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at new f1.&lt;/P&gt;&lt;P&gt;write: lv_f1,&lt;/P&gt;&lt;P&gt;       lv_f2.&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write: &amp;lt;internaltable&amp;gt;-f3,&lt;/P&gt;&lt;P&gt;       &amp;lt;internaltable&amp;gt;-f4.&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;with regards,&lt;/P&gt;&lt;P&gt;Eswar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2007 11:33:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-report-problem/m-p/3184048#M758110</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-13T11:33:48Z</dc:date>
    </item>
  </channel>
</rss>

