<?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: help in internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-internal-table/m-p/921039#M58950</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;for the view I have borrowed the data element from the tables(jhamot) i have not created any new data elements and data type.Also the view has the data stored in them. So they have the same data type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;santhosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 May 2005 19:26:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-05-31T19:26:46Z</dc:date>
    <item>
      <title>help in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-internal-table/m-p/921032#M58943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi folks,&lt;/P&gt;&lt;P&gt;anybody who could help me in this aspect...&lt;/P&gt;&lt;P&gt;types: begin of structbdata,&lt;/P&gt;&lt;P&gt;         bdate  type  jhtfp-fbuda,&lt;/P&gt;&lt;P&gt;        predition type jhtfp-vavtyp,&lt;/P&gt;&lt;P&gt;        adnumber type jhtfp-aubel,&lt;/P&gt;&lt;P&gt;        adsize type jhamot-breite_s,&lt;/P&gt;&lt;P&gt;         bunits type jhamot-HOEHE_S,&lt;/P&gt;&lt;P&gt;   end of structbdata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data bdata type standard table of structbdata with key adnumber initial&lt;/P&gt;&lt;P&gt;size 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select fbuda vavtyp aubel breite_ieh hoehe_i_eh from zzjhtfp INNER JOIN&lt;/P&gt;&lt;P&gt;jhamot ON zzjhtfp&lt;SUB&gt;aubel = jhamot&lt;/SUB&gt;avm_nr INTO BDATA WHERE zzjhtfp~kunnr&lt;/P&gt;&lt;P&gt;= p_custid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have declared the internal table type -structbdata and declare internal table bdata to read the data from the query below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;error i am getting is internal table cannot be treated as a work area.&lt;/P&gt;&lt;P&gt;hence forth the results of the query is not getting stored in the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance guys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;santhosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2005 15:46:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-internal-table/m-p/921032#M58943</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-31T15:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: help in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-internal-table/m-p/921033#M58944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you should write into table BDATA and not into BDATA .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2005 16:00:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-internal-table/m-p/921033#M58944</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-31T16:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: help in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-internal-table/m-p/921034#M58945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Santhosh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The fields you are selecting seem to have no correspondence with the fields in the internal table.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The internal table should match the fields in your select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So for a preference, your internal table should have the same names, and MUST have the same field definitions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I would create your internal table with fields like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fbuda&lt;/P&gt;&lt;P&gt;vavtyp&lt;/P&gt;&lt;P&gt;aubel &lt;/P&gt;&lt;P&gt;breite_ieh &lt;/P&gt;&lt;P&gt;hoehe_i_eh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can use SELECT ... INTO TABLE BDATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to have a different structure and field names in your internal table then use field alias's.  This would be like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT fbuda as bdate ... INTO CORRESPONDING FIELDS OF TABLE BDATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2005 16:08:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-internal-table/m-p/921034#M58945</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-31T16:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: help in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-internal-table/m-p/921035#M58946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Brad, for your input. I did try that and the query is correct as I fixed the bug - it is compling with no syntax errors -the only thing is not executing. I did run the program in the debugg mode and when it comes to the query the data from the view(zzjhtfp - I am reading the data from the view and not from the table -Is that anything to do with???) is not stored in the internal table it is totally blank. otherwise  I did fix the query in terms of syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your input. If you have any leads that would be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Santhosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2005 18:28:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-internal-table/m-p/921035#M58946</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-31T18:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: help in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-internal-table/m-p/921036#M58947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The question is how did you fix it?&lt;/P&gt;&lt;P&gt;Do you use into corresponding now? And if so did you adjust the field names that structure and table will match? &lt;/P&gt;&lt;P&gt;What is sy-subrc right after the select? sy-subrc = 4 would indicate that the where condition could not retrieve a record. Do you have an empty internal table or are there empty lines - this would mean that the structure and table still do not match. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2005 18:48:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-internal-table/m-p/921036#M58947</guid>
      <dc:creator>ChristianFi</dc:creator>
      <dc:date>2005-05-31T18:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: help in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-internal-table/m-p/921037#M58948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you check that there is data getting selected in your view. SE16 --&amp;gt; view Name??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Further join is on zzjhtfp&lt;SUB&gt;aubel = jhamot&lt;/SUB&gt;avm_nr &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;both the fields may not have the same type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if one contains 1234 and other '0001234' then need to check if that will work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2005 18:56:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-internal-table/m-p/921037#M58948</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-31T18:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: help in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-internal-table/m-p/921038#M58949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks alot.&lt;/P&gt;&lt;P&gt; prefixed the term 'table'BDATA into the query. But I do not understand that how the structure and the table fields do not match because I have created the internal table declaring the type structure, in the query I have mentioned the field names in the same order as the fields declared in the view.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The internal table has empty lines  and how does the structure and the table not matching. I do not understand that part.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your input would help....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;santhosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2005 19:19:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-internal-table/m-p/921038#M58949</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-31T19:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: help in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-internal-table/m-p/921039#M58950</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;for the view I have borrowed the data element from the tables(jhamot) i have not created any new data elements and data type.Also the view has the data stored in them. So they have the same data type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;santhosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2005 19:26:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-internal-table/m-p/921039#M58950</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-31T19:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: help in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-internal-table/m-p/921040#M58951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Santhosh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are selecting the entries from the database table into your internal table in one single shot, then you have to use the INTO TABLE option as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT fbuda vavtyp aubel breite_ieh hoehe_i_eh 
  FROM zzjhtfp INNER JOIN jhamot ON zzjhtfp~aubel = jhamot~avm_nr 
  INTO table bdata
 WHERE zzjhtfp~kunnr = p_custid.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if you are not doing it this way, but you are in a SELECT, ENDSELECT loop, then you do need a workarea. You need to define your internal table WITH HEADER LINE or define another workarea like your internal table type and then move it to your internal table as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: s_bdata TYPE structbdata.

SELECT fbuda vavtyp aubel breite_ieh hoehe_i_eh 
  FROM zzjhtfp INNER JOIN jhamot ON zzjhtfp~aubel = jhamot~avm_nr 
  INTO s_bdata
 WHERE zzjhtfp~kunnr = p_custid.
*-- Do your processing, validations here
APPEND s_bdata to bdata.
CLEAR s_bdata.

ENDSELECT.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2005 20:59:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-internal-table/m-p/921040#M58951</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-31T20:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: help in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-internal-table/m-p/921041#M58952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks srinivas. I have already included the header line to my code. the data is there in the view but it is not read into the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is my updated code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of structbdata,&lt;/P&gt;&lt;P&gt;        fbuda type  jhtfp-fbuda,&lt;/P&gt;&lt;P&gt;        vavtyp type jhtfp-vavtyp,&lt;/P&gt;&lt;P&gt;        aubel type jhtfp-aubel,&lt;/P&gt;&lt;P&gt;        breite_s type jhamot-breite_s,&lt;/P&gt;&lt;P&gt;         hoehe_s type jhamot-HOEHE_S,&lt;/P&gt;&lt;P&gt;   end of structbdata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data bdata type standard table of structbdata with key aubel with&lt;/P&gt;&lt;P&gt;header line initial size 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select fbuda vavtyp aubel breite_s HOEHE_S from zzjhtfp INNER JOIN jhamot ON zzjhtfp&lt;SUB&gt;aubel = jhamot&lt;/SUB&gt;avm_nr INTO table BDATA WHERE zzjhtfp~kunnr = p_custid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your help is really appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;santhosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2005 21:22:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-internal-table/m-p/921041#M58952</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-05-31T21:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: help in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-internal-table/m-p/921042#M58953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Santhosh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is just a case of data not coming into your internal table, then it is certainly a case of data's internal/external representation. Check if your AUBEL and AVM_NR store the data internally in the exact same way(i.e., leading zeros etc). Also, check if your p_custid and KUNNR are also similar. Remember, SE16 does some of the conversions for you, if the fields have conversion exits associated with them. Your program may not be doing that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best way to test it out is, take out the join and do the individual selects. See where it fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2005 00:04:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-internal-table/m-p/921042#M58953</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-06-01T00:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: help in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-internal-table/m-p/921043#M58954</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 fix the error, I suggest you to do the following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. write the field names in select as zzjhtfp~aubel&lt;/P&gt;&lt;P&gt;instead of aubel.similarly for other fields with that &amp;lt;b&amp;gt;~&amp;lt;/b&amp;gt; symbol.&lt;/P&gt;&lt;P&gt;2. Remove &amp;lt;b&amp;gt;where condition&amp;lt;/b&amp;gt; and check.If data is coming,then problem is in p_custid.&lt;/P&gt;&lt;P&gt;select fbuda vavtyp aubel breite_s HOEHE_S from zzjhtfp INNER JOIN jhamot ON zzjhtfp&lt;SUB&gt;aubel = jhamot&lt;/SUB&gt;avm_nr INTO table BDATA .&lt;/P&gt;&lt;P&gt;3. Remove the &amp;lt;b&amp;gt;on condition&amp;lt;/b&amp;gt;.If data is coming,then problem in join.&lt;/P&gt;&lt;P&gt;select fbuda vavtyp aubel breite_s HOEHE_S from zzjhtfp INNER JOIN jhamot INTO table BDATA WHERE zzjhtfp~kunnr = p_custid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this fix the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;J.Jayanthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2005 04:00:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-internal-table/m-p/921043#M58954</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2005-06-01T04:00:40Z</dc:date>
    </item>
  </channel>
</rss>

