Help with pricing condition??

Hi Guyz,
I have a requirement with my client, the want to supply material to an external customer at an intercompany price(ZPR9). So whenever a sales order is created for this specific customer it should pull the price from Intercompany price(ZPR9).  I have a option to create new pricing procedure and new pricing condition but this condition should pick up the price from ZPR9 so that we don't have to define the price manually like we do in PR00.
I can't able to assign ZPR9 to my new pricing procedure because ZPR9 is use for intercompany and this customer doesn not belong to any of our company code.So the situation is i have to define new pricing procedure and new pricing condition but this condition should pull the price from ZPR9.
when I see the details of ZPR9(condition type) its condition category is assigned as 'Y' which is customer reserve Y. I am not sure what this is.So could you plz advice how to handle this whole scenario. Appreciate your help.
thanks
Mohammed.

mohammed,
This type of requirement is hard to handle and if you do it in a wrong way, whoever support this process later will have a hard time.
Anyway, I think one of the twisted ways of doing this is to use Alternative Culculation routine and put the logic to get the condition right out of price condition table (A*) of ZPR9. This is not flexible at all because this involves hard coding, so I do not recommend this.
The message I can get from your client is "We don't want to maintain the same condition here and there," but sometimes they have to deal with it, because the nature of the condition type is very different from business point of view.
Having said that, in order for them to have easier way to create the condition, maybe you can develop a custom ABAP to copy ZPR9 condition into the new condition you might be creating, and either have them run the program every time they update ZPR9 or schedule the job.
Hope this helps.
Akio

Similar Messages

  • I have an issue with pricing condition ZPRO (basic price )

    Hello gurus
    I have an issue with pricing condition ZPRO (basic price ).
    users created a sales order, and the basic price ZPRO which is mannual is added twice ,now i want to put a check so that condition tpye zpro is not accepted twice by the system. please let me know how can i restrict  system from accepting condition type zpro  twice during sales order.
    regds
    Edited by: sapuser09 on Jul 26, 2011 8:44 AM

    Hi,
    Solution for this is very simple. Don't make any changes to the sales order user exit. Use condition exclusion  for the condition type.
    Do customization in the following path of IMG
    Sales and distribution---- > Basic Functions--- > Pricing--
    > Condition exclusion -- > Condition exclusion for groups of conditions
    First  In Define condition exclusion groups you have to define condition exclusion group (ZXXX)
    Then  in Assign condition types to the exclusion groups you have to assign condition type to the exclusion group (ZXXX   ZPRO)
    Then in Maintain Condition exclusion for pricing procedures select the pricing procedure where you have the problem and click Exclusion box present in Dialog structure box
    You will be faced with Change view exclusion overview screen Click new entries
    You will be faced with New entries overview of added entries screen.
    Take serial no as 10 Condition exclusion procedure  as B (Best condition with in condition type) In the exclusion group1 add the exclusion group ZXXX.
    Save it and create order.
    In the order pricing you will again observe that ZPRO appearing twice but only one will be active.
    Changing user exit for this issue is not at all required and it must be only the last resort Try replicating the issue in your sand box system. As I had mentioned it will be picked twice but only one will be active.
    Hope this helps.
    Edited by: mokirala tilak on Aug 10, 2011 10:19 AM

  • How to Create MM Quotaion with Pricing Conditions against RFQ through ME47?

    Hi,
    I got a requirement to Create MM Quotation against Request for Quotation with Pricing.
    I got a Function Module BS01_MM_QUOTATION_CREATE to Create Quotaion but there is no Parameter to Pass Pricing Conditions.
    Can anyone suggest me to Create MM Quotaion with Pricing Conditions.
    Thanks & Regards,
    SBLSV Ramana.

    Hi,
    There is no standard T Code in SAP which allows you to automatically convert RFQs to PO. Using ME59n you can only create POs from PR. Even Document type would not suffice the purpose because although it will show you the list of all document types but the basic criteria of open PR still remains.
    So I think we will not be able to do it by standard functionality.
    IV

  • I need help with the conditional build tag option RoboHelp 10

    I need help with the conditional build tag option. I want to apply CBT to content in a topic. I looked at the Help topics and believed that I applied the feature correctly. Howver, it is not working as desired. In the 2nd sentence below I want the text highlighted in blue to only appear for the printed output and the text printed in purple to only appear for the .htm /online output. Please help.
    There are common tasks used to manage the folders in the Navigator and the folders
    in the BBS Folders Viewer Grid. For more information on these common tasks see Help
    and Support in Success Enterprise. click the links below.

    Hi there
    Using tagging is a two part process.
    Part One
    You create and apply the tags to the information you wish to control.
    Part Two
    You create a Build Expression that is used when you generate your output. The Build Expression typically reads something like: NOT Tag1 (or whatever your tag name is)
    Then when you generate and use the Build Expression, the information tagged is not included in the build.
    Cheers... Rick

  • Need a list with pricing conditions for each customer

    Hi experts,
    I am searching for a function module or BAPI which reads out all the pricing conditions for a certain customer. The FM/ BAPI should provide the pricing conditions in an internal table.
    Now I do this with BAPI_SALESORDER_SIMULATE.
    It returns me all the condition types and condition values for a certain customer and material.
    But this BAPI is very slow.
    Can anybody help me to find a better solution?
    Thanks & best regards, Reiner.

    Hi,
    Welcome to SDN.
    If you are using ECC 5 or 6  then
    BAPI_PRICES_CONDITIONS

  • Free Goods with pricing condition (Urgent)

    Hi MM Expert,
    we have a probleme with free goods. because in PO item of free goods, there is no condition management (no Invoice entry) but we should manage some pricing condition for the item (spécifique condition relative to transport, ...).
    so are the any way of managing the expenses annex condition(transport charge, customs clearance charges,…) for the free goods in an item of Purchase Order ??
    thank's in advance.
    Said

    Hi,
    This is not possible to maintain the condition s for free goods because while creating the PO for free goods by selecting the free goods tad at item level, There is no Condition tab at Item detail .means you are not able to mainatin conditions.
    If you want to maintain the conditions ,you have to treat as a Normal scenarios .
    Regards
    Sanjay L

  • Problem with pricing condition type in case of proforma invoicing

    Hello All,
    the problem is related to a pricing condition type in case of proforma invoice where the details are as follows -
    Name of Condition Type - ZADC - Add 10% on Cost                                         Access seq.   Z038 Diff
                                                                                    Plus/minus    A Positive
    Cond. class -  A Discount or surcharge
    Calculat.type -  A Percentage
    Cond.category - Blank
    Manual entries      D Not possible to process manually
    Amount / Percent - Checked
    Item Condition - checked
    Scale Basis - Quantity
    Currency Conversion - Checked
    Quantity Conversion - Checked
    This condition type has been kept as statistical in the pricing procedure. Still in the proforma invoice the condition type is not getting reflected automatically , whenever I am updating with " carry out new pricing " option the condition type is getting populated.In case of other commercial invoices this very condition type is getting populated automatically without any updates.Along with this point to be noted is that the Condition type in which the actual costi is captured has been kept active.
    What more needs to be configured or what are the changes to be done to populate the condition type automatically as statistical during the time of proforma invoicing?
    Thanks & Regards
    Priyanka Mitra

    Hi,
    Kindly do the pricing analysis and check whether you have the following error such as
    Inactive condition type because of subsequent price,
    Regards,
    Ravi

  • File Upload Problem - help with a condition

    Dear all,
    I have built a form that includes a file upload. Everything works great until I don't include a file for upload(!) It wont allow me to "not" upload a file, it throws an error at me. My database allows this field to be blank. Do I have to wite some sort of condition that allows the file field to be blank, if so, could anyone help with it?
    Many thanks

    Hello,
    Can any one at Adobe help with this please as I still cannot understand why I am forced to upload a file with the file upload control. What happens if I dont want to add a file with my insert form??? I get errors if I do not include a file:
    Developer Details:
    Folder error. Security Error. Folder 'C:\Inetpub\Www_root\absbiodiesel.co.uk\' is out of base folder 'C:\Inetpub\Www_root\absbiodiesel.co.uk\NewsArticles\'. (FOLDER_DEL_SECURITY_ERROR)
    tNG Execution Trace - VIEW
    tNG_insert.executeTransaction
    STARTER.Trigger_Default_Starter
    tNG_insert.doTransaction
    BEFORE.Trigger_Default_FormValidation
    tNG_insert.prepareSQL
    tNG_insert.executeTransaction - execute sql
    tNG_insert.postExecuteSql
    AFTER.Trigger_FileUpload*
    ERROR.Trigger_Default_Insert_RollBack
    tNG_insert.getRecordset
    tNG_insert.getFakeRsArr
    tNG_insert.getLocalRecordset
    tNG_insert.getFakeRecordset
    tNG_insert.getFakeRecordset

  • Rounding Issue with Pricing Conditions

    Currently we have in place a pricing hierchery that consists of two pricing conditions.  ZP for base price and ZD for a +-differential.  Both conditions begin with 00.  ZP00. ZP01, ZP03, ZP04.  If a ZP01 exists it overrides a ZP00.  If a ZP03 exists it overrides ZP00,ZP01, etc.  So basically the higher the number means it overrides anything underneath it.  The ZD conditions are setup exactly the same way.  I am currently running into a round issue.  We settle all transactions in USD however the manual and differentials are often based on prices that go out more than 2 decimal places.  SAP is treating the calculation for the ZP and ZD as two separate calculations.  It rounds each of them and then combines for a total price.  So if the base price ZP02 is $2.245 multiplied by quantity 3,999 = $8,977.755  which it rounds to $8,977.76 and the differential ZD02 is $.0235 this = $93.9765 which it rounds to $93.98 for a total price of $9,071.74.  However if you add the ZD02 + the ZD02 you get a total unit price of $2.2685.  This multiplied times the quantity 3,999 = $9,071.731 which is correct.  But because SAP does each calc separately the price comes out to $9,071.74 or off 1CT.  I have seen various solutions on how to fix this from user exits to creating additional conditions that takes both ZP and ZD conditions and calculates them as one but I was hoping someone had come up with something better?  Or if there was a preferred method?

    Currently we have in place a pricing hierchery that consists of two pricing conditions.  ZP for base price and ZD for a +-differential.  Both conditions begin with 00.  ZP00. ZP01, ZP03, ZP04.  If a ZP01 exists it overrides a ZP00.  If a ZP03 exists it overrides ZP00,ZP01, etc.  So basically the higher the number means it overrides anything underneath it.  The ZD conditions are setup exactly the same way.  I am currently running into a round issue.  We settle all transactions in USD however the manual and differentials are often based on prices that go out more than 2 decimal places.  SAP is treating the calculation for the ZP and ZD as two separate calculations.  It rounds each of them and then combines for a total price.  So if the base price ZP02 is $2.245 multiplied by quantity 3,999 = $8,977.755  which it rounds to $8,977.76 and the differential ZD02 is $.0235 this = $93.9765 which it rounds to $93.98 for a total price of $9,071.74.  However if you add the ZD02 + the ZD02 you get a total unit price of $2.2685.  This multiplied times the quantity 3,999 = $9,071.731 which is correct.  But because SAP does each calc separately the price comes out to $9,071.74 or off 1CT.  I have seen various solutions on how to fix this from user exits to creating additional conditions that takes both ZP and ZD conditions and calculates them as one but I was hoping someone had come up with something better?  Or if there was a preferred method?

  • Plz help: SO pricing - condition record found but in gray, subtotal is ZERO

    Dears,
    During creating SO, I found in the Item pricing analysis, the condition record is found and the record is also in valid period. But the strange thing is, the condition value in the item pricing table is in gray instead of blue.
    Could you please advise what should I do to find out the reason of this issue?
    Many thanks!
    Regards
    Shiliang

    Hi,
    I shall get back in the evening. But mean time can you please try  another sales order for the same condition, for which condition tables are satisfying the criteria with condition records in place, may be in a test server. It should work.
    Sadhu Kishore

  • Error with pricing condition in opportunities

    Good afternoon everyone, I have a problem that has followed me for 3 days, and still do not know how to solve it, is with respect to the function CRM_ORDER_MAINTAIN, I want to add and modify the price terms of opportunities, yet I can not I have read many post match and still nothing, please help.
    I need guidance as tables fill the function, as do some manual, some development etc all currently serves, as I have no idea how to do
    Thanks
    Enclosed is my code
    data: ltm_pridoc_comt type crmt_pridoc_comt.
    data: lsm_pridoc_comt type crmt_pridoc_com.
    data: lt_cond_add type prct_cond_external_input_t.
    data: ls_cond_add type prct_cond_external_input,
    ls_prct_cond_external_input type prct_cond_external_input,
    lt_input_fields type crmt_input_field_tab,
    ls_input_fields type crmt_input_field,
    gt_exception type crmt_exception_t,
    lv_loghndl type balloghndl.
    data : ls_header_guid type crmt_object_guid,
    lt_header_guid type crmt_object_guid_tab,
    gt_saved_objects type crmt_return_objects,
    ls_input_field_names type crmt_input_field_names,
    lt_input_field_names type crmt_input_field_names_tab.
    data: p_item type crmt_object_guid,
    p_header type crmt_object_guid.
    p_item = 'D8F6C5D63959224781181FDF9E2BB0D4'.
    p_header = 'DF4266B597F5C6F1B7C80011856B9E9E'.
    clear: lsm_pridoc_comt,ls_prct_cond_external_input.
    lsm_pridoc_comt-ref_guid = p_header.
    lsm_pridoc_comt-ref_kind = 'B'.
    ls_cond_add-kschl = 'ZVR1'.
    ls_cond_add-waers ='USD'.
    ls_cond_add-kbetr = 1500.
    ls_cond_add-knumh = p_item.
    insert ls_cond_add into table lsm_pridoc_comt-cond_add.
    insert lsm_pridoc_comt into table ltm_pridoc_comt.
    ls_input_fields-ref_guid = p_item.
    ls_input_fields-ref_kind = 'B'.
    ls_input_fields-objectname = 'PRIDOC'.
    ls_input_fields-field_names = lt_input_field_names.
    insert ls_input_fields into table lt_input_fields.
    call function 'CRM_ORDER_MAINTAIN'
    exporting
    it_pridoc = ltm_pridoc_comt
    importing
    et_exception = gt_exception
    changing
    ct_input_fields = lt_input_fields
    cv_log_handle = lv_loghndl
    exceptions
    error_occurred = 1
    document_locked = 2
    no_change_allowed = 3
    no_authority = 4
    others = 5.
    if sy-subrc = 0.
    ls_header_guid = p_header.
    append ls_header_guid to lt_header_guid.
    CALL FUNCTION 'CRM_ORDER_SAVE'
    EXPORTING
    it_objects_to_save = lt_header_guid
    IMPORTING
    et_saved_objects = gt_saved_objects.
    call function 'BAPI_TRANSACTION_COMMIT'
    exporting
    wait = 'X'
    IMPORTING
    RETURN =
    if sy-subrc eq 0.
    write : /3 'Successfully status changed'.
    endif.
    endif.

    hi all, well at posting the final solution will function CRM_ORDER_MAINTAIN, adding a new condition of the item price, thank you very much for everything.
    data: ltm_pridoc_comt type crmt_pridoc_comt.
    data: lsm_pridoc_comt type crmt_pridoc_com.
    data: lt_cond_add                  type prct_cond_external_input_t.
    data: ls_cond_add                  type prct_cond_external_input.
    data: lt_cond_delete               type prct_cond_external_change_t.
    data: ls_cond_delete               type prct_cond_external_change,
          ls_prct_cond_external_input  type prct_cond_external_input,
          lt_input_fields              type crmt_input_field_tab,
          ls_input_fields              type crmt_input_field,
          gt_exception                 type crmt_exception_t,
          lv_loghndl                   type balloghndl,
          et_pricing_item              like  bapibus20001_pricing_item_dis occurs 0 with header line,
          et_guid                      like  bapibus20001_guid_dis occurs 0 with header line.
    data : ls_header_guid type crmt_object_guid,
           lt_header_guid type crmt_object_guid_tab,
           gt_saved_objects type crmt_return_objects,
           ls_input_field_names type crmt_input_field_names,
           lt_input_field_names type crmt_input_field_names_tab.
      data:
            it_objects_to_save   type crmt_object_guid_tab,
            wa_objects_to_save   type crmt_object_guid,
            it_saved_objects     type crmt_return_objects,
            it_exception         type crmt_exception_t,
            it_objects_not_saved type crmt_object_guid_tab.
    data: p_item type crmt_object_guid,
          p_header type crmt_object_guid.
    data: it_msg type crmt_tour_msg_tab,
          wa_balmnr type balmnr,
          it_lines type tsftext.
    p_item   = 'DF4266F3849D0EF1B7C80011856B9E9E'.
    p_header = 'DF4266B597F5C6F1B7C80011856B9E9E'.
    clear: lsm_pridoc_comt,ls_prct_cond_external_input.
    lsm_pridoc_comt-ref_guid = p_item.
    lsm_pridoc_comt-ref_kind = 'B'.
    ls_cond_add-kschl        = 'ZVR1'.
    ls_cond_add-waers        ='USD'.
    ls_cond_add-kbetr        = 1500.
    insert ls_cond_add into table lsm_pridoc_comt-cond_add.
    insert lsm_pridoc_comt into table ltm_pridoc_comt.
    ls_input_field_names-fieldname  = 'KBETR'.
    insert ls_input_field_names into table lt_input_field_names.
    ls_input_field_names-fieldname  = 'KSCHL'.
    insert ls_input_field_names into table lt_input_field_names.
    ls_input_field_names-fieldname  = 'WAERS'.
    insert ls_input_field_names into table lt_input_field_names.
    ls_input_fields-ref_guid    = p_item.
    ls_input_fields-ref_kind    = 'B'.
    ls_input_fields-objectname  = 'PRIDOC'.
    ls_input_fields-field_names = lt_input_field_names.
    insert ls_input_fields into table lt_input_fields.
    call function 'CRM_ORDER_MAINTAIN'
      exporting
        it_pridoc         = ltm_pridoc_comt
      importing
        et_exception      = gt_exception
      changing
        ct_input_fields   = lt_input_fields
        cv_log_handle     = lv_loghndl
      exceptions
        error_occurred    = 1
        document_locked   = 2
        no_change_allowed = 3
        no_authority      = 4
        others            = 5.
    if sy-subrc = 0.
      wa_objects_to_save = p_header.
      append wa_objects_to_save to it_objects_to_save.
      call function 'CRM_ORDER_SAVE'
        exporting
          it_objects_to_save         = it_objects_to_save
       importing
         et_saved_objects           = it_saved_objects
         et_exception               = it_exception
         et_objects_not_saved       = it_objects_not_saved
       changing
         cv_log_handle              = lv_loghndl
       exceptions
         document_not_saved         = 1
         others                     = 2.
      if sy-subrc <> 0.
    error
      else.
        call function 'BAPI_TRANSACTION_COMMIT'
         exporting
           wait          = 'X'.
      endif.
    endif.

  • Help with filter condition

    Hi
    I need to have a condition in the which gives available hours , considering the tester whose decommision date is not greater than the day_date.
    I have 4 tables :
    3 dimension tables and 1 fact table
    dim_date : has all possible dates in all formats
    dim_tester : has the all the tester values , and its inception ( when the tester was bought) and decommision(when the tester was decommsioned or removed)
    dim_time : which has hour seg prime values , and the available hours for a day
    Fct_tester_utilization : this table has the keys to link all the dimension tables and the logged hours (used hours) details.
    i need to calculate available hours based on the inception date and decommision date.
    A tester is considered to be online if its between inception and decommsion date, and available hours has to be calculated for all the testers online, if the tester is decommisioned then it has the date value of when its decommsioned if not it has the far value like 12/31/9999.
    Here is the ddl and some sample data
    CREATE TABLE EDW_DIM.DIM_DATE
      DATE_KEY NUMBER(*, 0)
    , DAY_DATE DATE
    , SUN_WEEK_START_DATE DATE )
    Sample Data:
    DATE_KEY DAY_DATE   SUN_WEEK_START_DATE
    3260     05-DEC-10     05-DEC-10
    3261     06-DEC-10     05-DEC-10
    3262     07-DEC-10     05-DEC-10
    3263     08-DEC-10     05-DEC-10
    3264     09-DEC-10     05-DEC-10
    3265     10-DEC-10     05-DEC-10
    3266     11-DEC-10     05-DEC-10
    3267     12-DEC-10     12-DEC-10
    3268     13-DEC-10     12-DEC-10
    3269     14-DEC-10     12-DEC-10
    3270     15-DEC-10     12-DEC-10
    3271     16-DEC-10     12-DEC-10
    3272     17-DEC-10     12-DEC-10
    3273     18-DEC-10     12-DEC-10
    3274     19-DEC-10     19-DEC-10
    3275     20-DEC-10     19-DEC-10
    3276     21-DEC-10     19-DEC-10
    3277     22-DEC-10     19-DEC-10
    3278     23-DEC-10     19-DEC-10
    3279     24-DEC-10     19-DEC-10
    3280     25-DEC-10     19-DEC-10
    3281     26-DEC-10     26-DEC-10
    3282     27-DEC-10     26-DEC-10
    3283     28-DEC-10     26-DEC-10
    DIM_TESTER:
    CREATE TABLE EDW_DIM.DIM_TESTER
      TESTER_KEY NUMBER(10, 0) NOT NULL
    , TESTER_NAME VARCHAR2(25 BYTE)
    , TESTER_CATEGORY VARCHAR2(25 BYTE)
    , TESTER_INCEPTION_DATE DATE
    , TESTER_DECOMMISSION_DATE DATE
    Sample data:
    TESTER_KEY TESTER_NAME TESTER_CATEGORY  TESTER_INCEPTION_DATE TESTER_DECOMMISSION_DATE
    401     RFR6155-2     Bench     02-NOV-06     31-DEC-99
    402     RFR6250-2     Bench     02-NOV-06     25-SEP-09
    403     RFR6250-3     Bench     02-NOV-06     31-DEC-99
    404     RFR6250-7     Bench     02-NOV-06     31-DEC-99
    405     RFR6275-2     Bench     02-NOV-06     27-MAY-08
    406     RFR6275-3     Bench     02-NOV-06     31-DEC-99
    407     SMOKY             Bench     02-NOV-06     31-DEC-99
    408     SUGAR             Bench     02-NOV-06     31-DEC-99
    409     ZIF-02             Bench     02-NOV-06     31-DEC-99
    410     ZIF-03             Bench     02-NOV-06     25-SEP-09
    411     ZIF-04             Bench     02-NOV-06     25-SEP-09
    412     ZIF-18             Bench     02-NOV-06     31-DEC-99
    413     ACDC             ATE     05-NOV-03     09-DEC-06
    414     AEROSMITH     ATE     05-FEB-05     15-OCT-09
    416     BEATLES             ATE     10-APR-06     02-OCT-07
    417     BLAINE          SIMULATOR     14-MAY-03     31-DEC-09
    418     BURNS          SIMULATOR     02-SEP-03     31-DEC-09
    419     CAPOTE             ATE     16-JUN-05     31-DEC-99
    420     CHICO             ATE     03-JUN-03     31-DEC-99
    421     CLASH             ATE     01-APR-04     09-NOV-10
    422     DAPHNE             ATE     29-DEC-04     31-DEC-99
    424     EXACTA             ATE     24-MAR-03     31-DEC-99
    425     FOGHAT             ATE     16-JUN-05     31-DEC-99
    427     GRATEFULDEAD     ATE     05-MAR-03     05-NOV-07
    428     GRENACHE     ATE     06-JAN-06     31-DEC-99
    431     IDITAROD     ATE     24-MAR-03     31-DEC-99
    432     IRONMAIDEN     ATE     20-JUL-03     30-JAN-07
    434     LEDZEPPELIN     ATE     01-FEB-05     07-NOV-10
    531     RFALAB-037     Bench     01-SEP-07     31-DEC-99
    532     UFLEX1             ATE     18-SEP-07     14-OCT-08
    DIM_TIME
    CREATE TABLE EDW_DIM.DIM_TIME
      TIME_KEY NUMBER
    , HOUR_SEG_PRIME VARCHAR2(50 BYTE)
    Sample Data:
    TIME_KEY HOUR_SEG_PRIME
    1     AM-OS:12 AM - 7 AM
    61     AM-OS:12 AM - 7 AM
    121     AM-OS:12 AM - 7 AM
    181     AM-OS:12 AM - 7 AM
    241     AM-OS:12 AM - 7 AM
    301     AM-OS:12 AM - 7 AM
    361     AM-OS:12 AM - 7 AM
    421     AM-Eng:7 AM - 9 AM
    481     AM-Eng:7 AM - 9 AM
    541     Prime Time:9 AM - 7 PM
    601     Prime Time:9 AM - 7 PM
    661     Prime Time:9 AM - 7 PM
    721     Prime Time:9 AM - 7 PM
    781     Prime Time:9 AM - 7 PM
    841     Prime Time:9 AM - 7 PM
    901     Prime Time:9 AM - 7 PM
    961     Prime Time:9 AM - 7 PM
    1021     Prime Time:9 AM - 7 PM
    1081     Prime Time:9 AM - 7 PM
    1141     PM-Eng:7 PM - 10 PM
    1201     PM-Eng:7 PM - 10 PM
    1261     PM-Eng:7 PM - 10 PM
    1321     PM-OS:10 PM - 12 AM
    1381     PM-OS:10 PM - 12 AM
    FCT_TESTER_UTILIZATION:
    CREATE TABLE EDW_FACT.FCT_TESTER_UTILIZATION
      TESTER_KEY NUMBER(10, 0)
    , DIM_DATE_KEY NUMBER(10, 0)
    , DIM_TIME_KEY NUMBER(10, 0)
    , LOGGED_TIME NUMBER(10, 0)
    Sample Data:
    DIM_DATE_KEY     DIM_TIME_KEY     TESTER_KEY     LOGGED_TIME
    3260     1     345     60
    3260     1     347     60
    3261     1     707     60
    3261     1     708     60
    3261     1     709     60
    3261     1     710     60
    3261     1     711     60
    3261     1     713     60
    3261     1     715     60
    3261     1     722     60
    3261     1     723     60
    3261     1     724     60
    3261     1     726     60
    3261     61     345     60
    3261     61     355     60I have calculated available hours :
    Here is my query :
    SQL SELECT
    B.HOUR_SEG_PRIME,
    t.tester_name,
    TRUNC(c.DAY_DATE + 1,'IW')-1 AS Week,
    c.DAY_DATE,
    t.tester_inception_date,
    t.tester_decommission_date,
                   CASE
                        WHEN B.HOUR_SEG_PRIME = 'AM-OS:12 AM - 7 AM' THEN 0.292
                        WHEN B.HOUR_SEG_PRIME = 'AM-Eng:7 AM - 9 AM' THEN 0.083
                        WHEN B.HOUR_SEG_PRIME = 'Prime Time:9 AM - 7 PM' THEN 0.417
                        WHEN B.HOUR_SEG_PRIME = 'PM-Eng:7 PM - 10 PM' THEN 0.125
                        WHEN B.HOUR_SEG_PRIME = 'PM-OS:10 PM - 12 AM' THEN 0.083
                   END
              )* 24 AS "Available_Hours"
    FROM dim_time B join fct_tester_utilization f
    on  f.dim_time_key = B.time_key
    join dim_date c
    on f.dim_date_key = c.date_key
    join dim_tester t
    on t.tester_key = f.tester_key I have not written a where condition in the above query , could any one please assist me in writing query considering the above mentioned conditions for inception and decommision dates?
    Output with the above query:
    WEEK TESTER_NAME DAY_DATE INCEPTION_DATE DECOMMISION_DATEAVAILABLE_HOURS
    12/5/2010     BROWN     12/6/2010     11/2/2006     12/31/9999     10.01
    12/5/2010     CHICO     12/11/2010     6/3/2003     12/31/9999     3.00
    12/5/2010     MEGATRACE     12/8/2010     8/20/2009     8/27/2010     10.01
    12/5/2010     MEGATRACE     12/9/2010     8/20/2009     8/27/2010     10.01
    12/5/2010     MEGATRACE     12/10/2010     8/20/2009     8/27/2010     10.01
    12/5/2010     MERLOT     12/5/2010     3/24/2003     12/31/9999     7.01
    12/5/2010     MEZCAL     12/5/2010     6/2/2006     12/31/9999     7.01
    12/5/2010     OUZO     12/11/2010     4/23/2008     12/31/9999     1.99
    12/5/2010     RFALAB-080     12/9/2010     1/17/2009     12/31/9999     10.01
    12/5/2010     RFR6275-2     12/8/2010     11/2/2006     5/27/2008     10.01
    12/12/2010     MEGATRACE     12/13/2010     8/20/2009     8/27/2010     10.01
    12/12/2010     MEGATRACE     12/16/2010     8/20/2009     8/27/2010     10.01
    12/12/2010     MEZCAL     12/18/2010     6/2/2006     12/31/9999     7.01
    12/19/2010     MARCO     12/25/2010     3/24/2003     12/31/9999     7.01
    12/19/2010     MEGATRACE     12/21/2010     8/20/2009     8/27/2010     10.01
    12/19/2010     MEGATRACE     12/22/2010     8/20/2009     8/27/2010     10.01
    12/19/2010     MERLOT     12/22/2010     3/24/2003     12/31/9999     10.01
    12/26/2010     MALBEC     12/27/2010     4/14/2006     12/31/9999     10.01
    12/26/2010     MARCO     1/1/2011     3/24/2003     12/31/9999     7.01
    12/26/2010     MEGATRACE     12/28/2010     8/20/2009     8/27/2010     10.01In the above output the tester MEGATRACE has already been decommsioned on 8/27/2010 but still there is a day_date , i should not calculate available hours for the testers which have already been decommisoned.
    Expected Output :
    WEEK     TESTER_NAME     DAY_DATE     TESTER_INCEPTION_DATE     TESTER_DECOMMISION_DATE     AVAILABLE_HOURS
    12/5/2010     BROWN     12/6/2010     11/2/2006     12/31/9999     10.01
    12/5/2010     CHICO     12/11/2010     6/3/2003     12/31/9999     3.00
    12/5/2010     MERLOT     12/5/2010     3/24/2003     12/31/9999     7.01
    12/5/2010     MEZCAL     12/5/2010     6/2/2006     12/31/9999     7.01
    12/5/2010     OUZO     12/11/2010     4/23/2008     12/31/9999     1.99
    12/5/2010   RFALAB-080    12/9/2010      1/17/2009     12/31/9999     10.01
    12/12/2010     MEZCAL     12/18/2010     6/2/2006     12/31/9999     7.01
    12/19/2010     MARCO     12/25/2010     3/24/2003     12/31/9999     7.01
    12/19/2010     MERLOT     12/22/2010     3/24/2003     12/31/9999     10.01
    12/26/2010     MALBEC     12/27/2010     4/14/2006     12/31/9999     10.01
    12/26/2010     MARCO     1/1/2011     3/24/2003     12/31/9999     7.01
    12/26/2010    MEGATRACE     8/26/2010      8/20/2009    8/27/2010     10.01The last day_date for Megatrace should not be greater than the decommsionned date.Please Help
    Edited by: user13502884 on Feb 10, 2011 11:11 AM
    Edited by: user13502884 on Feb 10, 2011 1:23 PM
    Edited by: user13502884 on Feb 10, 2011 1:24 PM

    Peter Gjelstrup wrote:
    user13502884 wrote:
    Please let me know if my question is not clear ....My personal opinion: Too much work to be done, turning you sample data into something usuable. Had you posted it as insert statements, several people might already be working at your issue.
    Right now, I haven't even read it to the end..
    Sorry to say
    PeterThere is so much of data for a week , so i was unable to figure out how much sample data i can post , please look into the last set of sample data obtained by my query , which gives an idea of what i am looking into...
    is there a way where i can send some excel files?

  • Please help with 'Pricing' function module

    Hi!
    I am trying to use function module 'Pricing' but the table it_komv is still empty even after calling. I am basically trying to print some free of charge items on invoice sapscript and hence I am using 'Pricing' function in the print program. I am passing the below parameters. Please tell me whatelse I need to pass/not to pass.
      wa_komk-mandt = sy-mandt.
          wa_komk-kalsm = vbdkr-kalsm.
          wa_komk-kappl = 'V'.
          wa_komk-waerk = vbdkr-waerk.
         wa_komk-knumv = vbdkr-knumv.
          wa_komk-knuma = vbdkr-knuma.
          wa_komk-vbtyp = vbdkr-vbtyp.
          wa_komk-land1 = vbdkr-land1.
          wa_komk-vkorg = vbdkr-vkorg.
          wa_komk-vtweg = vbdkr-vtweg.
          wa_komk-spart = vbdkr-spart.
          wa_komk-prsdt = vbdkr-erdat.
          wa_komk-kurst = vbdkr-kurst.
          wa_komk-kurrf = vbdkr-kurrf.
          wa_komk-kurrf_dat = vbdkr-kurrf_dat.
          wa_komp-kposn = vbdpr-posnr.
          wa_komp-kursk = vbdpr-kursk.
          wa_komp-kursk_dat = vbdpr-kursk_dat.
          wa_komp-werks = vbdpr-werks.
          CALL FUNCTION 'PRICING'
            EXPORTING
            CALCULATION_TYPE        = 'A'
              comm_head_i             = wa_komk
              comm_item_i             = wa_komp
            PRELIMINARY             = ' '
            NO_CALCULATION          = ' '
         IMPORTING
             comm_head_e             = wa_komk
             comm_item_e             = wa_komp
          TABLES
              tkomv                   = it_komv
            SVBAP                   =
        CHANGING
            REBATE_DETERMINED       = ' '
    Thanks a lot!

    Hi,
    Check this example..
    tables: vbdkr.
    data: s_komk type KOMK.
    data: s_komp type komp.
    data: t_komv like KOMV occurs 0 with header line.
    data: t_komvd like komvd occurs 0 with header line.
    Input
    s_komk-mandt = sy-mandt.
    s_komk-knumv = vbdkr-knumv.
    CALL FUNCTION 'RV_PRICE_PRINT_ITEM'
      EXPORTING
        comm_head_i       = s_komk
        comm_item_i       = s_komp
      tables
        tkomv             = t_komv
        tkomvd            = t_komvd
    You can check the program RVADIN01 for a sample..
    Hope this helps..
    Thanks,
    Naren

  • Help with Report Condition

    I have three parameters in my report which are academic year, instance code and id number. Only two parameter values are entered when user runs report, that is, either academic year and id number or academic year and instance code.
    The report produces a student’s statement of results and should show all results for the previous years. E.g. if student did c-inst1 in 2009, c-inst2 in 2010, c-inst3 in 2011, when user enters 2011 for parameter academic year and c-inst3 as course instance, the report should display all the results of students starting from 2011 going back to 2009 for all the three course instances c-inst1, c-inst2 and c-inst3.
    My report conditions are as below:
    ACADEMIC_SESSION <= :ACADEMIC_YEAR AND
    (Id_NUMBER = :ID_NUMBER OR (:ID_NUMBER IS NULL AND (CI.INSTANCE_CODE = :course_instance OR What?? ) What condition should I add here in order to get all those records with course instance entered as well as previous course instances done by a student?
    Please assist. Thanks.

    user8655468 wrote:
    I have three parameters in my report which are academic year, instance code and id number. Only two parameter values are entered when user runs report, that is, either academic year and id number or academic year and instance code.
    The report produces a student’s statement of results and should show all results for the previous years. E.g. if student did c-inst1 in 2009, c-inst2 in 2010, c-inst3 in 2011, when user enters 2011 for parameter academic year and c-inst3 as course instance, the report should display all the results of students starting from 2011 going back to 2009 for all the three course instances c-inst1, c-inst2 and c-inst3.
    My report conditions are as below:
    ACADEMIC_SESSION <= :ACADEMIC_YEAR AND
    (Id_NUMBER = :ID_NUMBER OR (:ID_NUMBER IS NULL AND (CI.INSTANCE_CODE = :course_instance OR What?? ) What condition should I add here in order to get all those records with course instance entered as well as previous course instances done by a student?You can use lexical parameter in reports sql and pass the condition whatever u want. How can we do that ?
    1. create a parameter like PR with char data type.
    2. pass the column name and other parameter to this parameter via After Parameter Form trigger.
    Hope this will help you.

  • Please i need help with this condition

    ok this my situation and try to help me simpler than this
    i have 3 input test fields named
    name_txt , emailTxt , phonetxt.
    and i have a text file named "question.txt" at the same
    folder.
    i have three dynamic textfields that load &ques1 ,
    &ques2 and &ques3
    and i want to do the following:
    i want to compare between the answers the user input and the
    answers at the
    txt file &answer1,&answer2 and &answer3.
    For example:
    _root.submit_btn.onRelease = function(){
    if ( _root.nametxt.text = = My variable ????){
    gotoAndPlay(2);
    } else{
    gotoAndPlay(3);
    AND THE CODE I AM USING IS :
    //on frame 1
    stop();
    _root.loadVariables("ques.txt");
    /*and my input txts named as following
    name_txt
    email_txt
    phone_txt
    and the text file ques.txt read as following:
    &firstQ=What is your name?
    &secondQ=What is your email?
    &thirdQ=What is your mobile number?
    &answer1=Essam
    &answer2= my email
    &answer3=0124613121
    and i want to make a condition to compare between text input
    in the
    name_txt,email_txt and phone_txt and &answer1,
    &answer2 , &answer3 and
    that if ok gotoAndStop(where the next ques is) ;
    Please help me that way and thank you for your efforts in
    advance

    Create two condition type
    ZCAH and ZCAS
    Set up ZCAH condition type as positive and ZCAS for negative.
    Then in calculation schema, enter the ZCAH and then ZCAS condition type
    Next enter the total and give the "from and to" as bellow screen.
    Then whenever you will give any amount in condition type ZCAH and ZCAS, the total will appear as ZCAH-ZCAS.
    For more details please read the blog Pricing procedure Steps and Details in SAP MM
    Regards
    Dëv

Maybe you are looking for

  • Is that actually a mini-DVI port on my G5 iMac?

    So I can't seem to figure this out... Is the Mini-DVI connector on the back of the G5 iMac (2 GHz, pre-camera or remote) a jack (male) or a port (female)? I bought one of the Apple mini-dvi -> S-Video & RCA adapter cables, but the mini-DVI end seems

  • How can I create a black background around a closeup of a flower?

    I want to have some of my close-up pics of flowers on a black background. Is there a way to do this with aperture? I use aperture on both my iMac and Macbook Pro. Thanks for any help.

  • BI Front end & Back end Activities

    Hi BW/BI gurus, Can some one enlighten me what are the front end & back end activities to be highlighted  for taking a  BW/BI Consultant’s position/interview in the US. Regards Chandu

  • Need Acrobat 9 pro install/download files

    Over the years, my group has purchased Acrobat 7 Pro, 8 Pro, and 9 Pro...  I have serial numbers for all of the above listed in my My Adobe/My Products area.  I have disks for both 7 and 8 pro... Unfortunately, when our purchasing agent bought 9 pro,

  • Iphone 4s fails to restart after installing ios 5.1 & then restoring from backup ?

                                            I have restored My Iphone 4s to Os 5.1 Yesterday ... every thing went fine ..... at the time of restoring it from my previous backup ........ iphone fails to restart ..... it is in continous loop of apple logo