Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Performace tunning regarding custum Program

Former Member
0 Likes
482

Hi all,

How can we replaced the the below statements to improve the performance

-


DATA : BEGIN OF i_clint OCCURS 0,

clint LIKE klah-clint,

END OF i_clint.

data:i_kssk LIKE i_clint OCCURS 0.

-


READ TABLE idoc_data WITH KEY

segnam = c_e1lfa1m. struct_e1lfa1m = idoc_data-sdata.

ws_lifnr = struct_e1lfa1m-lifnr.

*****************************************************

READ TABLE idoc_data WITH KEY

segnam = c_e1lfb1m.

IF sy-subrc EQ 0.

struct_e1lfb1m = idoc_data-sdata.

IF struct_e1lfb1m-zwels NE '/' OR "Payment method

struct_e1lfb1m-hbkid NE '/'. "House bank

*****************************************************************

Please help me on this.

Hi all,

How can we replaced the the below statements to improve the performance

-


DATA : BEGIN OF i_clint OCCURS 0,

clint LIKE klah-clint,

END OF i_clint.

data:i_kssk LIKE i_clint OCCURS 0.

-


READ TABLE idoc_data WITH KEY

segnam = c_e1lfa1m. struct_e1lfa1m = idoc_data-sdata.

ws_lifnr = struct_e1lfa1m-lifnr.

*****************************************************

READ TABLE idoc_data WITH KEY

segnam = c_e1lfb1m.

IF sy-subrc EQ 0.

struct_e1lfb1m = idoc_data-sdata.

IF struct_e1lfb1m-zwels NE '/' OR "Payment method

struct_e1lfb1m-hbkid NE '/'. "House bank

*****************************************************************

Please help me on this.

2 REPLIES 2
Read only

Former Member
0 Likes
465

Hi,

As SAP recommends, do not create/declare internal tables with header line. Create an explicit work area for internal tables and read into the work area or use field symbols (ASSIGNING).

Also, when performing READ command on internal table, use BINARY SEARCH. However, precaution, always sort the internal table with the fields used for read in WITH KEY clause.

Cheers.

Read only

Former Member
0 Likes
465

1. Try using Internal tables without header line.

2. For work areas, define a separate one or use field symbols.

3. Try to use READ TABLE... BINARY SEARCH.

Hope this helps.

Thanks,

Balaji