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 - Update response time

Former Member
0 Likes
1,584

Hi,

I am trying to get the equipment data and I have to link with asset. The only way I could find is through m_equia view. I select the equipment number from m_equia passing the key as asset no and from there i go to equi and get the other data.

But when i am trying to select from m_equia the database time is more. So, can some one suggest me a better option for this other than the m_equia to get the equipment details with asset as the key. I also have cost center details with me.

Thanks,

11 REPLIES 11
Read only

Former Member
0 Likes
1,493

u need to create an index on the table..so that database access will be fast.

Read only

0 Likes
1,493

I am pushing everything to Ztable. Do you mean I have to create an index on Ztable ? Can you explain more in detail.

Thanks in advance.

Message was edited by:

lakshmi

Read only

Former Member
0 Likes
1,493

Hi,

Try using FM 'AAPM_AA_READ_EQUIS_OF_ASSET'. You pass the Company code, Asset # & Sub Asset #. In return, you'll get the equipments linked to it.

Regards

Shantharam

Read only

0 Likes
1,493

I'm sure is referring to putting an index on m_equia, but this is a view of multiple tables, so you would have to decide which tables to index on. First lets examine your select statement. Can you please post the select statement for m_equia,.

Regards,

Rich Heilman

Read only

0 Likes
1,493

Hi,

Please find the select on m_equia and further select on it.

    • Get asset related data from the view

  • IF NOT i_asset[] IS INITIAL.

  • SELECT anlnr

  • equnr

  • FROM m_equia

  • INTO TABLE i_asst_equi

  • FOR ALL ENTRIES IN i_asset

  • WHERE anlnr = i_asset-anln1 AND

  • anlun = i_asset-anln2 AND

  • bukrs = i_asset-bukrs.

  • IF sy-subrc = 0.

  • SORT i_asst_equi BY equnr.

  • ENDIF.

  • ENDIF.

*

    • Get Equipment related data

  • IF NOT i_asst_equi[] IS INITIAL.

  • SELECT equi~equnr

  • herst

  • typbz

  • eqart

  • mapar

  • serge

  • iwerk

  • FROM equi

  • INNER JOIN equz

  • ON equiequnr = equzequnr

  • INTO TABLE i_equipment

  • FOR ALL ENTRIES IN i_asst_equi

  • WHERE equi~equnr = i_asst_equi-equnr.

  • SORT i_equipment BY equnr.

  • ENDIF.

Thanks.

Message was edited by:

lakshmi

Read only

0 Likes
1,493

First lets try sorting the table.

** Get asset related data from the view
 IF NOT i_asset[] IS INITIAL.

<b>

sort i_asset ascending by anln1 anln2 bukrs

.</b>

 SELECT anlnr equnr
           FROM m_equia
               INTO TABLE i_asst_equi
                       FOR ALL ENTRIES IN i_asset
                                WHERE anlnr = i_asset-anln1 AND
                                             anlun = i_asset-anln2 AND
                                             bukrs = i_asset-bukrs.
     IF sy-subrc = 0.
      SORT i_asst_equi BY equnr.
     ENDIF.
 ENDIF.

Regards,

Rich Heilman

Read only

0 Likes
1,493

Hi Rich,

This is how i am using the select now....do you think i should sort ascending ?

  • Select all the Asset/Kiosk Nos.

SELECT bukrs

anln1

anln2

anlkl

erdat

aedat

xloev

xspeb

ktogr

zujhr

zuper

aktiv

ivdat

txt50

FROM anla

INTO TABLE i_asset

where ANLKL = '00002000'.

IF sy-subrc = 0.

SORT i_asset BY anln1.

ENDIF.

Thanks.

Message was edited by:

lakshmi

Read only

0 Likes
1,493

Try selecting ILOA-ILOAN using your asset number (secondary index).

Then SELECT EQUUZ-EQUNR using ILOAN (also secondary index).

You can get whatever else you need using asset and equipment numbers.

Rob

Read only

0 Likes
1,493

Can i do an inner join on ILOA & EQUZ by any chance (Also how do i know if its a secondary index or ..) ?

Message was edited by:

lakshmi

Read only

0 Likes
1,493

M_EQUIA includes a join of ILOA and EQUUZ, so yes you can do your own join.

Click on the "Indexes" button in the data dictionary to see the secondary indexes of any table.

rob

Read only

ferry_lianto
Active Contributor
0 Likes
1,493

Hi,

Can i do an inner join on ILOA & EQUZ?

Please try this.

SELECT ....

INTO ....

FROM ILOA as a inner join EQUZ as b on bILOAN = aILOAN

WHERE ...

Regards,

Ferry Lianto