<?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: how to avoid duplicates values from alvgird see below code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-avoid-duplicates-values-from-alvgird-see-below-code/m-p/1639049#M284755</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you r getting the duplicate value in your alv grid than you can't do anything by the select statement, you have to pass that particular varible through a funtion module which ll return you only single value , and than you can use that value as per your requirement.&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;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Nov 2006 06:56:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-03T06:56:39Z</dc:date>
    <item>
      <title>how to avoid duplicates values from alvgird see below code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-avoid-duplicates-values-from-alvgird-see-below-code/m-p/1639045#M284751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how to avoid duplicates values from alvgird see below code&lt;/P&gt;&lt;P&gt;in below query docno no is repeated again and again &lt;/P&gt;&lt;P&gt;how i can avoid duplication in this query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * into corresponding fields of table itab&lt;/P&gt;&lt;P&gt;         from  J_1IEXCHDR&lt;/P&gt;&lt;P&gt;                 inner join  J_1IEXCDTL&lt;/P&gt;&lt;P&gt;                    on  J_1IEXCDTL&lt;SUB&gt;lifnr =  J_1IEXCHDR&lt;/SUB&gt;lifnr&lt;/P&gt;&lt;P&gt;                 where  J_1IEXCHDr~status = 'P'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Nov 2006 05:51:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-avoid-duplicates-values-from-alvgird-see-below-code/m-p/1639045#M284751</guid>
      <dc:creator>laxman_sankhla3</dc:creator>
      <dc:date>2006-11-03T05:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: how to avoid duplicates values from alvgird see below code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-avoid-duplicates-values-from-alvgird-see-below-code/m-p/1639046#M284752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  There are two options based on your need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the entire row of the table is same then you can sort the internal table using SORT . And then delete the duplicate entreis using DELETE ADJACENT DUPLICATES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then your ALV Will display only unique rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if only docno fileds has sames values and other fileds have different values you can use the following code to display only one value for the same doc number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ls_sort         TYPE lvc_s_sort.&lt;/P&gt;&lt;P&gt;DATA: lt_sort         TYPE lvc_t_sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        ls_sort-spos      = column position.&lt;/P&gt;&lt;P&gt;        ls_sort-fieldname = column fieldname.&lt;/P&gt;&lt;P&gt;        ls_sort-group     = abap_true.&lt;/P&gt;&lt;P&gt;        APPEND ls_sort TO lt_sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then pass this to the it_sort import parameter of the ALV's SET_TABLE_FOR_FIRST_DISPLAY method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Nov 2006 05:59:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-avoid-duplicates-values-from-alvgird-see-below-code/m-p/1639046#M284752</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2006-11-03T05:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: how to avoid duplicates values from alvgird see below code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-avoid-duplicates-values-from-alvgird-see-below-code/m-p/1639047#M284753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;you can either use SELECT DISTINCT, but better avoid using this if the fields in the query are not a part of index,&lt;/P&gt;&lt;P&gt;hence use DELETE ADJACENT DUPLICATES from the internal table and then pass to ALV,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Aditya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Nov 2006 06:15:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-avoid-duplicates-values-from-alvgird-see-below-code/m-p/1639047#M284753</guid>
      <dc:creator>former_member184495</dc:creator>
      <dc:date>2006-11-03T06:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to avoid duplicates values from alvgird see below code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-avoid-duplicates-values-from-alvgird-see-below-code/m-p/1639048#M284754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Laxman,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after that select statement &lt;/P&gt;&lt;P&gt;select * into corresponding fields of table itab&lt;/P&gt;&lt;P&gt;from J_1IEXCHDR&lt;/P&gt;&lt;P&gt;inner join J_1IEXCDTL&lt;/P&gt;&lt;P&gt;on J_1IEXCDTL&lt;SUB&gt;lifnr = J_1IEXCHDR&lt;/SUB&gt;lifnr&lt;/P&gt;&lt;P&gt;where J_1IEXCHDr~status = 'P'. &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;delete adjucent duplicates from itab comparing &amp;lt;field name of itab internal table&amp;gt;&lt;/P&gt;&lt;P&gt;endif.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this will delete your duplicate entries.once you done with this call the alv FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;  call function 'REUSE_ALV_GRID_DISPLAY'&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt; exporting&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_INTERFACE_CHECK                 = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_BYPASSING_BUFFER                = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_BUFFER_ACTIVE                   = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   i_callback_program                = v_repid&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_CALLBACK_PF_STATUS_SET          = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_CALLBACK_USER_COMMAND           = 'IT_USER_COMMAND'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_CALLBACK_TOP_OF_PAGE            = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_CALLBACK_HTML_TOP_OF_PAGE       = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_CALLBACK_HTML_END_OF_LIST       = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_STRUCTURE_NAME                  =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_BACKGROUND_ID                   = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   i_grid_title                      = 'Purchase Order Details'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_GRID_SETTINGS                   = I_GRID_SETTINGS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   is_layout                         = wa_layout&lt;/P&gt;&lt;P&gt;   it_fieldcat                       = it_fieldcat&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IT_EXCLUDING                      = IT_EXCLUDING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IT_SPECIAL_GROUPS                 = IT_SPECIAL_GROUPS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   it_sort                           = it_sort&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IT_FILTER                         = IT_FILTER&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IS_SEL_HIDE                       = IS_SEL_HIDE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_DEFAULT                         = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_SAVE                            = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IS_VARIANT                        = IS_VARIANT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   it_events                         = it_event&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IT_EVENT_EXIT                     = IT_EVENT_EXIT&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IS_PRINT                          = IS_PRINT&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IS_REPREP_ID                      = IS_REPREP_ID&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_SCREEN_START_COLUMN             = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_SCREEN_START_LINE               = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_SCREEN_END_COLUMN               = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_SCREEN_END_LINE                 = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_HTML_HEIGHT_TOP                 = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  I_HTML_HEIGHT_END                 = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IT_ALV_GRAPHICS                   = IT_ALV_GRAPHICS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IT_HYPERLINK                      = IT_HYPERLINK&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IT_ADD_FIELDCAT                   = IT_ADD_FIELDCAT&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IT_EXCEPT_QINFO                   = IT_EXCEPT_QINFO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IR_SALV_FULLSCREEN_ADAPTER        = IR_SALV_FULLSCREEN_ADAPTER&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  E_EXIT_CAUSED_BY_CALLER           = E_EXIT_CAUSED_BY_CALLER&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ES_EXIT_CAUSED_BY_USER            = ES_EXIT_CAUSED_BY_USER&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    tables&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;      t_outtab                          = ITAB&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt; exceptions&lt;/P&gt;&lt;P&gt;   program_error                     = 1&lt;/P&gt;&lt;P&gt;   others                            = 2&lt;/P&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    message id sy-msgid type sy-msgty number sy-msgno&lt;/P&gt;&lt;P&gt;            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&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;Thanks&lt;/P&gt;&lt;P&gt;Vikranth Khimavath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Nov 2006 06:30:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-avoid-duplicates-values-from-alvgird-see-below-code/m-p/1639048#M284754</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-03T06:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: how to avoid duplicates values from alvgird see below code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-avoid-duplicates-values-from-alvgird-see-below-code/m-p/1639049#M284755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you r getting the duplicate value in your alv grid than you can't do anything by the select statement, you have to pass that particular varible through a funtion module which ll return you only single value , and than you can use that value as per your requirement.&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;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Nov 2006 06:56:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-avoid-duplicates-values-from-alvgird-see-below-code/m-p/1639049#M284755</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-03T06:56:39Z</dc:date>
    </item>
  </channel>
</rss>

