<?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: Retrieving records in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieving-records/m-p/2502101#M565429</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;u can write like this.&lt;/P&gt;&lt;P&gt;tables:lfa1.&lt;/P&gt;&lt;P&gt;select * from lfa1 where land1 = 'IN'.&lt;/P&gt;&lt;P&gt;  if lfa1-name1 Cp 'C*'.&lt;/P&gt;&lt;P&gt;  write:/5 lfa1-kunnr,20 lfa1-name1.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds,&lt;/P&gt;&lt;P&gt;bharat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Jul 2007 11:17:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-13T11:17:34Z</dc:date>
    <item>
      <title>Retrieving records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieving-records/m-p/2502099#M565427</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;How to retrieve all the customers where country key is u.s&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;display all the records where customer name starts with 'A'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2007 11:10:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieving-records/m-p/2502099#M565427</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-13T11:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieving-records/m-p/2502100#M565428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;   from KNA1 &lt;/P&gt;&lt;P&gt;  into table it_kunnr&lt;/P&gt;&lt;P&gt;where LAND1 = 'US'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_kunnr.&lt;/P&gt;&lt;P&gt;if it_kna1-name1 cp 'A*'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Display record....&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2007 11:15:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieving-records/m-p/2502100#M565428</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-13T11:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieving-records/m-p/2502101#M565429</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;u can write like this.&lt;/P&gt;&lt;P&gt;tables:lfa1.&lt;/P&gt;&lt;P&gt;select * from lfa1 where land1 = 'IN'.&lt;/P&gt;&lt;P&gt;  if lfa1-name1 Cp 'C*'.&lt;/P&gt;&lt;P&gt;  write:/5 lfa1-kunnr,20 lfa1-name1.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds,&lt;/P&gt;&lt;P&gt;bharat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2007 11:17:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieving-records/m-p/2502101#M565429</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-13T11:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieving-records/m-p/2502102#M565430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use the below code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from &amp;lt;table&amp;gt; into table &amp;lt;it&amp;gt; where country key = 'US' and kunnr = 'A%'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if USEFUL&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2007 11:18:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieving-records/m-p/2502102#M565430</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-13T11:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieving-records/m-p/2502103#M565431</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;try like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM KNA1 INTO TABLE IT_KNA1 WHERE NAME1 LIKE 'A%'&lt;/P&gt;&lt;P&gt;retrieves all records starting with A----&lt;/P&gt;&lt;HR originaltext="-------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM KNA1 INTO TABLE IT_KNA1 WHERE NAME1 LIKE 'A_'&lt;/P&gt;&lt;P&gt;retrives all record starting with A------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if helpful reward some points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with regards,&lt;/P&gt;&lt;P&gt;Suresh.A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2007 11:20:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieving-records/m-p/2502103#M565431</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-13T11:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieving-records/m-p/2502104#M565432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: BEGIN OF itab OCCURS 0,
        lifnr TYPE lifnr,
      END OF itab .

DATA: wa_itab LIKE LINE OF itab.

SELECT lifnr FROM kna1
       INTO TABLE itab
       WHERE land1 = 'US'.

IF sy-subrc = 0.

  LOOP AT itab INTO wa_itab WHERE lifnr+0(1) eq 'A'.
    WRITE:/ wa_itab-lifnr.
  ENDLOOP.

ELSE.

  WRITE:/ 'No data found' .

ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,Deepu.k&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2007 11:23:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieving-records/m-p/2502104#M565432</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-13T11:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieving-records/m-p/2502105#M565433</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 wrote the program like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;FS_EMP TYPE KNA1,&lt;/P&gt;&lt;P&gt;IT_EMP TYPE TABLE OF KNA1,&lt;/P&gt;&lt;P&gt;KUNNR TYPE KUNNR.&lt;/P&gt;&lt;P&gt;SELECT KUNNR FROM KNA1 INTO FS_EMP WHERE LAND1 = 'US'.&lt;/P&gt;&lt;P&gt;APPEND FS_EMP TO IT_EMP.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i want to check the result when i execute. plz let me know.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2007 11:44:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieving-records/m-p/2502105#M565433</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-13T11:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieving-records/m-p/2502106#M565434</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;DATA:&lt;/P&gt;&lt;P&gt;FS_EMP TYPE KNA1,&lt;/P&gt;&lt;P&gt;IT_EMP TYPE TABLE OF KNA1,&lt;/P&gt;&lt;P&gt;KUNNR TYPE KUNNR.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;SELECT KUNNR FROM KNA1 INTO CORRESPONDING FIELDS OF TABLE IT_EMP WHERE LAND1 = 'US'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF IT_EMP IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;LOOP AT IT_EMP INTO FS_EMP.&lt;/P&gt;&lt;P&gt;WRITE: FS_EMP-KUNNR.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;WRITE: 'Nothing Found'.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;ENDIF.&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, 13 Jul 2007 12:11:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieving-records/m-p/2502106#M565434</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-07-13T12:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieving-records/m-p/2502107#M565435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT *&lt;/P&gt;&lt;P&gt;   FROM KNA1&lt;/P&gt;&lt;P&gt;   INTO TABLE ITAB&lt;/P&gt;&lt;P&gt;  WHERE KNA1-KUNNAR = &lt;/P&gt;&lt;P&gt;              AND KNA1-LAND1 = 'US.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YOU WILL GET RETRIVE DATA FROM DTABLE&lt;/P&gt;&lt;P&gt;'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2007 12:18:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieving-records/m-p/2502107#M565435</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-13T12:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieving-records/m-p/2502108#M565436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ram,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this out,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;FS_EMP TYPE KNA1,&lt;/P&gt;&lt;P&gt;IT_EMP TYPE TABLE OF KNA1,&lt;/P&gt;&lt;P&gt;KUNNR TYPE KUNNR.&lt;/P&gt;&lt;P&gt;SELECT * FROM KNA1 INTO FS_EMP WHERE LAND1 = 'US'.&lt;/P&gt;&lt;P&gt;APPEND FS_EMP TO IT_EMP.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR FS_EMP.&lt;/P&gt;&lt;P&gt;LOOP AT IT_EMP INTO FS_EMP.&lt;/P&gt;&lt;P&gt;IF FS_EMP-KUNNR+0(1) EQ 'A'.&lt;/P&gt;&lt;P&gt;   WRITE:/ FS_EMP-KUNNR.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Reward points if this helps,&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2007 12:18:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieving-records/m-p/2502108#M565436</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-13T12:18:24Z</dc:date>
    </item>
  </channel>
</rss>

