Order of operations

Hi guys
I'm a noob in this field of using hints
I cannot figure how to create the exact execution plan oracle sugests
GENERAL INFORMATION SECTION
Tuning Task Name   : sql_id_tuning_task_SD
Tuning Task Owner  : APMIG
Workload Type      : Single SQL Statement
Scope              : COMPREHENSIVE
Time Limit(seconds): 120
Completion Status  : COMPLETED
Started at         : 07/26/2011 09:05:28
Completed at       : 07/26/2011 09:05:30
Schema Name: APMIG
SQL ID     : 26g474qmntzds
SQL Text   : insert /*+ append */ into STG_AR_PAYMENTS_CHEQUE_DETAILS
             select  /*+ leading(dp,p,ep,pdc) use_hash(ep) full(ep)*/
             apswn.ar_payments_cheque_details_s.nextval
             --AR_PAYMENT_CHEQUE_DETAIL_ID
             ,null --CHEQUE_DATE
             ,null --CHEQUE_NUMBER
             ,null --ACCOUNT_NUMBER
             ,null --CHEQUE_PAYER_NAME
             ,null --CHEQUE_BANK_CODE
             ,pdc.deposit_id --CHEQUE_DEP_SLIP_NR
             ,'N' --CHEQUE_NEGOTIATION_IND for PS
             ,ep.entry_date--CHEQUE_SENT_NEGOTIATION_DATE
             ,decode(ep.negotiation_status,'Y',
             ep.cntl_timestamp)--CHEQUE_NEGOTIATION_COMPL_DATE
             ,ep.negotiated_amt--CHEQUE_NEGOTIATION_AMOUNT
             ,ep.negotiated_currency_code--CHEQUE_NEGOTIATION_CURRENCY
             ,decode(ep.returned_ind,'Y', ep.cntl_timestamp)--CHEQUE_RETURN_DA
             TE
             ,(select cd.cheque_deposit_id from stg_ar_cheque_deposits cd
             where cd.cheque_dep_slip_nr = pdc.deposit_id and cd.deposit_bu =
             pdc.deposit_bu)--CHEQUE_DEPOSIT_ID
             ,(select sp.ar_payment_id from stg_ar_payments sp where
             sp.deposit_id = p.deposit_id and sp.deposit_bu = p.deposit_bu )
             --AR_PAYMENT_ID
             ,ep.customer_reference--CHEQUE_CUSTOMER_REF
             from ps_deposit_control pdc
             join ps_payment p on p.deposit_id = pdc.deposit_id and
             p.deposit_bu = pdc.deposit_bu and p.payment_method = 'CHK' and (
             p.deposit_id not like '%TRA%'
             and p.deposit_id not like '%TRN%'
             and p.deposit_id not like '%TRTANS%'
             left join deposit_payments dp on p.deposit_id = dp.deposit_id
             and p.payment_seq_num = dp.payment_sequence and dp.payment_type
             = 'CHK'
             join entered_payments ep on ep.payment_type = dp.payment_type
             and ep.payment_currency_code = dp.payment_currency_code
             and ep.payment_id = dp.payment_id
             and ep.entry_date = dp.entry_date
             and ep.payment_sequence = dp.payment_sequence
             log errors into E_STG_AR_PAYMENTS_CHEQUE_DS('cr8') reject limit
             unlimited
FINDINGS SECTION (1 finding)
1- SQL Profile Finding (see explain plans section below)
  A potentially better execution plan was found for this statement.
  Recommendation (estimated benefit=10%)
  - Consider accepting the recommended SQL profile.
    execute dbms_sqltune.accept_sql_profile(task_name =>
            'sql_id_tuning_task_SD', task_owner => 'APMIG', replace => TRUE);
EXPLAIN PLANS SECTION
1- Original With Adjusted Cost
Plan hash value: 721680283
| Id  | Operation               | Name                           | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
|   0 | INSERT STATEMENT        |                                | 89336 |    11M|       | 11473   (1)| 00:02:18 |
|   1 |  LOAD AS SELECT         | STG_AR_PAYMENTS_CHEQUE_DETAILS |       |       |       |            |          |
|*  2 |   TABLE ACCESS FULL     | STG_AR_CHEQUE_DEPOSITS         |     1 |    22 |       |    49   (0)| 00:00:01 |
|*  3 |   TABLE ACCESS FULL     | STG_AR_PAYMENTS                |     2 |    22 |       |  5259   (2)| 00:01:04 |
|   4 |   ERROR LOGGING FULL    | STG_AR_PAYMENTS                |       |       |       |  5259   (2)| 00:01:04 |
|   5 |    SEQUENCE             | AR_PAYMENTS_CHEQUE_DETAILS_S   |       |       |       |            |          |
|   6 |     NESTED LOOPS        |                                | 89336 |    11M|       | 11473   (1)| 00:02:18 |
|*  7 |      HASH JOIN          |                                | 89336 |    10M|  6728K| 11464   (1)| 00:02:18 |
|*  8 |       HASH JOIN         |                                | 89399 |  5674K|  4768K|  9504   (1)| 00:01:55 |
|*  9 |        TABLE ACCESS FULL| DEPOSIT_PAYMENTS               | 91985 |  3682K|       |  1166   (1)| 00:00:14 |
|* 10 |        TABLE ACCESS FULL| PS_PAYMENT                     |   524K|    12M|       |  7207   (1)| 00:01:27 |
|* 11 |       TABLE ACCESS FULL | ENTERED_PAYMENTS               | 91920 |  5116K|       |  1332   (1)| 00:00:16 |
|* 12 |      INDEX UNIQUE SCAN  | PS_DEPOSIT_CONTROL             |     1 |    17 |       |     0   (0)| 00:00:01 |
Predicate Information (identified by operation id):
   2 - filter("CD"."CHEQUE_DEP_SLIP_NR"=:B1 AND "CD"."DEPOSIT_BU"=:B2)
   3 - filter("SP"."DEPOSIT_ID"=:B1 AND "SP"."DEPOSIT_BU"=:B2)
   7 - access("EP"."PAYMENT_TYPE"="DP"."PAYMENT_TYPE" AND
              "EP"."PAYMENT_CURRENCY_CODE"="DP"."PAYMENT_CURRENCY_CODE" AND "EP"."PAYMENT_ID"="DP"."PAYMENT_ID" AND
              "EP"."ENTRY_DATE"="DP"."ENTRY_DATE" AND "EP"."PAYMENT_SEQUENCE"="DP"."PAYMENT_SEQUENCE")
   8 - access("P"."PAYMENT_SEQ_NUM"="DP"."PAYMENT_SEQUENCE" AND "P"."DEPOSIT_ID"="DP"."DEPOSIT_ID")
   9 - filter("DP"."PAYMENT_TYPE"='CHK')
  10 - filter("P"."DEPOSIT_ID" NOT LIKE '%TRA%' AND "P"."DEPOSIT_ID" NOT LIKE '%TRN%' AND
              "P"."DEPOSIT_ID" NOT LIKE '%TRTANS%' AND "P"."PAYMENT_METHOD"='CHK')
  11 - filter("EP"."PAYMENT_TYPE"='CHK')
  12 - access("P"."DEPOSIT_BU"="PDC"."DEPOSIT_BU" AND "P"."DEPOSIT_ID"="PDC"."DEPOSIT_ID")
2- Original With Adjusted Cost
Plan hash value: 721680283
| Id  | Operation               | Name                           | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
|   0 | INSERT STATEMENT        |                                | 89336 |    11M|       | 11473   (1)| 00:02:18 |
|   1 |  LOAD AS SELECT         | STG_AR_PAYMENTS_CHEQUE_DETAILS |       |       |       |            |          |
|*  2 |   TABLE ACCESS FULL     | STG_AR_CHEQUE_DEPOSITS         |     1 |    22 |       |    49   (0)| 00:00:01 |
|*  3 |   TABLE ACCESS FULL     | STG_AR_PAYMENTS                |     2 |    22 |       |  5259   (2)| 00:01:04 |
|   4 |   ERROR LOGGING FULL    | STG_AR_PAYMENTS                |       |       |       |  5259   (2)| 00:01:04 |
|   5 |    SEQUENCE             | AR_PAYMENTS_CHEQUE_DETAILS_S   |       |       |       |            |          |
|   6 |     NESTED LOOPS        |                                | 89336 |    11M|       | 11473   (1)| 00:02:18 |
|*  7 |      HASH JOIN          |                                | 89336 |    10M|  6728K| 11464   (1)| 00:02:18 |
|*  8 |       HASH JOIN         |                                | 89399 |  5674K|  4768K|  9504   (1)| 00:01:55 |
|*  9 |        TABLE ACCESS FULL| DEPOSIT_PAYMENTS               | 91985 |  3682K|       |  1166   (1)| 00:00:14 |
|* 10 |        TABLE ACCESS FULL| PS_PAYMENT                     |   524K|    12M|       |  7207   (1)| 00:01:27 |
|* 11 |       TABLE ACCESS FULL | ENTERED_PAYMENTS               | 91920 |  5116K|       |  1332   (1)| 00:00:16 |
|* 12 |      INDEX UNIQUE SCAN  | PS_DEPOSIT_CONTROL             |     1 |    17 |       |     0   (0)| 00:00:01 |
Predicate Information (identified by operation id):
   2 - filter("CD"."CHEQUE_DEP_SLIP_NR"=:B1 AND "CD"."DEPOSIT_BU"=:B2)
   3 - filter("SP"."DEPOSIT_ID"=:B1 AND "SP"."DEPOSIT_BU"=:B2)
   7 - access("EP"."PAYMENT_TYPE"="DP"."PAYMENT_TYPE" AND
              "EP"."PAYMENT_CURRENCY_CODE"="DP"."PAYMENT_CURRENCY_CODE" AND "EP"."PAYMENT_ID"="DP"."PAYMENT_ID" AND
              "EP"."ENTRY_DATE"="DP"."ENTRY_DATE" AND "EP"."PAYMENT_SEQUENCE"="DP"."PAYMENT_SEQUENCE")
   8 - access("P"."PAYMENT_SEQ_NUM"="DP"."PAYMENT_SEQUENCE" AND "P"."DEPOSIT_ID"="DP"."DEPOSIT_ID")
   9 - filter("DP"."PAYMENT_TYPE"='CHK')
  10 - filter("P"."DEPOSIT_ID" NOT LIKE '%TRA%' AND "P"."DEPOSIT_ID" NOT LIKE '%TRN%' AND
              "P"."DEPOSIT_ID" NOT LIKE '%TRTANS%' AND "P"."PAYMENT_METHOD"='CHK')
  11 - filter("EP"."PAYMENT_TYPE"='CHK')
  12 - access("P"."DEPOSIT_BU"="PDC"."DEPOSIT_BU" AND "P"."DEPOSIT_ID"="PDC"."DEPOSIT_ID")
3- Using SQL Profile
Plan hash value: 2436199625
| Id  | Operation               | Name                           | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
|   0 | INSERT STATEMENT        |                                | 89336 |    11M|       | 11473   (1)| 00:02:18 |
|   1 |  LOAD AS SELECT         | STG_AR_PAYMENTS_CHEQUE_DETAILS |       |       |       |            |          |
|*  2 |   TABLE ACCESS FULL     | STG_AR_CHEQUE_DEPOSITS         |     1 |    22 |       |    49   (0)| 00:00:01 |
|*  3 |   TABLE ACCESS FULL     | STG_AR_PAYMENTS                |     2 |    22 |       |  5259   (2)| 00:01:04 |
|   4 |   ERROR LOGGING FULL    | STG_AR_PAYMENTS                |       |       |       |  5259   (2)| 00:01:04 |
|   5 |    SEQUENCE             | AR_PAYMENTS_CHEQUE_DETAILS_S   |       |       |       |            |          |
|   6 |     NESTED LOOPS        |                                | 89336 |    11M|       | 11473   (1)| 00:02:18 |
|*  7 |      HASH JOIN          |                                | 89336 |    10M|  6200K| 11464   (1)| 00:02:18 |
|*  8 |       TABLE ACCESS FULL | ENTERED_PAYMENTS               | 91920 |  5116K|       |  1332   (1)| 00:00:16 |
|*  9 |       HASH JOIN         |                                | 89399 |  5674K|  4768K|  9504   (1)| 00:01:55 |
|* 10 |        TABLE ACCESS FULL| DEPOSIT_PAYMENTS               | 91985 |  3682K|       |  1166   (1)| 00:00:14 |
|* 11 |        TABLE ACCESS FULL| PS_PAYMENT                     |   524K|    12M|       |  7207   (1)| 00:01:27 |
|* 12 |      INDEX UNIQUE SCAN  | PS_DEPOSIT_CONTROL             |     1 |    17 |       |     0   (0)| 00:00:01 |
Predicate Information (identified by operation id):
   2 - filter("CD"."CHEQUE_DEP_SLIP_NR"=:B1 AND "CD"."DEPOSIT_BU"=:B2)
   3 - filter("SP"."DEPOSIT_ID"=:B1 AND "SP"."DEPOSIT_BU"=:B2)
   7 - access("EP"."PAYMENT_TYPE"="DP"."PAYMENT_TYPE" AND
              "EP"."PAYMENT_CURRENCY_CODE"="DP"."PAYMENT_CURRENCY_CODE" AND "EP"."PAYMENT_ID"="DP"."PAYMENT_ID" AND
              "EP"."ENTRY_DATE"="DP"."ENTRY_DATE" AND "EP"."PAYMENT_SEQUENCE"="DP"."PAYMENT_SEQUENCE")
   8 - filter("EP"."PAYMENT_TYPE"='CHK')
   9 - access("P"."PAYMENT_SEQ_NUM"="DP"."PAYMENT_SEQUENCE" AND "P"."DEPOSIT_ID"="DP"."DEPOSIT_ID")
  10 - filter("DP"."PAYMENT_TYPE"='CHK')
  11 - filter("P"."DEPOSIT_ID" NOT LIKE '%TRA%' AND "P"."DEPOSIT_ID" NOT LIKE '%TRN%' AND
              "P"."DEPOSIT_ID" NOT LIKE '%TRTANS%' AND "P"."PAYMENT_METHOD"='CHK')
  12 - access("P"."DEPOSIT_BU"="PDC"."DEPOSIT_BU" AND "P"."DEPOSIT_ID"="PDC"."DEPOSIT_ID")
-------------------------------------------------------------------------------the difference out there is that it suggests a little different for steps 7 and 8
Although the cost is a bit higher than my initial plan (and I don't know about the time column but this runs far longer)
any ideea how to make the exact plan, and if this will help me?
BR
Florin POP

without hints
Plan hash value: 2884505198                                                                                                                                                                                                                                                                                 
| Id  | Operation                         | Name                           | Rows  | Bytes | Cost (%CPU)| Time     |                                                                                                                                                                                        
|   0 | INSERT STATEMENT                  |                                |    61 |  8479 |  7420   (1)| 00:01:30 |                                                                                                                                                                                        
|   1 |  LOAD AS SELECT                   | STG_AR_PAYMENTS_CHEQUE_DETAILS |       |       |            |          |                                                                                                                                                                                        
|*  2 |   TABLE ACCESS FULL               | STG_AR_CHEQUE_DEPOSITS         |     1 |    22 |    49   (0)| 00:00:01 |                                                                                                                                                                                        
|*  3 |   TABLE ACCESS FULL               | STG_AR_PAYMENTS                |     2 |    22 |  5259   (2)| 00:01:04 |                                                                                                                                                                                        
|   4 |   ERROR LOGGING FULL              | STG_AR_PAYMENTS                |       |       |  5259   (2)| 00:01:04 |                                                                                                                                                                                        
|   5 |    SEQUENCE                       | AR_PAYMENTS_CHEQUE_DETAILS_S   |       |       |            |          |                                                                                                                                                                                        
|   6 |     NESTED LOOPS                  |                                |       |       |            |          |                                                                                                                                                                                        
|   7 |      NESTED LOOPS                 |                                |    61 |  8479 |  7420   (1)| 00:01:30 |                                                                                                                                                                                        
|   8 |       NESTED LOOPS                |                                |    61 |  5002 |  7332   (1)| 00:01:28 |                                                                                                                                                                                        
|   9 |        NESTED LOOPS               |                                |    61 |  2501 |  7207   (1)| 00:01:27 |                                                                                                                                                                                        
|* 10 |         TABLE ACCESS FULL         | PS_PAYMENT                     |    61 |  1464 |  7207   (1)| 00:01:27 |                                                                                                                                                                                        
|* 11 |         INDEX UNIQUE SCAN         | PS_DEPOSIT_CONTROL             |     1 |    17 |     0   (0)| 00:00:01 |                                                                                                                                                                                        
|  12 |        TABLE ACCESS BY INDEX ROWID| DEPOSIT_PAYMENTS               |     1 |    41 |     3   (0)| 00:00:01 |                                                                                                                                                                                        
|* 13 |         INDEX RANGE SCAN          | DP_IX                          |     1 |       |     2   (0)| 00:00:01 |                                                                                                                                                                                        
|* 14 |       INDEX UNIQUE SCAN           | ENPA_PK                        |     1 |       |     1   (0)| 00:00:01 |                                                                                                                                                                                        
|  15 |      TABLE ACCESS BY INDEX ROWID  | ENTERED_PAYMENTS               |     1 |    57 |     2   (0)| 00:00:01 |                                                                                                                                                                                        
                                                                        with hint /*+ full(ep) full(dp)*/
Plan hash value: 1147295939                                                                                                                                                                                                                                                                                 
| Id  | Operation               | Name                           | Rows  | Bytes | Cost (%CPU)| Time     |                                                                                                                                                                                                  
|   0 | INSERT STATEMENT        |                                |    61 |  8479 |  9706   (1)| 00:01:57 |                                                                                                                                                                                                  
|   1 |  LOAD AS SELECT         | STG_AR_PAYMENTS_CHEQUE_DETAILS |       |       |            |          |                                                                                                                                                                                                  
|*  2 |   TABLE ACCESS FULL     | STG_AR_CHEQUE_DEPOSITS         |     1 |    22 |    49   (0)| 00:00:01 |                                                                                                                                                                                                  
|*  3 |   TABLE ACCESS FULL     | STG_AR_PAYMENTS                |     2 |    22 |  5259   (2)| 00:01:04 |                                                                                                                                                                                                  
|   4 |   ERROR LOGGING FULL    | STG_AR_PAYMENTS                |       |       |  5259   (2)| 00:01:04 |                                                                                                                                                                                                  
|   5 |    SEQUENCE             | AR_PAYMENTS_CHEQUE_DETAILS_S   |       |       |            |          |                                                                                                                                                                                                  
|*  6 |     HASH JOIN           |                                |    61 |  8479 |  9706   (1)| 00:01:57 |                                                                                                                                                                                                  
|*  7 |      HASH JOIN          |                                |    61 |  5002 |  8374   (1)| 00:01:41 |                                                                                                                                                                                                  
|   8 |       NESTED LOOPS      |                                |    61 |  2501 |  7207   (1)| 00:01:27 |                                                                                                                                                                                                  
|*  9 |        TABLE ACCESS FULL| PS_PAYMENT                     |    61 |  1464 |  7207   (1)| 00:01:27 |                                                                                                                                                                                                  
|* 10 |        INDEX UNIQUE SCAN| PS_DEPOSIT_CONTROL             |     1 |    17 |     0   (0)| 00:00:01 |                                                                                                                                                                                                  
|* 11 |       TABLE ACCESS FULL | DEPOSIT_PAYMENTS               | 90911 |  3639K|  1166   (1)| 00:00:14 |                                                                                                                                                                                                  
|* 12 |      TABLE ACCESS FULL  | ENTERED_PAYMENTS               | 91920 |  5116K|  1332   (1)| 00:00:16 |                                                                                                                                                                                                  
---------------------------------------------------------------------------------------------------------- Edited by: kquizak on Jul 26, 2011 1:57 PM
Finally, you have 2 scalar subqueries ... this was the problem (If I have put them as outer joins I would have noticed a full scan where I should have an index scan).
I greatly appreciate your help, you made me think in another way ... (also I marked a post of yours as correct)
Thanks

Similar Messages

  • BAPI/FM for Confirmation of Production order at operation level

    Hi ABAPers,
    I am using the 'BAPI_PRODORDCONF_CREATE_ACT'for Confirmation of Production order at operation level.
    I am able to pass the Production order number and Active Operation get the confirmation done.
    But the Confirmed Qty is not being updating in AFKO table.
    The 'BAPI_PRODORDCONF_CREATE_HDR' cannot be used for Confirmation of Production order at operation level as there is no Operation/Activity(Vornr) field in the input table. Hence using this bapi confirmation of Prod order can be only at Order level.
    Can someone know any FM/BAPI which can be used for the Confirmation of Production order at operation level(not order level).
    Thanks in Advance
    Ramesh Babu Cikka

    Hi Ramesh,
    Please use FUNCTION 'BAPI_PRODORDCONF_CREATE_TT'.
    This will work as like as T/Code "CO11".
    I hope this will help you.
    Example :
      CALL FUNCTION 'BAPI_PRODORDCONF_CREATE_TT'
        EXPORTING
          POST_WRONG_ENTRIES = '0'
          TESTRUN            = ' '
        IMPORTING
          RETURN             = ZRETURN
        TABLES
          TIMETICKETS        = ZBAPI_PP_TIMETICKET
          DETAIL_RETURN      = ZBAPI_CORU_RETURN.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          WAIT = 'W'.
    Lanka

  • Logical operator order of operation

    Hello,
    Does anyone happen to know the order of operation for logical operators? (&&, ||, &, |) For example, if I have the following statement:
    if (true && false | true || true & false)
    What is the order of evaluatioin?
    Thanks a lot
    - nygrl

    Thanks Jverd, but the problem is I don't know how to
    group subexpressions together without parentheses.
    For example, I found this in my book. if ( false
    e && false | true), accroding to the book, JVM will
    interpret this statement as if ( false && (false |
    true) ). But why?Why? Because the designers of the language decided that & and | have higher precedence than && and ||.
    Why did they decide that? I don't know. Might be historical reasons. Might be because there's some mathematical reason why it makes more sense. Might have just been arbitrary.
    I want to know the rules of how
    they group together without parentheses.I don't understand what you're asking. You found the precedence rules, right? Are you saying you don't know how to apply those rules?
    If that's your quesiton, the answer is pretty straightforward: Higher precedence binds tighter.
    For instance, * has higher precedence than +. This means that in a + b * c , the * binds more tightly than the +. It could be (a+b) * c or a + (b*c) . When I say "binds more tightly," you can picture the * pulling on the b harder than the + does, so it's like this: a    +    b*c --> a + (b * c) So if | has higher precedence than &&, then whenever you see an operand that could potentially be associated with an | or an &&, it's as if you'd put parens around it to associate it with the |.
    (Note: I'm taking your word for it that | has higher precedence than &&. I haven't looked, and I don't care, because I'd a) probably never use those two together in a single expression, and b) would absolutely add parens if I did use them, regardless of how well I understood their relative precedence.)

  • Workcenter based on Production Order and Operation

    Dear All,
    I want to fetch the data based on the following :
    1. For a given Production Order ( This PO will have multiple Operations)
    2. I need to know the Work Center
    3. for which the respective Operation has the status as "Not Confirmed".
    or Let me put in this way :
    I need the Workcenter for a particular Purchase order whose operations are not confirmed .
    How to fetch the above ?
    Regards,
    Deepu.K

    Hi,
    Status check :
    call function 'STATUS_CHECK_MULTI'
           exporting
                bypass_buffer = 'X'
                client        = sy-mandt
                status        = 'I0009'  <--- here i0009 is the id for produced orders
                flg_exclude   = space         check for unconfirmed orders status here 
           tables
                objects       = itab_objnr.
    Workcenter from production order :
    clear w_aufpl.
        select aufpl from afko into w_aufpl where aufnr = itab_afpo-aufnr.
        endselect.
        clear afvc.
        select * from afvc where aufpl = w_aufpl and
        steus   = 'PP03'.
        endselect.
        clear crhd.
        select * from crhd where objid = afvc-arbid.
          exit.
        endselect.
        if crhd-arbpl = space.
          itab_afpo-arbpl = 'OTHER'.
        else.
          itab_afpo-arbpl = crhd-arbpl.
        endif.
    Regards,
    Vind

  • Release the order on operation level

    Hi,
    Currently we are releasing the complete production order. But Now we want to release the order operation by operation. How can we do that?
    Regards
    deepak sharma

    Hi Deepak,
    I think that you have already realesed the order at header level and now you want to realese the production order at operation level. If this is correct,then follow step as below.
    1.Goto CO02
    2.Select Function,then Read PP master data.continue,enter & save. So status of order will be changed to created.
    3. Now follow the step given by SAP PP consultant.
    Hope this help you.
    Regards,
    Raja.

  • Transfer LTP planned orders to Operational planned orders

    Hi
    Can anyone suggest how to transfer planned orders generated from LTP(Long Term Plan) to Operational Plan?
    Regards
    Pradipta Sahoo

    Dear Sahoo,
    You can transfer the simulative planned orders to operative planning using T Code MD43.
    Check this,
    Copying the Long-Term Planning Results to Operative Planning  
    Use
    Once you have optimized the results of long-term planning, you can copy them to operative planning.
    It is not only possible to copy the demand program to operative planning, you can also copy the planned orders firmed in long-term planning per material using the MRP transaction Interactive single-item planning.
    When copying the results to operative planning, you can set the system to create purchase requisitions and delivery schedules instead of planned orders for materials procured externally.
    Prerequisites
    You must firm the simulative planned orders you want to copy to operative planning. You can firm planned orders by:
    Making manual changes
    Using the planning time fence
    Setting a manual firming date
    If, when copying the data to operative planning, you want the system to create purchase requisitions or delivery schedules for materials procured externally instead of planned orders, enter the appropriate indicators in the Create pur. req. and Schedule lines on the initial screen of single-item, interactive planning (in MRP).
    When copying the results to operative planning, the system does not carry out any source determination. If you want the system to create delivery schedules and purchase requisitions to which a vendor has already been assigned, you must maintain the necessary master data in the Purchasing menu before carrying out the planning run in long-term planning.
    http://help.sap.com/saphelperp60_sp/helpdata/en/92/bf02af44bd11d182b40000e829fbfe/content.htm_
    Regards
    Mangalraj.S

  • Order of Operations with Parentheses

    I have a query that is returning unexpected results. I'm under the impression that when parentheses are included that they override operator precedence. If that is the case, the NOT_EQUAL_CHECK should be the negation of the EQUAL_CHECK, right? Using 10.2.0.4 on an AIX machine.
    WITH src AS
        (SELECT 'T' AS var1, 'T' AS var2 FROM dual
        UNION ALL
        SELECT 'T' AS var1, 'F' AS var2 FROM dual
        UNION ALL
        SELECT 'T' AS var1, NULL AS var2 FROM dual
        UNION ALL
        SELECT NULL AS var1, 'F' AS var2 FROM dual
        UNION ALL
        SELECT NULL AS var1, NULL AS var2 FROM dual
      SELECT   nvl(var1, 'NULL') AS var1,
          nvl(var2, 'NULL') as var2     ,
          CASE
            WHEN((var1 = var2) OR (var1 IS NULL AND var2 IS NULL))
            THEN 'T'
            ELSE 'F'
          END AS equal_check,
          CASE
            WHEN NOT((var1 = var2) OR (var1 IS NULL AND var2 IS NULL))
            THEN 'T'
            ELSE 'F'
          END AS not_equal_check
        FROM src
        ORDER BY var1,
          var2;
    VAR1   VAR2   EQUAL_CHECK   NOT_EQUAL_CHECK
    NULL   F      F             F
    NULL   NULL   T             F
    T      F      F             T
    T      NULL   F             F
    T      T      T             F

    Hi,
    Remember how SQL's 3-value logic works.
    'T' = NULLis neither TRUE nor FALSE, but rather the 3rd possibility: UNKNOWN.
    NOT UNKNOWN is, paradoxically, UNKNOWN.
    That is to say, the truth table of NOT is:
    X          NOT X
    TRUE          FALSE
    FALSE          TRUE
    UNKNOWN          UNKNOWNThe CASE expression
    CASE
        WHEN  <condition_x>
        THEN  'T'
        ELSE  'F'
    ENDreturns 'T' when condition_x evaluates to TRUE, and it returns 'F' in all other events, that is, whether condition_x is FALSE or condition_x is UNKNOWN.
    Putting NOT in fron of that condition:
    CASE
        WHEN  NOT <condition_x>
        THEN  'T'
        ELSE  'F'
    ENDchanges what happens when condition_x is either TRUE or FALSE, but it has no effect on the results when condition_x is UNKNOWN.
    If you want a CASE expression that is the opposite of equal_check, just swap the values in the THEN and ELSE clauses.
    Alternatively, you can negate the condition piece by piece, as shown in the last CASE expression below.
      SELECT   nvl(var1, 'NULL') AS var1,
          nvl(var2, 'NULL') as var2     ,
          CASE
            WHEN((var1 = var2) OR (var1 IS NULL AND var2 IS NULL))
            THEN 'T'
            ELSE 'F'
          END AS equal_check,
          CASE
            WHEN((var1 = var2) OR (var1 IS NULL AND var2 IS NULL))
            THEN 'F'
            ELSE 'T'
          END AS swap,
          CASE
            WHEN LNNVL (var1 = var2)
         AND  NVL (var1, var2)     IS NOT NULL
         THEN 'T'
            ELSE 'F'
          END AS piece_by_piece
        FROM src
        ORDER BY var1,
          var2;Output:
    VAR1 VAR2 E S P
    NULL F    F T T
    NULL NULL T F F
    T    F    F T T
    T    NULL F T T
    T    T    T F FNOT has a similar effect on 3-valued boolean values that multiplying by -1 has on numbers. If you multiply a positive number x by -1, the result will be different than x, and if you mutiply a negative number x by -1 then the result will also be different than x. But if you multiply 0 by -1, the result is still 0.
    Edited by: Frank Kulash on May 20, 2010 2:13 PM

  • Purchase order and operations

    In which table I can find  that the operation has a purchase order defined?
    the field for this indicator is  KREUZ.But I am not able to find it any table to co-relate with purchase-order.

    You can search the tables which is having field name specified by you "KREUZ". I searched it but no table is having this field. plz check the field name.

  • ESW: Question on the usage of "READ PURCHASE ORDER" service operation

    Hi everyone,
    I plan to consume consume "READ PURCHASE ORDER" in my composite application. When I navigated to SAP Documentation on ES Workplace, I found out the following paragraph in the "Notes on SAP Implementation" section.
    Notes on SAP Implementation
    Prerequisites
    You must implement the application component Purchase Orders (MM-PUR-PO) so that you can use the operation.
    I am not clear about the prerequisite. How do I implement an application component?
    Here are the details to this service operation from ES Workplace:
    Software Component Version:       ESA ECC-SE 604
    First released with:      ESA ECC-SE 600
    Release State:      released
    Technical Name:      PurchaseOrderByIDQueryResponse_In
    Namespace:      http://sap.com/xi/APPL/SE/Global
    Application Area:      MM-PUR
    Webservice Definition:      ECC_PURCHASEORDER002QR
    Direction:      inbound
    Mode:      synchronous
    Idempotency:      not applicable
    Change/Update Behavior:      not applicable
    Could anyone please enlighten me on this issue?
    Thanks,
    Joon Meng

    Hi Michael,
    thanks for the quick reply.
    Now I understand the situation better with your explanation. But how can I check whether the application component is configured, which transaction? And how I can configure the application component?
    Are there any documentations or tutorials concerning this topic? I simply do not have the whole picture / process flow of the matter.
    Thanks in advance.
    Regards,
    Joon Meng

  • PM Order - Change operations Work Center to Main Work Center

    Hi Experts,
    We have prepared a tool for client, which create Maintenance Plan and order in the background.
    The order created is having "Main Work Center" defined at header and "Work Center" at the operations level. In the current scenario the "Main Work Center" and "Work Center" are different say 'ABC' & u2018XYZu2019.
    Client has the requirement that work center maintained at operations should be same as the main work center.
    We need to implement the solution to take care of work center to be same as main work center while creation of the order in the background.
    Has anyone worked on the similar requirement before?
    I checked for existing USER EXITS for IW31/32/33 and found only one IWO10012. This doesnu2019t seem to be much useful.
    Please suggest any possible solution.
    Thanks,
    Ankur Sharma

    Hi,
         The work Center entered by default comes in operation work center, u can do validations while saving the Order :-using user exit : IWO10009 PM Order: Customer Check for 'Save' Event.
    regards
    pushpa

  • CO11N - Order and Operation status

    I use co11n to confirm the operation in order. When i do final confirmation of the first operation the order header status changes to CNF whereas it should be PCNF.(operation gets the status CNF)
    Ideally the order status should change to CNF only when all the operations are confirmed.
    Pl let me know the reason for this behaviour of system (ECC 6.0)
    Thanks
    Rohit

    Hi All,
    Check out in this way....
    A confirmation documents the processing status of orders, operations, suboperations and individual capacities.
    You can enter a confirmation
    - For an Opeartion (co11/co11n)
    You have the following options:
    - To confirm quantities, durations, activities or personnel data.
    - To make a confirmation at a particular point in time (for example, at the start of setup or the finish of processing) enter a 
    confirmation.
    - When you confirm time events, the system calculates the required duration. For example, the setup duration is the time between setup start and setup finish.
    - For an Order : CO15
    If you enter a confirmation at order header level, the system confirms all the operations that have a control key in which 
    confirmation is optional or necessary. The quantitiesconfirmed in the operations are proportional to the quantities confirmed in the order header.
    Reward if useful.
    Regards,
    pherasath

  • IW42 - Materials for Operation linked to Order, not Operation

    In my current development, I'm struggling with linking materials to an operation, after IW42 has been completed.
    In my test data, I coded for two situations, lookup of MSEG values starting with AFRU-WABLNR or WEBLNR (via AFWI-MBLNR).  While that was viable in IW41, that doesn't work with IW42 because AFRU-WABLNR and WEBLNR are always initial.
    My other course is to call BAPI_ALM_CONF_GETDETAIL, using the keys from AFRU, which is the more desirable approach, but not used in previous versions of this work.  The BAPI call results in an empty goods movement and an empty goods movement errors table.
    In researching SAP tables, I'm finding only a link between material document and service order in table AUFM...there seems to be no link that I can use to assign the material consumed to the service order operation that consumed the material.
    This seems to be supported by Doc Flow displays in IW12 and IW32.  The goods issues are showing sequentially for the order, followed by operations and the confirmations (hours) for each operation. I cannot find a link for material to operation in any of the documents found in document flow.
    Question:  Is anyone aware of :
    1.  An alternative way to link goods movements to operations in this situation; or
    2.  SAP settings that I should point out that would support assigning goods movement to a service order operation?

    Resolved...functional specialist decided to use IW41, which allows retrieval of goods movements by operation.

  • Release of Production Order at operation level

    Dear Experts,
    Production order to be released at operation level automatically one by one, after confirmation of operation.
    Let us suppose
    Op 10 ...... 10 Confirmed
    Op 20 ...... 10 Confirmed
    then in the Op 30 ..... 4 Qunatity to be released automatically once Operation 20 is confirmaed.
    Please give your valuble inputs
    regards
    Ram Kumar

    Dear Experts,
    Production order to be released at operation level automatically one by one, after confirmation of operation.
    Let us suppose
    Op 10 ...... 10 Confirmed
    Op 20 ...... 10 Confirmed
    then in the Op 30 ..... 4 Quantity to be released automatically once Operation 20 is confirmed.
    How to create trigger point for this?
    Can anybody give clear idea, what all the fields I need to maintain ?
    regards
    Ram Kumar

  • FM/BAPI to update Production Order at Operation Level

    Hi Friends,
    Can any one help me in this issue.
    My rek is, needs to update Production Order Sequence Number(AFVC-CY_SEQNRV) at operation level.
    There are some Production Orders under one Project.User is updating theSequence Numberfor the first order in that group (TCode CO02),at the time of save remaining Orders in that group needs to be updated with the same Sequence Number.
    Please provide me with FM/BAPI(operation level not at header level)
    Points Rewarded,
    Thanks in advance,
    PRBode.

    Prathap,
    Have you tried using the Bapi :  BAPI_PP_TIMETICKET
    This would confirm at operation level..
    Hope it is useful.
    Regards
    Ram

  • Need to confirm production order on operation,sub-operation & sub-sub-operation

    Hi Friends,
    I've a requirement to confirm order below sub operation level. eg There is operation 100,200,300....and sub operation 110,120,130...further, below these sub operation, there is sub-sub operation like 111,112 for sub operation 110 and 211,212 for sub operation 210.
    Requirement is,till sub operation we can confirm the order but below this level we can't confirm.Is there any solution in standard SAP.
    Thanks
    Pankaj

    Dear Pankaj,
    What is the reason behind creating a sub-operation for another sub-operation?
    For meeting what business requirement, this has been mapped so?
    In my understanding this is not possible in standard SAP.
    Check and come with your further queries.
    Regards
    Mangalraj.S

  • Production Order Multiple Operations

    Hi Gents / Ladies,
    Here is the scenario.
    Production order generated for Item A
    Item A BOM:
    Item B
    Item C
    Operation 1 (In house assembly) - Item Assignment
    Item B
    Item C
    Operation 2 (Subcontractor Painting) - Item Assignment
    - None
    Currently we just generate Manual Outbound Deliveries and Manula PO's for this operation. How can I generate a delivery that references the production order. Can I use a Text Item for Painting and assign it to the operation?
    I know that I can create another Item A - Painted and a new production order. I would like to capture all of this in one production order.
    Please let me know if i didn't explain myself and how to make this happen.

    It looks more like PP realted question.

Maybe you are looking for

  • Creative Alchemy & Windows 7

    Creative Alchemy was a great innovation for putting DirectSound3D back into games that ran on Windows Vista & putting the EAX effects back in many games like Unreal Tournament 999, Deus Ex, Half-Life & a slew of other games. Unfortunately, Creative A

  • How to include multiple attachment control's in single info-path form

    Hello Everyone, I am using SharePoint online with info-path form 2013. for one sharepoint list form i would like to include multiple attachment control's. please suggest a possible solution.

  • My InDesign Doesn't start up

    Hi all I've been experiencing major problems with my Adobe Suit ever since I installed it. The only apps that Im able to  use (that do startUP) are Photoshop, Adobe Professional and Bridge. InDesign, along with the others, do not start up at all. But

  • Investigative Case Management Analytics in SAP BW

    There does not appear to be standard BW business content extractors (datasources) available for ICM in BW7.  Has anyone implemented ICM with requirements for analytics in BW? Could you tell me whether you had to develop custom extractors/datasources?

  • Is it possible to force AE to fail if plugins are unlicensed/not-installed?

    Hi - Odd problem. We run a small shop and in order to save money we buy only licenses for AE plug-ins that we really NEED. Unfortunately, sometimes the artists forget that there is only one/a-few licenses for a specific plugin and they submit the ren