<?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: for all entries problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/2021756#M413830</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the following code you have to use atleast one field from the internal table &lt;/P&gt;&lt;P&gt;in where condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use atleast one field of i_lqua_details in where condition, as per ur requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i_lqua_details[] is not initial.&lt;/P&gt;&lt;P&gt;select matnr werks lgort charg &lt;/P&gt;&lt;P&gt;from mchb&lt;/P&gt;&lt;P&gt;into table i_mchb_details&lt;/P&gt;&lt;P&gt;for all entries in i_lqua_details&lt;/P&gt;&lt;P&gt;where matnr in s_matnr&lt;/P&gt;&lt;P&gt;and werks in s_werks&lt;/P&gt;&lt;P&gt;and lgort in s_lgo_fr&lt;/P&gt;&lt;P&gt;and lvorm eq space.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Mar 2007 07:01:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-20T07:01:51Z</dc:date>
    <item>
      <title>for all entries problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/2021751#M413825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I need fetch matnr werks lgort charg fields where the special stock is K.&lt;/P&gt;&lt;P&gt;For this I wrote the code. But for all entries wont support IN statement.&lt;/P&gt;&lt;P&gt;So in my second query how to give range values. It&amp;#146;s giving me error in my code. Please check this and correct the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      select matnr werks lgort charg sobkz                 &lt;/P&gt;&lt;P&gt;      from   lqua&lt;/P&gt;&lt;P&gt;      into   table i_lqua_details&lt;/P&gt;&lt;P&gt;      where  matnr in s_matnr&lt;/P&gt;&lt;P&gt;       and   werks in s_werks&lt;/P&gt;&lt;P&gt;       and   lgort in s_lgo_fr&lt;/P&gt;&lt;P&gt;       and   sobkz eq k.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i_lqua_details[] is not initial.&lt;/P&gt;&lt;P&gt;      select matnr werks lgort charg                 &lt;/P&gt;&lt;P&gt;      from   mchb&lt;/P&gt;&lt;P&gt;      into   table i_mchb_details&lt;/P&gt;&lt;P&gt;      for all entries in i_lqua_details&lt;/P&gt;&lt;P&gt;      where  matnr in s_matnr&lt;/P&gt;&lt;P&gt;       and   werks in s_werks&lt;/P&gt;&lt;P&gt;       and   lgort in s_lgo_fr&lt;/P&gt;&lt;P&gt;       and   lvorm eq space.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will reward with the valid points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Raghu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2007 06:48:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/2021751#M413825</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-20T06:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: for all entries problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/2021752#M413826</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;You have not used the contents of your i_lqua_details internal table in the where condition of the 2nd query. either you take out the for all entries addition or insert the condition &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select matnr werks lgort charg &lt;/P&gt;&lt;P&gt;from mchb&lt;/P&gt;&lt;P&gt;into table i_mchb_details&lt;/P&gt;&lt;P&gt;for all entries in i_lqua_details&lt;/P&gt;&lt;P&gt;where matnr eq i_lqua_details-matnr&lt;/P&gt;&lt;P&gt;and werks eq i_lqua_details-werks&lt;/P&gt;&lt;P&gt;and lgort eq i_lqua_details-lgort&lt;/P&gt;&lt;P&gt;and lvorm eq space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Mahesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2007 06:53:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/2021752#M413826</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-20T06:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: for all entries problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/2021753#M413827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raghu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check out the following examples&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Ranges you can use '&amp;lt;='  '&amp;gt;='  or 'between'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example 1:&lt;/P&gt;&lt;P&gt;data : it_vbap like vbap occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data : it_vbak like vbap occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * &lt;/P&gt;&lt;P&gt;from vbak &lt;/P&gt;&lt;P&gt;into it_vbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not it_vbak[] is in initial.&lt;/P&gt;&lt;P&gt;select * from vbap&lt;/P&gt;&lt;P&gt;into it_vbap&lt;/P&gt;&lt;P&gt;for all entries in it_vbak&lt;/P&gt;&lt;P&gt;where vbeln eq it_vbak-vbeln.&lt;/P&gt;&lt;P&gt;endif. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example 2:&lt;/P&gt;&lt;P&gt;CLEAR: G_T_VBRK,G_T_VBFA,G_T_VBAK,G_T_VBPA,G_T_KNA1.&lt;/P&gt;&lt;P&gt;REFRESH: G_T_VBRK,G_T_VBFA,G_T_VBAK,G_T_VBPA,G_T_KNA1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT VBRK&lt;SUB&gt;BUKRS VBRK&lt;/SUB&gt;FKART VBRK&lt;SUB&gt;FKDAT VBRK&lt;/SUB&gt;FKSTO VBRK~KUNRG&lt;/P&gt;&lt;P&gt;VBRK&lt;SUB&gt;SFAKN VBRK&lt;/SUB&gt;VBELN VBRK&lt;SUB&gt;VKORG VBRK&lt;/SUB&gt;VTWEG KNA1~KUNNR&lt;/P&gt;&lt;P&gt;KNA1&lt;SUB&gt;LAND1 KNA1&lt;/SUB&gt;NAME1 INTO CORRESPONDING FIELDS OF&lt;/P&gt;&lt;P&gt;TABLE G_T_VBRK&lt;/P&gt;&lt;P&gt;FROM VBRK INNER JOIN KNA1 ON KNA1&lt;SUB&gt;KUNNR = VBRK&lt;/SUB&gt;KUNRG&lt;/P&gt;&lt;P&gt;WHERE VBRK~BUKRS IN BUKRS&lt;/P&gt;&lt;P&gt;AND VBRK~VKORG IN VKORG&lt;/P&gt;&lt;P&gt;AND VBRK~FKART IN FKART&lt;/P&gt;&lt;P&gt;AND VBRK~FKDAT IN SP$00004&lt;/P&gt;&lt;P&gt;AND VBRK~FKSTO IN SP$00014&lt;/P&gt;&lt;P&gt;AND VBRK~KUNRG IN SP$00005&lt;/P&gt;&lt;P&gt;AND VBRK~SFAKN IN SP$00015&lt;/P&gt;&lt;P&gt;AND VBRK~VBELN IN SP$00006&lt;/P&gt;&lt;P&gt;AND VBRK~VTWEG IN SP$00008&lt;/P&gt;&lt;P&gt;AND KNA1~LAND1 IN SP$00016.&lt;/P&gt;&lt;P&gt;IF NOT G_T_VBRK[] IS INITIAL.&lt;/P&gt;&lt;P&gt;SELECT * FROM VBPA INTO TABLE G_T_VBPA&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN G_T_VBRK&lt;/P&gt;&lt;P&gt;WHERE VBELN = G_T_VBRK-VBELN&lt;/P&gt;&lt;P&gt;AND PARVW = 'ZE'.&lt;/P&gt;&lt;P&gt;IF NOT G_T_VBPA[] IS INITIAL.&lt;/P&gt;&lt;P&gt;SELECT * FROM KNA1 INTO TABLE G_T_KNA1&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN G_T_VBPA&lt;/P&gt;&lt;P&gt;WHERE KUNNR = G_T_VBPA-KUNNR.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example 3:&lt;/P&gt;&lt;P&gt;SELECT matnr mtart&lt;/P&gt;&lt;P&gt;  FROM mara&lt;/P&gt;&lt;P&gt;  INTO TABLE t_mara&lt;/P&gt;&lt;P&gt;  WHERE matnr IN s_matnr.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;IF NOT t_mara[] IS INITIAL.&lt;/P&gt;&lt;P&gt;  SELECT matnr maktx&lt;/P&gt;&lt;P&gt;    FROM makt&lt;/P&gt;&lt;P&gt;    INTO TABLE t_makt&lt;/P&gt;&lt;P&gt;    FOR ALL ENTRIES IN t_mara&lt;/P&gt;&lt;P&gt;    WHERE matnr EQ t_mara-matnr.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example 4:&lt;/P&gt;&lt;P&gt;SELECT vbeln posnr matnr&lt;/P&gt;&lt;P&gt;  FROM vbap&lt;/P&gt;&lt;P&gt;  INTO TABLE it_vbap &lt;/P&gt;&lt;P&gt;  FOR ALL ENTRIES IN it_vbak&lt;/P&gt;&lt;P&gt;  WHERE vbeln = it_vbak-vbeln.&lt;/P&gt;&lt;P&gt;In the above code, for all entries in internal table it_vbak, corresponding entries from table VBAP will be fetched into table it_vbap comparing values of vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Ranges you can use '&amp;lt;='  '&amp;gt;='  or 'between'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good Luck and thanks&lt;/P&gt;&lt;P&gt;AK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2007 06:56:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/2021753#M413827</guid>
      <dc:creator>ashok_kumar24116</dc:creator>
      <dc:date>2007-03-20T06:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: for all entries problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/2021754#M413828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select matnr werks lgort charg sobkz &lt;/P&gt;&lt;P&gt;from lqua&lt;/P&gt;&lt;P&gt;into table i_lqua_details&lt;/P&gt;&lt;P&gt;where matnr in s_matnr&lt;/P&gt;&lt;P&gt;and werks in s_werks&lt;/P&gt;&lt;P&gt;and lgort in s_lgo_fr&lt;/P&gt;&lt;P&gt;and sobkz eq k.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i_lqua_details[] is not initial.&lt;/P&gt;&lt;P&gt;select matnr werks lgort charg &lt;/P&gt;&lt;P&gt;from mchb&lt;/P&gt;&lt;P&gt;into table i_mchb_details&lt;/P&gt;&lt;P&gt;for all entries in i_lqua_details&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;where matnr in s_matnr&lt;/P&gt;&lt;P&gt;and werks in s_werks&lt;/P&gt;&lt;P&gt;and lgort in s_lgo_fr&lt;/P&gt;&lt;P&gt;and lvorm eq space.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where matnr eq i_lqua_details-matnr&lt;/P&gt;&lt;P&gt;and werks eq i_lqua_details-werks&lt;/P&gt;&lt;P&gt;and lgort eq i_lqua_details-lgo_fr&lt;/P&gt;&lt;P&gt;and lvorm eq space&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**&lt;STRONG&gt;Please reward suitable points&lt;/STRONG&gt;***&lt;/P&gt;&lt;P&gt;With Regards&lt;/P&gt;&lt;P&gt;Navin Khedikar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2007 06:57:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/2021754#M413828</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-20T06:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: for all entries problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/2021755#M413829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Raghu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  If use the for all entries for an internal table,in wher condition you have to use interble field to check some condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select matnr werks lgort charg &lt;/P&gt;&lt;P&gt;from mchb&lt;/P&gt;&lt;P&gt;into table i_mchb_details&lt;/P&gt;&lt;P&gt;for all entries in i_lqua_details&lt;/P&gt;&lt;P&gt;where matnr in si_lqua_details-matnr&lt;/P&gt;&lt;P&gt;and werks in s_werks&lt;/P&gt;&lt;P&gt;and lgort in s_lgo_fr&lt;/P&gt;&lt;P&gt;and lvorm eq space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls. reard if useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2007 07:00:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/2021755#M413829</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-20T07:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: for all entries problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/2021756#M413830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the following code you have to use atleast one field from the internal table &lt;/P&gt;&lt;P&gt;in where condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use atleast one field of i_lqua_details in where condition, as per ur requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i_lqua_details[] is not initial.&lt;/P&gt;&lt;P&gt;select matnr werks lgort charg &lt;/P&gt;&lt;P&gt;from mchb&lt;/P&gt;&lt;P&gt;into table i_mchb_details&lt;/P&gt;&lt;P&gt;for all entries in i_lqua_details&lt;/P&gt;&lt;P&gt;where matnr in s_matnr&lt;/P&gt;&lt;P&gt;and werks in s_werks&lt;/P&gt;&lt;P&gt;and lgort in s_lgo_fr&lt;/P&gt;&lt;P&gt;and lvorm eq space.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2007 07:01:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries-problem/m-p/2021756#M413830</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-20T07:01:51Z</dc:date>
    </item>
  </channel>
</rss>

