Skip to Content
0
Former Member
Jun 12, 2006 at 09:44 PM

performance issue..help me out

21 Views

Hi all,

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...

for the below program...

TABLES : ekko.

DATA : lv_record_identifier(3) type c value '100',

lv_sp_id(3) type c value '100',

lv_sp_name(60) type c value 'HI',

lv_creation_date(8) type c,

lv_creation_time(6) type c,

lv_file_format(3) type c value 'BYE',

lv_file_version(3) type c value '1.1'.

DATA : lv_record_identifier1(3) type c value '110',

lv_org_id(4) type c value '1744',

lv_org_name(60) type c value 'SEE U'.

DATA : BEGIN OF lt_ekko OCCURS 0,

lv_record_identifier2(3) type c,

lv_org_id1(4) type c,

ebeln type ekko-ebeln,

bedat type ekko-bedat,

bsart type ekko-bsart,

lifnr type ekko-lifnr,

zsrm_pcnum type ekko-zsrm_pcnum,

name1 type lfa1-name1,

END OF lt_ekko.

DATA : lv_record_identifier3(3) type c value '130',

lv_org_id2(4) type c value '1744',

lv_org_name1(60) type c value 'go',

lv_detail_record_count(5) type c.

DATA : lv_record_identifier4(3) type c value '140',

lv_extract_record_count(5) type c,

lv_file_record_count(5) type c.

DATA : lv_record_count type i.

SELECT-OPTIONS : so_bedat for ekko-bedat,

so_bsart for ekko-bsart.

DATA : output_string1 type string,

output_string2 type string,

output_string3 type string,

output_string4 type string,

output_string5 type string.

CONSTANTS : c_tab TYPE x VALUE '09'.

lv_creation_date = sy-datum.

lv_creation_time = sy-uzeit.

concatenate lv_record_identifier

lv_sp_id

lv_sp_name

lv_creation_date

lv_creation_time

lv_file_format

lv_file_version

into output_string1

separated by c_tab.

write :/ output_string1.

concatenate lv_record_identifier1

lv_org_id

lv_org_name

into output_string2

separated by c_tab.

write :/ output_string2.

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 alifnr = blifnr

where a~bedat in so_bedat

and a~bsart in so_bsart

  • and bedat = sy-datum

and ( absart = 'V1' OR absart = 'B1' )

and a~zsrm_pcnum is not null.

lv_record_count = sy-dbcnt.

lv_detail_record_count = lv_record_count.

lv_extract_record_count = lv_record_count - 2.

lv_file_record_count = lv_record_count + 4.

loop at lt_ekko.

clear output_string3.

lt_ekko-lv_record_identifier2 = '120'.

lt_ekko-lv_org_id1 = '1744'.

concatenate lt_ekko-lv_record_identifier2

lt_ekko-lv_org_id1

lt_ekko-ebeln

lt_ekko-bedat

lt_ekko-bsart

lt_ekko-lifnr

lt_ekko-name1

into output_string3

separated by c_tab.

write :/ output_string3.

endloop.

concatenate lv_record_identifier3

lv_org_id2

lv_org_name1

lv_detail_record_count

into output_string4

separated by c_tab.

write :/ output_string4.

*concatenate for File Footer Record

concatenate lv_record_identifier4

lv_extract_record_count

lv_file_record_count

into output_string5

separated by c_tab.

write :/ output_string5.