Restriction_Payment for Rs. 1 Crore

Hi All,
Iam facing one problem I wrote one validation to restrict a FI/CO documents more than 1 crore.I wrote the validation but now my client is asking to put authorizations to one or two people how do put i dont no.
the validation is:
Prerequisite:  ( Document type = 'SA' OR Document type = 'KR' OR
Document type = 'DR' )
Check:  Amount < '10000000.00'
This is the validation please help how do we put the authorisations for that particular validation.
Regards,
Lakshmi Narayana

Hi
In the same valaidation you can include the user names who are authorised to post in the "prerequsite"
The field fo user name is SYST-UNAME
or the other way you can put the user name to be excluded in the "check"
Good Luck
Hari

Similar Messages

  • Example to demonstrate how to make rebate for business

    Hello Gurus,
          please give a example to demonstrate how to make rebate for business?
    thanks very much!

    hi
    Rebates Processs in SAP is divided into three components
    1) Configuring Rebates
    2) Setting Up Rebates
    3) Managing rebate agreeeements and payments
    Pre-requsiistes- Check the following:
    1.The payer partner needs toi have the rebate field checked in the customer master on the sales area-billing doc tab.
    2.The Billing type must be marked as relevant for rebates.
    3.The Sales Organisation must be marked as relevant for rebates.
    Condition Technique :
    Rebates, use the condition technique, but distinguish themselves from pricing in applying to transactions over time, versus on a transaction basis. Rebates have their wn field catalog and their own condition table naming convention.So you could have two condition table "001" one for pricing and one for rebates, which could have different key fields. You need to use the technical names A001 For pricing and KOTe001 for rebates when you use the query type using transaction SE 16..
    Use create access sequence (AS). Enter 1 in field category for rebate specific. AS after going thru the right path of maintaining access sequence for rebates.
    The big difference between the rebate and the pricing access sequence is that there is no exclsuion flag available for rebate related AS. This means multiple tables for an access sequence can be aplied at the same time.
    Rebate related condition types are identified by codnition class -C.
    After defining and creating condition types for rebated include them in the pricing proceedure. The requirement should be 24 here which implies that the accruals are calculated on the basis of invoice/bill.
    The other fields- alctyp and altcbv does not allow you to manipulate how a rebate is calculated. Also, remove the requiremnt 24, if u want to see reabtes at order time.
    Now payment of rebates:
    Payments can be maunal or in full settlement. When you do manual payments, it defines how much can be paid out during a partial settlemetn. You use partial settlement only when rebate agreement is defined for a full year but the paoyouts are supposed to happen on a monthly, quarterly or anyother specified period.
    These accurals are based on sales volume and when they are posted billing is created int eh follwoing manner. Provision for accruals is debited and Sales revenue is credited. When rebate credit memo is created
    Customer account/ is debited and
    Accrual provision account is credited.
    Also, please note that when rebates are created without dependent ona material but on customer/material you need to refer to a material for settlement.
    First of all rebates are more or less discounts which are offered to customers. The rebates are based on the volume of the business the customer does with you within a specified time. for eg if the customer agrees for Rs.1 Crore worth of business with u in 1 year, then you activate your rebate porocess. if at the end of the year the customer DOES achieve the target u offer him say 2/3/4 % whatever is decided. The rebates are passed on to the customer in the form of Credit notes.
    The rebate can be given to the customer at one time or in installments also.
    This is broadly the outline of the rebate process.
    Note : I recomend you to study the theory part of why rebate and why not a discount.
    This will help you understand better.
    May be I can help you with rebate process.(IN -IMG)
    1. define a rebate agreement type
    2. define a condition type group
    3. define a condition type and place this condition
    Type in the pricing procedure.(REQUIREMENT=24)
    ALSO IN THE PROCEDURE- ACCRUAL KEY = ERU
    YOU ALSO HAVE TO DO THE ACCOUNT DETERMINATION FOR REBATES.
    Once you have defined all the 3 and assignment starts.
    Assign the agreement type to the condition type group
    Assign the cond type group to the condition type.
    Condition technique is also used in rebates.
    REBATE ACTIVATION- IN CUSTOMER MASTER, SALES ORGANISATION AND FOR THE BILLING DOCUMENT.
    After having done this please proceed to maintain the condition record for the rebates (transaction code-vbo1)
    Note: if you maintain the requirement coloumn with the requirement as 24 - the rebate will be affected in the billing document and if you dont give the requirement as 24 your rebate will be affected in the sales order.
    The rebate process is completed when you have created a credit memo to the customer.
    The document type for the partial settlement is R3.
    Please make sure you open two screens SO THAT YOU CAN COMPARE THE NEW ENTRIES WHAT EVER YOU'RE DEFINING WITH THAT OF THE STANDARDS or first you try with the standard condition type boo1, boo2
    boo3 boo4.
    AFTER YOU HAVE FINISHED A COMPLETE SALES CYCLE OF CREATION ORDER , DELIVERY AND BILLING.
    GO TO THE CONDITION RECORD IN CHANGE MODE (VB02) AND SETTLE THE ACCOUNT PARTIALLY.
    In a simple way,
    1. First you need to create a Rebate agreement.
    2. Create condition record for rebate giving the rebate rate and accrual rate.
    3. when the rebate relevent billing doc is generated, the rebate and accruals are determined and posted in a seperate GL account as a noted item - amount to be settled. Also it gets copied in the rebate agreement.
    4. create settlement run using credit memo request and then credit memo to settle this amount with the customer.

  • How to manage huge amount of data into OBIEE 11g?

    Hi all Experts,
    I have some business requirements for a BANK where I need to get data for around 2 crores accounts with different product lines with 50 columns.
    from a staging table generated from data ware house. .
    ** I don't need to manage any modeling and business model based criteria (dimension and fact) its going from direct database request.
    how to handle and make the report output faster.
    ***If I  create the same report from OBIEE rpd based subject area , presentation tables (with filters to get less no of rows) than it never comes up with result any result and fails than return errors.
    any suggestion will help a lot.
    Thanks in advance
    Raj M

    "if the product does not peform"...
    Let's put the problem into a perspective that guys (which I assume we all are for the sake of the argument): cars.
    Using your direct database request as a starting point it's a bit like trying to use a Ferrari to pull a camper. Yes, it will work, but it's the wrong approach. Likewise (or conversely) it's a pretty bad idea to take a Land Rover Defender around the Nurburg Ring.
    In both cases "the product" (i.e. the respective cars) "will not perform" (i.e. not fulfill the intended duties the way you may want them to).
    I never get why everyone always bows to the most bizarre requests like "I MUST be able to export 2 million rows through an analysis exposed on a dashboard" or "This list report must allow scrolling through 500k records per day across 300 columns".

  • Can u tell me waht r the steps involved in rebate processing

    hi guru's this is suresh.advanced thanks for all gurus

    Rebates Processs in SAP is divided into three components
    1) Configuring Rebates
    2) Setting Up Rebates
    3) Managing rebate agreeeements and payments
    Pre-requsiistes- Check the following:
    1.The payer partner needs toi have the rebate field checked in the customer master on the sales area-billing doc tab.
    2.The Billing type must be marked as relevant for rebates.
    3.The Sales Organisation must be marked as relevant for rebates.
    Condition Technique :
    Rebates, use the condition technique, but distinguish themselves from pricing in applying to transactions over time, versus on a transaction basis. Rebates have their wn field catalog and their own condition table naming convention.So you could have two condition table "001" one for pricing and one for rebates, which could have different key fields. You need to use the technical names A001 For pricing and KOTe001 for rebates when you use the query type using transaction SE 16..
    Use create access sequence (AS).  Enter 1 in field category for rebate specific.  AS after going thru the right path of maintaining access sequence for rebates.
    The big difference between the rebate and the pricing access sequence is that there is no exclsuion flag available for rebate related AS. This means multiple tables for an access sequence can be aplied at the same time.
    Rebate related condition types are identified by codnition class -C.
    After defining and creating condition types for rebated include them in the pricing proceedure. The requirement should be 24 here which implies that the accruals are calculated on the basis of invoice/bill.
    The other fields- alctyp and altcbv does not allow you to manipulate how a rebate is calculated. Also, remove the requiremnt 24, if u want to see reabtes at order time.
    Now payment of rebates:
    Payments can be maunal or in full settlement. When you do manual payments, it defines how much can be paid out during a partial settlemetn.  You use partial settlement only when rebate agreement is defined for a full year but the paoyouts are supposed to happen on a monthly, quarterly or anyother specified period.
    These accurals are based on sales volume and when they are posted billing is created int eh follwoing manner. Provision for accruals is debited and Sales revenue is credited. When rebate credit memo is created
       Customer account/ is debited and
       Accrual provision account is credited.
    Also, please note that when rebates are created without dependent ona material but on customer/material you need to refer to a material for settlement.
    With Compliment: Srini
    I have this same problem found in:
    http://www.sap-img.com/sap-sd/rebate-process-with-ref-to-so.htm
    However, can somebody explain it as I have problem in understanding the link.
    What exactly do you wish to know in Rebates? The total outline of the Rebate process or each and every step in the SAP system?
    First of all rebates are more or less discounts which are offered to customers. The rebates are based on the volume of the business the customer does with you within a specified time. for eg if the customer agrees for Rs.1 Crore worth of business with u in 1 year, then you activate your rebate porocess. if at the end of the year the customer DOES achieve the target u offer him say 2/3/4 % whatever is decided. The rebates are passed on to the customer in the form of Credit notes.
    The rebate can be given to the customer at one time or in installments also.
    This is broadly the outline of the rebate process.
    R.Sreeram
    Note : I recomend you to study the theory part of why rebate and why not a discount.
    This will help you understand better.
    May be I can help you with rebate process.(IN -IMG)
    1. define a rebate agreement type
    2. define a condition type group
    3. define a condition type and place this condition
    Type in the pricing procedure.(REQUIREMENT=24)
    ALSO IN THE PROCEDURE- ACCRUAL KEY = ERU
    YOU ALSO HAVE TO DO THE ACCOUNT DETERMINATION FOR REBATES.
    Once you have defined all the 3 and assignment starts.
    Assign the agreement type to the condition type group
    Assign the cond type group to the condition type.
    Condition technique is also used in rebates.
    REBATE ACTIVATION- IN CUSTOMER MASTER, SALES ORGANISATION AND FOR THE BILLING DOCUMENT.
    After having done this please proceed to maintain the condition record for the rebates (transaction code-vbo1)
    Note: if you maintain the requirement coloumn with the requirement as 24 - the rebate will be affected in the billing document and if you dont give the requirement as 24 your rebate will be affected in the sales order.
    The rebate process is completed when you have created a credit memo to the customer.
    The document type for the partial settlement is R3.
    Please make sure you open two screens SO THAT YOU CAN COMPARE THE NEW ENTRIES WHAT EVER YOU'RE DEFINING WITH THAT OF THE STANDARDS or first you try with the standard condition type boo1, boo2
    boo3 boo4.
    AFTER YOU HAVE FINISHED A COMPLETE SALES CYCLE OF CREATION ORDER , DELIVERY AND BILLING.
    GO TO THE CONDITION RECORD IN CHANGE MODE (VB02) AND SETTLE THE ACCOUNT PARTIALLY.
    I hope this will be of any help to you.
    Praveen
    In a simple way,
    1. First you need to create a Rebate agreement.
    2. Create condition record for rebate giving the rebate rate and accrual rate.
    3. when the rebate relevent billing doc is generated, the rebate and accruals are determined and posted in a seperate GL account as a noted item - amount to be settled. Also it gets copied in the rebate agreement.
    4. create settlement run using credit memo request and then credit memo to settle this amount with the customer.
    Source : SAP-IMG

  • Deleteing large number of rows_urgent

    Hi Friends,
    I need to write a procedure which will purge a table having more than 8 crores records based on the parameter passed by the user.We have open a cursor and in loop we are deleting one by one and when the count reaches 50,000 we issue commit so the rollback segment problem can be avoided.But this is taking plenty of time...very very slow.Is there any other way through which we can improve the perfomance.Instead of deleting one by one is it possible to delete 20000 rows in a fetch.
    Please suggest.

    try BULK COLLECT method of pl/sql.
    it has the option for you to process a set of records with a single execution.
    here is an example.
    declare
    type ty_dept is table of number index by binary_integer;
    dept_list ty_dept;
    cursor cur_dept is select deptno from dept;
    begin
    open cur_dept;
    loop
    --do bulk collect 1000 at a time
    fetch cur_dept bulk collect into dept_list limit 1000;
    exit when cur_dept%notfound;
    --process in bulk
    forall i in 1..dept_list.count
    delete from emp where deptno = dept_list(i);
    end loop;
    end;
    in the above example it process 1000 at a time. so instead of looping 1000 times and execute delete statements 1000 times it does once.
    maybe this should improve you performance.
    bench mark with initial some set of records before applying for entire 8 crores.

  • Update query issue to update middle (n records) of the rows in a table

    Hi
    I have a below requirement for that I gone thru one below appoch to fulfill my requirement.
    Requirement:
    I need to pull 3 crore data thru ODI, source table does not have a primary key and it have 200 columns with 3 crores records (it has a 25 columns as composite key).
    I need to populate those 3 crores records into target oracle DB but when I tried to load 3 crores at time I got an error so I approch incremental load, since for that I need to update for each 1 crore records with flg1,flg2 anf flg3 (flag values), for this update I have added one more column in source table using those flag values I can populate 1 crore records in target machine.
    Approch
    For aove requirement I writem below query to update flg1 for first crores records update tbl_name set rownum_id='flg1' where rownum<=10000000; and it updated successfully without any error, for second, to update flg2 for 2nd crore records I wrote below update query and it execute 20min and given *0 rows updated* Please help if below query is wrong
    Query: update tbl_name set rownum_id='flg2' where rownum<=20000000 and rownum_id is NULL;
    Thanks in advance
    Regards,
    Phanikanth

    A couple of thoughts.
    1. This forum is in English and accessed by people in more than 100 countries. Use metric counts not crore. Translate to million, billions, trillions, etc.
    2. No database version ... makes helping you very hard.
    3. 200 columns with 25 in a composite key is a nightmare by almost any definition ... fix your design before going any further.
    4. What error message? Post the complete message not just your impression of it.
    5. Oracle tables are heap tables .. there is no such concept as the top, the bottom, or the middle.
    6. If you are trying to perform sampling ... use the SAMPLE clause (http://www.morganslibrary.org/reference/select.html#sssc).
    7. What is ODI? Do not expect your international audience to know what the acronym means.

  • Rebate screen Shots

    Hi SAP Gurus,
    Plz has anybody for me rebate screen shots also? my mail iD : [email protected]

    Dear Ngassom Yves Fabrice,
    How to do rebate processing
    Rebates Processs in SAP is divided into three components
    1) Configuring Rebates
    2) Setting Up Rebates
    3) Managing rebate agreeeements and payments
    Pre-requsiistes- Check the following:
    1.The payer partner needs toi have the rebate field checked in the customer master on the sales area-billing doc tab.
    2.The Billing type must be marked as relevant for rebates.
    3.The Sales Organisation must be marked as relevant for rebates.
    Condition Technique :
    Rebates, use the condition technique, but distinguish themselves from pricing in applying to transactions over time, versus on a transaction basis. Rebates have their wn field catalog and their own condition table naming convention.So you could have two condition table "001" one for pricing and one for rebates, which could have different key fields. You need to use the technical names A001 For pricing and KOTe001 for rebates when you use the query type using transaction SE 16..
    Use create access sequence (AS).  Enter 1 in field category for rebate specific.  AS after going thru the right path of maintaining access sequence for rebates.
    The big difference between the rebate and the pricing access sequence is that there is no exclsuion flag available for rebate related AS. This means multiple tables for an access sequence can be aplied at the same time.
    Rebate related condition types are identified by codnition class -C.
    After defining and creating condition types for rebated include them in the pricing proceedure. The requirement should be 24 here which implies that the accruals are calculated on the basis of invoice/bill.
    The other fields- alctyp and altcbv does not allow you to manipulate how a rebate is calculated. Also, remove the requiremnt 24, if u want to see reabtes at order time.
    Now payment of rebates:
    Payments can be maunal or in full settlement. When you do manual payments, it defines how much can be paid out during a partial settlemetn.  You use partial settlement only when rebate agreement is defined for a full year but the paoyouts are supposed to happen on a monthly, quarterly or anyother specified period.
    These accurals are based on sales volume and when they are posted billing is created int eh follwoing manner. Provision for accruals is debited and Sales revenue is credited. When rebate credit memo is created
       Customer account/ is debited and
       Accrual provision account is credited.
    Also, please note that when rebates are created without dependent ona material but on customer/material you need to refer to a material for settlement.
    With Compliment: Srini
    I have this same problem found in:
    http://www.sap-img.com/sap-sd/rebate-process-with-ref-to-so.htm
    However, can somebody explain it as I have problem in understanding the link.
    What exactly do you wish to know in Rebates? The total outline of the Rebate process or each and every step in the SAP system?
    First of all rebates are more or less discounts which are offered to customers. The rebates are based on the volume of the business the customer does with you within a specified time. for eg if the customer agrees for Rs.1 Crore worth of business with u in 1 year, then you activate your rebate porocess. if at the end of the year the customer DOES achieve the target u offer him say 2/3/4 % whatever is decided. The rebates are passed on to the customer in the form of Credit notes.
    The rebate can be given to the customer at one time or in installments also.
    This is broadly the outline of the rebate process.
    R.Sreeram
    Note : I recomend you to study the theory part of why rebate and why not a discount.
    This will help you understand better.
    May be I can help you with rebate process.(IN -IMG)
    1. define a rebate agreement type
    2. define a condition type group
    3. define a condition type and place this condition
    Type in the pricing procedure.(REQUIREMENT=24)
    ALSO IN THE PROCEDURE- ACCRUAL KEY = ERU
    YOU ALSO HAVE TO DO THE ACCOUNT DETERMINATION FOR REBATES.
    Once you have defined all the 3 and assignment starts.
    Assign the agreement type to the condition type group
    Assign the cond type group to the condition type.
    Condition technique is also used in rebates.
    REBATE ACTIVATION- IN CUSTOMER MASTER, SALES ORGANISATION AND FOR THE BILLING DOCUMENT.
    After having done this please proceed to maintain the condition record for the rebates (transaction code-vbo1)
    Note: if you maintain the requirement coloumn with the requirement as 24 - the rebate will be affected in the billing document and if you dont give the requirement as 24 your rebate will be affected in the sales order.
    The rebate process is completed when you have created a credit memo to the customer.
    The document type for the partial settlement is R3.
    Please make sure you open two screens SO THAT YOU CAN COMPARE THE NEW ENTRIES WHAT EVER YOU'RE DEFINING WITH THAT OF THE STANDARDS or first you try with the standard condition type boo1, boo2
    boo3 boo4.
    AFTER YOU HAVE FINISHED A COMPLETE SALES CYCLE OF CREATION ORDER , DELIVERY AND BILLING.
    GO TO THE CONDITION RECORD IN CHANGE MODE (VB02) AND SETTLE THE ACCOUNT PARTIALLY.
    I hope this will be of any help to you.
    In a simple way,
    1. First you need to create a Rebate agreement.
    2. Create condition record for rebate giving the rebate rate and accrual rate.
    3. when the rebate relevent billing doc is generated, the rebate and accruals are determined and posted in a seperate GL account as a noted item - amount to be settled. Also it gets copied in the rebate agreement.
    4. create settlement run using credit memo request and then credit memo to settle this amount with the customer.
    Hope this helps you.
    Do award points if you found them useful.
    Regards,
    Rakesh
    P.S. you can send me a mail at my mail id [email protected] for any specific details

  • Rebates scren shots

    Hi sd gurus,
    can any one plz send me step by step screen shots for rebates with theory explanation of documents types b1,b2,r3,r4 etc
    to my mail id is <REMOVED>
    regards,
    T.srinivas
    Message was edited by:
            Yathish K

    Dear srinu vasu, 
    How to do rebate processing
    Rebates Processs in SAP is divided into three components
    1) Configuring Rebates
    2) Setting Up Rebates
    3) Managing rebate agreeeements and payments
    Pre-requsiistes- Check the following:
    1.The payer partner needs toi have the rebate field checked in the customer master on the sales area-billing doc tab.
    2.The Billing type must be marked as relevant for rebates.
    3.The Sales Organisation must be marked as relevant for rebates.
    Condition Technique :
    Rebates, use the condition technique, but distinguish themselves from pricing in applying to transactions over time, versus on a transaction basis. Rebates have their wn field catalog and their own condition table naming convention.So you could have two condition table "001" one for pricing and one for rebates, which could have different key fields. You need to use the technical names A001 For pricing and KOTe001 for rebates when you use the query type using transaction SE 16..
    Use create access sequence (AS).  Enter 1 in field category for rebate specific.  AS after going thru the right path of maintaining access sequence for rebates.
    The big difference between the rebate and the pricing access sequence is that there is no exclsuion flag available for rebate related AS. This means multiple tables for an access sequence can be aplied at the same time.
    Rebate related condition types are identified by codnition class -C.
    After defining and creating condition types for rebated include them in the pricing proceedure. The requirement should be 24 here which implies that the accruals are calculated on the basis of invoice/bill.
    The other fields- alctyp and altcbv does not allow you to manipulate how a rebate is calculated. Also, remove the requiremnt 24, if u want to see reabtes at order time.
    Now payment of rebates:
    Payments can be maunal or in full settlement. When you do manual payments, it defines how much can be paid out during a partial settlemetn.  You use partial settlement only when rebate agreement is defined for a full year but the paoyouts are supposed to happen on a monthly, quarterly or anyother specified period.
    These accurals are based on sales volume and when they are posted billing is created int eh follwoing manner. Provision for accruals is debited and Sales revenue is credited. When rebate credit memo is created
       Customer account/ is debited and
       Accrual provision account is credited.
    Also, please note that when rebates are created without dependent ona material but on customer/material you need to refer to a material for settlement.
    With Compliment: Srini
    I have this same problem found in:
    http://www.sap-img.com/sap-sd/rebate-process-with-ref-to-so.htm
    However, can somebody explain it as I have problem in understanding the link.
    What exactly do you wish to know in Rebates? The total outline of the Rebate process or each and every step in the SAP system?
    First of all rebates are more or less discounts which are offered to customers. The rebates are based on the volume of the business the customer does with you within a specified time. for eg if the customer agrees for Rs.1 Crore worth of business with u in 1 year, then you activate your rebate porocess. if at the end of the year the customer DOES achieve the target u offer him say 2/3/4 % whatever is decided. The rebates are passed on to the customer in the form of Credit notes.
    The rebate can be given to the customer at one time or in installments also.
    This is broadly the outline of the rebate process.
    R.Sreeram
    Note : I recomend you to study the theory part of why rebate and why not a discount.
    This will help you understand better.
    May be I can help you with rebate process.(IN -IMG)
    1. define a rebate agreement type
    2. define a condition type group
    3. define a condition type and place this condition
    Type in the pricing procedure.(REQUIREMENT=24)
    ALSO IN THE PROCEDURE- ACCRUAL KEY = ERU
    YOU ALSO HAVE TO DO THE ACCOUNT DETERMINATION FOR REBATES.
    Once you have defined all the 3 and assignment starts.
    Assign the agreement type to the condition type group
    Assign the cond type group to the condition type.
    Condition technique is also used in rebates.
    REBATE ACTIVATION- IN CUSTOMER MASTER, SALES ORGANISATION AND FOR THE BILLING DOCUMENT.
    After having done this please proceed to maintain the condition record for the rebates (transaction code-vbo1)
    Note: if you maintain the requirement coloumn with the requirement as 24 - the rebate will be affected in the billing document and if you dont give the requirement as 24 your rebate will be affected in the sales order.
    The rebate process is completed when you have created a credit memo to the customer.
    The document type for the partial settlement is R3.
    Please make sure you open two screens SO THAT YOU CAN COMPARE THE NEW ENTRIES WHAT EVER YOU'RE DEFINING WITH THAT OF THE STANDARDS or first you try with the standard condition type boo1, boo2
    boo3 boo4.
    AFTER YOU HAVE FINISHED A COMPLETE SALES CYCLE OF CREATION ORDER , DELIVERY AND BILLING.
    GO TO THE CONDITION RECORD IN CHANGE MODE (VB02) AND SETTLE THE ACCOUNT PARTIALLY.
    I hope this will be of any help to you.
    Praveen
    In a simple way,
    1. First you need to create a Rebate agreement.
    2. Create condition record for rebate giving the rebate rate and accrual rate.
    3. when the rebate relevent billing doc is generated, the rebate and accruals are determined and posted in a seperate GL account as a noted item - amount to be settled. Also it gets copied in the rebate agreement.
    4. create settlement run using credit memo request and then credit memo to settle this amount with the customer.
    Hope this helps you.
    Do award points if you found them useful.
    Regards,
    Rakesh
    P.S. you can send me a mail at my mail id [email protected] for any specific details

  • URGENT HELP Required: Solution to avoid Full table scan for a PL/SQL query

    Hi Everyone,
    When I checked the EXPLAIN PLAN for the below SQL query, I saw that Full table scans is going on both the tables TABLE_A and TABLE_B
    UPDATE TABLE_A a
    SET a.current_commit_date =
    (SELECT MAX (b.loading_date)
    FROM TABLE_B b
    WHERE a.sales_order_id = b.sales_order_id
    AND a.sales_order_line_id = b.sales_order_line_id
    AND b.confirmed_qty > 0
    AND b.data_flag IS NULL
    OR b.schedule_line_delivery_date >= '23 NOV 2008')
    Though the TABLE_A is a small table having nearly 1 lakh records, the TABLE_B is a huge table, having nearly 2 and a half crore records.
    I created an Index on the TABLE_B having all its fields used in the WHERE clause. But, still the explain plan is showing FULL TABLE SCAN only.
    When I run the query, it is taking long long time to execute (more than 1 day) and each time I have to kill the session.
    Please please help me in optimizing this.
    Thanks,
    Sudhindra

    Check the instruction again, you're leaving out information we need in order to help you, like optimizer information.
    - Post your exact database version, that is: the result of select * from v$version;
    - Don't use TOAD's execution plan, but use
    SQL> explain plan for <your_query>;
    SQL> select * from table(dbms_xplan.display);(You can execute that in TOAD as well).
    Don't forget you need to use the {noformat}{noformat} tag in order to post formatted code/output/execution plans etc.
    It's also explained in the instruction.
    When was the last time statistics were gathered for table_a and table_b?
    You can find out by issuing the following query:select table_name
    , last_analyzed
    , num_rows
    from user_tables
    where table_name in ('TABLE_A', 'TABLE_B');
    Can you also post the results of these counts;select count(*)
    from table_b
    where confirmed_qty > 0;
    select count(*)
    from table_b
    where data_flag is null;
    select count(*)
    from table_b
    where schedule_line_delivery_date >= /* assuming you're using a date, and not a string*/ to_date('23 NOV 2008', 'dd mon yyyy');

  • View for GDS

    Hi All,
    I want to create a view on table mbew and mara :
    tables are
    MBEW
    T001
    MARA
    joining condition are
    MARA     MANDT     =     MBEW     MANDT
    MARA     MATNR     =     MBEW     MATNR
    then i got the error of Invalid extract structure template  .....
    then i included T001 table and refrence field  now view fields are
    ZKDAT     DATS     8     Date as of which the price is valid
    ZKPRS     CURR     11     Future price
    WAERS     CUKY     5     Currency Key
    MTART     CHAR     4     Material Type
    MATKL     CHAR     9     Material Group
    MATNR     CHAR     18     Material Number
    Problem is that the data records in view are in crores bcoz duplicate entries are coming ...
         0.00     ARS     HALB     301     400000
         0.00     ARS     HALB     301     400000
         0.00     ARS     HALB     301     400000
         0.00     ARS     HALB     301     400000
         0.00     ARS     HALB     301     400000
         0.00     ARS     HALB     302     400001
         0.00     ARS     HALB     302     400001
         0.00     ARS     HALB     302     400001
         0.00     ARS     HALB     302     400001
         0.00     ARS     HALB     302     400001
    like this.......
    pls tell me where is the prob???
    Regards
    Shweta

    Hi,
    when u see the key for these fields, all are primary only..so for sure u wont duplicate entries..here
    because of date, u ll get these kind of values..
    once u have proper value for date...it ll solve ur problem...
    thnks..

  • SAP R3 and BI system requirement for loading Inventory data (0IC_C03)

    Hi,
    I have installed the Business content for 0IC_C03,activated the required datasources in R3 and replicated the same in SAP BI.
    However, while filling up setup tables the load is getting failed and it is giving error "No internal table space....".
    This is related to memory issues in SAP R3.Please let me know the minimum system requirement to do the above activity,
    for example RAM,parameters to be set from basis point of view,etc.The backend is MSSQL 2003 having RAM of 20GB.There is around one crore of data.
    Please let me as  soon as possible.
    Regards
    Deepak.

    Thank you Murali.
    But approximately can you tell me what is the memory requirement for SAP R3 and SAP BI for such type of applications.
    Regards
    Deepak.

  • Hi want to convert a number in crore, e.g. 10000000 to 1.00 Can anybody help on this?

    Hi All,
    I want to convert a number in crore format.
    My basic problem is, I am using a custome format:
    #,##0.00,,,%;
    Here main task is done by ,,,%.
    Each comma (,) is dividing a number by 1000. Thus three commas are dividing a number by 10^9 digits.
    But I need number in crore (i.e. 10^7), Thus we have used this percent sign (%).
    Here I can get required Value but appended percent (%) to it. I can temporary hide this using wrap text.
    But I need exact solution to convert a number in crore.
    Can anybody help me regarding the same.

    Hi Neha,
    You can use EPMScaleData function, in that give scaling factor as per your requirement.
    For more details you can go through following link
    How to use EPMScaleData in a fully dynamic report
    Regards,
    Shrikant

  • Commit for every 1000 records in  Insert into select statment

    Hi I've the following INSERT into SELECT statement .
    The SELECT statement (which has joins ) has around 6 crores fo data . I need to insert that data into another table.
    Please suggest me the best way to do that .
    I'm using the INSERT into SELECT statement , but i want to use commit statement for every 1000 records .
    How can i achieve this ..
    insert into emp_dept_master
    select e.ename ,d.dname ,e.empno ,e.empno ,e.sal
       from emp e , dept d
      where e.deptno = d.deptno       ------ how to use commit for every 1000 records .Thanks

    Smile wrote:
    Hi I've the following INSERT into SELECT statement .
    The SELECT statement (which has joins ) has around 6 crores fo data . I need to insert that data into another table.Does the another table already have records or its empty?
    If its empty then you can drop it and create it as
    create your_another_table
    as
    <your select statement that return 60000000 records>
    Please suggest me the best way to do that .
    I'm using the INSERT into SELECT statement , but i want to use commit statement for every 1000 records .That is not the best way. Frequent commit may lead to ORA-1555 error
    [url http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:275215756923]A nice artical from ASKTOM on this one
    How can i achieve this ..
    insert into emp_dept_master
    select e.ename ,d.dname ,e.empno ,e.empno ,e.sal
    from emp e , dept d
    where e.deptno = d.deptno       ------ how to use commit for every 1000 records .
    It depends on the reason behind you wanting to split your transaction into small chunks. Most of the time there is no good reason for that.
    If you are tying to imporve performance by doing so then you are wrong it will only degrade the performance.
    To improve the performance you can use APPEND hint in insert, you can try PARALLEL DML and If you are in 11g and above you can use [url http://docs.oracle.com/cd/E11882_01/appdev.112/e25788/d_parallel_ex.htm#CHDIJACH]DBMS_PARALLEL_EXECUTE to break your insert into chunks and run it in parallel.
    So if you can tell the actual objective we could offer some help.

  • Query Required for FMS

    Dear Expert
               I want the Query for to convert Value in to words,the value is  the document total value.

    HI,
    Try This It may help you
    ->> Create 1 UDF in Header on Requrie Documents (ex. Marketing Documents).
    ->> Create 3 Function in MSSQL Server Management.
    ->> Create 1 FMS in Query Generator and save as Query Manager then Assign to UDF for Amount in Words.
    for example:
    Create UDF in Header on Marketing Documents.
    ->> Choose Tools on Top menu.
    ->> User - Defined Fields. -> User Manage Fields.
    ->> Open the User Manage Fields Widnow.
    ->> Marketing Documents. -> Title.
    ->> Select Title and Click Add button in Bottom on User Manage Fields Window.
    ->> Create Amount in Words UDF(Code, Discription and Type - Character) and Add the UDF.
    Create Function in MSSQL Server Management.
    Check this Link, (have 3 Functions in Link).
    http://techcreeze.blogspot.com/2008/11/convert-amount-into-words-according-to_15.html
    1st Funciton - to Convert one Digit Number to words
    2nd Funciton - to convert 2 digit number to words.
    3rd Funciton - to convert amt in numbers to words.
    ->> Open the MSSQL Server Management Window.
    ->> Choose your Company database and Create NEW Query.
    ->> Create 3 Function Queries one by one.
    ->> Create 3 NEW Query Tab and 1st one put the 1st Function then Run the Function. and
    2nd New Query tab put the 2nd Function then Run the Function.
    3rd New Query tab put the 3rd Function then Run the Function.
    Create FMS in Query Generator and Save as Query Manager.
    ->> Adminstration.
    ->> Reports. -> Query Generator.
    ->> Open the Query Generator and put the below FMS query.
    for example : Purchase Order Doc. Toal(in wrods).
    declare @Doc_total numeric (19,6)
    set @Doc_total=$http://OPOR.DocTotal
    select dbo.fNumToWords (@Doc_total)
    ->> Assign the FMS in UDF on Purchase Order.
    ->> Auto Refresh of Document Total.
    Ex.
    1. Goto the UDF and Clcik Shift+Alt+F2.
    2. Select the SEARCH BY SAVED QUERY.
    3. Assign the FMS Query.
    4. Select the AUTO REFRESH WHEN FIELD CHENGES.
    5. Select Document Total.
    6. Check the Display Saved Values
    I am including here, source code of functions required for converting Number into words according to Indian or Nepali Numbering style. In Indian or Nepali Numbering style, 100000 is 1 Lakh and 100 Lakhs or 10000000 is 1 Crore. This makes the numbering style different from English and International Numbering Style.
    1. Function to Convert one Digit Number to words.
    CREATE    Function dbo.fConvertDigit(@decNumber decimal)
    returns varchar(6)
    as
    Begin
    declare
    @strWords varchar(6)
    Select @strWords = Case @decNumber
         When '1' then 'One'
         When '2' then 'Two'
         When '3' then 'Three'
         When '4' then 'Four'
         When '5' then 'Five'
         When '6' then 'Six'
         When '7' then 'Seven'
         When '8' then 'Eight'
         When '9' then 'Nine'
         Else ''
    end
    return @strWords
    end
    2. Function to convert 2 digit number to words.
    CREATE    Function dbo.fConvertTens(@decNumber varchar(2))
    returns varchar(30)
    as
    Begin
    declare @strWords varchar(30)
    --Is value between 10 and 19?
    If Left(@decNumber, 1) = 1
    begin
    Select @strWords = Case @decNumber
         When '10' then 'Ten'
         When '11' then 'Eleven'
         When '12' then 'Twelve'
         When '13' then 'Thirteen'
         When '14' then 'Fourteen'
         When '15' then 'Fifteen'
         When '16' then 'Sixteen'
         When '17' then 'Seventeen'
         When '18' then 'Eighteen'
         When '19' then 'Nineteen'
    end
    end
    else  -- otherwise it's between 20 and 99.
    begin
    Select @strWords = Case Left(@decNumber, 1)
         When '0' then '' 
         When '2' then 'Twenty '
         When '3' then 'Thirty '
         When '4' then 'Forty '
         When '5' then 'Fifty '
         When '6' then 'Sixty '
         When '7' then 'Seventy '
         When '8' then 'Eighty '
         When '9' then 'Ninety '
    end
    Select @strWords = @strWords + dbo.fConvertDigit(Right(@decNumber, 1))
    end
    --Convert ones place digit.
    return @strWords
    end
    3. Function to convert amt in numbers to words. (Built with the help of above 2 functions)
    CREATE function dbo.fNumToWords (@decNumber decimal(12, 2))
    returns varchar(300)
    As
    Begin
    Declare
    @strNumber varchar(100),
    @strRupees varchar(200),
    @strPaise varchar(100),
    @strWords varchar(300),
    @intIndex integer,
    @intAndFlag integer
    Select @strNumber = Cast(@decNumber as varchar(100))
    Select @intIndex = CharIndex('.', @strNumber)
    if(@decNumber>99999999.99)
    BEGIN
    RETURN ''
    END
    If @intIndex > 0
    begin
    Select @strPaise = dbo.fConvertTens(Right(@strNumber, Len(@strNumber) - @intIndex))
    Select @strNumber = SubString(@strNumber, 1, Len(@strNumber) - 3)
    If Len(@strPaise) > 0 Select @strPaise = @strPaise + ' paise'
    end
    Select @strRupees = ''
    Select @intIndex=len(@strNumber)
    Select @intAndFlag=2
    while(@intIndex>0)
    begin
    if(@intIndex=8)
    begin
      Select @strRupees=@strRupees+dbo.fConvertDigit(left(@decNumber,1))+' Crore '
      Select @strNumber=substring(@strNumber,2,len(@strNumber))
      Select @intIndex=@intIndex-1
    end
    else if(@intIndex=7)
    begin
      if(substring(@strNumber,1,1)='0')
      begin
       if substring(@strNumber,2,1)<>'0'
       begin
        if (@strRupees<>NULL and substring(@strNumber,3,1)='0' and substring(@strNumber,4,1)='0' and substring(@strNumber,5,1)='0' and substring(@strNumber,6,1)='0' and substring(@strNumber,7,1)='0' and @intAndFlag=2 and @strPaise=NULL)
        begin
         Select @strRupees=@strRupees+' and ' +dbo.fConvertDigit(substring(@strNumber,2,1))+' Lakh '
         Select @intAndFlag=1
        end
        else
        begin
         Select @strRupees=@strRupees+dbo.fConvertDigit(substring(@strNumber,2,1))+' Lakh '
        end
        Select @strNumber=substring(@strNumber,3,len(@strNumber))
        Select @intIndex=@intIndex-2
       end
       else
       begin
        Select @strNumber=substring(@strNumber,3,len(@strNumber))
        Select @intIndex=@intIndex-2
       end
      end
      else
      begin
       if(substring(@strNumber,3,1)='0' and substring(@strNumber,4,1)='0' and substring(@strNumber,5,1)='0' and substring(@strNumber,6,1)='0' and substring(@strNumber,7,1)='0'  and @intAndFlag=2 and @strPaise='')
       begin  
        Select @strRupees=@strRupees+' and ' + dbo.fConvertTens(substring(@strNumber,1,2))+' Lakhs '
        Select @intAndFlag=1
       end
       else
       begin
        Select @strRupees=@strRupees+dbo.fConvertTens(substring(@strNumber,1,2))+' Lakhs '
       end
       Select @strNumber=substring(@strNumber,3,len(@strNumber))
       Select @intIndex=@intIndex-2
      end
    end
    else if(@intIndex=6)
      begin
       if(substring(@strNumber,2,1)<>'0' or substring(@strNumber,3,1)<>'0' and substring(@strNumber,4,1)='0' and substring(@strNumber,5,1)='0' and substring(@strNumber,6,1)='0' and @intAndFlag=2 and @strPaise='')
       begin
        if len(@strRupees) <= 0
        begin
         if convert(int,substring(@strNumber,1,1)) = 1
         begin
          Select @strRupees=@strRupees+'' + dbo.fConvertDigit(substring(@strNumber,1,1))+' Lakh '
          Select @intAndFlag=2
         end
         else
         begin
          Select @strRupees=@strRupees+'' + dbo.fConvertDigit(substring(@strNumber,1,1))+' Lakhs '
          Select @intAndFlag=2
         end
        end
        else
        begin
         if convert(int,substring(@strNumber,1,1)) = 1
         begin
          Select @strRupees=@strRupees+' and' + dbo.fConvertDigit(substring(@strNumber,1,1))+' Lakh '
          Select @intAndFlag=1
         end
         else
         begin
          Select @strRupees=@strRupees+' and' + dbo.fConvertDigit(substring(@strNumber,1,1))+' Lakhs '
          Select @intAndFlag=1
         end
        end
       end
       else
       begin
        if convert(int,substring(@strNumber,1,1)) = 1
        begin
         Select @strRupees=@strRupees+dbo.fConvertDigit(substring(@strNumber,1,1))+' Lakh '
        end
        else
        begin
         Select @strRupees=@strRupees+dbo.fConvertDigit(substring(@strNumber,1,1))+' Lakhs '
        end
       end
       Select @strNumber=substring(@strNumber,2,len(@strNumber))
       Select @intIndex=@intIndex-1
      end
    else if(@intIndex=5)
      begin
       if(substring(@strNumber,1,1)='0')
       begin
        if substring(@strNumber,2,1)<>'0'
        begin
         if(substring(@strNumber,3,1)='0' and substring(@strNumber,4,1)='0' and substring(@strNumber,5,1)='0' and @intAndFlag=2 and @strPaise='')
         begin
          Select @strRupees=@strRupees+' and ' +dbo.fConvertDigit(substring(@strNumber,2,1))+' Thousand '
          Select @intAndFlag=1
         end
         else
         begin
          Select @strRupees=@strRupees+dbo.fConvertDigit(substring(@strNumber,2,1))+' Thousand '
         end
         Select @strNumber=substring(@strNumber,3,len(@strNumber))
         Select @intIndex=@intIndex-2
        end
        else
        begin
         Select @strNumber=substring(@strNumber,3,len(@strNumber))
         Select @intIndex=@intIndex-2
        end
       end
       else
       begin
        if(substring(@strNumber,3,1)='0' and substring(@strNumber,4,1)='0' and substring(@strNumber,5,1)='0' and @intAndFlag=2 and @strPaise='')
        begin
         Select @strRupees=@strRupees+' and '+dbo.fConvertTens(substring(@strNumber,1,2))+' Thousand '
         Select @intAndFlag=1
        end
        else
        begin
         Select @strRupees=@strRupees+dbo.fConvertTens(substring(@strNumber,1,2))+' Thousand '
        end
        Select @strNumber=substring(@strNumber,3,len(@strNumber))
        Select @intIndex=@intIndex-2
       end
      end
    else if(@intIndex=4)
      begin
       if ( (substring(@strNumber,3,1)<>'0' or substring(@strNumber,4,1)<>'0') and substring(@strNumber,2,1)='0' and  @intAndFlag=2 and @strPaise='')
       begin
        Select @strRupees=@strRupees+' and' + dbo.fConvertDigit(substring(@strNumber,1,1))+' Thousand '
        Select @intAndFlag=1
       end
       else
       begin
       Select @strRupees=@strRupees+dbo.fConvertDigit(substring(@strNumber,1,1))+' Thousand '
       end
       Select @strNumber=substring(@strNumber,2,len(@strNumber))
       Select @intIndex=@intIndex-1
      end
    else if(@intIndex=3)
      begin
       if  substring(@strNumber,1,1)<>'0'
       begin
        Select @strRupees=@strRupees+dbo.fConvertDigit(substring(@strNumber,1,1))+' Hundred '
        Select @strNumber=substring(@strNumber,2,len(@strNumber))
        if( (substring(@strNumber,1,1)<>'0' or  substring(@strNumber,2,1)<>'0') and @intAndFlag=2 )
        begin
         Select @strRupees=@strRupees+' and '
         Select @intAndFlag=1
        end
        Select @intIndex=@intIndex-1
       end
       else
       begin
        Select @strNumber=substring(@strNumber,2,len(@strNumber))
        Select @intIndex=@intIndex-1
       end
      end
    else if(@intIndex=2)
      begin
       if substring(@strNumber,1,1)<>'0'
       begin
        Select @strRupees=@strRupees+dbo.fConvertTens(substring(@strNumber,1,2))
        Select @intIndex=@intIndex-2
       end
       else
       begin
        Select @intIndex=@intIndex-1
       end
      end
    else if(@intIndex=1)
      begin
       if(@strNumber<>'0')
       begin
        Select @strRupees=@strRupees+dbo.fConvertDigit(@strNumber)
       end
       Select @intIndex=@intIndex-1
      end
    continue
    end
    if len(@strRupees)>0 Select @strRupees=@strRupees+ ' rupees '
    IF(len(@strPaise)<>0)
    BEGIN
    if len(@strRupees)>0 Select @strRupees=@strRupees + ' and '
    END
    Select @strWords = IsNull(@strRupees, '') + IsNull(@strPaise, '')
    select @strWords = @strWords + ' only'
    Return @strWords
    End
    Regards
    Balaji Sampath

  • Reg : SQL for fetching 10 rows incrementaly

    Hi,
    Version :10.2.0.
    For our development purpose we need to retrive minimum (10) records incrementaly by page wise, from table which have huge volume of data (may be 1 crore).
    I tried using rownum but its not efficient ...
    my query :
    SELECT * FROM (SELECT ROWNUM sno,*.table_name FROM table_name) WHERE sno BETWEEN 10 AND 20
    In the above, the inner query fetches all the records and the records are split based on the between clause and loaded in the grid....
    Is there any other efficient query or method to get this ?
    Plz advice....
    TIA,

    Try something like this:
    select *
    from (
       select t.*
       , rownum rn
       from yourtable t
       where rownum <= 20
    where rn >= 10;cheers,
    Anthony

Maybe you are looking for

  • Question about FMIR - open close fm periods

    A simple question: In the fmir transaction (to open and close fm posting periods), if the "From" column for a particular year is blank (not zero, but BLANK), and the "To" column has 12, then will the whole year be open? Or does the "From" column have

  • Error messag -'Error while determining ref.mov.type for WM via Table 156S:'

    Hi Guys, I am currently facing some issues with respect to the deliver creation. The scenario is somthing like this. I have assigned a FOC Item category to an Consignment Issue order type. The system is able to determine the Item category successfull

  • Mailing long http links...

    I have a common problem that I am running into when sending http links through Mail. If I drag a long web address from Safari, into a mail message, and then send it to a recipient that has a Microsoft mail client, such as Outlook Express, the HTML li

  • Using deprecated db panel possible?

    I know there are several discussions on the deprecated database panel in DW cc. However, I have not found anyone discussing the problems I've had using the reinstalled panel after the last update to DWcc. In short, I installed the deprecated database

  • How to install downloaded JDBC drivers?

    I have downloaded jdbc80520-nt.zip. Do I just extract the contents to a folder and put that in my classpath or should I be using the Oracle installer (if so there is no .PRD file). Also if I am using the Thin JDBC how do I know that Oracle has a Java