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

Performance issue with the ABAP statements

Former Member
0 Likes
418

Hello,

Please can some help me with the below statements where I am getting performance problem.

SELECT * FROM /BIC/ASALHDR0100 into Table CHDATE.


SORT CHDATE by DOC_NUMBER.
SORT SOURCE_PACKAGE by DOC_NUMBER.


LOOP AT CHDATE INTO WA_CHDATE.
   READ TABLE SOURCE_PACKAGE INTO WA_CIDATE WITH KEY DOC_NUMBER =
   WA_CHDATE-DOC_NUMBER BINARY SEARCH.

   MOVE WA_CHDATE-CREATEDON  to WA_CIDATE-CREATEDON.
 APPEND WA_CIDATE to CIDATE.

ENDLOOP.

I wrote an above code for the follwing requirement.

1. I have 2 tables from where i am getting the data

2.I have common fields in both the table names CREATEDON date. In both the tables I hve the values.

3. While accessing the 2 table and copying to thrid table i have to modify the field.

I am getting performance issues with the above statements.

Than

Edited by: Rob Burbank on Jul 29, 2010 10:06 AM

Hello,

Please can some help me with the below statements where I am getting performance problem.

SELECT * FROM /BIC/ASALHDR0100 into Table CHDATE.


SORT CHDATE by DOC_NUMBER.
SORT SOURCE_PACKAGE by DOC_NUMBER.


LOOP AT CHDATE INTO WA_CHDATE.
   READ TABLE SOURCE_PACKAGE INTO WA_CIDATE WITH KEY DOC_NUMBER =
   WA_CHDATE-DOC_NUMBER BINARY SEARCH.

   MOVE WA_CHDATE-CREATEDON  to WA_CIDATE-CREATEDON.
 APPEND WA_CIDATE to CIDATE.

ENDLOOP.

I wrote an above code for the follwing requirement.

1. I have 2 tables from where i am getting the data

2.I have common fields in both the table names CREATEDON date. In both the tables I hve the values.

3. While accessing the 2 table and copying to thrid table i have to modify the field.

I am getting performance issues with the above statements.

Than

Edited by: Rob Burbank on Jul 29, 2010 10:06 AM

2 REPLIES 2
Read only

Former Member
0 Likes
383

Hello,

try a select like the following one instead of you code.


SELECT field field2 ...
INTO TABLE it_table
FROM table1 AS T1 INNER JOIN table2 AS T2
ON t1-doc_number = t2-doc_number

Read only

0 Likes
383

You can go for parallel cursor method.

https://wiki.sdn.sap.com/wiki/display/Snippets/ABAPCodeforParallelCursor-Loop+Processing

Regards,

Nikhil