<?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: selecting values into same internal table from 2 differrnt select statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-values-into-same-internal-table-from-2-differrnt-select-statement/m-p/4999197#M1164262</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; I think the below code will help u, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select augbl belnr
into table lt_bsad
from bsad
where belnr = I_vbeln and
kunnr = l_kunnr and
burks = l_bukrs and
blart = 'xy'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 10:56 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Jan 2009 13:46:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-01-08T13:46:30Z</dc:date>
    <item>
      <title>selecting values into same internal table from 2 differrnt select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-values-into-same-internal-table-from-2-differrnt-select-statement/m-p/4999191#M1164256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 types : 
   begin of ty_bsad,
     augbl type bsad-augbl,
  end of ty_bsad.

 begin of ty_bsad1,
     augbl type bsad-augbl,
     belnr type bsad-belnr,
  end of ty_bsad1.

  select augbl 
           from bsad
          into table it_bsad
          where belnr = l_vbeln and
                   bukrs = l_bukrs and
                  kunnr  = l_kunrg.
       if sy-subrc = 0 .

           select belnr
                     into table lt_bsad1
                     from bsad
                    for all entries in lt_bsad
                   where augbl = lt_bsad-augbl and
                            kunnr = l_kunnr  and
                            burks  = l_bukrs and
                            blart   = 'xy'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; now my requiremnt is i need to get both the augbl and belnr in single internal table but not in differnrnt internal table.&lt;/P&gt;&lt;P&gt;how can i get it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Priyanka.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 10:53 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2009 13:25:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-values-into-same-internal-table-from-2-differrnt-select-statement/m-p/4999191#M1164256</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-08T13:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: selecting values into same internal table from 2 differrnt select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-values-into-same-internal-table-from-2-differrnt-select-statement/m-p/4999192#M1164257</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;create one more final internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move each one into final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;vinod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2009 13:29:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-values-into-same-internal-table-from-2-differrnt-select-statement/m-p/4999192#M1164257</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-08T13:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: selecting values into same internal table from 2 differrnt select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-values-into-same-internal-table-from-2-differrnt-select-statement/m-p/4999193#M1164258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select augbl 
from bsad
into table it_bsad
where belnr = l_vbeln and
bukrs = l_bukrs and
kunnr = l_kunrg and blart = 'xy'.
if sy-subrc = 0 .
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code will work..you dont need two internal tables...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vasavi kotha&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 10:55 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2009 13:36:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-values-into-same-internal-table-from-2-differrnt-select-statement/m-p/4999193#M1164258</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-08T13:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: selecting values into same internal table from 2 differrnt select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-values-into-same-internal-table-from-2-differrnt-select-statement/m-p/4999194#M1164259</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;Use APPENDING CORRESPONDING FIELDS OF TABLE  lt_bsad in the second select query.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2009 13:42:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-values-into-same-internal-table-from-2-differrnt-select-statement/m-p/4999194#M1164259</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-08T13:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: selecting values into same internal table from 2 differrnt select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-values-into-same-internal-table-from-2-differrnt-select-statement/m-p/4999195#M1164260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; try with this code. it's just an example. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

types : begin of rec_line,
         augbl type bsad-augbl,
         augbl2 type bsad-augbl,
         belnr type bsad-belnr,
        end of rec_line.
        
data : wa_line type rec_line,
       itab type standard table of rec_line.

select * from bsad where belnr = l_vbeln and bukrs = l_bukrs and
 kunnr = l_kunrg.
  clear wa_line.
  wa_line-augbl = bsad-augbl.
  select * from *bsad where augbl = bsad-augbl and kunnr = l_kunnr and
   bukrs = l_bukrs and blart = 'xy'.
   wa_line-augbl2 = *bsad-augbl.
   wa_line-belnr =  *bsad-belnr.
   append wa_line to itab.
  endselect.
 endselect. 

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want you can optiomize it selecting only the right colums from the SELECT statement.&lt;/P&gt;&lt;P&gt;Bye&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2009 13:42:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-values-into-same-internal-table-from-2-differrnt-select-statement/m-p/4999195#M1164260</guid>
      <dc:creator>andrea_galluccio2</dc:creator>
      <dc:date>2009-01-08T13:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: selecting values into same internal table from 2 differrnt select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-values-into-same-internal-table-from-2-differrnt-select-statement/m-p/4999196#M1164261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
data: begin of it_bsad occur 0,
           augbl type bsad-augbl,
           belnr type bsad-belnr,
        end of it_bsdad.

select augbl belnr 
   from bsad
   into table it_bsad
   where belnr = l_vbeln and
            kunnr = l_kunnr and
            burks = l_bukrs and
            blart = 'xy'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2009 13:44:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-values-into-same-internal-table-from-2-differrnt-select-statement/m-p/4999196#M1164261</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-01-08T13:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: selecting values into same internal table from 2 differrnt select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-values-into-same-internal-table-from-2-differrnt-select-statement/m-p/4999197#M1164262</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; I think the below code will help u, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select augbl belnr
into table lt_bsad
from bsad
where belnr = I_vbeln and
kunnr = l_kunnr and
burks = l_bukrs and
blart = 'xy'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 10:56 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2009 13:46:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-values-into-same-internal-table-from-2-differrnt-select-statement/m-p/4999197#M1164262</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-08T13:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: selecting values into same internal table from 2 differrnt select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-values-into-same-internal-table-from-2-differrnt-select-statement/m-p/4999198#M1164263</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;No Need to create two internal table because your feyching values from same table BSAD with diffrent where condition.try this code.it s work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select augbl 
from bsad
into table it_bsad
where belnr = l_vbeln and
bukrs = l_bukrs and
kunnr = l_kunrg and
blart = 'xy'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else Refer this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
LOOP AT it_bill_data INTO wa_bill_data.
    MOVE-CORRESPONDING wa_bill_data TO wa_final_data.

    READ TABLE it_material_data INTO wa_material_data
                                WITH KEY matnr = wa_bill_data-matnr.
    IF sy-subrc = 0.
      wa_final_data-meins_mara = wa_material_data-meins.
    ENDIF.
    APPEND wa_final_data TO it_final_data.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Jay on Jan 8, 2009 2:53 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Jay on Jan 8, 2009 2:57 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 10:56 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2009 13:52:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-values-into-same-internal-table-from-2-differrnt-select-statement/m-p/4999198#M1164263</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-08T13:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: selecting values into same internal table from 2 differrnt select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-values-into-same-internal-table-from-2-differrnt-select-statement/m-p/4999199#M1164264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi priyanka ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write below code it will work &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
move it_bsad []  to  it_bsad1 []
select belnr
from bsad
appending table lt_bsad
for all entries in lt_bsad1
where augbl = lt_bsad1-augbl and
kunnr = l_kunnr and
burks = l_bukrs and
blart = 'xy'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this .....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards , &lt;/P&gt;&lt;P&gt;prem Chander&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Premchander Arumugam on Jan 8, 2009 7:37 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 10:56 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2009 14:07:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selecting-values-into-same-internal-table-from-2-differrnt-select-statement/m-p/4999199#M1164264</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-08T14:07:29Z</dc:date>
    </item>
  </channel>
</rss>

