Accounting Rule query from the Pricing/Billing tab in Service Contracts

Running Oracle Apps. 11.5.10.2. I have the query listed below which returns both header and live level data for service contracts. I am trying to add the Accounting Rule from the Pricing/Billing tab within service contracts, but I am not having luck finding a suitable join. I have tried joining ra_customer_trx_lines_all to okc_k_lines_b using the following join from etrm rctla.contract_line_id(+) = oklb.cle_id, but it does not return any records for accounting_rule_id. Once I can get records to return for accounting_rule_id, I can pull in the rule name from ra_rules.
SELECT OKHB.CONTRACT_NUMBER                                         CONTRACT_NUMBER,
       NVL(OKHB.CONTRACT_NUMBER_MODIFIER, '-')                      CONTRACT_NUMBER_MODIFIER,
       OKHB.STS_CODE                                                STATUS,
       OKHB.START_DATE                                              START_DATE,
       OKHB.END_DATE                                                END_DATE,
       to_date(oklbs.attribute1, 'YYYY/MM/DD HH24:MI:SS')           WARRANTY_START_DATE,
       to_date(oklbs.attribute2, 'YYYY/MM/DD HH24:MI:SS')           WARRANTY_END_DATE,
       rctta.name                                                   PRODUCT_GROUP,
                       rctla.accounting_rule_id,
       P.PARTY_NUMBER                                               PARTY_NUMBER,
       P.PARTY_NAME                                                 PARTY_NAME,
       to_char(oklb.line_number)||'.'||to_char(oklbs.line_number)   SUBLINE_NUMBER,
       to_char(okcis.number_of_items, '9,999,999,999')              QTY,
       msib.segment1                                                ITEM_NUMBER,
       msib.description                                                      DESCRIPTION,
       to_char(oklbs.price_unit, '9,999,999,990.99')                UNIT_PRICE,
       to_char(oklbs.price_negotiated, '9,999,999,990.99')          EXTENDED_PRICE
  FROM OKC_K_HEADERS_B      OKHB,
       OKC_K_PARTY_ROLES_B  OKPRB,
       HZ_PARTIES           P,
       HZ_PARTIES           HP,
       OKX_CUST_SITE_USES_V C_BILL_TO,
       OKX_CUST_SITE_USES_V C_SHIP_TO,
       OKC_CONTACTS OC,
       OKC_CONTACTS OCS,
       OKX_RESOURCES_V ORV,
       OKC_K_LINES_B oklb,
       MTL_SYSTEM_ITEMS_B MSIB,
       OKC_K_ITEMS OKCI,
       OKC_K_ITEMS OKCIS,
       OKC_K_LINES_B OKLBS,
       OKX_SALESREPS_V OSV,
       RA_CUST_TRX_TYPES_ALL RCTTA,
                ra_customer_trx_lines_all rctla
WHERE OKHB.ID = OKPRB.CHR_ID
    AND OKPRB.JTOT_OBJECT1_CODE = 'OKX_PARTY'
    AND OKPRB.OBJECT1_ID1 = P.PARTY_ID
    AND C_SHIP_TO.PARTY_ID = HP.PARTY_ID
    AND OKHB.ID = OC.dnz_chr_id(+)
    AND okhb.id = ocs.dnz_chr_id(+)
    AND oc.jtot_object1_code (+) = 'OKX_RESOURCE'
    AND oc.OBJECT1_ID1 = orv.ID1(+)
    AND ocs.jtot_object1_code = 'OKX_SALEPERS'
    AND ocs.object1_id1 = osv.id1
    AND C_BILL_TO.SITE_USE_CODE(+) = 'BILL_TO'
    AND OKHB.SHIP_TO_SITE_USE_ID = C_SHIP_TO.ID1(+)
    AND OKHB.BILL_TO_SITE_USE_ID = C_BILL_TO.ID1(+)
    AND C_SHIP_TO.SITE_USE_CODE(+) = 'SHIP_TO'
    AND okhb.id = oklb.chr_id
    AND msib.inventory_item_id = okci.object1_id1
    AND msib.organization_id = 3
    AND okcis.cle_id           = oklbs.id
    AND okci.cle_id           = oklb.id
    AND oklbs.lse_id     <> '2'
    and oklbs.cle_id     = oklb.id
    AND rctta.cust_trx_type_id(+) = oklbs.attribute8
             and rctla.contract_line_id(+) = oklb.cle_id

Sorry for the late reply, but this solution worked great.
and OKS_K_HEADERS_B.ACCT_RULE_ID = RA_RULES.RULE_ID
and OKC_K_HEADERS_B.ID = OKS_K_HEADERS_B.CHR_ID

Similar Messages

  • Okc/okx table that contains Transaction Type from the pricing/billing tab

    We are running 11.5.9 EBS, and the module is Service Contracts Authoring.
    I have a sql script that pulls data from the header and subline level for service contracts. If possible I would like to get the Transaction Type form the Pricing/Billing Tab. Summary > Pricing/Billing - submenu "Billing". I have not been able to find a table in OKC or OKX that contains this Transaction Type ID which can be tied back the cust_trx_type_id in the AR.RA_CUST_TRX_TYPES_ALL and in turn get the NAME for the transaction.

    I'm not sure where the cust_trx_type_id would be stored in OKC/OKS tables, but the table OKS_BILL_TRANSACTIONS stores the trx_number that you can link to ra_customer_trx_all and get the cust_trx_type_id.
    HTH
    Alka

  • How can I  remove my credit card from the automatic billing for my account?

    How can I remove my credit card from the automatic billing for my account?

    The following has instructions for changing iTunes payment method: http://support.apple.com/kb/ht1918

  • Is there a way of shifting purchases from one account to another with the same billing information, so that I don't lose purchases made by my iPhone when I sync?

    The AOL address I was using for my iTunes account has been deleted due to me not signing in for awhile and I'm afraid that I will lose all of my purchases made from my iphone when I sync it into iTunes for a much needed update and so that I can (hopefully) transfer its data to my new iPhone 4...
    The only time I have synced my current iPhone was when I activated it but since then I have not been able to sync with my computer and now have a new one.
    Sorry about the garbled way this is written but I desperately need help:
    1, Is there a way of shifting purchases from one account to another with the same billing information?
    Or
    2, is there a way of recovering my old account and changing the details?
    Any other help is greatly appreciated
    Thom

    You don't need to access your e-mail account, just get into your Apple account and change the e-mail address. If you can't access your Apple account, then you have a bigger issue to contend with.

  • How to remove the DATA Provider(Query) from the WAD 3.5

    Hi,
         I want to remove the unused dataprovider(query) from the WAD 3.5,
         How to delete the dataprovider.
    Please suggest here

    Go to HTML tab. You will see all the data providers on top. You can delete the unused ones there.

  • Creation of DMR and CMR from the archived billing document in EHP3 system

    Hi all
    I read somewhere that one of the functionality in EHP3 is we can create sales document like debit memo request and credit memo request from the archived billing document. I am working on EHP3 system only but i am not able to create the sales document. the system throws an error that billing document doesnt exist
    If any one of you have worked on such functionality kindly suggest me why its not happening here also let me know Is ther any customization required for the execution of this functionality in spro.

    > If any one of you have worked on such functionality kindly suggest me why its not happening here also let me know Is ther any customization required for the execution of this functionality in spro.
    I suggest you open that question in an SD forum together with the support package you run and if you have an industry solution or any business function sets activated or not.
    Markus

  • Creation of sales document (DMR, CMR) from the archived billing document

    Hi all
    I read somewhere that one of the functionality in EHP3 is we can create sales document like debit memo request and credit memo request from the archived billing document. I am working on EHP3 system only but i am not able to create the sales document. the system throws an error that billing document doesnt exist
    If any one of you have worked on such functionality kindly suggest me why its not happening here also let me know Is ther any customization required for the execution of this functionality in spro.

    hi,
    the help says:
    You can use this business function to further optimize your electronic Sales and Billing Processes.
    Electronic data archiving regulations result in a high volume of data for sales documents and require invoices to be archived at an early stage. You can integrate archived billing documents in your business processes more easily. Since you still have electronic access to archived invoices during the sales process, you can manage archiving without delay and execute further sales processes electronically.
    You can more efficiently use the rebate agreements from SAP ERP for your marketing activities. In particular, customers who use SAP CRM (Trade Promotion Management) with a large volume of data for campaigns, target groups, and product segments can define a custom-made logic for their rebate determination and thus avoid potential database problems.
    Integration
    To implement the logic for rebate processing in SAP ERP, you use the Enhancements for Rebate Processing Business Add-In (BAdI). For more information, see the Implementation Guide (IMG) under  Sales and Distribution  Billing  Rebate Processing  Business Add-Ins (BAdIs)  Enhancements for Rebate Processing .
    Prerequisites
    You have activated the Logistics: S&D Simplification (SD_01) business function.
    Features
    You can integrate archived billing documents in your business processes as follows:
    Create sales documents with reference to archived billing documents, such as credit memo and debit memo requests.
    Display archived billing documents.
    When you do either of these steps, the system first looks for the invoice in the database and then in the archive.
    For the sales employee, the processing steps are identical, regardless of where the sales document is stored. As soon as the sales employee processes an archived billing document, they see the relevant information in the message line as well as in the title of the function.
    For rebate processing, you can store your company's check logic in the interface of the Business Add-In (BAdI) Enhancements for Rebate Processing.
    So check if you have activated the business function.
    I hope this helps.
    Balazs

  • Query from the data abse  and pass values to a pdf form

    query from the data abse and pass values to a pdf form
    Hello
    Hello i have this html report that i have written to output a
    report.
    now, i am assigned to pass the same fields to a pdf form so
    the fields in the adaobe form can be populated or the term
    Pre-populate the form.
    can anyone help me get started.
    first i would like to know if it can be done.
    second, what do i need to get started (tools )
    third how do i do this.
    i am really lost at this point.
    can anyone give me tips in how to approach this
    subject??

    It can be one using Adobe Acrobat Designer which is packaged
    with Acrobat
    Professional Pro 7. It uses all XML to create and populate
    forms.
    If you had the time, you can also create <cfdocument
    type="pdf"> to have
    them ready and just pass the info to it so it autogenerates
    the PDF on the
    fly.

  • How to query from the xml table a single, specified element.

    I'm quite new in Xml Db. Pleas, can anybody tell me how to query from the xml table below a single element (i.e. the element 'rapportoparentela = NIPOTE' related to the element 'codicefiscale = CRRVNC76R52G337R', or the element 'rapportoparentela = FIGLIO' related to the element 'codicefiscale = CRRRNT51L23G337Q')?
    - <dati xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <codiceinterno />
    <codicefiscaleassistito>CRRMNL81R31G337H</codicefiscaleassistito>
    - <famigliare>
    <codicefiscale>CRRVNC76R52G337R</codicefiscale>
    <rapportoparentela>NIPOTE</rapportoparentela>
    </famigliare>
    - <famigliare>
    <codicefiscale>CRRRNT51L23G337Q</codicefiscale>
    <rapportoparentela>FIGLIO</rapportoparentela>
    </famigliare>
    - <famigliare>
    <codicefiscale>CBRPRN15S65E080W</codicefiscale>
    <rapportoparentela>I.S.</rapportoparentela>
    </famigliare>
    - <famigliare>
    <codicefiscale>CRRMNL81R31G337H</codicefiscale>
    <rapportoparentela>NIPOTE</rapportoparentela>
    </famigliare>
    - <famigliare>
    <codicefiscale>BCCCML54C50I845G</codicefiscale>
    <rapportoparentela>NUORA</rapportoparentela>
    </famigliare>
    </dati>
    Using SELECT extractValue(value(t),'/rapportoparentela') into result FROM NF_XMLT X,
    TABLE ( xmlsequence (extract(value(X),'/dati/famigliare/rapportoparentela'))) t
    I get all the elements 'rapportoparentela' and I want to get only one specified.
    Regards.
    Piero

    Piero,
    you can add the condition "CRRVNC76R52G337R" to your xpath-expression like:
    SELECT extractValue(value(t),'/rapportoparentela')
    FROM NF_XMLT x
    ,TABLE ( xmlsequence (extract(value(X),'/dati/famigliare[rapportoparentela="CRRVNC76R52G337R"]'))) tto select only those famigliare-elements that have a child-element rapportoparentela with value "CRRVNC76R52G337R".
    When you stored your XML in an XMLType column in the table, i think the following queries are better:
    SELECT extractValue(x.your_XMLType_column,'/dati/famigliare/rapportoparentela')
    FROM NF_XMLT x
    WHERE extractValue(x.your_XMLType_column,'/dati/famigliare/codicefiscale')
    = 'CRRVNC76R52G337R'or
    SELECT extractValue(x.your_XMLType_column,'/dati/famigliare/rapportoparentela')
    FROM NF_XMLT x
    WHERE existsNode(x.your_XMLType_column,'/dati/famigliare[codicefiscale="CRRVNC76R52G337R"]')
    != 0

  • Problem of running the jump query from the result line

    Dear expert,
    I have a problem when running a jump query from the result line. Apparently, the values of the caracteristics haven't been sent to the jump target.  However, the configuration in RSBBS seems to be good as the jump works well from the other lines.
    Does anyone have some ideas on that?
    Thanks in advance!

    Hi,
    If you are supposed to bring across characteristic values to your target, then you will not be able to jump from the result line. The configuration expects that the values of the characteristic marked as being used in the jump are filled with unique values. When you use the result line as a source for your jump, the values in the result line will most likely be based on the sum of multiple characteristic values.
    Hth,
    -Jacob

  • Framed IP Attribute missing in Accounting-Start messages from the ISG

    Framed IP Attribute missing in Accounting-Start messages from the ISG for the TAL Users. Account-Logon users and Interim updates have the Framed-IP though.
    We have the following command already enabled: aaa accounting include auth-profile framed-ip-address aaa accounting delay-start
    Any ideas or workarounds please?
    Debug:
    Aug 27 19:36:02.213: RADIUS(00000181): Send Accounting-Request to X.X.X.X:1813 id 21647/201, len 406
    Aug 27 19:36:02.213: RADIUS:  authenticator 23 FC FF 1B AC 01 77 B6 - 89 FE E2 9A 4E AA 0B 32
    Aug 27 19:36:02.213: RADIUS:  Acct-Session-Id     [44]  10  "000001BB"
    Aug 27 19:36:02.213: RADIUS:  Framed-Protocol     [7]   6   PPP                       [1]
    Aug 27 19:36:02.213: RADIUS:  Vendor, Cisco       [26]  20 
    Aug 27 19:36:02.213: RADIUS:   ssg-service-info   [251] 14  "NBWAUTHSVC01"
    Aug 27 19:36:02.213: RADIUS:  Vendor, Cisco       [26]  34 
    Aug 27 19:36:02.213: RADIUS:   Cisco AVpair       [1]   28  "parent-session-id=000001BA"
    Aug 27 19:36:02.213: RADIUS:  User-Name           [1]   22  "[email protected]"
    Aug 27 19:36:02.213: RADIUS:  Acct-Status-Type    [40]  6   Start                     [1]
    Aug 27 19:36:02.213: RADIUS:  Vendor, Cisco       [26]  25 
    Aug 27 19:36:02.213: RADIUS:   Cisco AVpair       [1]   19  "portbundle=enable"
    Aug 27 19:36:02.213: RADIUS:  Vendor, Cisco       [26]  23 
    Aug 27 19:36:02.213: RADIUS:   ssg-account-info   [250] 17  "SX.X.X.X"
    Aug 27 19:36:02.213: RADIUS:  Calling-Station-Id  [31]  19  "00-15-00-73-XX-XX"
    Aug 27 19:36:02.213: RADIUS:  NAS-Port-Type       [61]  6   Virtual                   [5]
    Aug 27 19:36:02.213: RADIUS:  NAS-Port            [5]   6   0                        
    Aug 27 19:36:02.213: RADIUS:  NAS-Port-Id         [87]  11  "0/2/0/200"
    Aug 27 19:36:02.213: RADIUS:  Vendor, Cisco       [26]  46 
    Aug 27 19:36:02.213: RADIUS:   Cisco AVpair       [1]   40  "remote-id-tag=020a00000a050001000800c8"
    Aug 27 19:36:02.213: RADIUS:  Vendor, Cisco       [26]  36 
    Aug 27 19:36:02.213: RADIUS:   Cisco AVpair       [1]   30  "vendor-class-id-tag=MSFT 5.0"
    Aug 27 19:36:02.213: RADIUS:  Service-Type        [6]   6   Framed                    [2]
    Aug 27 19:36:02.213: RADIUS:  NAS-IP-Address      [4]   6   X.X.X.X            
    Aug 27 19:36:02.213: RADIUS:  Ascend-Session-Svr-K[151] 10 
    Aug 27 19:36:02.213: RADIUS:   39 45 41 39 39 36 44 44          [ 9EA996DD]
    Aug 27 19:36:02.213: RADIUS:  Event-Timestamp     [55]  6   1346096162               
    Aug 27 19:36:02.213: RADIUS:  Nas-Identifier      [32]  24  "LAB-RAS01"
    Aug 27 19:36:02.213: RADIUS:  Acct-Delay-Time     [41]  6   0    
    Thanks in advance.

    It seems you already have tac case opened for this issue? Let me know if that is not the case.

  • I would like to change the current song from the pull down tab so that I don't have to exit whatever app I'm in, return to music and change it. Is this possible?

    I would like to change the current song from the pull down tab so that I don't have to exit whatever app I'm in, return to music and change it. Is this possible?

    Try double clicking the Home button and then swipe the bottom row fully to to the right to get to the music control

  • I have a large number of contacts in my Outlook account.  As long as that account is active on the iPhone (6 ) the contact are available on the phone but disappear when that account is removed from the phone.  How do I transfer the contacts?

    I have a large number of contacts in my Outlook account.  As long as that account is active on the iPhone (6 ) the contact are available on the phone but disappear when that account is removed from the phone.  How do I transfer the contacts permanently to the phone?

    Archive the contacts you have in Address book, then delete them, they will be removed from iCloud as well. Restore the archive

  • To Find the SAP Query from the tranaction code or the program name

    Hi,
    I have a situation wherein I have to modify the sap query associated with an transaction code.But the problem is that I am unable to find the SAP Query.
    <b>Please let me know how to find the SAP query from the transaction code or the program name.</b>
    Thanks and Regards,
    Rupesh

    Hi Rupesh,
    1 use FM
      RSAQ_DECODE_REPORT_NAME
    2. This is one of the best and easiest way.
    3. It will provide u the following info.
       WORKSPACE
       USERGROUP
       QUERY    
       CLIENT   
    4. Thru TCode U must know the program name first.
       This can be discovered using SE93.
    Hope it helps.
    Regards,
    Amit M.

  • How to Launch a Query from the Easy Access Menu

    Hello Experts,
    Once I have created, saved and tested my query how can I set it up so that my users can either type in a transaction at the Easy Access Menu or select my query from the Easy Access Menu and launch the query input screen that displays fields for:
    Reporting Period
    Selection Criteria - Personnel Number, Employment Status, Personnel Area etc.
    Program Selections - company code
    Output Format
    Thanks.
    Regards,
    Jeanette

    Hello Jeanette
    You may refer to following thread
    Assign transaction code to SAP Query (created via SQ01)
    Hope this helps
    Best Regards
    Reddy

Maybe you are looking for