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

question on performance issue with AFRU table

Former Member
0 Likes
5,589

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

1 ACCEPTED SOLUTION
Read only

SimoneMilesi
Active Contributor
3,208

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 🙂

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 🙂

9 REPLIES 9
Read only

SimoneMilesi
Active Contributor
3,209

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 🙂

Read only

0 Likes
3,208

Thanks for your answer .. it worked..

🙂

Read only

former_member196331
Active Contributor
0 Likes
3,208

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.

Read only

0 Likes
2,769

Hi Ramya,

can you please tell me how you get to this. Means how we can view diff. tablein which the field exist , how to view this in the system.

Read only

Former Member
0 Likes
3,208

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

Read only

0 Likes
3,208

Thanks for ur replies

Read only

RaymondGiuseppi
Active Contributor
0 Likes
3,208

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


Read only

0 Likes
3,208

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

Read only

0 Likes
3,208

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