<?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: itab problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-problem/m-p/1343220#M173380</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;instead of using read use loop within a loop to get the result as u want&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves the prob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT T_ET.
      loop at TABLE T_JEST WITH KEY OBJNR = T_ET-OBJNR BINARY SEARCH.
      IF SY-SUBRC EQ 0.
        T_ET-STAT = T_JEST-STAT.
        MODIFY T_ET TRANSPORTING STAT.
      ENDIF.
    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;&amp;lt;b&amp;gt;Award point if found helpful&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Rahul Kavuri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 May 2006 10:12:15 GMT</pubDate>
    <dc:creator>rahulkavuri</dc:creator>
    <dc:date>2006-05-10T10:12:15Z</dc:date>
    <item>
      <title>itab problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-problem/m-p/1343218#M173378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts&lt;/P&gt;&lt;P&gt;I have itabs like this&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
T_JEST

OBJNR                    STAT                               
&amp;lt;b&amp;gt;IEEE9000-04              I0099
IEEE9000-04              I0320&amp;lt;/b&amp;gt;
IEEE9000-05              I0100
IEEE9000-05              I0320
IEEE9000-07              I0100
IEEE9000-07              I0320
&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;
T_ET

EQUNR   OBJNR		VKBUR   STAT

9AA	IEEE9000-04	9001	I0320
9BB	IEEE9000-05	9001	I0100
9CC	IEEE9000-07	9001	I0100

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;since T_JEST having double values i want to fill T_ET like this.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
EQUNR   OBJNR		VKBUR   STAT

9AA	&amp;lt;b&amp;gt;IEEE9000-04&amp;lt;/b&amp;gt;	9001	&amp;lt;b&amp;gt;I0099&amp;lt;/b&amp;gt;
9AA     &amp;lt;b&amp;gt;IEEE9000-04&amp;lt;/b&amp;gt;     9001    &amp;lt;b&amp;gt;I0320&amp;lt;/b&amp;gt;
9BB	IEEE9000-05	9001	I0100
9BB	IEEE9000-05	9001	I0320
9CC	IEEE9000-07	9001	I0100
9CC	IEEE9000-07	9001	I0320
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I have written select statements to get above values.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  SELECT EQUNR EQTYP EQART INBDT OBJNR VKBUR
       INTO CORRESPONDING FIELDS OF TABLE T_ET
       FROM V_EQUI
            WHERE EQTYP IN S_EQTYP AND
                   VKBUR IN S_VKBUR AND
                   INBDT LE P_INBDT.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;
    SELECT * FROM JEST INTO TABLE T_JEST
      FOR ALL ENTRIES IN T_ET
      WHERE OBJNR = T_ET-OBJNR AND
            INACT NE 'X'.

    SORT T_JEST BY OBJNR INACT.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;
    LOOP AT T_ET.
      READ TABLE T_JEST WITH KEY OBJNR = T_ET-OBJNR BINARY SEARCH.
      IF SY-SUBRC EQ 0.
        T_ET-STAT = T_JEST-STAT.
        MODIFY T_ET TRANSPORTING STAT.
      ENDIF.
    ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;   Why iam not able to get T_JEST values into T_ET completely?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;kaki&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2006 10:04:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-problem/m-p/1343218#M173378</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-10T10:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: itab problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-problem/m-p/1343219#M173379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LOOP AT T_ET.      &lt;/P&gt;&lt;P&gt;READ TABLE T_JEST WITH KEY OBJNR = T_ET-OBJNR&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;                           stat  = t_et-stat&amp;lt;/b&amp;gt; BINARY SEARCH.  &lt;/P&gt;&lt;P&gt;    IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;        T_ET-STAT = T_JEST-STAT.&lt;/P&gt;&lt;P&gt;        MODIFY T_ET TRANSPORTING STAT.  &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;Do the high lighted change.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2006 10:10:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-problem/m-p/1343219#M173379</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-10T10:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: itab problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-problem/m-p/1343220#M173380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;instead of using read use loop within a loop to get the result as u want&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves the prob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT T_ET.
      loop at TABLE T_JEST WITH KEY OBJNR = T_ET-OBJNR BINARY SEARCH.
      IF SY-SUBRC EQ 0.
        T_ET-STAT = T_JEST-STAT.
        MODIFY T_ET TRANSPORTING STAT.
      ENDIF.
    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;&amp;lt;b&amp;gt;Award point if found helpful&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Rahul Kavuri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2006 10:12:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-problem/m-p/1343220#M173380</guid>
      <dc:creator>rahulkavuri</dc:creator>
      <dc:date>2006-05-10T10:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: itab problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-problem/m-p/1343221#M173381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kaki,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use Delete Duplicate Entries syntax after populating the onternal table&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATE ENTRIES FROM &amp;lt;itab&amp;gt; &lt;/P&gt;&lt;P&gt;                                  [COMPARING &amp;lt;f1&amp;gt; &amp;lt;f 2&amp;gt; ... &lt;/P&gt;&lt;P&gt;                                             |ALL FIELDS].&lt;/P&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;Ranjit Thakur.&lt;/P&gt;&lt;P&gt;Please Mark The Helpful Answer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2006 10:13:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-problem/m-p/1343221#M173381</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-10T10:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: itab problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-problem/m-p/1343222#M173382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;make  a  internal  table t_et1 like t_et.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at t_jest.&lt;/P&gt;&lt;P&gt;READ TABLE T_et WITH KEY OBJNR = T_jest-OBJNR BINARY SEARCH.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;        T_ET1-equnr  = t_et-EQUNR  &lt;/P&gt;&lt;P&gt;        T_ET1-objnr = t_jest-OBJNR		&lt;/P&gt;&lt;P&gt;        T_ET1-vkbur = t_et-VKBUR   &lt;/P&gt;&lt;P&gt;       &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        T_ET1-STAT = T_JEST-STAT.&lt;/P&gt;&lt;P&gt;        append T_ET1 TRANSPORTING STAT.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2006 10:15:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-problem/m-p/1343222#M173382</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-10T10:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: itab problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-problem/m-p/1343223#M173383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kaki,&lt;/P&gt;&lt;P&gt;Since you want to modify table contents of T_ET while looping at the same table.&lt;/P&gt;&lt;P&gt; It would not be a good practice. &lt;/P&gt;&lt;P&gt; Instead create another table T_ET_TEMP and append the contents to that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    DATA T_ET_TEMP LIKE TABLE OF T_ET WITH HEADER LINE.
    LOOP AT T_ET.
      MOVE-CORRESPONDING T_ET INTO T_ET_TEMP.
      LOOP AT T_JEST WHERE OBJNR EQ T_ET-OBJNR.
        T_ET_TEMP-STAT = T_JEST-STAT.
        APPEND T_ET_TEMP.
      ENDLOOP.
    ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Wenceslaus.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2006 10:20:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-problem/m-p/1343223#M173383</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-10T10:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: itab problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-problem/m-p/1343224#M173384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this way:&lt;/P&gt;&lt;P&gt;LOOP AT T_JEST.      &lt;/P&gt;&lt;P&gt;READ TABLE T_ET WITH KEY OBJNR = T_JEST-OBJNR STAT = T_JEST-STAT BINARY SEARCH.      &lt;/P&gt;&lt;P&gt;IF SY-SUBRC EQ 0.        &lt;/P&gt;&lt;P&gt;MOVE-CORRESPONDING T_ET TO T_ET_NEW.&lt;/P&gt;&lt;P&gt;T_ET_NEW-EQUNR = T_JEST-EQUNR.        &lt;/P&gt;&lt;P&gt;T_ET_NEW-VKBUR = T_JEST-VKBUR.&lt;/P&gt;&lt;P&gt;APPEND T_ET_NEW.&lt;/P&gt;&lt;P&gt;ENDIF.    &lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2006 10:26:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-problem/m-p/1343224#M173384</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-10T10:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: itab problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-problem/m-p/1343225#M173385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kaki,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT A&lt;SUB&gt;EQUNR A&lt;/SUB&gt;EQTYP A&lt;SUB&gt;EQART A&lt;/SUB&gt;INBDT A&lt;SUB&gt;OBJNR A&lt;/SUB&gt;VKBUR&lt;/P&gt;&lt;P&gt;       B~stat&lt;/P&gt;&lt;P&gt;       INTO CORRESPONDING FIELDS OF TABLE T_ET&lt;/P&gt;&lt;P&gt;       FROM V_EQUI as A&lt;/P&gt;&lt;P&gt;       LEFT JOIN JEST AS B&lt;/P&gt;&lt;P&gt;         ON A&lt;SUB&gt;OBJNR EQ B&lt;/SUB&gt;OBJNR &lt;/P&gt;&lt;P&gt;        AND B~INACT NE 'X'&lt;/P&gt;&lt;P&gt;            WHERE EQTYP IN S_EQTYP AND&lt;/P&gt;&lt;P&gt;                   VKBUR IN S_VKBUR AND&lt;/P&gt;&lt;P&gt;                   INBDT LE P_INBDT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This select stament is much simpler and faster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Nilesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2006 14:21:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-problem/m-p/1343225#M173385</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-10T14:21:13Z</dc:date>
    </item>
  </channel>
</rss>

