<?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: select staments?? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-staments/m-p/3679713#M886121</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it required to write this quires in the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;srihitha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Apr 2008 09:36:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-21T09:36:21Z</dc:date>
    <item>
      <title>select staments??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-staments/m-p/3679709#M886117</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;  For one of my requirement i need some quires.Please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Queires : To retrive the name1,name2&lt;/P&gt;&lt;P&gt;logic   : pick customer No from MHND-KUNNR and use table kna1-name1.&lt;/P&gt;&lt;P&gt;logic   : pick customer No from MHND-KUNNR and use the table kna1-name2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for Address Line 1 to retrive the ADRC(HOUSE_NUM1),ADRC(STREET).&lt;/P&gt;&lt;P&gt;logic: Pick the address number from the table KNA1 and then go to the table ADRC to pull the relevant field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for Address Line 2 to retrive the ADRC(STR_SUPPL1 ),ADRC(STR_SUPPL2 ),ADRC(STR_SUPPL2 ).&lt;/P&gt;&lt;P&gt;logic: Pick the address number from the table KNA1 and then go to the table ADRC to pull the relevant field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for contact tel number ADR2(TEL_NUMBER) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;logic: Pls extract the Address number from Table T001 and then extract telephone sequence no.2 from table ADR2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me how to write the select quires?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;srihitha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2008 09:10:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-staments/m-p/3679709#M886117</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-21T09:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: select staments??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-staments/m-p/3679710#M886118</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;select single name1 name2 from kna1 where kunnr = mhnd-kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for fetching address:&lt;/P&gt;&lt;P&gt;select single * from adrc where kunnr = kna1-kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;similarly you can do for t001 table....&lt;/P&gt;&lt;P&gt;and these should be in loop.&lt;/P&gt;&lt;P&gt;say loop at mhnd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Reward If Helpful&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jagadish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2008 09:14:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-staments/m-p/3679710#M886118</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-21T09:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: select staments??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-staments/m-p/3679711#M886119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select single name1 name2 from kna1 where kunnr = mhnd-kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for fetching address:&lt;/P&gt;&lt;P&gt;select single * from adrc where kunnr = kna1-kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;similarly you can do for t001 table....&lt;/P&gt;&lt;P&gt;and these should be in loop.&lt;/P&gt;&lt;P&gt;say loop at mhnd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with regards&lt;/P&gt;&lt;P&gt;pardeep sharma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2008 09:23:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-staments/m-p/3679711#M886119</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-21T09:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: select staments??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-staments/m-p/3679712#M886120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;select name1 name2 addrnumber into table lt_kna1&lt;/P&gt;&lt;P&gt; from kna1&lt;/P&gt;&lt;P&gt;where kunnr = MHND-KUNNR .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check lt_kna1 is not initial.&lt;/P&gt;&lt;P&gt;select HOUSE_NUM1 STREET STR_SUPPL1 STR_SUPPL2  &lt;/P&gt;&lt;P&gt;into table lt_adrc&lt;/P&gt;&lt;P&gt;from adrc&lt;/P&gt;&lt;P&gt;for all entries in lt_kna1&lt;/P&gt;&lt;P&gt;where adrnr = lt_kna1-addrnumber.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select TEL_NUMBER into table lt_adr2&lt;/P&gt;&lt;P&gt;from adr2&lt;/P&gt;&lt;P&gt;for all entries in lt_kna1&lt;/P&gt;&lt;P&gt;where adrnr = lt_kna1-addrnumber.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ramya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2008 09:28:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-staments/m-p/3679712#M886120</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-21T09:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: select staments??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-staments/m-p/3679713#M886121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it required to write this quires in the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;srihitha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2008 09:36:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-staments/m-p/3679713#M886121</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-21T09:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: select staments??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-staments/m-p/3679714#M886122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes then only the data would be fetched according to kunnr wise!!!!!!!!!!!!!!&lt;/P&gt;&lt;P&gt;reward if useful!!!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With regards&lt;/P&gt;&lt;P&gt;pardeep sharma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2008 09:39:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-staments/m-p/3679714#M886122</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-21T09:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: select staments??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-staments/m-p/3679715#M886123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How to write this quires in the loop statament???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2008 09:41:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-staments/m-p/3679715#M886123</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-21T09:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: select staments??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-staments/m-p/3679716#M886124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srihitha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the below piese of code this can be helpful to fetch the required data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Based on the fields in my selection screen i.e, BUKRS i have got the remaining data....in your case you may have some other key fields of MHND table so you can use them also in where clause where required.&lt;/P&gt;&lt;P&gt;if you could have given the fields which you will have with you from table MHND we can have INNER JOINS for some tables.&lt;/P&gt;&lt;P&gt;But the below queries may be helpful to you or they may atleast give you an idea to proceed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK b1.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: s_bukrs FOR mhnd-bukrs.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF ty_names,&lt;/P&gt;&lt;P&gt;       kunnr TYPE kunnr,&lt;/P&gt;&lt;P&gt;       name1 TYPE name1_gp,&lt;/P&gt;&lt;P&gt;       name2 TYPE name2_gp,&lt;/P&gt;&lt;P&gt;       adrnr TYPE adrnr,&lt;/P&gt;&lt;P&gt;       END OF ty_names,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       BEGIN OF ty_kunnr,&lt;/P&gt;&lt;P&gt;       kunnr TYPE kunnr,&lt;/P&gt;&lt;P&gt;       END OF ty_kunnr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       BEGIN OF ty_address,&lt;/P&gt;&lt;P&gt;       house_num1 TYPE ad_hsnm1,&lt;/P&gt;&lt;P&gt;       street     TYPE ad_street,&lt;/P&gt;&lt;P&gt;       str_supp1  TYPE ad_strspp1,&lt;/P&gt;&lt;P&gt;       str_supp2  TYPE ad_strspp2,&lt;/P&gt;&lt;P&gt;       str_supp3  TYPE ad_strspp3,&lt;/P&gt;&lt;P&gt;       END OF ty_address,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       BEGIN OF ty_telephone,&lt;/P&gt;&lt;P&gt;       tel_number TYPE ad_tlnmbr,&lt;/P&gt;&lt;P&gt;       adrnr      TYPE adrnr,&lt;/P&gt;&lt;P&gt;       END OF ty_telephone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: lt_names TYPE STANDARD TABLE OF ty_names,&lt;/P&gt;&lt;P&gt;      lt_kunnr TYPE STANDARD TABLE OF ty_kunnr,&lt;/P&gt;&lt;P&gt;      lt_address TYPE STANDARD TABLE OF ty_address,&lt;/P&gt;&lt;P&gt;      lt_telephone TYPE STANDARD TABLE OF ty_telephone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REFRESH: lt_names,&lt;/P&gt;&lt;P&gt;         lt_kunnr,&lt;/P&gt;&lt;P&gt;         lt_address,&lt;/P&gt;&lt;P&gt;         lt_telephone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT s_bukrs IS INITIAL.&lt;/P&gt;&lt;P&gt;  SELECT kunnr&lt;/P&gt;&lt;P&gt;    INTO TABLE lt_kunnr&lt;/P&gt;&lt;P&gt;    FROM mhnd&lt;/P&gt;&lt;P&gt;    WHERE bukrs IN s_bukrs.&lt;/P&gt;&lt;P&gt;  IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT kunnr&lt;/P&gt;&lt;P&gt;           name1&lt;/P&gt;&lt;P&gt;           name2&lt;/P&gt;&lt;P&gt;           adrnr&lt;/P&gt;&lt;P&gt;      INTO TABLE lt_names&lt;/P&gt;&lt;P&gt;      FROM kna1&lt;/P&gt;&lt;P&gt;      FOR ALL ENTRIES IN lt_kunnr&lt;/P&gt;&lt;P&gt;      WHERE kunnr = lt_kunnr-kunnr.&lt;/P&gt;&lt;P&gt;    IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;      SELECT  house_num1&lt;/P&gt;&lt;P&gt;              street&lt;/P&gt;&lt;P&gt;              str_suppl1&lt;/P&gt;&lt;P&gt;              str_suppl2&lt;/P&gt;&lt;P&gt;              str_suppl3&lt;/P&gt;&lt;P&gt;          INTO TABLE lt_address&lt;/P&gt;&lt;P&gt;          FROM adrc&lt;/P&gt;&lt;P&gt;          FOR ALL ENTRIES IN lt_names&lt;/P&gt;&lt;P&gt;          WHERE addrnumber = lt_names-adrnr.&lt;/P&gt;&lt;P&gt;      IF sy-subrc EQ 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;do nothing&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      SELECT tel_number&lt;/P&gt;&lt;P&gt;             addrnumber&lt;/P&gt;&lt;P&gt;        INTO TABLE lt_telephone&lt;/P&gt;&lt;P&gt;        FROM adr2&lt;/P&gt;&lt;P&gt;        FOR ALL ENTRIES IN lt_names&lt;/P&gt;&lt;P&gt;        WHERE addrnumber = lt_names-adrnr.&lt;/P&gt;&lt;P&gt;      IF sy-subrc EQ 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;do nothing&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&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;Regards,&lt;/P&gt;&lt;P&gt;Rasheed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2008 10:21:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-staments/m-p/3679716#M886124</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-21T10:21:37Z</dc:date>
    </item>
  </channel>
</rss>

