<?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: Internal table conversion to read in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-conversion-to-read/m-p/6398196#M1405830</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Shambu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please give me the syntax for Range Table.I got literally confused as how to declare it as each range has&lt;/P&gt;&lt;P&gt; r_mdate-sign   = &lt;/P&gt;&lt;P&gt;  r_mdate-option =.&lt;/P&gt;&lt;P&gt;  r_mdate-low    = &lt;/P&gt;&lt;P&gt;  r_mdate-high &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please define the range for the current scenario you suggested&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Nov 2009 08:44:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-11-18T08:44:58Z</dc:date>
    <item>
      <title>Internal table conversion to read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-conversion-to-read/m-p/6398191#M1405825</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 am new to ABAP, could you please help me to convert the following Select statement into READ. &lt;/P&gt;&lt;P&gt;I searched in forum but i could nt find any thread that will be helping in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab_neword .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select  max( /bic/zpviewdt ) from /bic/azvfosp2w00 into variable_ord&lt;/P&gt;&lt;P&gt;  where&lt;/P&gt;&lt;P&gt;doc_number = itab_neword-doc_number and&lt;/P&gt;&lt;P&gt;s_ord_item = itab_neword-s_ord_item and&lt;/P&gt;&lt;P&gt;sched_line = itab_neword-sched_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; wa_pdate-DOC_NUMBER = itab_neword-DOC_NUMBER.&lt;/P&gt;&lt;P&gt; wa_pdate-S_ORD_ITEM = itab_neword-S_ORD_ITEM.&lt;/P&gt;&lt;P&gt; wa_pdate-sched_line = itab_neword-SCHED_LINE.&lt;/P&gt;&lt;P&gt; wa_pdate-pdate = variable_ord.&lt;/P&gt;&lt;P&gt; APPEND wa_pdate to it_pdate.&lt;/P&gt;&lt;P&gt; clear variable_ord.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2009 07:18:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-conversion-to-read/m-p/6398191#M1405825</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-18T07:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table conversion to read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-conversion-to-read/m-p/6398192#M1405826</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;PRE&gt;&lt;CODE&gt;

select doc_number
          s_ord_item
          sched_line
          /bic/zpviewdt  from  /bic/azvfosp2w00  into table itab_w00
          for all entries in itab_neword
          where doc_number = itab_neword-doc_number and
                      s_ord_item = itab_neword-s_ord_item and
                      sched_line = itab_neword-sched_line.
      
           
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
sort itab_w00 by doc_number ASCENDING /bic/zpviewdt DESCENDING
loop at itab_neword .

read  table itab_w00 with key doc_number = itab_neword-doc_number and
                                                 s_ord_item = itab_neword-s_ord_item and
                                                 sched_line = itab_neword-sched_line binary search.
 
wa_pdate-DOC_NUMBER = itab_neword-DOC_NUMBER.
wa_pdate-S_ORD_ITEM = itab_neword-S_ORD_ITEM.
wa_pdate-sched_line = itab_neword-SCHED_LINE.
wa_pdate-pdate = itab_w00-/bic/zpviewdt.
APPEND wa_pdate to it_pdate.
clear itab_newword, clear itab_w00.

endloop.

&lt;/CODE&gt;&lt;/PRE&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;Regards,&lt;/P&gt;&lt;P&gt;Kumar M.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Kumar M on Nov 18, 2009 8:28 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2009 07:28:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-conversion-to-read/m-p/6398192#M1405826</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-18T07:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table conversion to read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-conversion-to-read/m-p/6398193#M1405827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
if itab_neword[] is not initial.

select max( /bic/zpviewdt ) from /bic/azvfosp2w00 into table it_variable_ord
for all entries in itab_neword
where
doc_number = itab_neword-doc_number and
s_ord_item = itab_neword-s_ord_item and
sched_line = itab_neword-sched_line.

endif.

if it_variable_ord[] is not initial.

loop at itab_neword .
read table it_variable_ord with key doc_number = itab_neword-doc_number
				    s_ord_item = itab_neword-s_ord_item
				    sched_line = itab_neword-sched_line.
if sy-subrc = 0.
"move the values
endif.

endloop. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2009 07:31:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-conversion-to-read/m-p/6398193#M1405827</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-11-18T07:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table conversion to read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-conversion-to-read/m-p/6398194#M1405828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Keshu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can we use Aggregate functions in FOR ALL ENTRIES Statement, i tried its throwing error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reagrds,&lt;/P&gt;&lt;P&gt;Kumar M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2009 07:42:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-conversion-to-read/m-p/6398194#M1405828</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-18T07:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table conversion to read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-conversion-to-read/m-p/6398195#M1405829</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 follow as like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) You declatre the range table for three fields doc_number , s_ord_item and sched_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab_neword into wa.&lt;/P&gt;&lt;P&gt;  here  you filled the ranges table .&lt;/P&gt;&lt;P&gt;endloop. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;select max( /bic/zpviewdt ) from /bic/azvfosp2w00 into table it_variable_ord&lt;/P&gt;&lt;P&gt;where&lt;/P&gt;&lt;P&gt;doc_number in ranges_table1 and&lt;/P&gt;&lt;P&gt;s_ord_item  in ranges_table2 and&lt;/P&gt;&lt;P&gt;sched_line in ranges_table3 .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;sort  it_variable_ord  by doc_number  s_ord_item  sched_line&lt;/P&gt;&lt;P&gt;loop at itab_neword .&lt;/P&gt;&lt;P&gt;read table it_variable_ord with key doc_number = itab_neword-doc_number&lt;/P&gt;&lt;P&gt;				    s_ord_item = itab_neword-s_ord_item&lt;/P&gt;&lt;P&gt;				    sched_line = itab_neword-sched_line.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;"move the values&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2009 08:11:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-conversion-to-read/m-p/6398195#M1405829</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-18T08:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table conversion to read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-conversion-to-read/m-p/6398196#M1405830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Shambu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please give me the syntax for Range Table.I got literally confused as how to declare it as each range has&lt;/P&gt;&lt;P&gt; r_mdate-sign   = &lt;/P&gt;&lt;P&gt;  r_mdate-option =.&lt;/P&gt;&lt;P&gt;  r_mdate-low    = &lt;/P&gt;&lt;P&gt;  r_mdate-high &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please define the range for the current scenario you suggested&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2009 08:44:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-conversion-to-read/m-p/6398196#M1405830</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-18T08:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table conversion to read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-conversion-to-read/m-p/6398197#M1405831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no need of range statement here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@ Kumar - Im sorry no aggregate functions can be used with for all entries .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

if itab_neword[] is not initial.
 
select doc_number  s_ord_item s_ord_item /bic/zpviewdt from /bic/azvfosp2w00 into table it_variable_ord
for all entries in itab_neword
where
doc_number = itab_neword-doc_number and
s_ord_item = itab_neword-s_ord_item and
sched_line = itab_neword-sched_line.
 
endif.
 
if it_variable_ord[] is not initial.
sort gt_line by doc_number s_ord_item sched_line   ASCENDING /bic/zpviewdt DESCENDING   .

loop at itab_neword .
read table it_variable_ord with key doc_number =          itab_neword-doc_number
				    s_ord_item = itab_neword-s_ord_item
				    sched_line = itab_neword-sched_line.
if sy-subrc = 0.
"move the values
endif.
 
endloop. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Keshu Thekkillam on Nov 18, 2009 2:56 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2009 09:23:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-conversion-to-read/m-p/6398197#M1405831</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-11-18T09:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table conversion to read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-conversion-to-read/m-p/6398198#M1405832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your question is not clear.  Where is your data?  Have you selected data from /bic/azvfosp2w00 into an internal table already?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2009 09:39:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-conversion-to-read/m-p/6398198#M1405832</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2009-11-18T09:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table conversion to read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-conversion-to-read/m-p/6398199#M1405833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_neword contains data  which was fetched before.&lt;/P&gt;&lt;P&gt;i need to check  maximum date in /bic/azvfospw100  for all entries in IT_NEWORD for &lt;/P&gt;&lt;P&gt;matching  document number,sales order item and schedule line between 2 tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2009 11:17:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-conversion-to-read/m-p/6398199#M1405833</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-18T11:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table conversion to read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-conversion-to-read/m-p/6398200#M1405834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shambhu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried with ur suggestion and changes as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:r_docnumber type RANGE OF /BIC/AZVFOSDP240-DOC_NUMBER,&lt;/P&gt;&lt;P&gt;     wa_docnumber like LINE OF r_docnumber.&lt;/P&gt;&lt;P&gt;Data:r_sitem type RANGE OF /BIC/AZVFOSDP240-S_ORD_ITEM,&lt;/P&gt;&lt;P&gt;     wa_sitem LIKE LINE OF r_sitem.&lt;/P&gt;&lt;P&gt;Data:r_sline type RANGE OF /BIC/AZVFOSDP240-SCHED_LINE,&lt;/P&gt;&lt;P&gt;      wa_sline like  LINE OF r_sline.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REFRESh r_docnumber.&lt;/P&gt;&lt;P&gt;REFRESH r_sitem.&lt;/P&gt;&lt;P&gt;REFRESH r_sline.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select  DOC_NUMBER S_ORD_ITEM SCHED_LINE max( /bic/zpviewdt ) from /bic/azvfosp1w00 into table it_pdate  where&lt;/P&gt;&lt;P&gt;doc_number in r_docnumber and&lt;/P&gt;&lt;P&gt;s_ord_item in r_sitem and&lt;/P&gt;&lt;P&gt;sched_line in r_sline&lt;/P&gt;&lt;P&gt;group by DOC_NUMBER S_ORD_ITEM SCHED_LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and i feel its working fine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i just wonder how its working as R_document number ,r_sitem,r_sline are only declared and not filled up.&lt;/P&gt;&lt;P&gt;but its giving correct output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could you please explain&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;Bala&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2009 11:20:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-conversion-to-read/m-p/6398200#M1405834</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-18T11:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table conversion to read</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-conversion-to-read/m-p/6398201#M1405835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;could anyone explian please..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2009 12:14:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-conversion-to-read/m-p/6398201#M1405835</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-18T12:14:47Z</dc:date>
    </item>
  </channel>
</rss>

