<?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: performance issue..help me out in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-help-me-out/m-p/1374282#M183742</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
&amp;lt;b&amp;gt;ranges: r_lifnr for lfa1-lifnr.&amp;lt;/b&amp;gt;
step 1.
select a~ebeln
a~bedat
a~bsart
a~zsrm_pcnum
b~name1
into corresponding fields of table lt_ekko
from ekko 
where a~bedat in so_bedat
* and bedat = sy-datum
and  a~bsart in ('V1','B1' )
and a~zsrm_pcnum ne ''.

step2.
loop at it_ekko.
r_lifnr- sign = 'I'.
r_lifnr-optiomn = 'EQ'.
r_lifnr-low = it_ekko-lifnr.
append r_lifnr.
clear r_lifnr.
endloop.
sort r_lifnr.
delete adjacent duplicates from r_lifnr comparing low.
sort r_lifnr.
if r_lisnr[] is not initial.
selet lifnr name1
 from lfa1 
into corresponding fields of it_lfa1
where lifnr in r_lifnr.
endif.
after that update ur it_ekko with vendor name.
endif.
get the Vendor name /code for above selected Codes
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dont check syntax error in the above code , its just sample code Only.&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;Prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Jun 2006 05:44:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-06-13T05:44:19Z</dc:date>
    <item>
      <title>performance issue..help me out</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-help-me-out/m-p/1374275#M183735</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;when i am checking the performance issue SE30..i am seeing the database time is 94%...how to decrease the database time and increase performance issue...&lt;/P&gt;&lt;P&gt;for the below program...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES : ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : lv_record_identifier(3) type c value '100',&lt;/P&gt;&lt;P&gt;       lv_sp_id(3) type c value '100',&lt;/P&gt;&lt;P&gt;       lv_sp_name(60) type c value 'HI',&lt;/P&gt;&lt;P&gt;       lv_creation_date(8) type c,&lt;/P&gt;&lt;P&gt;       lv_creation_time(6) type c,&lt;/P&gt;&lt;P&gt;       lv_file_format(3) type c value 'BYE',&lt;/P&gt;&lt;P&gt;       lv_file_version(3) type c value '1.1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : lv_record_identifier1(3) type c value '110',&lt;/P&gt;&lt;P&gt;       lv_org_id(4) type c value '1744',&lt;/P&gt;&lt;P&gt;       lv_org_name(60) type c value 'SEE U'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF lt_ekko OCCURS 0,&lt;/P&gt;&lt;P&gt;         lv_record_identifier2(3) type c,&lt;/P&gt;&lt;P&gt;         lv_org_id1(4) type c,&lt;/P&gt;&lt;P&gt;         ebeln type ekko-ebeln,&lt;/P&gt;&lt;P&gt;         bedat type ekko-bedat,&lt;/P&gt;&lt;P&gt;         bsart type ekko-bsart,&lt;/P&gt;&lt;P&gt;         lifnr type ekko-lifnr,&lt;/P&gt;&lt;P&gt;         zsrm_pcnum type ekko-zsrm_pcnum,&lt;/P&gt;&lt;P&gt;         name1 type lfa1-name1,&lt;/P&gt;&lt;P&gt;       END OF lt_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : lv_record_identifier3(3) type c value '130',&lt;/P&gt;&lt;P&gt;       lv_org_id2(4) type c value '1744',&lt;/P&gt;&lt;P&gt;       lv_org_name1(60) type c value 'go',&lt;/P&gt;&lt;P&gt;       lv_detail_record_count(5) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : lv_record_identifier4(3) type c value '140',&lt;/P&gt;&lt;P&gt;       lv_extract_record_count(5) type c,&lt;/P&gt;&lt;P&gt;       lv_file_record_count(5) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : lv_record_count type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS : so_bedat for ekko-bedat,&lt;/P&gt;&lt;P&gt;                 so_bsart for ekko-bsart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : output_string1 type string,&lt;/P&gt;&lt;P&gt;       output_string2 type string,&lt;/P&gt;&lt;P&gt;       output_string3 type string,&lt;/P&gt;&lt;P&gt;       output_string4 type string,&lt;/P&gt;&lt;P&gt;       output_string5 type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONSTANTS : c_tab TYPE x VALUE '09'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_creation_date = sy-datum.&lt;/P&gt;&lt;P&gt;lv_creation_time = sy-uzeit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate lv_record_identifier&lt;/P&gt;&lt;P&gt;            lv_sp_id&lt;/P&gt;&lt;P&gt;            lv_sp_name&lt;/P&gt;&lt;P&gt;            lv_creation_date&lt;/P&gt;&lt;P&gt;            lv_creation_time&lt;/P&gt;&lt;P&gt;            lv_file_format&lt;/P&gt;&lt;P&gt;            lv_file_version&lt;/P&gt;&lt;P&gt;            into output_string1&lt;/P&gt;&lt;P&gt;    separated by c_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; output_string1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate lv_record_identifier1&lt;/P&gt;&lt;P&gt;            lv_org_id&lt;/P&gt;&lt;P&gt;            lv_org_name&lt;/P&gt;&lt;P&gt;            into output_string2&lt;/P&gt;&lt;P&gt;    separated by c_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; output_string2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select a~ebeln&lt;/P&gt;&lt;P&gt;       a~bedat&lt;/P&gt;&lt;P&gt;       a~bsart&lt;/P&gt;&lt;P&gt;       a~zsrm_pcnum&lt;/P&gt;&lt;P&gt;       a~lifnr&lt;/P&gt;&lt;P&gt;       b~name1&lt;/P&gt;&lt;P&gt;       into corresponding fields of table lt_ekko&lt;/P&gt;&lt;P&gt;       from ekko as a inner join lfa1 as b&lt;/P&gt;&lt;P&gt;       on a&lt;SUB&gt;lifnr = b&lt;/SUB&gt;lifnr&lt;/P&gt;&lt;P&gt;       where a~bedat in so_bedat&lt;/P&gt;&lt;P&gt;       and a~bsart in so_bsart&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     and bedat = sy-datum&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;       and ( a&lt;SUB&gt;bsart = 'V1' OR a&lt;/SUB&gt;bsart = 'B1' )&lt;/P&gt;&lt;P&gt;       and a~zsrm_pcnum is not null.&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;lv_record_count = sy-dbcnt.&lt;/P&gt;&lt;P&gt;lv_detail_record_count = lv_record_count.&lt;/P&gt;&lt;P&gt;lv_extract_record_count = lv_record_count - 2.&lt;/P&gt;&lt;P&gt;lv_file_record_count = lv_record_count + 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at lt_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear output_string3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  lt_ekko-lv_record_identifier2 = '120'.&lt;/P&gt;&lt;P&gt;  lt_ekko-lv_org_id1 = '1744'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  concatenate lt_ekko-lv_record_identifier2&lt;/P&gt;&lt;P&gt;              lt_ekko-lv_org_id1&lt;/P&gt;&lt;P&gt;              lt_ekko-ebeln&lt;/P&gt;&lt;P&gt;              lt_ekko-bedat&lt;/P&gt;&lt;P&gt;              lt_ekko-bsart&lt;/P&gt;&lt;P&gt;              lt_ekko-lifnr&lt;/P&gt;&lt;P&gt;              lt_ekko-name1&lt;/P&gt;&lt;P&gt;              into output_string3&lt;/P&gt;&lt;P&gt;      separated by c_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; output_string3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate lv_record_identifier3&lt;/P&gt;&lt;P&gt;            lv_org_id2&lt;/P&gt;&lt;P&gt;            lv_org_name1&lt;/P&gt;&lt;P&gt;            lv_detail_record_count&lt;/P&gt;&lt;P&gt;            into output_string4&lt;/P&gt;&lt;P&gt;    separated by c_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; output_string4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*concatenate for File Footer Record&lt;/P&gt;&lt;P&gt;concatenate lv_record_identifier4&lt;/P&gt;&lt;P&gt;            lv_extract_record_count&lt;/P&gt;&lt;P&gt;            lv_file_record_count&lt;/P&gt;&lt;P&gt;            into output_string5&lt;/P&gt;&lt;P&gt;   separated by c_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; output_string5.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jun 2006 21:44:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-help-me-out/m-p/1374275#M183735</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-12T21:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue..help me out</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-help-me-out/m-p/1374276#M183736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vj,  I'm looking into your issue.  Meanwhile, can you please revist your other posts and award helpful answers and mark as solved if solved completely.  Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jun 2006 21:54:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-help-me-out/m-p/1374276#M183736</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-06-12T21:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue..help me out</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-help-me-out/m-p/1374277#M183737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your select statement isn't really performing too badly in my system.   How long does it take in your system?   There is an index on EKKO which includes BEDAT,  but the first field is BSTYP.  If you can use field in your WHERE clause it might help with performance.  Also,  in your WHERE clause you are restricting with SO_BSART, but also filtering on two static values.  I would suggest using one or the other in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


where  a~BSTYP = 'F'
   and a~bedat in so_bedat
*  and a~bsart in so_bsart
*  and bedat = sy-datum
   and ( a~bsart = 'V1' OR a~bsart = 'B1' ).
   and a~zsrm_pcnum is not null.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jun 2006 22:43:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-help-me-out/m-p/1374277#M183737</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-06-12T22:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue..help me out</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-help-me-out/m-p/1374278#M183738</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;for the below code i want to insert fields for ekpo table also by using ekko-ebeln field as a selection to ekpo table.........BUT THE VALUES FOR EKPO TABLE ARE NOT DISPLAYED ???????? AND I WANT TO SELCT EKKN FIELDS ALSO BASED ON EBELN ITSELF HOW TO INSERT THE CODE .......PLEASE HELP ME........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES : ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : lv_record_identifier(3) type c value '100',&lt;/P&gt;&lt;P&gt;lv_sp_id(3) type c value '100',&lt;/P&gt;&lt;P&gt;lv_sp_name(60) type c value 'HI',&lt;/P&gt;&lt;P&gt;lv_creation_date(8) type c,&lt;/P&gt;&lt;P&gt;lv_creation_time(6) type c,&lt;/P&gt;&lt;P&gt;lv_file_format(3) type c value 'BYE',&lt;/P&gt;&lt;P&gt;lv_file_version(3) type c value '1.1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : lv_record_identifier1(3) type c value '110',&lt;/P&gt;&lt;P&gt;lv_org_id(4) type c value '1744',&lt;/P&gt;&lt;P&gt;lv_org_name(60) type c value 'SEE U'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF lt_ekko OCCURS 0,&lt;/P&gt;&lt;P&gt;lv_record_identifier2(3) type c,&lt;/P&gt;&lt;P&gt;lv_org_id1(4) type c,&lt;/P&gt;&lt;P&gt;ebeln type ekko-ebeln,&lt;/P&gt;&lt;P&gt;bedat type ekko-bedat,&lt;/P&gt;&lt;P&gt;bsart type ekko-bsart,&lt;/P&gt;&lt;P&gt;lifnr type ekko-lifnr,&lt;/P&gt;&lt;P&gt;zsrm_pcnum type ekko-zsrm_pcnum,&lt;/P&gt;&lt;P&gt;name1 type lfa1-name1,&lt;/P&gt;&lt;P&gt;END OF lt_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF lt_ekpo OCCURS 0,&lt;/P&gt;&lt;P&gt;         ebeln type ekpo-ebeln,&lt;/P&gt;&lt;P&gt;         VRTKZ type ekpo-vrtkz,&lt;/P&gt;&lt;P&gt;         AFNAM type ekpo-afnam,&lt;/P&gt;&lt;P&gt;         TXZ01 type ekpo-txz01,&lt;/P&gt;&lt;P&gt;         NETWR type ekpo-netwr,&lt;/P&gt;&lt;P&gt;         MENGE type ekpo-menge,&lt;/P&gt;&lt;P&gt;         KNTTP type ekpo-knttp,&lt;/P&gt;&lt;P&gt;         MWSKZ type ekpo-mwskz,&lt;/P&gt;&lt;P&gt;       END OF lt_ekpo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF lt_ekkn OCCURS 0,&lt;/P&gt;&lt;P&gt;         VPROZ type ekkn-vproz,&lt;/P&gt;&lt;P&gt;         SAKTO type ekkn-sakto,&lt;/P&gt;&lt;P&gt;       END OF lt_ekkn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : lv_record_identifier3(3) type c value '130',&lt;/P&gt;&lt;P&gt;lv_org_id2(4) type c value '1744',&lt;/P&gt;&lt;P&gt;lv_org_name1(60) type c value 'go',&lt;/P&gt;&lt;P&gt;lv_detail_record_count(5) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : lv_record_identifier4(3) type c value '140',&lt;/P&gt;&lt;P&gt;lv_extract_record_count(5) type c,&lt;/P&gt;&lt;P&gt;lv_file_record_count(5) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : lv_record_count type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS : so_bedat for ekko-bedat,&lt;/P&gt;&lt;P&gt;so_bsart for ekko-bsart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : output_string1 type string,&lt;/P&gt;&lt;P&gt;output_string2 type string,&lt;/P&gt;&lt;P&gt;output_string3 type string,&lt;/P&gt;&lt;P&gt;output_string4 type string,&lt;/P&gt;&lt;P&gt;output_string5 type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONSTANTS : c_tab TYPE x VALUE '09'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_creation_date = sy-datum.&lt;/P&gt;&lt;P&gt;lv_creation_time = sy-uzeit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate lv_record_identifier&lt;/P&gt;&lt;P&gt;lv_sp_id&lt;/P&gt;&lt;P&gt;lv_sp_name&lt;/P&gt;&lt;P&gt;lv_creation_date&lt;/P&gt;&lt;P&gt;lv_creation_time&lt;/P&gt;&lt;P&gt;lv_file_format&lt;/P&gt;&lt;P&gt;lv_file_version&lt;/P&gt;&lt;P&gt;into output_string1&lt;/P&gt;&lt;P&gt;separated by c_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; output_string1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate lv_record_identifier1&lt;/P&gt;&lt;P&gt;lv_org_id&lt;/P&gt;&lt;P&gt;lv_org_name&lt;/P&gt;&lt;P&gt;into output_string2&lt;/P&gt;&lt;P&gt;separated by c_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; output_string2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select a~ebeln&lt;/P&gt;&lt;P&gt;a~bedat&lt;/P&gt;&lt;P&gt;a~bsart&lt;/P&gt;&lt;P&gt;a~zsrm_pcnum&lt;/P&gt;&lt;P&gt;a~lifnr&lt;/P&gt;&lt;P&gt;b~name1&lt;/P&gt;&lt;P&gt;into corresponding fields of table lt_ekko&lt;/P&gt;&lt;P&gt;from ekko as a inner join lfa1 as b&lt;/P&gt;&lt;P&gt;on a&lt;SUB&gt;lifnr = b&lt;/SUB&gt;lifnr&lt;/P&gt;&lt;P&gt;where a~bedat in so_bedat&lt;/P&gt;&lt;P&gt;and a~bsart in so_bsart&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;and bedat = sy-datum&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;and ( a&lt;SUB&gt;bsart = 'V1' OR a&lt;/SUB&gt;bsart = 'B1' )&lt;/P&gt;&lt;P&gt;and a~zsrm_pcnum is not null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT lt_ekpo IS INITIAL.&lt;/P&gt;&lt;P&gt;select a~ebeln&lt;/P&gt;&lt;P&gt;       b~VRTKZ&lt;/P&gt;&lt;P&gt;       b~AFNAM&lt;/P&gt;&lt;P&gt;       b~TXZ01&lt;/P&gt;&lt;P&gt;       b~NETWR&lt;/P&gt;&lt;P&gt;       b~MENGE&lt;/P&gt;&lt;P&gt;       b~KNTTP&lt;/P&gt;&lt;P&gt;       b~MWSKZ&lt;/P&gt;&lt;P&gt;       into corresponding fields of table lt_ekpo&lt;/P&gt;&lt;P&gt;       from ekko as a inner join ekpo as b&lt;/P&gt;&lt;P&gt;       on a&lt;SUB&gt;ebeln eq b&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt;       where b~ebeln = lt_ekko-ebeln.&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;lv_record_count = sy-dbcnt.&lt;/P&gt;&lt;P&gt;lv_detail_record_count = lv_record_count.&lt;/P&gt;&lt;P&gt;lv_extract_record_count = lv_record_count - 2.&lt;/P&gt;&lt;P&gt;lv_file_record_count = lv_record_count + 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at lt_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear output_string3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lt_ekko-lv_record_identifier2 = '120'.&lt;/P&gt;&lt;P&gt;lt_ekko-lv_org_id1 = '1744'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate lt_ekko-lv_record_identifier2&lt;/P&gt;&lt;P&gt;              lt_ekko-lv_org_id1&lt;/P&gt;&lt;P&gt;              lt_ekko-ebeln&lt;/P&gt;&lt;P&gt;              lt_ekko-bedat&lt;/P&gt;&lt;P&gt;              lt_ekko-bsart&lt;/P&gt;&lt;P&gt;              lt_ekko-lifnr&lt;/P&gt;&lt;P&gt;              lt_ekko-name1&lt;/P&gt;&lt;P&gt;              lt_ekpo-VRTKZ&lt;/P&gt;&lt;P&gt;              lt_ekpo-AFNAM&lt;/P&gt;&lt;P&gt;              lt_ekpo-TXZ01&lt;/P&gt;&lt;P&gt;              v_netwr&lt;/P&gt;&lt;P&gt;              v_MENGE&lt;/P&gt;&lt;P&gt;              lt_ekpo-KNTTP&lt;/P&gt;&lt;P&gt;              lt_ekpo-MWSKZ&lt;/P&gt;&lt;P&gt;              into output_string3&lt;/P&gt;&lt;P&gt;      separated by c_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; output_string3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate lv_record_identifier3&lt;/P&gt;&lt;P&gt;lv_org_id2&lt;/P&gt;&lt;P&gt;lv_org_name1&lt;/P&gt;&lt;P&gt;lv_detail_record_count&lt;/P&gt;&lt;P&gt;into output_string4&lt;/P&gt;&lt;P&gt;separated by c_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; output_string4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate lv_record_identifier4&lt;/P&gt;&lt;P&gt;lv_extract_record_count&lt;/P&gt;&lt;P&gt;lv_file_record_count&lt;/P&gt;&lt;P&gt;into output_string5&lt;/P&gt;&lt;P&gt;separated by c_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; output_string5.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jun 2006 01:06:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-help-me-out/m-p/1374278#M183738</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-13T01:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue..help me out</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-help-me-out/m-p/1374279#M183739</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;This is your problem,&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select a~ebeln
a~bedat
a~bsart
a~zsrm_pcnum
a~lifnr
b~name1
into corresponding fields of table lt_ekko
from ekko as a inner join lfa1 as b
on a~lifnr = b~lifnr
where a~bedat in so_bedat
and a~bsart in so_bsart
* and bedat = sy-datum
and ( a~bsart = 'V1' OR a~bsart = 'B1' )
and a~zsrm_pcnum is not null.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead using "Inner Join",it's better using "FOR ALL ENTRIES". And "Into Corresponding Fields" replace with "Select Field1, Field2,..,..,.., Into Table ITAB".&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;For more detail step in using For All Entries, you can read this  &lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="1677161"&gt;&lt;/A&gt;. And I believe it will be very helping you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jun 2006 01:57:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-help-me-out/m-p/1374279#M183739</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-13T01:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue..help me out</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-help-me-out/m-p/1374280#M183740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just because SE30 shows a high percentage of database use doesn't automatically mean that the program is not performing well. Some programs are database intensive; some are CPU intensive. What really matters is if it takes too long.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Having said that, you have to make sure that so_bedat is not empty before running the select; otherwise, it will do a full table scan on EKKO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jun 2006 03:32:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-help-me-out/m-p/1374280#M183740</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-13T03:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue..help me out</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-help-me-out/m-p/1374281#M183741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead using "Inner Join",it's better using "&amp;lt;b&amp;gt;FOR ALL ENTRIES&amp;lt;/b&amp;gt;". &lt;/P&gt;&lt;P&gt;And donot use "Into Corresponding Fields" ... use  "Select Field1, Field2,..,..,.., &amp;lt;b&amp;gt;Into Table&amp;lt;/b&amp;gt; ITAB".&lt;/P&gt;&lt;P&gt;instead of making directly internal table first make str then use"itab type standard table of str"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;reward points if it is helpful.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jun 2006 05:06:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-help-me-out/m-p/1374281#M183741</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-13T05:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue..help me out</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-help-me-out/m-p/1374282#M183742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
&amp;lt;b&amp;gt;ranges: r_lifnr for lfa1-lifnr.&amp;lt;/b&amp;gt;
step 1.
select a~ebeln
a~bedat
a~bsart
a~zsrm_pcnum
b~name1
into corresponding fields of table lt_ekko
from ekko 
where a~bedat in so_bedat
* and bedat = sy-datum
and  a~bsart in ('V1','B1' )
and a~zsrm_pcnum ne ''.

step2.
loop at it_ekko.
r_lifnr- sign = 'I'.
r_lifnr-optiomn = 'EQ'.
r_lifnr-low = it_ekko-lifnr.
append r_lifnr.
clear r_lifnr.
endloop.
sort r_lifnr.
delete adjacent duplicates from r_lifnr comparing low.
sort r_lifnr.
if r_lisnr[] is not initial.
selet lifnr name1
 from lfa1 
into corresponding fields of it_lfa1
where lifnr in r_lifnr.
endif.
after that update ur it_ekko with vendor name.
endif.
get the Vendor name /code for above selected Codes
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dont check syntax error in the above code , its just sample code Only.&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;Prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jun 2006 05:44:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-help-me-out/m-p/1374282#M183742</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-06-13T05:44:19Z</dc:date>
    </item>
  </channel>
</rss>

