Rule based ATP is not working for Components

Hi All,
Our requirement is to do availability check through APO for Sales order created in ECC,so we are using gATP.
Requirement: We are creating salesorder for BOM header (Sales BOM) and avaialbility check should happen for components i.e. Product avalaibility & Rule based substitution.
Issue: Product availiabilty is working for components but rules based substituion is working,  mean Rules are not getting determind for components.
Settings:
- Header doesnot exist in APO and compnents do exist in APO
- Availability check is not enabled for header item category and enabled for Item category for components
- Rules have been created for Components in APO
- Rule base ATP is activated in Check instructions
We have also tried MATP for this i.e. PPM created in APO but still didn't get the desired result.
If we create salesorder for the component material directly then Rule based ATP is happening, so for components Rule based ATP is not working.
How do we enable enable Rulesbased ATP for components, i mean is there any different way to do the same.
Thanks for help.
Regards,
Jagadeesh

Hi Jagdeesh,
If you are creating BOM in ECC and CIFing PPM of FG/Header material to APO, I think you need to CIF Header material, too, with material integration model.
Please include header material in you integration models for material, SO and ATP check as well.
For component availability check, you can use MATP; but for MATP, FG should be in APO. You need not to CIF any receipts of FG (stock, planned orders, POs etc), so that MATP will be triggered directly. Then maintaining Rules for RMs will enable to select available RMs according to the rule created.
Regards,
Bipin

Similar Messages

  • Questions on Rules-Based ATP and Purchase Requisitions for STOs

    Hello experts,
    We are working on rules-based ATP configuration and have several questions about the functionality.  Iu2019m hoping that some of you are using this functionality and can help give us direction.
    In our environment we have multiple distribution centers and multiple manufacturing plants.  We want to confirm sales orders against stock and production orders in any of those plants, depending on the locations that have stock or planned production.  For example, we will place a sales order against plant A.  If there is not enough stock in plant A then rules-based ATP will use location determination to check in plant B, then C.  The scope of check on the ATP check will include stock and released production orders.  We will configure plant A as the u201Cconsolidation locationu201D so if stock is found in plants B or C then stock transport orders will automatically be created to move the stock to plant A before shipping to the customer.
    We have configured rules-based ATP and this functionality is working well in our Development system.  The ATP check is executed and uses the rules-based ATP to find eligible stock in other plants.  The system is also creating purchase requisitions to move the stock to the consolidation plant. 
    Our first concern is that there doesnu2019t appear to be any firm linkage between the sales order and the resulting purchase requisition.  For example, if we create sales order 123 for plant A and the rules-based ATP finds stock in plant B it automatically creates a purchase requisition 987 to move the stock from plant B to plant A.  However, there doesnu2019t appear to be a linkage between sales order 123 and purchase requisition 987.  For instance, if we delete sales order 123 the purchase requisition doesnu2019t get deleted. 
    Our second concern is that the quantity on the purchase requisition can still be confirmed against later sales orders.  For example, say the above scenario resulted in a purchase requisition 987 that consumed all the stock available in plant B.  We then create a second sales order 456 for the same product.  Plant A is out of stock so the rules-based ATP looks in plant B.  We would expect that plant B would also not have any stock because itu2019s all been consumed by the purchase requisition.  Instead, the system creates a second purchase requisition to move quantity from plant B to plant A.  Itu2019s as if the system doesnu2019t realize that the purchase requisition 987 is already planning to move stock out of plant B.
    Does anyone have any thoughts or suggestions on these two scenarios?  Is there a way to configure the system so there is a hard linkage between the sales order and the purchase requisition so that if the sales order is deleted then the purchase requisition is also deleted?  Should ATP realize that purchase orders are consuming inventory and not allow later sales orders to confirm against that same inventory?  Any advice or experience would be greatly appreciated.
    Thanks,
    David Eady
    Application Delivery Team Lead
    Propex, Inc.

    Hi,
    The scheduling is done in SCM, and from there, whenever the RBA is triggered, the calculation is done always with the old route in SCM. Until you get back to R/3 this is when your route is determined. But the ATP check is always with the original route. So the idea would be that you change the values of the route while still in APO, this is possible via the user exit. Should be done in scheduling in APO.  
    Hope this information is helpful.
    Regards,
    Tibor

  • SD- Sales Order - ATP check not working for few item in same sales order

    Hi Experts,
    Need help we activated ATP check but for few item i could not find confirmation qty after availability check. In same SO out of 4 items for schedule line it confirming qty for 2 item but  it's not confirming for remaining 2 items though stock is available. Please guide me how to correst and what need to check.
    Manoj

    Dear Manoj,
               As you know, ATP is a big subject & some times its difficult to point the exact problem.
    In your case, I suggest you to execute the function module:BAPI_MATERIAL_AVAILABILITY using Tx:SE37
    key in selection criteria , in results check the "ATPQTY"- it will show you how much actual stock is available for use i.e. ATP qtty.
    still if you find the availability & system not confirming the qtty, then problem could be in checking rule
    Tx:OVZ9 check in relevant combination, whether you are considering RLT or not?
    is this case with MTS or MTO
    because in Sales order -
    for MTS - checking rule "A" & MTO checking rule will be "AE"
    Regards,
    Reazuddin MD

  • Time based stacking does not work for 0 seconds

    Related to my previous note about stacking DNG with CR2, it appears that selecting 0 time interval for stacking does not work the way I would expect.
    A 0 time interval for stacking should mean that all times that are exactly the same (ie. DNG from CR2 file) get merged. This does not happen. It would seem that a time interval of 1 second is required to stack a DNG that comes from a CR2 file together.
    So if I have a CR2 file that was taken at 11:23:34 and convert it to DNG, I now have two files taken at 11:23:34.
    If I use the "time based stacking" and select 0 second gap, they will not be stacked together.
    I need to use a 1 second gap.
    It would be nice to see this fixed

    Reset SMC.     http://support.apple.com/kb/HT3964
    Choose the method for:
    "Resetting SMC on portables with a battery you should not remove on your own".

  • Rule with DoesNotContain qualifier not working for CATEGORY

    I try to use the DoesNotContain qualifier on a CATEGORY field.
    I tried the following rule:
    (CATEGORY DoesNotContain "Archived")
    And receive this Error Msg: "Error in Rule. Invalid Operator for Datatype"
    But the following rule works fine
    (CATEGORY Matches "Archived")
    But I need the negated expression... any ideas?

    Try this
    !(CATEGORY Matches "Archived")
    as you must be doing this from some sort of program, just add the
    exclamation mark before the opening bracket
    Cheers Dave
    Dave Parkes [NSCS]
    Occasionally resident at http://support-forums.novell.com/

  • BPM Worklist: Searching in custom views does not work for protected flexfields !

    Hello,
    Have mapped few protected attributes in my .task file. Also created the corresponding labels on target SOA server. I am able to create custom views using these protected flex fields.
    But what I have observed is keyword based search is not working for custom views using protected fiexfields.. however it works fine with public fiexfields.
    Any pointers on this? Am I missing something in the configuration?
    Thanks..

    Can anyone help me?

  • Rules based ATP not working

    Hi Experts,
    We are facing couple of issues with Rules based ATP . The scenario is we are using only location based  substitution
    1) We are creating an order for a material in ECC . This material is GATP relevant & the settings are made for rules based ( if no stock available at Plant 1 it would check for stock  at plant 2 and confirm the requested quantity if available )   , ATP check is happening after creation of order for plant1  , but it is not checking for quantity at plant 2  eventhough quantity is available at Plant 2 .
    I am checking the rules, it says no rule was found ,it is not possible to dispaly the rules , But for the sameif i am doing a ATP simulation in APO , it is working fine , the susbstitutions are happening & confirmations are being done.
    2) IS it possible to use both checking horizon & rules based ATP ? The situation is if we use Checking horizon  in check control , any SO will get confirmed based on checking horizon , if no receipts or stock is available before the CH . If the rules based ATP is present along with CH  for plants 1 & 2, the system is still confirming the quantity at the CH on Plant1 , even though there is enough quantity to be confirmed at Plant 2.
    Thanks for your help
    Regards
    Surendra

    The first issue  is solved . There was discrepancy in the data format between APO & ECC . The data when transferred to APO from ECC has been converted to a  format  which APO uses & when a SO is created in ECC the data that was entered in the SO is not being recognised by APO  so the error .
    Regards
    Surendra

  • APO Rule based ATP for RA Repair

    Hey,
    Could you please help me to turn on rule based ATP for document type RA outbound?
    The senario is as follows:
    Customer returns to my company the product.
    My company has multiple locations (plants) for replacement products. I would like to determine the replacement product location with rule-based ATP. We use rule-based ATP for the sales site w/o issues.
    I set up in configuration:
    ZRA (copy of RA) with business transaction RMA(to trigger the rule based ATP)
    Assigned ZRA / Item usage = R104/ PSTYV= ZXNN (item category allows rule based ATP).
    ZRA     ZNO1     R104     IRRA     ZXNN
    I also did the below rules based ATP item catgegory determination:
    AUART        MTPOS         VWPOS        UEPST         PSTYV
    ZRA     ZNO1     APO0     ZTP1     ZXNN
    ZRA     ZNO1     APO1          ZTP1
    ZRA     ZNO1     APO1     ZXNN     ZTP1
    ZRA     ZNO1     APO2     ZTP1     ZXNN
    When I create with VA01 a ZRA order and add a replacement plant then I get this message:
    The ATP rules are not called up for item 000030 - Message no. /SAPAPO/ATP147
    But when I go from the "APO Availability Check" view to the Rule then I see my rules determined.
    The detail message also says that the system "things" the line was already delivered, which is not the case.
    Could you please tell me if it is possible to combine rule-based ATP with the RA replacement process and if yes how to do it?
    Thanks,
    Sabine

    Check OSS Note 571044 - RBA: Use of calculation profiles and rules
    Regards,

  • Delivery & Invoice for Rules based ATP check materials

    Hi All,
    We have an query regarding rules based ATP , delivery & Invoicing . When we create a SO ( say we have only one line item 10 , with quantity 100 created at Plant P1 , item category TAN ) , ATP confirmation happens   ,based on the stock & receipts ( say we have confirmation of 60 units at Plant P1  ) . Since we are using RBATP , the remaining 40 quantity is being confirmed at Plant P2.  Now the order will have multiple line items 10 the original line item but with different item category TAPA and also two more line items  for quantity of 60 & 40  for plants P1 & Plants P2 respectively with item category TAN. This is the standard functionality.
    My question is , Will there be any issues with respect to delivery & Invoicing  as there are multiple plants and different item categories.
    Thanks & Regards
    Surendra

    Hi,
    With respect  to delivery you will have differnt delivey document because your shipping point is going to be different.
    Regarding Billing you can combine the differnet delivey document if the delivery document created using the sales order contains the same payer,payment terms, billing date,material group and Incoterms.
    Apart from the above you will not face anyproblem by having 2 diiferent item category for the above said scenario..
    Regards,
    V.Devaselvam.

  • Defaulting Rules Not Working for Repair Orders in OM?

    Hi,
    Defaulting Rules have been setup for return line & standard line based on few conditions and it is working fine if we create a sales order directly from OM (Manual SO)?
    But in our project we are using  Depot Repair(Repair Orders), we tried to create a service request and then converted to a sales order here defaulting rules not working for repair orders?
    Please help me to solve this issue ASAP.
    Thanks,
    Kishor

    Hi,
    You have like this:
    1. Price list
    2.OE_DEFAULT_PVT.Get_SOB_Currency_Code
    You have to make
    1. XXOE_DEFAULT_PVT.custom_code
    2. Price list
    3.OE_DEFAULT_PVT.Get_SOB_Currency_Code
    Did you made own custom code to pick currency?
    Regards,
    Luko

  • MOSS 2007 Enterprise Search not working for Korea based users but WSS Search is working fine.

    Hi,
    In my organization all the users are able to do Enterprise content search and people search but only Korea based users its not working (both content search & people search). But at the same time WSS 3.0 search (its a different farm) is working fine.
    Your search cannot be completed because of a service error. Try your search again or contact your administrator for more information.
    1. No changes in the URL for all users and Korea users
    2. Tried with different browsers and clearly the temp files but no use.
    3. Korea users also working from office only with Wired LAN connection.
    4. Tried different accounts (including Farm account) but no use.
    5. Not receiving any errors in the Event Viewer
    Anyone please let me know what went wrong.
    Regards,
    Prabhu.

    Hi,
    Is the Archive folders open in your Outlook?
    Please try to click and hight All Mail Items under Mail Folders and then try to search again:
    Please let me know the result.
    Best Regards,
    Steve Fan
    TechNet Community Support

  • Derivation Rules Not Working for other company codes

    Hi,
    I have 5 Company codes and only for one FM was activated. now i want to activate FM for all 5 company codes. for which i have assigned the FM area to all 5 company codes. I have also assigned the derivation strategy to all 5 company codes as well. now when i post a transaction for any other company code derivation rules is not being process hence no commitment item or fund center is derived. however for the original company code for which FM was activated in the first derivation rule are working fine means system is deriving commitment item and fund center. can any one tell me why derivation rules are not working for other company codes? do i have to add Company code in source field of derivation strategy? could this be the reason? because in beginning there was no other company code so we did not included any company code field in the first place.
    Regards,

    Faizan,
    Go to  Funds Management Government> Actual and Commitment Update/Integration> Activate/Deactivate Funds Management.
    In the screen create an entry for each Company Code and Funds Management Area combination.
    Activate the AA Derivtn flag if you want the derivation to be called and the Update flag if you want to update commitments and actuals in FM.
    Thanks
    Shyam

  • Copa derivation rule not working for Discount GL

    Hi All,
    Kindly note that I have a distribution rule where company & plant combination is used where condtion is that customer group 3 should be 018 and then replace distribution channel to 03.However the rule is not working for discount GL posted in the billing document.
    I tried testing it in FB50 but then it does not allows me to enter plant and because of that derivation rule fails. However in my billing doc I do see a plant  against discount GL and still the rule is not getting picked.
    I had raised this issue earlier but the reply where not as expected and so I have rephraised my question.
    Kindly help me on this.
    Regards
    Pranay

    Hi Pranay
    I could not understand your req to a great detail, following are my observations
    1. There should be derivation rule in place 1st of all to derive customer group from billing doc...
    Check if Cust Group is populated in your COPA doc or not.. For this cust group should be a segment level char in KEQ3
    2. Create a derivation rule using method "Derivation".
    Source fields would be Cust Group, Plant and Company code ( I guess you want to change dist channel with this combination)
    Target field would be VTWEG (Dist Channel)....Click on the magnifying lens beside VTWEG and choose relevant radio button "Overwrite if ......."
    CLick on RULE VALUES and maintain the required Values there
    This should work...
    Regards
    Ajay M

  • Rules based ATP to Consider Checking Horizon

    Hello SAP Experts,
    I am a novice to GATP functionality. I have one scenario tried to work on it and Standard SAP system doesn't seem to work this way.
    Rules based ATP for location Determination is used for order confirmation.
    Loc A   Mat 1  500 Pcs
    Loc B   Mat 1  200 Pcs
    Rule 1 LocA --> Loc B
    Order comes in for Mat 1 at location A for 1000 Pcs and confirmation was given for 700 Pcs out of which 200 Pcs will be sourced from Loc B. I'm trying to confirm remaining 300 at the end of Checking horizon as per Customer requirement. Please suggest a way to acheive this.
    Regards,
    Priyanka

    Hi,
    You will start from ECC, Material master MRP3 view   MARC-WZEIT   Total replenishment lead time (in workdays).
    In APO , SPRO--GATP-Maintain check control - make sure that ATP group and business event example 01 and A should have "consider Checking horizon" .
    RLT from R3 will become Checking horizon in product master in APO. In APO product master ATP tab CHKHOR is the field name.
    Make sure that in the rules -- calculation profile -allowed delay is not maintained or should not be less than RLT /Checking horizon.
    Thanks,
    Pavan Verma

  • Auto_lexer (stemming) not working for other languages(other than english)

    Hi All,
    We are planning to use AUTO_LEXER instead of MULTI_LEXER and observed that stemming is not working for German where as it is working for English when I use AUTO_LEXER. I even used query templates but of no use.
    But when i use MULTI_LEXER, creating sub lexers for German and Enlgish, Stemming is working for German also after changing the session language and setting stemmer of wod list to German (Which is expected).
    Following is the code for AUTO_LEXER creation:
    CREATE TABLE test_auto_lexer(pkey NUMBER(5,0),
    lang_index VARCHAR2(3),
    content_text CLOB,
    CONSTRAINT test_auto_lexer_pk primary key (pkey))
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (1,'eng','I drive a bike')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (2,'eng','I drove a bike')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (3,'eng','I have driven a bike')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (4,'eng','Just check for other things')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (5,'eng','always drive a car')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (6,'eng','it is nothing')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (7,'ger','Ich fahre ein Fahrrad')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (8,'ger','Ich fuhr ein Fahrrad')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (9,'ger','Ich habe ein Fahrrad gefahren')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (10,'ger','Aktivieren Sie einfach für andere Dinge')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (11,'ger','immer Auto fahren')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (12,'ger','es ist nichts')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (13,'ger','sprechen')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (14,'ger','sprach')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (15,'ger','gesprochen')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (16,'ger','tale')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (17,'ger','Indlæg')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (18,'ger','tales')
    BEGIN
    ctx_ddl.create_preference('auto_lexer1', 'auto_lexer');
    END;
    BEGIN
    ctx_ddl.set_attribute('auto_lexer1','index_stems','yes');
    END;
    BEGIN
    ctx_ddl.set_attribute('auto_lexer1','language','danish english german');
    END;
    BEGIN
    ctx_ddl.set_attribute('auto_lexer1','alternate_spelling','german');
    END;
    CREATE INDEX test_auto_lexer_ix1
    ON test_auto_lexer(content_text)
    INDEXTYPE IS ctxsys.context
    PARAMETERS ('datastore ctxsys.direct_datastore filter ctxsys.null_filter lexer auto_lexer1')
    select to_char(content_Text) from test_auto_lexer where contains(content_text,
    '<query>
    <textquery lang="ger" grammar="context">
    $fahren
    </textquery>
    <score datatype="integer"/>
    </query>') > 0
    this doesnt work even after changing the session language. My default Sesson language is AMERICAN.
    Could any one help me with this, in case I am missing something here. I would be really thankful.
    Edited by: Nagendra Prasad on Jan 23, 2010 12:05 AM

    In the future, please begin a new thread for a new question and provide a link to a related question.
    According to the online documentation, Oracle only supports stemming for English, Dutch, French, German, Italian, Spanish, and Japanese. Oracle does not support Russian stemming, although you may have gotten some accidental results, due to identifying it as a different language and applying stemming rules for that language. The following manual sections show the languages available for the index_stems attribute of the basic_lexer and stemmer attribute of the basic_wordlist:
    Basic_lexer attributes:
    http://docs.oracle.com/cd/E11882_01/text.112/e24436/cdatadic.htm#CIHHBAAD
    Basic_wordlist attributes:
    http://docs.oracle.com/cd/E11882_01/text.112/e24436/cdatadic.htm#g1019326
    Also, please see the following note:
    Features not available in 11.2.0.3:
    http://docs.oracle.com/cd/E11882_01/readmes.112/e22488/toc.htm#BABDGGDB
    "Certain Oracle Text functionality based on third-party technologies, including AUTO_LEXER and CTX_ENTITY, have been disabled in this release (reference Bug 12618046). For BASIC_LEXER, the usage of the INDEX_STEMS attribute values that depend on third-party technologies, is also affected. If this impacts an existing application, contact Oracle Support Services for guidance."
    Also, the auto_lexer has been replaced by the world_lexer, which only has one attribute:
    http://docs.oracle.com/cd/E11882_01/text.112/e24436/cdatadic.htm#BHCJEGFJ
    I don't work for Oracle, so I don't know why they do things the way they do.
    So, you need to stick with the basic_wordlist for stemming, not the lexers. However, you may get better performance by combining the multi_lexer with the basic_wordlist, as the multi_lexer eliminates time spent on automatic language detection. But, you need to remember not to use the index_stems with your lexer, since it will conflict with the wordlist. I am not experiencing any time problems as you have. Please see the demo below. I have provided the whole script below that, so that you can reproduce it on your system. If you still have problems, then it may be due to differences in versions.
    -- demo:
    SCOTT@orcl_11gR2> select * from v$version
      2  /
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE     11.2.0.1.0     Production
    TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    5 rows selected.
    SCOTT@orcl_11gR2> select value from v$nls_parameters
      2  where  parameter = 'NLS_CHARACTERSET'
      3  /
    VALUE
    AL32UTF8
    1 row selected.
    SCOTT@orcl_11gR2> DROP TABLE news
      2  /
    Table dropped.
    SCOTT@orcl_11gR2> EXEC CTX_DDL.DROP_PREFERENCE ('my_wordlist')
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> EXEC CTX_DDL.DROP_PREFERENCE ('global_lexer')
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> EXEC CTX_DDL.DROP_PREFERENCE ('english_LEXER')
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> EXEC CTX_DDL.DROP_PREFERENCE ('german_LEXER')
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> CREATE TABLE news
      2    (pkey            NUMBER,
      3       lang            VARCHAR2 (2),
      4       short_content  CLOB)
      5  /
    Table created.
    SCOTT@orcl_11gR2> INSERT ALL
      2  INTO news (pkey, lang, short_content)
      3    VALUES  (1, 'en', 'I drive a bike.')
      4  INTO news (pkey, lang, short_content)
      5    VALUES  (2, 'en', 'I drove a bike.')
      6  INTO news (pkey, lang, short_content)
      7    VALUES  (3, 'en', 'I have driven a bike.')
      8  INTO news (pkey, lang, short_content)
      9    VALUES  (4, 'en', 'I always drive a car')
    10  INTO news (pkey, lang, short_content)
    11    VALUES  (5, 'en', 'This is nothing')
    12  INTO news (pkey, lang, short_content)
    13    VALUES  (6, 'de', 'Ich fahre ein Fahrrad.')
    14  INTO news (pkey, lang, short_content)
    15    VALUES  (7, 'de', 'Ich fuhr ein Fahrrad.')
    16  INTO news (pkey, lang, short_content)
    17    VALUES  (8, 'de', 'Ich habe ein Fahrrad gefahren.')
    18  INTO news (pkey, lang, short_content)
    19    VALUES  (9, 'de', 'Ich habe immer ein Auto fahren.')
    20  INTO news (pkey, lang, short_content)
    21    VALUES  (10, 'de', 'Es ist nichts.')
    22  SELECT * FROM DUAL
    23  /
    10 rows created.
    SCOTT@orcl_11gR2> BEGIN
      2    -- word list:
      3    ctx_ddl.create_preference ('my_wordlist',   'basic_wordlist');
      4    ctx_ddl.set_attribute      ('my_wordlist',   'stemmer',           'auto');
      5    -- english lexer:
      6    ctx_ddl.create_preference ('english_lexer', 'basic_lexer');
      7    -- german lexer:
      8    ctx_ddl.create_preference ('german_lexer',  'basic_lexer');
      9    ctx_ddl.set_attribute      ('german_lexer',  'composite',       'german');
    10    ctx_ddl.set_attribute      ('german_lexer',  'alternate_spelling', 'german');
    11    ctx_ddl.set_attribute      ('german_lexer',  'mixed_case',       'no');
    12    ctx_ddl.set_attribute      ('german_lexer',  'base_letter',       'yes');
    13    -- multi_lexer:
    14    ctx_ddl.create_preference ('global_lexer',  'multi_lexer');
    15    ctx_ddl.add_sub_lexer      ('global_lexer',  'default',            'english_lexer');
    16    ctx_ddl.add_sub_lexer      ('global_lexer',  'german',            'german_lexer');
    17  END;
    18  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> create index search_news
      2  on news (short_content)
      3  indextype is ctxsys.context
      4  parameters
      5    ('lexer            global_lexer
      6        language column  lang
      7        wordlist       my_wordlist')
      8  /
    Index created.
    SCOTT@orcl_11gR2> EXEC DBMS_STATS.GATHER_TABLE_STATS (USER, 'NEWS')
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> COLUMN short_content FORMAT A30
    SCOTT@orcl_11gR2> ALTER SESSION SET NLS_LANGUAGE = 'AMERICAN'
      2  /
    Session altered.
    SCOTT@orcl_11gR2> set timing on
    SCOTT@orcl_11gR2> select * from news
      2  where  contains (short_content, '$drive') > 0
      3  /
          PKEY LA SHORT_CONTENT
             1 en I drive a bike.
             2 en I drove a bike.
             3 en I have driven a bike.
             4 en I always drive a car
    4 rows selected.
    Elapsed: 00:00:00.05
    SCOTT@orcl_11gR2> select * from news
      2  where  contains (short_content, '$drove') > 0
      3  /
          PKEY LA SHORT_CONTENT
             1 en I drive a bike.
             2 en I drove a bike.
             3 en I have driven a bike.
             4 en I always drive a car
    4 rows selected.
    Elapsed: 00:00:00.05
    SCOTT@orcl_11gR2> ALTER SESSION SET NLS_LANGUAGE = 'GERMAN'
      2  /
    Session altered.
    Elapsed: 00:00:00.01
    SCOTT@orcl_11gR2> select * from news
      2  where  contains (short_content, '$fahr') > 0
      3  /
          PKEY LA SHORT_CONTENT
             6 de Ich fahre ein Fahrrad.
             7 de Ich fuhr ein Fahrrad.
             8 de Ich habe ein Fahrrad gefahren.
             9 de Ich habe immer ein Auto fahren
    4 rows selected.
    Elapsed: 00:00:00.07
    SCOTT@orcl_11gR2> select * from news
      2  where  contains (short_content, '$fuhr') > 0
      3  /
          PKEY LA SHORT_CONTENT
             6 de Ich fahre ein Fahrrad.
             7 de Ich fuhr ein Fahrrad.
             8 de Ich habe ein Fahrrad gefahren.
             9 de Ich habe immer ein Auto fahren
    4 rows selected.
    Elapsed: 00:00:00.16-- script for you to reproduce the demo on your system:
    select * from v$version
    select value from v$nls_parameters
    where  parameter = 'NLS_CHARACTERSET'
    DROP TABLE news
    EXEC CTX_DDL.DROP_PREFERENCE ('my_wordlist')
    EXEC CTX_DDL.DROP_PREFERENCE ('global_lexer')
    EXEC CTX_DDL.DROP_PREFERENCE ('english_LEXER')
    EXEC CTX_DDL.DROP_PREFERENCE ('german_LEXER')
    CREATE TABLE news
      (pkey           NUMBER,
       lang           VARCHAR2 (2),
       short_content  CLOB)
    INSERT ALL
    INTO news (pkey, lang, short_content)
      VALUES  (1, 'en', 'I drive a bike.')
    INTO news (pkey, lang, short_content)
      VALUES  (2, 'en', 'I drove a bike.')
    INTO news (pkey, lang, short_content)
      VALUES  (3, 'en', 'I have driven a bike.')
    INTO news (pkey, lang, short_content)
      VALUES  (4, 'en', 'I always drive a car')
    INTO news (pkey, lang, short_content)
      VALUES  (5, 'en', 'This is nothing')
    INTO news (pkey, lang, short_content)
      VALUES  (6, 'de', 'Ich fahre ein Fahrrad.')
    INTO news (pkey, lang, short_content)
      VALUES  (7, 'de', 'Ich fuhr ein Fahrrad.')
    INTO news (pkey, lang, short_content)
      VALUES  (8, 'de', 'Ich habe ein Fahrrad gefahren.')
    INTO news (pkey, lang, short_content)
      VALUES  (9, 'de', 'Ich habe immer ein Auto fahren.')
    INTO news (pkey, lang, short_content)
      VALUES  (10, 'de', 'Es ist nichts.')
    SELECT * FROM DUAL
    BEGIN
      -- word list:
      ctx_ddl.create_preference ('my_wordlist',   'basic_wordlist');
      ctx_ddl.set_attribute     ('my_wordlist',   'stemmer',            'auto');
      -- english lexer:
      ctx_ddl.create_preference ('english_lexer', 'basic_lexer');
      -- german lexer:
      ctx_ddl.create_preference ('german_lexer',  'basic_lexer');
      ctx_ddl.set_attribute     ('german_lexer',  'composite',          'german');
      ctx_ddl.set_attribute     ('german_lexer',  'alternate_spelling', 'german');
      ctx_ddl.set_attribute     ('german_lexer',  'mixed_case',          'no');
      ctx_ddl.set_attribute     ('german_lexer',  'base_letter',         'yes');
      -- multi_lexer:
      ctx_ddl.create_preference ('global_lexer',  'multi_lexer');
      ctx_ddl.add_sub_lexer     ('global_lexer',  'default',             'english_lexer');
      ctx_ddl.add_sub_lexer     ('global_lexer',  'german',              'german_lexer');
    END;
    create index search_news
    on news (short_content)
    indextype is ctxsys.context
    parameters
      ('lexer            global_lexer
        language column  lang
        wordlist         my_wordlist')
    EXEC DBMS_STATS.GATHER_TABLE_STATS (USER, 'NEWS')
    COLUMN short_content FORMAT A30
    ALTER SESSION SET NLS_LANGUAGE = 'AMERICAN'
    set timing on
    select * from news
    where  contains (short_content, '$drive') > 0
    select * from news
    where  contains (short_content, '$drove') > 0
    ALTER SESSION SET NLS_LANGUAGE = 'GERMAN'
    select * from news
    where  contains (short_content, '$fahr') > 0
    select * from news
    where  contains (short_content, '$fuhr') > 0
    /

Maybe you are looking for

  • Can't run Photoshop on win 7 64 bit - licensed creative cloud member

    Starting today I have been unable to run photoshop cs6 and can't find a work around.  I have logged into my creative cloud account and reviewed adobe forums for solutions.  Very, very frustrated with adobe licensing model. Message comes up indicating

  • Adobe Connect 9 Training Course Video gets resized after being published from Captivate 6

    Hello! I have an FLV that I have published to Adobe Connect 9 from Adobe Captivate 6. I have set the size of the video to the dimensions that best display the FLV with player controls. However, when I publish to Adobe Connect 9, the video is resized

  • To connect a wifi interface (only wps) to airport

    i have: 1) a new airport time capsule (bought on 2 march and fully updated) 2) wifi devide that can connect to wifi router through the wps button (there is no other way to set the wifi connection). the devide is the wifi interface to meldcould of mit

  • I cant use my yahoo messnger

    i have had my bb 8320 for about 2 months and i cant log into my yahoo it says that the service not enabled for my hand held> how do i get it to work

  • Will Apple Air (2011) work with BenQ W1070

    I want to be able to display home made videos and photos to reasonable sized groups of people, so I need to use a projector rather than a screen. For this purpose and a couple of others my research shows the BenQ W1070 to be the right balance of func