Bill To Account is missing on Service Contract line after customer merge

Hi
This probelem relates to service contracts that have customers that were merged. After the existing customer (on the contract) was merged with a new customer the contract address are updated with the the new Customer and Addresses (this is all standard merge fucntionality). The issues is the lines on the contract are not updated properly with the new Bill to Address fromt the merged into customer. The end result is when this contract is invoiced the invoice lines are errroing in AR interface due to the Bill Account being missing.
Please let me know if you have faced similar situation and what steps did you take to resolve this issue.
Thanks
Kundan

Hi Siddharth,
Thanks for your reply. The patch suggested by the Metalink Doc ID 353230.1 has already been applied in our case, still this issue. Please let me know if you have some other alterantive solution.
Thanks
Kundan

Similar Messages

  • Issue in using custom discount condition type in pricing agreement at Service Contract line item level

    Hello
    We are facing an issue while using a Z discount condition type in price agreement at service contract line item level.
    A Z Condition type has been created in ECC and assigned to the pricing procedure. This pricing procedure is downloaded in CRM and determined in the service contract.
    A condition maintenance group using this Z condition type is created in CRM and assigned to service contract item category.
    Condition records are created in CRM for this condition type/condition maintenance group for specific products along with sales org and discount percentage.
    But when the price agreement(using this condition type) is used at the item level of a service contract, the system throws errors (related to product/unit of measure and sales org, even though no issues seem to be there)and thus the price agreement is not allowed to be used.
    If anyone has worked on such kind of scenario, please get in touch, I will share more details for the same. 
    Regards
    Ankit Arora

    Dear Ankit,
    Once the pricing procedure is downloaded, please maintain the document pricing procedure at service contract header level, and maintain the customer pricing procedure at business partner sales area billing data.
    In spro, maintain the pricing procedure for the combination of sales area, document pricing procedure, customer pricing procedure.
    Please crosscheck whether the condition table is active or not.
    Regards,
    Maddy

  • How to get price list line id for service contract line(subline)

    Does some one know how to find a price list line id for service contracts line (sub line)?
    There is actually a column in table okc_k_lines_b which is called price_list_line_id, but it looks like it is never used (all columns values are NULL). I have tried to investigate reprice API's which are used in contracts authoring form, but they are too huge and it didn't lead to nay result. There is a way (bad hack), by calling OKS_QP_INT_PVT.COMPUTE_PRICE it is possible to get price list line id by which contract line is priced, it would be kina fine if I would need to find line id for some rows, but it wont work for thousands!
    Is there some proper way how could I get price list line id by which is service contract line priced?

    Hi,
    Check out the following query that gets the price_list_id on subline_level and more.
    The price_list_Id is stored as a rule.
    SELECT
    chd.contract_number
    , par.party_number
    , par.party_name
    , ldf.pas_nummer
    , ldf.pas_houder     
    , rh.object1_id1 hdr_price_list_id
    , rsl.object1_id1 sl_hdr_price_list_id
    , pld.parkeerterrein
    , msi.segment1
    , sit.description
    FROM
    okc_k_headers_b chd
    , okc_k_lines_b clt
    , okc_k_lines_b cls
    , okc_k_lines_b_dfv ldf
    , okc_k_items cit
    , okc_rule_groups_b rgh
    , okc_rules_b rh
    , okc_rule_groups_b rgt
    , okc_rules_b rtl
    , okc_line_styles_b lst
    , okc_rule_groups_b rgs
    , okc_rules_b rsl
    , okc_line_styles_b lss
    , qp_list_headers_b plh
    , qp_list_lines pll
    , qp_list_lines_dfv pld
    , qp_pricing_attributes pat
    , mtl_system_items_b msi
    , mtl_system_items_tl sit
    , hz_cust_accounts cac
    , hz_parties par
    WHERE
    rgh.chr_id = chd.id
    AND rh.rgp_id = rgh.id
    AND rh.jtot_object1_code = 'OKX_PRICE'
    AND cac.cust_account_id = rtl.object1_id1
    AND par.party_id = cac.party_id
    AND clt.chr_id = chd.id
    AND clt.lse_id = lst.id
    AND lst.lty_code = 'SERVICE'
    AND rgt.cle_id = clt.id
    AND rtl.rgp_id = rgt.id
    AND rtl.jtot_object1_code = 'OKX_CUSTACCT'
    AND cls.cle_id = clt.id
    AND cit.cle_id = cls.cle_id
    AND cit.jtot_object1_code = 'OKX_SERVICE'
    AND cls.lse_id = lss.id
    AND lss.lty_code = 'COVER_ITEM'
    AND cls.id = rgs.cle_id
    AND rgs.id = rsl.rgp_id
    AND rsl.jtot_object1_code = 'OKX_PRICE'
    AND plh.list_header_id = rsl.object1_id1
    AND plh.list_header_id = pll.list_header_id
    AND pll.rowid = pld.row_id
    AND pat.list_header_id = pll.list_header_id
    AND pat.list_line_id = pll.list_line_id
    AND cit.object1_id1 = pat.product_attr_value
    AND cit.object1_id2 = chd.authoring_org_id
    AND msi.inventory_item_id = cit.object1_id1
    AND msi.organization_id = cit.object1_id2
    AND sit.inventory_item_id = msi.inventory_item_id
    AND sit.organization_id = msi.organization_id
    AND sit.language = userenv('LANG')
    AND cls.rowid = ldf.row_id
    Hth,
    Martin
    Edited by: mvdons on 4-sep-2008 2:13

  • Changing Billing Schedule Level for OM originated Service Contracts

    Hi,
    When we create a Service Contract from Order Management, the Billing Schedule Level is always set to Top Level and only one Billing Stream gets created.
    Can we get the Billing Schedule Level changed to other Levels viz., Equal Amount or Covered Level using any setups.
    Has anyone did any customization/extension to be able to change the Billing Schedule Level.
    The basic requirement is to have multiple billing streams for the contract, created from Order Management.
    Gurus, any ideas/suggestions to get this accomodated.

    Sid,
    I don't think you are on the right track (in my opinion). You are right that we can only create service contract from the order management (service or Extended Warranty Lines).
    If I understood correctly, you sell electronic subscriptions (like my internet service I have at home) and you are looking for way to take it from the order management so that you can bill it from Contracts and not from OM. As this is electronic service, looks like you do not have fulfill any tangible product (like magazines) from contracts. Hence you do not care about the schedule for the contract shipments. Is that correct?
    As this is not something Oracle offers (I did not find anyway), you may want to consider extending OM workflow or a batch program to create a subscription contract once the order line is fulfilled (not the program where we create service contract). This way you have flexibility to create the contract the way you want it.
    But you can always create a service contract covering a subscription item as covered product. Like I have internet service as subscription but they cover me for any incidental visits of technicians for this subscription charging me some amount every month.
    Thanks
    Nagamohan

  • Service Contracts Line and Header Tax amounts are not matching

    Hi,
    I am creating service contracts using API. Using below code i am applying price adjustments on the line. while using the below API Tax is calculated at line level and added for each line But the Tax filed on the header is not getting updated. I fwe go to front end and click on reprice then the Tax amount is added to the header(If the contract created with status 'Entered').
    Please help me to fix this.
    l_multi_line_tbl (0).ID := l_x_clev_rec.ID;
    l_multi_line_tbl (0).price_list_id :=l_curr_price_list_id;
    l_multi_line_tbl (0).lse_id := 46;
    l_multi_line_tbl (0).line_pl_flag := 'Y';
    l_x_return_status := NULL;
    apps.oks_auth_util_pub.compute_price_multiple_line (
    p_api_version
    => 1.0,
    p_detail_tbl 
    => l_multi_line_tbl,
    x_return_status   => l_x_return_status,
    x_status_tbl 
    => l_status_tbl);
    Thanks,
    Hari

    not answered yet.

  • Problem in adding vales to service contract line item

    I want  the OBJECT ID  field to be filled in  OBJECT LIST tab at item level when ever  a service product is entered in service contract ( new line item) automatically ...
    I tired wiht CRM_ORDERADM_I_MERGE (CRM_ORDERADM_I_BADI) and
    CRM_ORDERADM_I_MERGE(ZCRM_ORDERADM_I_BADI) methods and using fuction module
    CRM_ORDPRP_I_MAINTAIN_OW  but not success yet.
    any help !!
    Thanks ....
    Edited by: aday rao on Sep 15, 2008 3:08 PM

    The way I typically handle organizational service attributes is to have a single amadmin XML file per AM service and in that amadmin file I have two requests, one to assign the service and the second to modify the service attributes. I then run the amadmin command with the -c continue option on the amadmin XML file so the service is always modified with latest settings regardless of whether or not it was assigned for the first time.
    Since your question relates to service attribute modification investigate the SchemaRequests -> AddAttributeSchema amadmin commands. For example, I use the following files to modify the amUserService
    <Requests>
    <!-- <SchemaRequests serviceName="iPlanetAMUserService" SchemaType="User">
    <RemoveAttributeSchema>
    <Attribute name="someoldattribute"/>
    </RemoveAttributeSchema>
    </SchemaRequests> -->
    <SchemaRequests serviceName="iPlanetAMUserService" SchemaType="User">
    <!-- full path or amadmin must run from same directory -->
    <AddAttributeSchema fileName="/opt/SUNWam/custom/amUserAttributes.xml" />
    </SchemaRequests>
    </Requests>
    <Requests>
    <!-- newest addition first, amadmin will quit on error regardless of -c flag -->
    <AttributeSchema name="somenewattribute"
    type="single"
    syntax="string"
    any="display"
    i18nKey="u301">
    </AttributeSchema>
    </Requests>

  • Updating service contract line item's end date

    Hi,
    I am trying to extend the end date on a line item in a service contract via the DI and it is giving me the following error:  'Item's end date cannot be greater than contract's end date' and I don't understand why.
    I retrieve the service contract object, change the header end date then find the line item  I need, update it with the same end date and then issue call the SC update method.  Here's my code:
        Try
                 SC.Lines.SetCurrentLine(SerialNbrLineNumber)
                 NewStartDate = LineEndDate
                 'calculate new end date & extend service contract
                 NewEndDate = NewStartDate.AddYears(Warranty_Duration)
                'never make the contract end date earlier than it had been
                SC.EndDate = IIf(NewEndDate > SC.EndDate, _
                                                             NewEndDate, _
                                                             SC.EndDate)
                'update service contract detail with new end date
                 If NewEndDate > LineEndDate Then
                     SC.Lines.EndDate = NewEndDate
                 End If
                 If SC.Update() <> 0 Then
                    rs.RtnCode = -1
                    rs.RtnMessage = B1Comp.GetLastErrorDescription()
                 End If
    I did see something in the di help that mentions that B1 calcs an end date based on the "duration of coverage" field but I don't think I could use that because I might only change the end date for one line item. 
    BTW I can do this in the application with no problem.
    Thanks in advance for any assistance.

    Known B1 bug.  Should have checked support first.  More info on note # 1026540

  • Adding Objects to Object List on the Service Contract Line Item

    Hi,
    I want to add a new fields at the object list. This is identified as configurable when I click on Configure Page button. Now when I add click on new field it which object should I select to enhance Object List.
    << Moderator message - Please do not promise points >>
    Thanks and Regards,
    Edited by: Rob Burbank on Dec 16, 2010 3:59 PM

    As books is a list of String it can't accept a Book object !
    LinkedList<Book> books = new LinkedList<Book>();

  • Canceling a service contract

    Hi,
    I am passing a future cancellation date for a service contract through a custom BAPI . The date is getting passed, but the billing plan line items are not getting deleted. I have to manually go into the service contract and select the date again to delete the bill plan line items.
    Can anyone please let me know how to do the action through the BAPI?

    Hello again Sloppy_Carlton,
    I’m glad to see you are utilizing the forums to reach out to us about multiple experiences, although I am sorry to see that neither of the experiences you posted about left you feeling delighted.
    Per our Return & Exchange Promise, we may return or exchange almost everything; however, devices that are damaged would be excluded. It seems the unauthorized modification (rooting and unrooting the phone) may have been the cause of the phone not turning on when attempting to update your operating system to KitKat. We would not be able to accept this device for an exchange or return as it would be considered damage from the unauthorized modification.
    That being said, I’m glad to hear you seem to have been provided a one-time solution to this experience. We truly value your insight and the time you have taken to share these insights with us. If you should need any further assistance, please feel welcome to reach out to us.
    Thank you for posting on the forum! 
    Tasha|Social Media Specialist | Best Buy® Corporate
     Private Message

  • Issue While Terminating a Service Contract with future date

    Hi CRM Gurus,
    We are in Oracle EBusiness Suite version R12 (12.1.3) and implementing service contracts for a client.
    Please help us with the following issue that we are facing while terminating  a service contract line with future date (end of the month).
    Example :
    A Contract 123 with 10 months of duration (Start Date:01-JUL-2013 and End Date: 30-APR-2014) has a service line 1.0 with unit price as $50 for a period of 10 months .The billing schedule is set for 10 months with each month for $50.
    The create main billing is run for the month of Jul 2013 and Aug 2013 and is sent to AR.Now we want to terminate the contract line with 30-Sep-2013 as termination date without any credit back to the customer so that we want to charge for month of Sep as well for $50.
    When we give 30-Sep-2013 as termination date and terminate the line, the billing schedule refreshes with $50 for Jul1-Jul 31 and $50 for Aug1-Aug31 and $48.39 for Sep1-Sep 29 instead of  30-Sep which is the termination date that we see on the line.
    The requirement is that we want to have the  billing for $50 even for the month of Sep,but the system only calculates for $48.39(which is 1 day minus) for the month of Sep. When we give Oct 1 as termination date ,then we get the schedule dates and amounts correctly i.e. 01-Sep to 30-Sep for $50.
    How do we achieve to bill for $50 when we put 30-Sep-2013 as termination date ? I see that the regular termination process does not consider timestamp while providing the termination date.
    Is this a bug or is there a patch for this or is there a workaround for this other than providing 01-Oct as termination date ?Please help.
    Regards,
    Sandeep Gorla

    Update the Ar Interface Table with  value 50$ for that record, before the Invoice gets created.

  • After Restore Got Voicemail Without Service Contract

    My old iPhone 3G doesn't have a service contract and in preparation of giving it to a friend, I erased all content and settings, then set it up as a new iPhone. Prior to doing this I was using it on wifi with various apps. My friend plans on doing the same and not get a service contract. After the restore though, I noticed the native phone app showed 3 voicemails. Prior to the restore it was a solid red dot, because of the no service contract. Is there a way to remove this so it doesn't show any voicemail? I am not sure why it does anyway.

    Not being under contract does not mean someone doesn't have service. After a contract has expired, service will be on a month to month basis without being under contract and can be cancelled at any time without a penalty.
    Are you still an AT&T subscriber with service with another phone?
    Erasing all content and settings on the iPhone is all that is needed in this situation. Setting the iPhone up as a new iPhone with iTunes after doing so means activating the iPhone with iTunes with AT&T, or did you restore the iPhone with iTunes as a new iPhone or not from your iPhone's backup after erasing all content and settings on the iPhone? If the iPhone is not activated with AT&T, you shouldn't have any visual voicemail messages. AFAIK, the only way visual voicemail messages can be downloaded to the iPhone from AT&T's server is with an iPhone that is activated with AT&T.

  • Service Contract Proftability Analysis in CS

    Hi Friends:
    How to capture or analyse the Profitability of Service Contracts in CS (Customer Service) ERP as to which Product or Customer is giving more profitability....
    Kindly Help.
    Regards,

    Hi,
    Use reports VA45 or VA45N
    or extract data from VBAK,VBAP,VBRK,VBRP
    Kapil

  • 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

  • Service Contracts Billing Schedule Creation Error

    Hi,
    I have a requirement of creating service contracts from back-end for which I am using the oks_contracts_pub.create_contract_header, create_service_line, and create_bill_schedule. I am creating my contracts with active status and renewal type of EVN (Header level), FUL(Line Level). My contract is of type subscription. The contract header and line are creating fine but the Bill schedule API is throwing an UNEXPECTED ERROR. The billing schedules need to be created based on accounting rule which can be quarterly or monthly. I have included the bill schedule code (hard coded values) for review. Any help is greatly appreciated.
    Also the version I am working on is R12
    ________________________________________________CODE___________________________________________________________________
    CREATE OR REPLACE PROCEDURE BILLING_SCHEDULE AS
    l_strm_level_tbl OKS_BILL_SCH.STREAMLVL_TBL;
    v_bill_qtrs NUMBER := 0;
    v_bill_mths NUMBER := 0;
    v_bill_days NUMBER := 0;
    v_net_amount NUMBER := 468;
    v_acct_rule_name VARCHAR2(50) := 'QUARTERLY';
    v_amt_per_day NUMBER;
    x_error_locator VARCHAR2(2000);
    v_start_date DATE := '04-MAY-2010';
    v_end_date DATE := '25-MAY-2010';
    x_return_status VARCHAr2(3);
    x_msg_count NUMBER;
    x_msg_data VARCHAR2(2000);
    v_billing_sequence NUMBER;
    x_chr_id NUMBER := 17000;
    x_line_id NUMBER := 223248604345353294444923586786456728480;
    g_day_uom VARCHAR2(10) := 'DAY';
    g_month_uom VARCHAR2(10) := 'MTH';
    g_quarter_uom VARCHAR2(10) := 'QTR';
    v_amt NUMBER;
    v_invoicing_rule_id NUMBER := -2;
    BEGIN
    --Create Billing Schedule based on accounting rule
    okc_context.set_okc_org_context;
    MO_GLOBAL.INIT('OKS');
    MO_GLOBAL.SET_POLICY_CONTEXT('S', 83);
    v_bill_qtrs := 0;
    v_bill_days := 0;
    v_bill_mths := 0;
    SELECT NVL(v_net_amount, 0)/(v_end_date - v_start_date)
    INTO v_amt_per_day
    FROM dual;
    dbms_output.put_line('Calculated amt per day ' || v_amt_per_day);
    IF v_acct_rule_name LIKE '%QUARTERLY%' THEN
    --Quarterly billing schedule
    SELECT FLOOR(MONTHS_BETWEEN( v_end_date,
    v_start_date)/3),
    v_end_date - ADD_MONTHS(v_start_date, (FLOOR(MONTHS_BETWEEN(v_end_date, v_start_date)/3)*3))
    INTO v_bill_qtrs,
    v_bill_days
    FROM dual;
    dbms_output.put_line('Calculated the qtrs and days');
    IF v_bill_qtrs > 0 THEN
    SELECT (ADD_MONTHS(v_start_date, (FLOOR(MONTHS_BETWEEN(v_end_date, v_start_date)/3)*3)) - v_start_date)*v_amt_per_day
    INTO v_amt
    FROM dual;
    dbms_output.put_line('Calculated qtr amt');
    SELECT NVL(MAX(sequence_no), 0) + 1
    INTO v_billing_sequence
    FROM oks_stream_levels_b
    WHERE dnz_chr_id = x_chr_id
    AND cle_id = x_line_id;
    --Populating the stream line variables
    l_strm_level_tbl(v_billing_sequence).sequence_no := v_billing_sequence;
    l_strm_level_tbl(v_billing_sequence).dnz_chr_id := x_chr_id;
    -- l_strm_level_tbl(v_billing_sequence).id := x_line_id;
    l_strm_level_tbl(v_billing_sequence).cle_id := x_line_id;
    l_strm_level_tbl(v_billing_sequence).uom_code := g_quarter_uom;
    l_strm_level_tbl(v_billing_sequence).uom_per_period := 1;
    l_strm_level_tbl(v_billing_sequence).level_periods := v_bill_qtrs;
    l_strm_level_tbl(v_billing_sequence).start_date := v_start_date;
    l_strm_level_tbl(v_billing_sequence).end_date := v_end_date;
    l_strm_level_tbl(v_billing_sequence).invoice_offset_days := NULL;
    l_strm_level_tbl(v_billing_sequence).amount := v_amt/v_bill_qtrs;
    l_strm_level_tbl(v_billing_sequence).level_amount := v_amt/v_bill_qtrs;
    l_strm_level_tbl(v_billing_sequence).lines_detailed_yn := 'Y';
    l_strm_level_tbl(v_billing_sequence).due_arr_yn := 'Y';
    dbms_output.put_line('Before calling the Bill Sch API for QTR');
    OKS_CONTRACTS_PUB.CREATE_BILL_SCHEDULE ( p_billing_sch=>'E',
    p_strm_level_tbl=>l_strm_level_tbl,
    p_invoice_rule_id=>v_invoicing_rule_id,
    x_return_status=>x_return_status);
    dbms_output.put_line('After calling the Bill Sch API for QTR');
    IF x_return_status <> 'S' THEN
    x_msg_count := 1;
    dbms_output.put_line('Quarterly schedule creation error ' || x_msg_data);
    ---DBMS_TRANSACTION.ROLLBACK_SAVEPOINT('OKS_A');
    -- RETURN;
    END IF;
    END IF;
    IF v_bill_days > 0 THEN
    SELECT NVL(MAX(sequence_no), 0) + 1
    INTO v_billing_sequence
    FROM oks_stream_levels_b
    WHERE dnz_chr_id = x_chr_id
    AND cle_id = x_line_id;
    dbms_output.put_line('sequence '||v_billing_sequence);
    --Populating the stream line variables
    l_strm_level_tbl(v_billing_sequence).sequence_no := v_billing_sequence;
    l_strm_level_tbl(v_billing_sequence).dnz_chr_id := x_chr_id;
    --l_strm_level_tbl(v_billing_sequence).id := x_line_id;
    l_strm_level_tbl(v_billing_sequence).cle_id := x_line_id;
    l_strm_level_tbl(v_billing_sequence).uom_code := g_day_uom;
    l_strm_level_tbl(v_billing_sequence).uom_per_period := v_bill_days;
    l_strm_level_tbl(v_billing_sequence).level_periods := 1;
    l_strm_level_tbl(v_billing_sequence).start_date := v_start_date;
    l_strm_level_tbl(v_billing_sequence).end_date := v_end_date;
    l_strm_level_tbl(v_billing_sequence).invoice_offset_days := NULL;
    l_strm_level_tbl(v_billing_sequence).amount := v_net_amount;--v_amt_per_day*v_bill_days;
    l_strm_level_tbl(v_billing_sequence).level_amount := v_net_amount;--v_amt_per_day*v_bill_days;
    l_strm_level_tbl(v_billing_sequence).lines_detailed_yn := 'Y';
    l_strm_level_tbl(v_billing_sequence).due_arr_yn := 'Y';
    dbms_output.put_line('Before calling the Bill Sch API for QTR days');
    OKS_CONTRACTS_PUB.CREATE_BILL_SCHEDULE ( p_billing_sch=>'E',
    p_strm_level_tbl=>l_strm_level_tbl,
    p_invoice_rule_id=>v_invoicing_rule_id,
    x_return_status=>x_return_status);
    dbms_output.put_line('After calling the Bill Sch API for QTR days ' || v_bill_days || ' ' || x_return_status);
    IF x_return_status <> 'S' THEN
    x_msg_count := 1;
    dbms_output.put_line('Day schedule, for quarterly accounting rule, creation error ' || x_msg_data);
    --DBMS_TRANSACTION.ROLLBACK_SAVEPOINT('OKS_A');
    --RETURN;
    END IF;
    END IF;
    ELSE
    --Monthly billing schedule
    SELECT FLOOR(MONTHS_BETWEEN( v_end_date,
    v_start_date)),
    v_end_date - ADD_MONTHS(v_start_date, FLOOR(MONTHS_BETWEEN(v_end_date, v_start_date)))
    INTO v_bill_mths,
    v_bill_days
    FROM dual;
    dbms_output.put_line('Calculated the mths and days');
    IF v_bill_mths > 0 THEN
    SELECT (ADD_MONTHS(v_start_date,FLOOR(MONTHS_BETWEEN(v_end_date, v_start_date))) - v_start_date)*v_amt_per_day
    INTO v_amt
    FROM dual;
    dbms_output.put_line('Calculated the mths amt');
    SELECT NVL(MAX(sequence_no), 0) + 1
    INTO v_billing_sequence
    FROM oks_stream_levels_b
    WHERE dnz_chr_id = x_chr_id
    AND cle_id = x_line_id;
    --Populating the stream line variables
    l_strm_level_tbl(v_billing_sequence).sequence_no := v_billing_sequence;
    l_strm_level_tbl(v_billing_sequence).dnz_chr_id := x_chr_id;
    --l_strm_level_tbl(v_billing_sequence).id := x_line_id;
    l_strm_level_tbl(v_billing_sequence).cle_id := x_line_id;
    l_strm_level_tbl(v_billing_sequence).uom_code := g_month_uom;
    l_strm_level_tbl(v_billing_sequence).uom_per_period := 1;
    l_strm_level_tbl(v_billing_sequence).level_periods := v_bill_mths;
    l_strm_level_tbl(v_billing_sequence).start_date := v_start_date;
    l_strm_level_tbl(v_billing_sequence).end_date := v_end_date;
    l_strm_level_tbl(v_billing_sequence).invoice_offset_days := NULL;
    l_strm_level_tbl(v_billing_sequence).amount := v_amt/v_bill_mths;
    l_strm_level_tbl(v_billing_sequence).level_amount := v_amt/v_bill_mths;
    l_strm_level_tbl(v_billing_sequence).lines_detailed_yn := 'Y';
    l_strm_level_tbl(v_billing_sequence).due_arr_yn := 'Y';
    dbms_output.put_line('Before calling the Bill Sch API for MTHS');
    OKS_CONTRACTS_PUB.CREATE_BILL_SCHEDULE ( p_billing_sch=>'E',
    p_strm_level_tbl=>l_strm_level_tbl,
    p_invoice_rule_id=>v_invoicing_rule_id,
    x_return_status=>x_return_status);
    dbms_output.put_line('After calling the Bill Sch API for MTHS');
    IF x_return_status <> 'S' THEN
    x_msg_count := 1;
    dbms_output.put_line('Monthly schedule creation error ' || x_msg_data);
    --DBMS_TRANSACTION.ROLLBACK_SAVEPOINT('OKS_A');
    --RETURN;
    END IF;
    END IF;
    IF v_bill_days > 0 THEN
    SELECT NVL(MAX(sequence_no), 0) + 1
    INTO v_billing_sequence
    FROM oks_stream_levels_b
    WHERE dnz_chr_id = x_chr_id
    AND cle_id = x_line_id;
    --Populating the stream line variables
    l_strm_level_tbl(v_billing_sequence).sequence_no := v_billing_sequence;
    l_strm_level_tbl(v_billing_sequence).dnz_chr_id := x_chr_id;
    --l_strm_level_tbl(v_billing_sequence).id := x_line_id;
    l_strm_level_tbl(v_billing_sequence).cle_id := x_line_id;
    l_strm_level_tbl(v_billing_sequence).uom_code := g_day_uom;
    l_strm_level_tbl(v_billing_sequence).uom_per_period := v_bill_days;
    l_strm_level_tbl(v_billing_sequence).level_periods := 1;
    l_strm_level_tbl(v_billing_sequence).start_date := v_start_date;
    l_strm_level_tbl(v_billing_sequence).end_date := v_end_date;
    l_strm_level_tbl(v_billing_sequence).invoice_offset_days := NULL;
    l_strm_level_tbl(v_billing_sequence).amount := v_amt_per_day*v_bill_days;
    l_strm_level_tbl(v_billing_sequence).level_amount := v_amt_per_day*v_bill_days;
    l_strm_level_tbl(v_billing_sequence).lines_detailed_yn := 'Y';
    l_strm_level_tbl(v_billing_sequence).due_arr_yn := 'Y';
    dbms_output.put_line('Before calling the Bill Sch API for MTH days');
    OKS_CONTRACTS_PUB.CREATE_BILL_SCHEDULE ( p_billing_sch=>'E',
    p_strm_level_tbl=>l_strm_level_tbl,
    p_invoice_rule_id=>v_invoicing_rule_id,
    x_return_status=>x_return_status);
    dbms_output.put_line('After calling the Bill Sch API for MTH days');
    IF x_return_status <> 'S' THEN
    x_msg_count := 1;
    dbms_output.put_line('Day schedule, for monthly accounting rule, creation error ' || x_msg_data);
    --DBMS_TRANSACTION.ROLLBACK_SAVEPOINT('OKS_A');
    --RETURN;
    END IF;
    END IF;
    END IF;
    COMMIT;
    EXCEPTION
    when others then
    dbms_output.put_line('Error ' || sqlerrm);
    END;
    Thanks,
    Yash.

    Hi There,
    I have a similar requirement to create rental service contracts and create billing schedules.
    Can you please pass on your functional docs so that i can refer to them.
    Thanks,
    Raidu

  • UNBILLED RECIEVABLE ACCOUNT- SERVICE CONTRACT WITH REVENUE RECOGNITION

    Hi SAP Gurus,
    I want to draw your kind attention towards my problem:
    I have created  service contract with one year contract and created an invoice for the whole year in advance.
    Now in-between i cancelled  a contract (after three months) and want to recognised a revenue for the contract period , so i'm creating a revenue recognition for the three months one by one using  transaction code-VF44,
    first month revenue recogniton is working fine as first month amount is going from deffered account to revenue account
    But for second month instead of deffered account ,system is using unbilled recievable account  ,which is wrong .
    Can anybody tell me why the system is picking unbilled receivable account instead of deffered account in case of second month revenue recogniton.
    This may help us:
    "When i was cancelling a contract ,at that time i was entering a billing plan end date in billing plan tab at an item level.
    and just after entering end date ,system was creating two lines instead of one in billing plan tab and i think because of that extra line system is picking unbilled receivables in second revenue recognition."
    Thanks in advance
    Ujjawal
    Edited by: Ujjawal Singh Karki on Dec 29, 2010 12:05 PM

    Hi,
    Thank you for your reply.
    I am doing a contract billing for overall period that is for 12 months (contract is of 12 months).
    Just after 3 months i have realized that somehow we have to cancel the contract and we canceled that in 3rd month.
    I had created the created a contract with periodic billing plan and for canceling that contract i'm putting contract end date in BILLING PLAN TAB as 31/03/2011 (Let say contract is from 01/01/2011 to 31/12/2011).
    Can you/anybody please tell me whether is this the correct way of canceling the contract with periodic billing plan?
    As per your analysis:
    "It seems you have done the billing document for one period and you are doing the RR document for multiple periods and hence the revenue is going to unbilled receivable account for the period for which billing document has not been done"
    As i have billed the customer for 12 months but contract was only for 3 months so i'll create RR for only 3 months and for rest of the period (i.e. 9 months) i'll create credit memo and send it to customer.
    "Please use a billing type where you will specify only start date and end date of the contract and not the billing plan in contract"
    How can we use billing type for contract start and end date .
    I think as soon as i'm changing the dates in billing plan tab system is proposing another line item with different  billing dates and that is not getting covered under deferred account that is still unbilled amount .
    Waiting for your valuable inputs.
    In case of any clarification kindly revert to me.
    Thanks,
    Ujjawal
    Edited by: Ujjawal Singh Karki on Jan 20, 2011 11:10 AM

Maybe you are looking for

  • Programs keep shutting down when opening - please help

    Hi, My imac keeps shutting down my programs when I'm using them. For example I can change my screensaver image to images from a chosen, when I try the program shuts down, same as safari and mac the ripper. Some of my other programs do not even open f

  • Question about templates with multiple queries

    I am just starting out with BI Publisher, v.10.1.3.2. I have a report that has multiple queries, but my template is just based on 1 query. How can I make the template use more than one query? Thanks!!

  • Why do I get this MyClass$1.class

    Hello, I have the following simple class: import java.awt.*; import java.awt.event.*; import javax.swing.*; public class HelloJava2 extends JComponent implements MouseMotionListener { // Coordinates for the message int messageX = 125, messageY = 95;

  • JavaFX2.0: Change Fontsize  in TextBox not working ?

    TextBox textBox = new TextBox ();                               textBox.setFont( new Font(Font.getDefault().getFamily(), 53));No Effect, the characters still appear very small. Is this a bug?

  • Migrating Oracle 9i to Oracle 10g

    Hi all, We have a database running on Oracle 9i(9.2.0.6), and we need to migrate this to Oracle 10g 10.2.0.1. Can any body suggest the procedure/links? Thanks in advance.