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

ABAP Performance Tunning

Former Member
0 Likes
1,052

Hi Guru's,

how to optimize the following select query

SELECT A~AUFNR A~AUART A~OBJNR B~EQUNR
  FROM AUFK AS A
  INNER JOIN AFIH AS B
  ON B~AUFNR = A~AUFNR
  INNER JOIN IHPA AS C
  ON C~OBJNR = A~OBJNR
  INNER JOIN JCDS AS D
  ON D~OBJNR = C~OBJNR
  INTO CORRESPONDING FIELDS OF TABLE LT_ORDER
  WHERE
stat  = lc_i0009 OR stat  = lc_i0045.

Thanks & Regards,

Meenachi.R

Hi Guru's,

how to optimize the following select query

SELECT A~AUFNR A~AUART A~OBJNR B~EQUNR
  FROM AUFK AS A
  INNER JOIN AFIH AS B
  ON B~AUFNR = A~AUFNR
  INNER JOIN IHPA AS C
  ON C~OBJNR = A~OBJNR
  INNER JOIN JCDS AS D
  ON D~OBJNR = C~OBJNR
  INTO CORRESPONDING FIELDS OF TABLE LT_ORDER
  WHERE
stat  = lc_i0009 OR stat  = lc_i0045.

Thanks & Regards,

Meenachi.R

6 REPLIES 6
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
890

Hi

Why are you doing select on JCDS you can have try to use JEST if it suits your requirement. JEST has an index created on stat field..Any reason for choose JCDS.?

thanks

Nabheet

Read only

Former Member
0 Likes
890

This message was moderated.

Read only

Former Member
0 Likes
890

This message was moderated.

Read only

former_member219762
Contributor
0 Likes
890

Hi Meenachi,

Define view in dictionary and use it.

Regards,

Sreenivas.

Read only

former_member202771
Contributor
0 Likes
890

This message was moderated.

Read only

Former Member
0 Likes
890

Hi,

I  I guess for better understanding you can split the select queries instead of joins in a one select. If you split the queries and may be database hits may be reduced.

-> get the OBJNR inner join of two table JEST and IHPA into table it_obj where Status in ( I0009,I00045)

* No relavent secondary index find to read Order Numbers(AUFNR) 

-> Get the AUFNR , AFURT from AUFK table it_aufk for entries it_OBJ where OBJNR = IT_OBJ-OBJNR

-> GET the AUFNR EQUNR from AFIH into table it_equnr where AUFNR = IT_AUFK-AUFNR.

Thanks,

Kiran