SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Performance: Customer developments in PP/PM(SAP Note 187906)



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> PP
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1636

PostPosted: Sat Apr 12, 2008 11:22 am    Post subject: Performance: Customer developments in PP/PM(SAP Note 187906) Reply with quote

Performance: Customer developments in PP/PM (SAP Note 187906)

Symptom
Customer programs and program enhancements ("user exits") have a bad performance. The bad performance can be seen when accessing the following SAP logistic tables:
AFRU, AFKO, AUFK, CAUFV, RESB

Additional key words
Cause and prerequisites
The R/3 System does not contain secondary indexes to the most important PP / PM flow tables.
To access them effectively you need a basic knowledge of the SAP data model. This notes contains information on the most important errors and provides alternatives.

However, note the following WARNINGS:
- Before you use the suggested alternatives check your program for functional correctness.

Pay attention to the following NOTES:
In the following examples, you often find accesses to several
e.g..:
SELECT aufnr FROM resb WHERE rsnum = <afko-rsnum>
SELECT ..... FROM afko WHERE aufnr = <resb-aufnr>
To increase the performance you should define a selection view on the corresponding tables (here: resb and afko) to combine the accesses to both table into one.

Solution
1. Access to order confirmation (table AFRU)
a) Search for confirmation of orders (field AFRU-AUFNR):
Incorrect:
SELECT FROM afru WHERE aufnr = ...
Correct:
SELECT aufpl FROM afko WHERE aufnr = <afru-aufnr>
SELECT rueck FROM afvc WHERE aufpl = <afko-aufpl>
SELECT ..... FROM afru WHERE rueck = <afvc-rueck>
Caution:
From table AFVC, you receive one value per operation for "RUECK".
2. Access to PPS orders (tables AFKO, CAUFV, AUFK)
a) Find orders for reservation (field AFKO-RSNUM; CAUFV-RSNUM):
Incorrect:
SELECT FROM afko WHERE rsnum = ...
Correct:
SELECT aufnr FROM resb WHERE rsnum = <afko-rsnum>
SELECT ..... FROM afko WHERE aufnr = <resb-aufnr>
Note:
The same access path applies to CAUFV and AUFK.
Search for sales orders (tables VBAP-VBELN, VBAP-POSNR; VBFA-VBELN, VBFA-POSNN; and so on.)
Incorrect:
SELECT FROM AUFK WHERE KDAUF = <VBAP-VBELN>
AND KDPOS = <VBAP-POSNR>
Correct:
SELECT FROM AFPO WHERE KDAUF = <VBAP-VBELN>
AND KDPOS = <VBAP-POSNR>
SELECT FROM AUFK WHERE AUFNR = AFPO-AUFNR.
Note:
The tables AFKO and CAUFV can be selected analogously to the AUFK access using order number AUFNR.
3. Access to reservations and dependent requirement (table: RESB, MDRS ATP _RESB)
a) Search for reservation for PPS orders (field RESB-AUFNR):
Incorrect:
SELECT FROM resb WHERE AUFNR = ...
Correct:
SELECT rsnum FROM afko WHERE aufnr = <resb-aufnr>
SELECT ..... FROM resb WHERE rsnum = <afko-rsnum>
Note:
The same access path applies to MDRS and ATP_RESB.
b) Search for reservation for Planned orders (field RESB-PLNUM):
Incorrect:
SELECT FROM resb WHERE PLNUM = ...
Correct:
SELECT rsnum FROM plaf WHERE plnum = <resb-plnum>
SELECT ..... FROM resb WHERE rsnum = <plaf-rsnum>
Note:
The same access path applies to MDRS and ATP_RESB.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> PP All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.