Skip to Content
0

question on performance issue with AFRU table

Oct 19, 2016 at 09:08 AM

187

avatar image

Hi Experts,

I need to get the posting date ( BUDAT) from AFRU table, based on production order nos (AUFNR) field . If I fetch data from AFRU table based on AUFNR ( prod order nos) its taking a lot of time as the we are fetching data based on non key fields.

I know we can use index , but is there any other way that we can get RUECK (completion confirmation number from any table ) and then get the data from AFRU table based on RUECK and AUFNR .

please suggest.

Thanks,

RG

10 |10000 characters needed characters left characters exceeded

Need Some clarification.You said.

its taking a lot of time as the we are fetching data based on non key fields.

A row contains Non key fields. and Key fields also.

Instead of using non key fields. use key fields.

Example:

key1 key2 Nonkey

1 a s1

2 b s12

3 c s13

May be you written the query like

select from table where nonkey field eq 's12'

I am suggesting that

select from table where key field eq '2'

Hope you understood.If you use key field also some time data is very slow.

0
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Simone Milesi Oct 19, 2016 at 09:17 AM
1

Hi Ramya,

As general rule, you can check where the data element is used and investigate a bit the DB tables

To find any possible link.

Sometimes is easy and intuitive, sometimes not so easy but it's always the best way.

Other option: check if your DB table is used in any view :)


1.png (48.5 kB)
2.png (26.6 kB)
Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thanks for your answer .. it worked..

:-)

0
avatar image
Former Member Oct 19, 2016 at 09:29 AM
0

Hi RG,

You can take the field RUECK from AFKO along with AUFNR. Also, you can try FM "CO_OCM_FA_AFRU_DATA_GET".

Regards

Raj

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thanks for ur replies

0
Raymond Giuseppi
Oct 19, 2016 at 09:58 AM
0

Did you try a JOIN like

SELECT * INTO CORRESPONDING FIELDS OF TABLE itab
FROM afko
JOIN afvc ON afvc~aufpl EQ afko~aufpl JOIN afru ON afru~rueck EQ afvc~rueck AND afru~rmzhl EQ afvc~rmzhl WHERE afko~aufnr IN range_aufnr.

Regards,
Raymond


Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi raymond,

Thanks for your reply, I think basically we are fetching data from AFKO table but we need to fetch data from AFRU table is what I needed.

Thanks,

rg

0

If you want to get the feeling of reading AFRU, try this syntax:

SELECT * INTO CORRESPONDING FIELDS OF TABLE itab
  FROM afru
  WHERE EXISTS (
    SELECT *
    FROM  afvc
    JOIN  afko
      ON  afko~aufpl EQ afvc~aufpl
    WHERE afvc~rueck EQ afru~rueck
      AND afvc~rmzhl EQ afru~rmzhl
      AND afko~aufnr IN range_aufnr ).

Regards,
Raymond

0