<?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: Not getting data in Internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/not-getting-data-in-internal-table/m-p/3808284#M915990</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can't leave the field p_bukrs empty as it it a parameter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;enter some value in P_bukrs you will get some data in your internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Always remamber prameters do not behave like select-options&lt;/P&gt;&lt;P&gt;if a select option is used in a SELECT statment and that is blank it will select all the records ie it will ignore the where,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if a parameter field is used in SELECT and it is blank it will serch for a matching record ie, blank.&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;Bikas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 May 2008 07:06:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-21T07:06:13Z</dc:date>
    <item>
      <title>Not getting data in Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/not-getting-data-in-internal-table/m-p/3808282#M915988</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;&lt;/P&gt;&lt;P&gt;I m generating an report in which when i enter vendor name or &lt;/P&gt;&lt;P&gt;small string of vendor name or&lt;/P&gt;&lt;P&gt;plant or &lt;/P&gt;&lt;P&gt;PO.&lt;/P&gt;&lt;P&gt;It will generate the same .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But no data in coming in my internal table.&lt;/P&gt;&lt;P&gt;Help me out where i m wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if s_name1 is not initial or s_lifnr is not initial or p_bukrs is not&lt;/P&gt;&lt;P&gt;initial.&lt;/P&gt;&lt;P&gt;    select lifnr bukrs  from lfb1&lt;/P&gt;&lt;P&gt;    into table i_lfb1&lt;/P&gt;&lt;P&gt;    where  lifnr in  s_lifnr &lt;/P&gt;&lt;P&gt;    and ( bukrs = p_bukrs ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if i_lfb1[] is not initial.&lt;/P&gt;&lt;P&gt;  select  lifnr name1&lt;/P&gt;&lt;P&gt;  from   lfa1&lt;/P&gt;&lt;P&gt;  into  corresponding fields of table i_lfa1&lt;/P&gt;&lt;P&gt;  for all entries in i_lfb1&lt;/P&gt;&lt;P&gt;  where lifnr =  i_lfb1-lifnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at i_lfa1.&lt;/P&gt;&lt;P&gt;  check i_lfa1-name1 cs s_name1.&lt;/P&gt;&lt;P&gt;  append i_lfa1.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; if i_lfa1[] is not initial.&lt;/P&gt;&lt;P&gt;  select  lifnr ekorg&lt;/P&gt;&lt;P&gt;  from   lfm1&lt;/P&gt;&lt;P&gt;  into  corresponding fields of table i_lfm1&lt;/P&gt;&lt;P&gt; for all entries in i_lfa1&lt;/P&gt;&lt;P&gt; where lifnr = i_lfa1-lifnr&lt;/P&gt;&lt;P&gt;      and ( ekorg eq p_ekorg ) .&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; if i_lfa1[] is not initial.&lt;/P&gt;&lt;P&gt;  select  werks ekorg&lt;/P&gt;&lt;P&gt;  from   t024w&lt;/P&gt;&lt;P&gt;  into  corresponding fields of table i_t024w&lt;/P&gt;&lt;P&gt; for all entries in i_lfm1&lt;/P&gt;&lt;P&gt; where  ekorg = i_lfm1-ekorg&lt;/P&gt;&lt;P&gt;     and ( werks eq p_werks ).&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt;LOOP AT i_lfb1  .&lt;/P&gt;&lt;P&gt;     LOOP AT i_lfa1  .&lt;/P&gt;&lt;P&gt;     LOOP AT i_lfm1 .&lt;/P&gt;&lt;P&gt;     LOOP AT i_t024w .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    LOOP AT i_tvktt WHERE ktgrd = i_vbrk-ktgrd.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    LOOP AT i_tvkmt WHERE ktgrm = i_vbrp-ktgrm.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;               main_table-lifnr  = i_lfb1-lifnr.&lt;/P&gt;&lt;P&gt;               main_table-bukrs  = i_lfb1-bukrs.&lt;/P&gt;&lt;P&gt;               main_table-name1  = i_lfa1-name1.&lt;/P&gt;&lt;P&gt;               main_table-ekorg  = i_lfm1-ekorg.&lt;/P&gt;&lt;P&gt;               main_table-werks  = i_t024w-werks.&lt;/P&gt;&lt;P&gt;               APPEND main_table.&lt;/P&gt;&lt;P&gt;               CLEAR main_table.&lt;/P&gt;&lt;P&gt;             ENDLOOP.&lt;/P&gt;&lt;P&gt;           ENDLOOP.&lt;/P&gt;&lt;P&gt;         ENDLOOP.&lt;/P&gt;&lt;P&gt;       ENDLOOP.&lt;/P&gt;&lt;P&gt;Best REGARDS ,&lt;/P&gt;&lt;P&gt;Aastha Gupta.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 06:53:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/not-getting-data-in-internal-table/m-p/3808282#M915988</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-21T06:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: Not getting data in Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/not-getting-data-in-internal-table/m-p/3808283#M915989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;As you need the selection fields not to be initial you can make them mandatory ones in the GUI itself. Provide screen validation.&lt;/P&gt;&lt;P&gt;after selecting data to parent internal table...checl if initial or not.&lt;/P&gt;&lt;P&gt;then fill other internal tables comparing the parent itab using FOR ALL ENTRIES.&lt;/P&gt;&lt;P&gt;afetr dat use SORT and DELETE ADJASCENT......on that table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at the parent itab, transfer data to the final / output itab. use READ and SY-SUBRC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REFRESH the otheer tabs. I think you'll get the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 07:05:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/not-getting-data-in-internal-table/m-p/3808283#M915989</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-21T07:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: Not getting data in Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/not-getting-data-in-internal-table/m-p/3808284#M915990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can't leave the field p_bukrs empty as it it a parameter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;enter some value in P_bukrs you will get some data in your internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Always remamber prameters do not behave like select-options&lt;/P&gt;&lt;P&gt;if a select option is used in a SELECT statment and that is blank it will select all the records ie it will ignore the where,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if a parameter field is used in SELECT and it is blank it will serch for a matching record ie, blank.&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;Bikas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 07:06:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/not-getting-data-in-internal-table/m-p/3808284#M915990</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-21T07:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: Not getting data in Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/not-getting-data-in-internal-table/m-p/3808285#M915991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do not post duplicates....see ur previous post&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 07:08:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/not-getting-data-in-internal-table/m-p/3808285#M915991</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2008-05-21T07:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: Not getting data in Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/not-getting-data-in-internal-table/m-p/3808286#M915992</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;P&gt;As u r using so many loops&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT i_lfb1 .&lt;/P&gt;&lt;P&gt;LOOP AT i_lfa1 .&lt;/P&gt;&lt;P&gt;LOOP AT i_lfm1 .&lt;/P&gt;&lt;P&gt;LOOP AT i_t024w .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT i_tvktt WHERE ktgrd = i_vbrk-ktgrd. &lt;/P&gt;&lt;P&gt;LOOP AT i_tvkmt WHERE ktgrm = i_vbrp-ktgrm. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;main_table-lifnr = i_lfb1-lifnr.&lt;/P&gt;&lt;P&gt;main_table-bukrs = i_lfb1-bukrs.&lt;/P&gt;&lt;P&gt;main_table-name1 = i_lfa1-name1.&lt;/P&gt;&lt;P&gt;main_table-ekorg = i_lfm1-ekorg.&lt;/P&gt;&lt;P&gt;main_table-werks = i_t024w-werks.&lt;/P&gt;&lt;P&gt;APPEND main_table.&lt;/P&gt;&lt;P&gt;CLEAR main_table.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if there no data in any one loop it will not go inside and it wont append any record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check in debugging...all the internal tables have data or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 07:12:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/not-getting-data-in-internal-table/m-p/3808286#M915992</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-21T07:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Not getting data in Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/not-getting-data-in-internal-table/m-p/3808287#M915993</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;STRONG&gt;problem in your code is in LOOP You hav written CLEAR MAIN_TABLE&lt;/STRONG&gt;. if the data is cleared what can b viewed? try d below mentioned code....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if s_name1 is not initial or s_lifnr is not initial or p_bukrs is not&lt;/P&gt;&lt;P&gt;initial.&lt;/P&gt;&lt;P&gt;select lifnr bukrs from lfb1&lt;/P&gt;&lt;P&gt;into table i_lfb1&lt;/P&gt;&lt;P&gt;where lifnr in s_lifnr &lt;/P&gt;&lt;P&gt;and ( bukrs = p_bukrs ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i_lfb1[] is not initial.&lt;/P&gt;&lt;P&gt;select lifnr name1&lt;/P&gt;&lt;P&gt;from lfa1&lt;/P&gt;&lt;P&gt;into corresponding fields of table i_lfa1&lt;/P&gt;&lt;P&gt;for all entries in i_lfb1&lt;/P&gt;&lt;P&gt;where lifnr = i_lfb1-lifnr,&lt;/P&gt;&lt;P&gt;      name1 cs s_name1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i_lfa1[] is not initial.&lt;/P&gt;&lt;P&gt;select lifnr ekorg&lt;/P&gt;&lt;P&gt;from lfm1&lt;/P&gt;&lt;P&gt;into corresponding fields of table i_lfm1&lt;/P&gt;&lt;P&gt;for all entries in i_lfa1&lt;/P&gt;&lt;P&gt;where lifnr = i_lfa1-lifnr&lt;/P&gt;&lt;P&gt;and ( ekorg eq p_ekorg ) .&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i_lfa1[] is not initial.&lt;/P&gt;&lt;P&gt;select werks ekorg&lt;/P&gt;&lt;P&gt;from t024w&lt;/P&gt;&lt;P&gt;into corresponding fields of table i_t024w&lt;/P&gt;&lt;P&gt;for all entries in i_lfm1&lt;/P&gt;&lt;P&gt;where ekorg = i_lfm1-ekorg&lt;/P&gt;&lt;P&gt;and ( werks eq p_werks ).&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT i_lfb1 .&lt;/P&gt;&lt;P&gt;main_table-lifnr = i_lfb1-lifnr.&lt;/P&gt;&lt;P&gt;main_table-bukrs = i_lfb1-bukrs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table i_lfa1 with key lifnr = ilfb1-lifnr.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;main_table-name1 = i_lfa1-name1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table i_lfa1 with key lifnr = ilfb1-lifnr.&lt;/P&gt;&lt;P&gt;read table i_lfm1 with key lifnr = ilfa1-lifnr.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;main_table-ekorg = i_lfa1-ekorg.&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;.........................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND main_table.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CLEAR i_lfb1&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh: i_lfb1, i_lfa1, i-lfm1, i_t024w.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2008 07:26:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/not-getting-data-in-internal-table/m-p/3808287#M915993</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-21T07:26:39Z</dc:date>
    </item>
  </channel>
</rss>

