Service Contract header, line level and party data report.

Using 11.5.9.
In Service Contracts Module, trying to create a query that extracts header data, party data (role and name) and the name of the service from the lines/account tab, ie Full Service, Gold Service etc...
Created query that retrieve Service Contract header and party data, but when I try to join to mtl_system_items_b, I am getting a product description instead of the name of the service. I also include code below this that pulls in the lines from the lines/account tab which captures line 1.1 and has the correct service name. Note this code does not have the header data and party data built into it, but I am willing to modify either piece of code to create the need join and get the data returned.
SELECT
distinct (okhb.contract_number)     contract_number,
nvl(okhb.contract_number_modifier,'-') contract_modifier,
okhb.sts_code,
okhb.start_date     start_date,
okhb.end_date          end_date,
okprb.rle_code ROLE,
msib.description,
(msib.segment1) item_number,
hp.party_name
FROM
hz_party_sites ps,
hz_party_sites ps9,
hz_locations l,
hz_locations l9,
hz_cust_acct_sites_all ca,
hz_cust_acct_sites_all ca9,
hz_cust_site_uses_all cs,
hz_cust_site_uses_all cs9,
hz_parties hp,
hz_parties hp9,
okc_rules_b orb,
okc_rules_b orb9,
okc_rule_groups_b ogb,
okc_k_headers_b okhb,
okc_k_party_roles_b okprb,
okc_k_lines_b oklb,
ra_customer_Trx_all rcta,
mtl_system_items_b msib
WHERE
PS.LOCATION_ID = L.LOCATION_ID AND
ps9.location_id = l9.location_id and
L.CONTENT_SOURCE_TYPE = 'USER_ENTERED' AND
l9.content_source_type = 'USER_ENTERED' and
PS.PARTY_SITE_ID = CA.PARTY_SITE_ID AND
ps9.party_site_id = ca9.party_site_id and
CA.CUST_ACCT_SITE_ID = CS.CUST_ACCT_SITE_ID and
ca9.cust_acct_site_id = cs9.cust_acct_site_id and
ps9.party_id = hp9.party_id and
ps.party_id = hp.party_id and
cs.site_use_id=orb.object1_id1 and
cs9.site_use_id = orb9.object1_id1 and
orb.jtot_object1_code in ('OKX_SHIPTO'/*,'OKX_BILLTO'*/) and
orb9.jtot_object1_code = 'OKX_BILLTO' and
orb.rgp_id = ogb.id and
orb9.rgp_id = ogb.id and
okhb.id = okprb.chr_id and
msib.inventory_item_id = orb.object1_id1 and
okhb.contract_number = rcta.interface_header_attribute1 and
nvl(okhb.contract_number_modifier,'-') = nvl(rcta.interface_header_attribute2,0) and
ogb.chr_id = okhb.id and
okhb.sts_code = 'ACTIVE' and
okhb.contract_number in ('VO-7001','VO-7078') and
okprb.rle_code in ('CUSTOMER','END_USER')
--oklb.line_number||'.'||oklbs.line_number = '1.1'
order by okhb.contract_number;
select
     to_char(oklb.line_number)||'.'||to_char(oklbs.line_number) subline_number,
okhb.contract_number,
     okhb.sts_code,
(msi.segment1) item_number,
     msi.description,
     okcis.number_of_items,
round(months_between(element.date_completed , element.date_start))     billable_days,
     oklbs.start_date          start_date,
     oklbs.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,
     oklbs.attribute4 sales_order
from oks_level_elements_v element,
okc_rules_v rule,     
okc_rule_groups_v grp,
oks_bill_cont_lines_v      obcl,
     okc_k_lines_v          oklbs,
     okc_k_items_v               okcis,
     mtl_system_items_vl     msi,
     okc_k_items_v               okci,
     okc_k_lines_v           oklb,
     okc_k_headers_v          okhb,
OKS_BILL_TRANSACTIONS_V obtrx
where trunc(element.date_start) = trunc(obcl.date_billed_from) and
rule.id = element.rul_id and
rule.rgp_id = grp.id and
grp.rgp_type = 'KRG' and
grp.rgd_code = 'SVC_K' and
grp.cle_id = oklbs.id and
oklbs.cle_id     = oklb.id      and
     oklbs.lse_id     <> '2'      and
okhb.sts_code = 'ACTIVE' and
     msi.inventory_item_id = okci.object1_id1 and
     msi.organization_id = 3      and
     okcis.cle_id          = oklbs.id and
     okci.cle_id          = oklb.id and
     obcl.cle_id           = oklb.id      and
     oklb.chr_id           = okhb.id      and
     obcl.btn_id = obtrx.id and
     okhb.contract_number like 'VO-7078' and
oklb.line_number||'.'||oklbs.line_number = '1.1'
order by okhb.contract_number, to_number(oklb.line_number), to_number(oklbs.line_number), oklbs.id;
Code that pulls in the correct description as seen at line level in Service Contracts Module.
OUTPUT of this query
CONTRACT_NUMBER     STS_CODE     ITEM_NUMBER     DESCRIPTION
XX-XXXX     ACTIVE     FULL SERVICE     FULL SERVICE

I guess you are looking for coverage name. You need to add two more table to join with items like as in
select inventory_item_id,a.name,a.item_description from mtl_system_Items_b c,okc_k_lines_tl a,okc_k_lines_b b
where organization_id=<organization_id>
and contract_item_type_code in ('SERVICE','WARRANTY')
and a.id=b.id
and b.chr_id=-1
and coverage_schedule_id=b.id;
Thanks
Nagamohan

Similar Messages

  • How to get multiple header lines dynamically and also data hierarchically using ALV

    Hi experts,
    My requirement is shown below.. I neet to compare prices of service RFQs. So i design as below..
    I want to get RFQ number ,Vendor code and vendor name in ALV header and also other headings which static. I think dynamic table is the best way to load RFQ numbers to header.. But problem is i'm unable to load two lines dynamically using ALV.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
         EXPORTING
           i_style_table             = 'X'
           it_fieldcatalog           = gt_dyn_fcat
         IMPORTING
           ep_table                  = gt_dyn_table
         EXCEPTIONS
           generate_subpool_dir_full = 1
           OTHERS                    = 2.
    I use this function and pass RFQ no and vendor code in two rows but it output gt_dyn_table in same row.. How to print them as given image???
    Then in data I want to get service items and according to the external service number divide them to groups and get sub totals and also finally total of all sub categories to compare each RFQs price to  compare.. There i think ALV hierarch can use. but not sure I can use with dynamic table(in header use it).
    What is thee best way to get the output in my image..??
    Thanks..
    Pavi

    Hi experts,
    My requirement is shown below.. I neet to compare prices of service RFQs. So i design as below..
    I want to get RFQ number ,Vendor code and vendor name in ALV header and also other headings which static. I think dynamic table is the best way to load RFQ numbers to header.. But problem is i'm unable to load two lines dynamically using ALV.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
         EXPORTING
           i_style_table             = 'X'
           it_fieldcatalog           = gt_dyn_fcat
         IMPORTING
           ep_table                  = gt_dyn_table
         EXCEPTIONS
           generate_subpool_dir_full = 1
           OTHERS                    = 2.
    I use this function and pass RFQ no and vendor code in two rows but it output gt_dyn_table in same row.. How to print them as given image???
    Then in data I want to get service items and according to the external service number divide them to groups and get sub totals and also finally total of all sub categories to compare each RFQs price to  compare.. There i think ALV hierarch can use. but not sure I can use with dynamic table(in header use it).
    What is thee best way to get the output in my image..??
    Thanks..
    Pavi

  • Header, Line Item and Cache Techniques Using Hashed Tables

    Hi,
    How can I work with header, line item, and a cache techniques using hashed tables?
    Thanks,
    Shah.

    Hi,
    Here is an example to clarify the ideas:
    In general, every time you have a header-> lines structure you have a unique key for the lines that has at least header key plus one or more fields. I'll make use of this fact.
    I'll try to put an example of how to work with header -> line items and a cache technique using hashed tables.
    Just suppose that you need a list of all the material movements '101'-'901' for a certain range of dates in mkpf-budat. We'll extract these fields:
    mkpf-budat
    mkpf-mblnr,
    mseg-lifnr,
    lfa1-name1,
    mkpf-xblnr,
    mseg-zeile
    mseg-charg,
    mseg-matnr,
    makt-maktx,
    mseg-erfmg,
    mseg-erfme.
    I'll use two cache: one for maintaining lfa1 related data and the other to maintain makt related data. Also I'll only describe the data gathering part. The showing of the data is left to your own imagination.
    The main ideas are:
    1. As this is an example I won't use inner join. If properly desingned may be faster .
    2. I'll use four hashed tables: ht_mkpf, ht_mseg, ht_lfa1 and ht_makt to get data into memory. Then I'll collect all the data I want to list into a fifth table ht_lst.
    3. ht_mkpf should have (at least) mkpf's primary key fields : mjahr, mblnr.
    4. ht_mseg should have (at least) mseg primary key fields: mjahr mblnr and zeile.
    5. ht_lfa1 should have an unique key by lifnr.
    6. ht_makt should have an unique key by matnr.
    7. I prefer using with header line because makes the code easier to follow and understand. The waste of time isn't quite significant (in my experience at least).
    Note: When I've needed to work from header to item lines then I added a counter in ht_header that maintains the count of item lines, and I added an id in the ht_lines so I can read straight by key a given item line. But this is very tricky to implement and to follow. (Nevertheless I've programmed it and it works well.)
    The data will be read in this sequence:
    select data from mkpf into table ht_mkpf
    select data from mseg int table ht_mseg having in count all the data in ht_mkpf
    loop at ht_mseg (lines)
    filter unwanted records
    read cache for lfa1 and makt
    fill in ht_lst and collect data
    endloop.
    tables
    tables: mkpf, mseg, lfa1, makt.
    internal tables:
    data: begin of wa_mkpf, "header
    mblnr like mkpf-mblnr,
    mjahr like mkpf-mjahr,
    budat like mkpf-budat,
    xblnr like mkpf-xblnr,
    end of wa_mkpf.
    data ht_mkpf like hashed table of wa_mkpf
    with unique key mblnr mjahr
    with header line.
    data: begin of wa_mseg, " line items
    mblnr like mseg-mblnr,
    mjahr like mseg-mjahr,
    zeile like mseg-zeile,
    bwart like mseg-bwart,
    charg like mseg-charg,
    matnr like mseg-matnr,
    lifnr like mseg-lifnr,
    erfmg like mseg-erfmg,
    erfme like mseg-erfme,
    end of wa_mseg,
    data ht_mseg like hashed table of wa_mseg
    with unique key mblnr mjahr zeile
    with header line.
    data: begin of wa_lfa1,
    lifnr like lfa1-lifnr,
    name1 like lfa1-name1,
    end of wa_lfa1,
    data ht_lfa1 like hashed table of wa_lfa1
    with unique key lifnr
    with header line.
    data: begin of wa_makt,
    matnr like makt-matnr,
    maktx like makt-maktx,
    end of wa_makt.
    data: ht_makt like hashed table of wa_makt
    with unique key matnr
    with header line.
    result table
    data: begin of wa_lst, "
    budat like mkpf-budat,
    mblnr like mseg-mblnr,
    lifnr like mseg-lifnr,
    name1 like lfa1-name1,
    xblnr like mkpf-xblnr,
    zeile like mseg-zeile,
    charg like mseg-charg,
    matnr like mseg-matnr,
    maktx like makt-maktx,
    erfmg like mseg-erfmg,
    erfme like mseg-erfme,
    mjahr like mseg-mjahr,
    end of wa_mseg,
    data: ht_lst like hashed table of wa_lst
    with unique key mblnr mjahr zeile
    with header line.
    data: g_lines type i.
    select-options: so_budat for mkpf-budat default sy-datum.
    select-options: so_matnr for mseg-matnr.
    form get_data.
    select mblnr mjahr budat xblnr
    into table ht_mkfp
    from mkpf
    where budat in so_budat.
    describe table ht_mkpf lines g_lines.
    if lines > 0.
    select mblnr mjahr zeile bwart charg
    matnr lifnr erfmg erfme
    into table ht_mseg
    from mseg
    for all entries in ht_mkpf
    where mblnr = ht_mkpf-mblnr
    and mjahr = ht_mjahr.
    endif.
    loop at ht_mseg.
    filter unwanted data
    check ht_mseg-bwart = '101' or ht_mseg-bwart = '901'.
    check ht_mseg-matnr in so_matnr.
    read header line.
    read table ht_mkpf with table key mblnr = ht_mseg-mblnr
    mjahr = ht_mseg-mjahr.
    clear ht_lst.
    note : this may be faster if you specify field by field.
    move-corresponding ht_mkpf to ht_lst.
    move-corresponding ht_mseg to ht_lst.
    perform read_lfa1 using ht_mseg-lifnr changing ht_lst-name1.
    perform read_makt using ht_mseg-matnr changing ht_lst-maktx.
    insert table ht_lst.
    endloop.
    implementation of cache for lfa1.
    form read_lfa1 using p_lifnr changing p_name1.
    read table ht_lfa1 with table key lifnr = p_lifnr
    transporting name1.
    if sy-subrc <> 0.
    clear ht_lfa1.
    ht_lfa1-lifnr = p_lifnr.
    select single name1
    into ht_lfa1-name1
    from lfa1
    where lifnr = p_lifnr.
    if sy-subrc <> 0. ht_lfa1-name1 = 'n/a in lfa1'. endif.
    insert table ht_lfa1.
    endif.
    p_name1 = ht_lfa1-name1.
    endform.
    implementation of cache for makt
    form read_makt using p_matnr changing p_maktx.
    read table ht_makt with table key matnr = p_matnr
    transporting maktx.
    if sy-subrc <> 0.
    ht_makt-matnr = p_matnr.
    select single maktx into ht_matk-maktx
    from makt
    where spras = sy-langu
    and matnr = p_matnr.
    if sy-subrc <> 0. ht_makt-maktx = 'n/a in makt'. endif.
    insert table ht_makt.
    endif.
    p_maktx = ht_makt-maktx.
    endform.
    Reward points if found helpfull...
    Cheers,
    Siva.

  • Service Contract Usage line Invoice Amount

    Hello All,
    I have created Service contract with a Usagline and Service line. When entered the Counter reading, and run the 'Service Contract Main billing program', i am getting the invoice amont of 0 only. Could you please tell me how can i proceed.
    And also, what is the relation between 'Service Contract Main Billing Program' and 'QP_CUSTOM' (I have to bill the usage line based on my own logic)
    Please help me
    Thanks inadvance,
    Amarnadh

    Did not understand your question, at least completely. The steps you described and the functionality provided is all right.
    Is the question, which one of these two values to choose from or why they are two values in the LOV?
    Thanks
    Nagamohan

  • Availability check box at schedule line level and requirement class level

    Hi All
    What is the significance of availability check field at schedule line level and requirement type level.
    If I remove the check box at schedule line level, then there won't be any availability check carried out in the sales order, even though in requirement class it is checked. Is it for doing availability once the requirement is passed to MRP...
    In make to stock scenario, no availability check is active at schedule line level.
    scenario 1. stock is 0 in plant, when i place an order for 10 quantity, does system give any confirmed quantity on so and so date...or the confirmed quantity will be zero or as there is no availability check carried out, it confirms 10 quantity on customer requested delivery date and the time of creation of delivery, it gives an error message stating zero quantity is available. which one is correct in all the above.
    In make to order scenario, no availability check is active at schedule line level.
    order was created for 10 qty, as there is no availability check active, does the system give some date based on the lead times maintained in the material master or not?
    Regards
    Sree

    Hi sreekar
    The significance of availability check at schedule line level  is to determine weather availability check and TOR should be carried out for sales orders  or not. 
    If you remove check box at schedule line level , availability check and TOR wont be  carried out at sales order level.
    Coming to the scenario you said , make to stock , i think the availability check you are using is 01 make it 02. which is planned requirements. and stratergy group as 10. in MRP3 view in MMR. .
    as the availability check u have put 01 & stratergy group as 10 availability check doesnt carry
    coming to the scenario 2  , if the stock is 0 in plant and if you create a sales order, then the confirmed quantity should be 0 and that particular order will go to backorder processing.
    sometimes it  confirms the ordered quantity as the  confirmed qunatity, and it gives a confiremed delivery date on which the stock is confirmed , but that date is a tentative date.
    all these unconfirmed orders will go to backorders. once the qunatity is confirmed automatically , delivery date also will be done
    Coming to scenario 3 , when you create MTO order there will be availability check checked at the schedule line level. can you tell wat is the schedule line you are getting is it CP or ND?
    for schedule lines , ND - no availability check will be there , PD - availability check will be there
    Note: plz check 1st the availability check you have entered in MMR , if it  is 01 make it as 02. and then run these cycles.
    Reward points if useful and if Any queries let me know
    Regards
    Srinath
    Edited by: sri nath on Mar 21, 2008 7:53 PM

  • How you will see reports last year and till date reports and compare?

    How you will see reports last year and till date reports and how you will compare?
    sridhar

    Hi.
        This you can achieve at query level.
    I have few question.. First let me know how many KFs you have in the query and based on what characteristic you want to compare the KFs.
    Let me assume that you want to compare "SALES" KF for the last and current year.
    1) Add the "SALES" KF to the Query.
    2) Rename it as "SALES - Prior Year"
    3) Copy the above KF and rename the new KF as "SALES - Current Year"
    4) In the "SALES - Prior Year", add the date (say, Calendar Date, Fiscal Period, etc.) as per yr requirement. Keep offset as "-1"
    5) Do the same for "SALES - Current Year" . No offset.
    6) Now create a new formula to find the difference between "SALES - Prior Year"  and "SALES - Current Year" .
    Hope you got some idea!!
    Let me know if anything more is required.
    Regards,
    Balaji V

  • In Service contract, to change the valid form date on service code level.

    Hi.
    I want to change the price valid form date on service code level ( i.e. in condition)  in Service contract.
    I know i can  do that with ME32 transaction but i have lot of Service contract with more then 10,000 line items
    Is there any way that i can change in mass based on Service contract no. wise.???
    Thanks in advance..
    Edited by: VIKRANT HANDE on Sep 15, 2009 9:11 AM

    Please check in KON* series table in SE16N transaction. I guess KOHN table may help you out. You can see other similar tables.
    In any one of the table you will find validity data.

  • Service Contract: Copy line item

    Scenario: we have Service Contracts and these have line items with contract start date and end date.
    Requirement: We want to create a new line item if the existing line items contract end date -- date profile's    
    Rewenal period value(say 10 days) equals to today's date and line item's custom field value equals to X.
    Question: what are possible ways we can achieve this?
    My thought was to use Actions but I am stuck with start condition. Basically I do not know how to create start conditions that involves fields from Contract Line Items and date profile's period.
    Please help.

    HI,
    You can use Action Profile to achieve your requirement. However there is some enhancement invloved in it.
    Create an Action profile for the item category of the service contract. Keep the Start condition as Renewal date >= Todays date.
    Use processng type as method call for this action definition and create a custom class and method with the logic to copy the line item into a new line. It seems quite possible.
    Regards,
    PP

  • Best way to handle single line Customer and Address Data

    Hi, We have customer data in a single line means name, address everything is in a single line. I am now suppose to cleanse this data using Data Quality. Now my question is how to parse this data. Normally I have dealt with multiple line or address data which I can map to input fields of the Address cleanse transforms. In this case, Shall I just map that single field to "Address_line" of the Address cleanse transform? It should be able to parse or shall I parse all the fields using some function in Query transform and then feed into Address Cleanse transform?
    Thanks,

    Hi, We have customer data in a single line means name, address everything is in a single line. I am now suppose to cleanse this data using Data Quality. Now my question is how to parse this data. Normally I have dealt with multiple line or address data which I can map to input fields of the Address cleanse transforms. In this case, Shall I just map that single field to "Address_line" of the Address cleanse transform? It should be able to parse or shall I parse all the fields using some function in Query transform and then feed into Address Cleanse transform?
    Thanks,

  • What is the difference between Service Edge Optimized line cards and Packet Transport line cards in the ASR 9000

    Hi Folks,
    What is the deep dive difference between the service edge optimized cards and the packet transport line cards in the ASR 9000?
    I know that QoS is the difference in general, for example, the service edge optimized has advanced QoS features while the Packet Transport line cards has basic QoS features but I want to know some more details please.
    Thanks

    There are four main deiffences (unfortunately don't have a reference link).
    L3 Interfaces:
    TR: 8k/LC, SE: 20k/LC
    L2 Interfaces:
    TR: 16k/LC, SE: 64k/LC
    QoS:
    TR: only 8 Queues per port, 8k policers per Network Processor
    SE: 256k Queues per port, 256k policers per NP
    ACL:
    TR: 24k ACE
    SE: 96k ACE
    Number of FIB/mFIB/MAC etries, L3 VRFs, PWs available per TR/SE linecard are the same.

  • PO Creation and GRN date report

    Pls Suggest any std report for the below values
    PO Number      PO Creation date      PO Line Item      Material      Material Document No     Material Document Date

    HI,
    Using T-code MB51 - Material Document List, your requirement full-filled  and the details to be given as follows.
    Plant     : __________
    Posting Date : __________ to _______  (for the period 01.10.2010 to 31.10.2010 if required)
    under Data Source heading 'Database' option to be ticked and then executed the report (run clock).
    After execute the report shown material document list and then top of the report  blue color button( Detail list) press, the report shown PO number, PO date,PO line item with material description, material doc.no. and material doc.date as you needed.
    Hope, it is full-filled your requirement.
    Regards,
    K.Rajendran

  • Why does Firefox beta keep connecting to 173.194.70.* (google), even when no tabs are open and all data reporting and the built in ggl. search is disabled?

    I'm worried of google spying. Connections appear in OS Monitor as ESTABLISHED TCP4 connections on port 80, even in background.

    See this article for some suggestions: [[Firefox has just updated tab shows each time you start Firefox]]
    See also http://kb.mozillazine.org/Preferences_not_saved and Preferences are not saved

  • 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.

  • 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

  • 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

Maybe you are looking for

  • How to Remove Credit card info on iTunes?

    hi, i would like to know how to remove my credit card info. because I used a prepaid master card and now I owe money so I want to take the credit card off. and for some reason the "None" option isn't there any more. Thanks

  • Write to excel using Range function - Excel_write_range.vi

    I am using the write using range Excel function to dump some data into Excel. My data is an array consisting of decimal numbers (data type double) but I have to use "Number To Fractional String" before I can dump this array into Excel. And then when

  • Results don't populate text field

    The program compiles and runs but the results don't populate the screen please help. i know I did,t highlight the code but I'm heading out I'm late for work. import javax.swing.*; import java.awt.*; import java.text.DecimalFormat; import java.awt.eve

  • App store terms 4s, app store terms 4s

    I'm going crazy.  I cannot get past the "Accept New Terms" on the Apps store and pressing "send email" does abolsultely nothing, so I cannot download any new apps etc.  What is going on with Apple?  Who tested this stuff? Any help would really be app

  • Add-Data-To-End-File

    hi every one i been two days seeking help about my problem but no one seems to reply my problem is very simple but becouse i am new on dealing with files i could not solve the following problem : i am trying to add data to a file hello world , and th