SAPPractical.com

1/7/2016 11:20:05 AM

All consultants (Technical and Functional) thinking to deliver the object but never think about future performance. Performance is not only slow with SD related transactions actually the system itself slowdown then customer will create high priority incidents.

To avoid Performance issue in PP and PM, below examples will give you heads up to tune our custom developments like Customer exit and BADI...

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.

If you like this blog, please share (Facebook/LinkedIn/Google+) to click below links so it will reach to others.


COMMENTS