<?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 Data not Retrieved through internal table. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-not-retrieved-through-internal-table/m-p/5804293#M1312280</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts!!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a structure yomresponse, which i have created through se11.&lt;/P&gt;&lt;P&gt;I have to get values of SHORT and STEXT from table HRP1000 into an internal table &lt;/P&gt;&lt;P&gt;it_yomresponse based on the pernr. I have written the following code but i am not &lt;/P&gt;&lt;P&gt;getting the right values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: it_yomresponse TYPE standard TABLE OF yomresponse,
wa_yomresponse TYPE yomresponse.
 SELECT SINGLE plans FROM  pa0001 INTO wa_yomresponse-eposid
    WHERE pernr = pa_objid.  "Pa_objid is coming from Selection screen

SELECT short stext FROM hrp1000
    INTO CORRESPONDING FIELDS OF TABLE it_yomresponse
WHERE objid =  wa_yomresponse-eposid.

 LOOP AT it_yomresponse INTO wa_yomresponse.
    WRITE:/ wa_yomresponse-eposstxt,
            wa_yomresponse-eposdesc.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any pointers will be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Nitesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Jun 2009 11:17:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-19T11:17:58Z</dc:date>
    <item>
      <title>Data not Retrieved through internal table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-not-retrieved-through-internal-table/m-p/5804293#M1312280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts!!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a structure yomresponse, which i have created through se11.&lt;/P&gt;&lt;P&gt;I have to get values of SHORT and STEXT from table HRP1000 into an internal table &lt;/P&gt;&lt;P&gt;it_yomresponse based on the pernr. I have written the following code but i am not &lt;/P&gt;&lt;P&gt;getting the right values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: it_yomresponse TYPE standard TABLE OF yomresponse,
wa_yomresponse TYPE yomresponse.
 SELECT SINGLE plans FROM  pa0001 INTO wa_yomresponse-eposid
    WHERE pernr = pa_objid.  "Pa_objid is coming from Selection screen

SELECT short stext FROM hrp1000
    INTO CORRESPONDING FIELDS OF TABLE it_yomresponse
WHERE objid =  wa_yomresponse-eposid.

 LOOP AT it_yomresponse INTO wa_yomresponse.
    WRITE:/ wa_yomresponse-eposstxt,
            wa_yomresponse-eposdesc.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any pointers will be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Nitesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2009 11:17:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-not-retrieved-through-internal-table/m-p/5804293#M1312280</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-19T11:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: Data not Retrieved through internal table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-not-retrieved-through-internal-table/m-p/5804294#M1312281</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;Its always better to use all the key fileds while using select single. Please modify the selct statemnt to check for all key fields.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT SINGLE plans FROM  pa0001 INTO wa_yomresponse-eposid
    WHERE pernr = pa_objid.  
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Please modify the select statement :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Intead of using 'into corresponding fields' declare the internal table with only those fields required...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT short stext FROM hrp1000
    INTO TABLE it_yomresponse
 WHERE objid =  wa_yomresponse-eposid.
 &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2009 11:19:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-not-retrieved-through-internal-table/m-p/5804294#M1312281</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-19T11:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: Data not Retrieved through internal table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-not-retrieved-through-internal-table/m-p/5804295#M1312282</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;Check this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

DATA: BEGIN OF it_yomresponse OCCURS 0,
      short TYPE hrp1000-short,
      stext TYPE hrp1000-stext,
      eposid TYPE pa0001-plans,
      END OF it_yomresponse.

DATA: lv_eposid TYPE pa0001-plans.

DATA: wa_yomresponse LIKE LINE OF it_yomresponse.
SELECT SINGLE plans FROM  pa0001 INTO lv_eposid
   WHERE pernr EQ '10'.  "Pa_objid is coming from Selection screen


SELECT short stext FROM hrp1000
    INTO CORRESPONDING FIELDS OF TABLE it_yomresponse
WHERE objid EQ  lv_eposid.

LOOP AT it_yomresponse.
  it_yomresponse-eposid = lv_eposid.

  MODIFY it_yomresponse TRANSPORTING eposid.

ENDLOOP.

LOOP AT it_yomresponse INTO wa_yomresponse.
  WRITE:/ wa_yomresponse-short,
          wa_yomresponse-stext,
          wa_yomresponse-eposid.
ENDLOOP.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your fields in the internal table were eposstxt and eposdesc, but in the SELECT query, you are trying to use corresponding fields (short, stext). Also you havent updated your eposid into the internal table. You gotto append them for every record you retrieve in the second select query.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2009 11:49:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-not-retrieved-through-internal-table/m-p/5804295#M1312282</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-19T11:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: Data not Retrieved through internal table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-not-retrieved-through-internal-table/m-p/5804296#M1312283</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 are comparing PLANS field value to OBJID to fetch the records from the table.&lt;/P&gt;&lt;P&gt;It may be the case that these both fields have different values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I check in my system.These two fields doesnt have one single common value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2009 12:04:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-not-retrieved-through-internal-table/m-p/5804296#M1312283</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-19T12:04:17Z</dc:date>
    </item>
  </channel>
</rss>

