BAPI_SALESORDER_CREATEFROMDAT2 contract duration

Hello,
i create the contract with BAPI_SALESORDER_CREATEFROMDAT2
but i cannot find a field for duration of my contract (for example 2 years)
can anybody help me?
thanks,
Sergej

check weather u have did any validation for the date fields in flatfile......or date field in selection screen.....might if those are not in that range ...it wont upload.......
and one more thing check u r system date format.....if that wont match with u r flat file date format then also it wont upload......so if that is not in the same format try to change u r flat file date format.....or after getting u r date in to the internal table use edit mask..........
reward points if helpful...........

Similar Messages

  • Extending contract duration: where is log maintained

    Hi,
    I am selecting a contract.
    Right clicka nd use extend option.
    Extend the date
    Question 1: What is perpetual CHeck box?
    Question 2: After contract extension, no history is available of its previous date etc.
    Please can anyone help.
    Regards
    Preeti

    Currently the detailed 'Call Log' is not available. You can only get the details about the Incomimg / Outgoing / Missed call Day / Time under the Call 'History' ..
    You may add your Vote over HERE

  • Contract Start and End Dates in Sales Order

    Hi
    I have a situation where a service item is bundled with a deliverable item. The order is as follows
    Line Item    Mat                                                                 Qty            Higher Level Item               
    10              Item No.1 (Physical Item)                                  1             
    20              Item No.2 (Service Item)                                    1               10
    For the deliverable item 10 , Revenue is recognized immediately. For the Service item no.20 , revenue needs to be recognized over a period of 1 Year (It is a 1 year service contract).
    The whole order is created via BAPI from an external 3rd party order capture system.
    In order to do revenue recognition properly for service items , SAP I believe has 2 options
    1. Based on Billing plan dates
    2. Based on contract start dates
    Since order with both the line items need to produce 1 invoice, I cannot use billing plan . The only other option is to use contract start and end dates. I have enabled contract data at the sales order level. So when I enter the contract start and end dates manually at the line item level and set the item category to recognize revenue based on contract start and end dates based on time-based revenue recognition it is working fine.
    But I need a way to automate the population of contract start and end dates at the line item level. My ABAP guy is not able to find a user exit that can change the XVEDA or any VEDA structure in any of the user exits.
    I guess the SAP SD gurus out there would have definitely dealt with a situation of product bundling (Service and non-service items in the same sales order with one billing document , but seperate revenue recognition for service and non-service items)
    Please help.
    Thnx
    Siva

    Hi Siva,
    Kindly let me know what criteria you want to give for automatic population of start date of contract...
    Standard SAP comes with a few baseline dates for contract start date and we can control this from customization itself. 
    01     Today's date
    02     Contract start date
    04     Acceptance date
    05     Installation date
    06     Date contract signed
    07     Billing date/Invoice date
    08     CntrctStDate+contract duration
    09     Contract end date
    If you have some criteria which is not covered here, then let me know and i will try to provide some help then.
    Thanks
    Kapil Sharma

  • Value Contract

    Dear Experts,
    I need your help. I checked in the definition of WKN that a dummy material called WKM2 has to be assigned in the IMG settings against " Value Contract Material" then only the creation would proceed.
    Can someone guide me as to how to create this dummy material? and what are the steps involved in the processing of a value contract?
    Please advise.

    hi,
    Value contract type WK 2 (material-related)
    You can create contracts for one material (usually configurable) with this type of value contract. A software company is an example of where this kind of contract is often used. There, a contract for the value of $500,000 is made with the customer for one specific software product.
    You can also agree on the length of the contract for this type. The contract duration can be agreed at item level and can be different from the contract duration specified at header level.
    In order to achieve technical control of value contract items for value contracts referring to an assortment module or a product hierarchy, you need a material in the item. This is, for example, important for controlling control derivation and statistics update. You can set this material as default. This predefined material is then automatically copied into the item. The item category group for value contracts must be assigned to the material in the material master. If a material is entered, then the item category is created for the value contract. This item category is taken from the item category group in combination with the sales document type.
    Procedure
    To create a value contract, proceed as follows:
    In the initial screen, choose Logistics ® Sales and distribution ® Sales.
    Choose Contract ® Create.
    In the Contract type field, choose Value contract, and enter the required organizational data.
    The values for sales organization, for distribution channel and the division are usually proposed from user-defined parameters. Entries for the sales office and the sales group are optional.
    In the standard system, the following two sales document types are defined:
    – Value contract general (VC1)
    – Value contract general (VC2)
    Choose Enter.
    Enter the following data:
    – Customer number of the sold-to party in the Sold-to party field.
    – Customer purchase order number for this document
    – Validity period in the Valid from and Valid to fields
    – Description of value contract
    – The master contract number (see also Master Contracts)
    – Material number(s)
    – Target values for the materials
    The target value is the planned entire value for the material in the contract.
    – only for value contracts not referring to material: Product hierarchy and/or assortment modules
    Additionally, you can define contract duration for the value contracts VC2 in the Contract start date and Contract end date fields. You can define both contract duration and header level per item. The contract duration at item level can be different to the contact data at header level.
    Choose Enter.
    If you want to enter further data for the header or items, select the corresponding menu entry. If you wish to change data for an item, select the item before you choose the menu entry.
    Enter all the necessary data.
    Save the document.
    pl reward if it helps.
    Thanks,
    Sadhu Kishore

  • Error when assigning serial no to VA41 contract

    Greetings.
    I would like to capture serial number in my service contract @ VA41
    But when I enter the serial number of a item and attempt to save, I am getting the following error.
    <Green Light> Correct data via menu path Extras->TechnicalObject
    <Red Light >  No TechObj assigned to item     10
    Message Text
    No TechObj assigned to item     10
    Technical Data
    Message type__________ E (Error)
    Message class_________ 00 (General Basis texts)
    Message number________ 001
    Message variable 1____ No TechObj assigned to item
    Message variable 2____      10
    Message variable 3____ 
    Message variable 4____ 
    Message Attributes
    Level of detail_______ 2 (Level of detail 2)
    Problem class_________ 
    Sort criterion________ 
    Number________________                                                                                1
    Environment Information
    Item__________________ 000
    The strange thing is, I am maintaining the serial no at Extras->Technical Objects at initial entry.
    Here is my procedure.
    1) Enter in WV order type @ VA41
    2) Enter in service material with contract duration & price (PPSV)
    3) Select item goto Extras -> Technical object and enter serial no.
    4) Save, then error appears.
    We are on ECC 6.0. This error doesnt prevent me from saving, nor does it prevent billing or any other processing.
    If anyone has any idea on how I cna make this message go away your input would be appreciated.
    Regards
    hanarin

    Hi Abhishek,
    Now, I maintained “S” in Equipment Cat through OIS2.
    And, then created a serial number “1” in IQ01 as per your guidance.
    After doing all this I’m able to assign serial number “1” manually in ME51N. But, "Create Serial No. Automatically" button is missing still.
    I have to assign serial no’s for 100 pc, doing this manually is not possible.
    I hope you can understand the situation and guide me.
    Thanks With Regards,
    Dinesh Kumar V.

  • How to create release order for value contract?

    dear experters,
    I create a value contract by T-code:va41, order type"WK1".I set a Assortment module to this order and mateirl "WKM1" to  it.
    then I create release order by T-code:va01 with refrence to this value contract,but it set the material "WKM1"  to the sales order, and I can't modify this material! I want to put another material which belong to the assortment module in the value contract. I want to know how.
    thanks.
    Best regards
    lance

    Assortment Module for Value Contracts
    This function enables you to define a list of materials that can be released from a value contract. Materials can be assigned to more than one assortment module.
    An assortment module is an entry tool and can be called up from the value contract. It is valid for a certain time period.
    If you delete a material from the assortment module, to which a value contract refers, you will be unable to release that material.
    In the value contract, only materials with the same sales organization and distribution channel as the value contract can be taken from the assortment module. All the other materials in the assortment module are not displayed in the value contract.
    To fulfill both these requirements, two types of value contracts are offered in the standard system:
    Value contract type WK 1
    You can specify a product hierarchy or a assortment module for value contracts with contract type WK 1. The system will always propose this type of contract, if you want to create a contract for several materials or a certain group of materials. All the materials in the relevant assortment, or belonging to the specified product hierarchy are then relevant for release.
    Value contract type WK 2 (material-related)
    You can create contracts for one material (usually configurable) with this type of value contract. A software company is an example of where this kind of contract is often used. There, a contract for the value of $500,000 is made with the customer for one specific software product.
    You can also agree on the length of the contract for this type. The contract duration can be agreed at item level and can be different from the contract duration specified at header level.
    You can store special price agreements for the value contract. These price agreements can then be used at any level. For example, a value contract can contain prices for individual materials, or discounts that are valid for every released material.
    Release Orders
    The customer fulfills a contract by issuing orders against the contract. The contract does not contain any exact dates for deliveries, so you need to create a sales order to release against a value contract.
    When a release order is created for the contract, the system automatically updates the released values in the contract. The release order value is calculated from the total of the open order and delivery values, plus the value that has already been billed to the value contract.
    The system also updates the released value for subsequent changes (for example, overdelivery of contract release, price changes in the billing document, partial deliveries, returns, rejection of order items, cancellation or reversal of orders, deliveries or billing documents).
    You can create a release order in any currency. The system automatically converts this currency into the one agreed upon in the value contract on the pricing date for the contract release order.
    Creating Assortment Modules for Value Contracts
    Procedure
    To create an assortment module, proceed as follows:
    1. From the initial screen choose Logistics >Sales and Distribution >Master data.
    2.Choose Products >Value contract - Assortment module > Create.
    You will then be in the Create assortment module: Initial Screen.
    Module type 6 is defined for the value contract.
    3. For external number assignment, enter a module number.
    You can then use existing modules as a reference by entering the name of the module under reference.
    4. Choose Enter.
    5. Enter a short description for the module.
    6. Enter a validity period for the product proposal.
    During a release, the system checks if the release date lies within the validity period.
    7. Create the materials that you wish to assign as items to a module.
    You can display a list of materials as a product proposal, which you can then copy into the assortment module. To do this, choose Suggest material, enter the selection criteria in the subsequent screen and copy the selected materials to the items. Use Edit > Delete item to delete the materials that you do not want to copy to the assortment module.
    8.Save your entries.
    Also Please check the copy control in VTAA
    Regards,
    Anbu

  • About the value contract

    Pls guide me
    I am creating the value contract.
    Condition type is BP01 and its value is 251.00 INR.
    But Base Amount of the that material is not reflect in the Taxes.
    How to get it in the base Amount.
    My condition type is BASB.

    Hi ...
    read below as to why u need a dummy material for value contract i.e WVN has this dummy WKM1
    Value contract type WK 2
    You can create contracts for one material (usually configurable) with this type of value contract. A software company is an example of where this kind of contract is often used. There, a contract for the value of $500,000 is made with the customer for one specific software product.
    You can also agree on the length of the contract for this type. The contract duration can be agreed at item level and can be different from the contract duration specified at header level.
    Regards
    reward if undestood the significance
    Krishna

  • Service contract with multiple validity period

    Hi,
    I am having a requirement where i need to create service contracts with multiple validities.
    some contracts may have 1 year validity, some six months.
    I already have a transaction type for contract which is having 1 year validity period assigned in its date profile.
    can i use the same transaction to create contracts for 6 months???
    Regards,
    PePe

    Hi,
      Yes you can use the same transaction type for the other validity period. What you can do is when you create a service contract, it will automatically pick up the 1 year duration since you have defined that way. But you can write some enhancement in ORDER_SAVE Badi.
    First you create a Z table and maintain the different durations (say based on your item) in a Z table.
    For example,
    item    duration(months)
    100       6
    200       12
    300       18
    400       24
    So at the time of saving the contract, your Badi implementation will be triggered and there you can pick up relevant duration (say 6 months) based on the item entered in your contract. And once you get the duration, you can change the Contract End date accordingly and then it will be saved. This way you can get the Contract duration as per your requirement.
    Hope it HELPS...
    Regards,
    Shailesh Jadhav

  • Rules for Date Determination in Sales Contracts

    Hi everyone,
    I have a need for an "enhanced" rule for date determination to be used in a contract profile for a sales contract.
    In our current system (SAP ECC 6.0) only the following rules are possible to choose:
    01 Today's date
    02 Contract start date
    04 Acceptance date
    05 Installation date
    06 Date contract signed
    07 Billing date/Invoice date
    08 CntrctStDate+contract duration
    09 Contract end date
    In supplement to these I would like to create
    ZZ CntrctStDate+to year end
    This rule should set the end date in the contract according to the following logic.
    If the Contract start date is between YYYY-01-01 and YYYY-05-31 the Contract end date should be calculated to YYYY-12-31 in the current year. Else (if Contract start date is between YYYY-06-01 and YYYY-12-31) the Contract end date should be calculated to YYYY-12-31 in the following year.
    I have searched the IMG and Development Workbench but I canu2019t find any place where it is possible to create own rules like the ones above (that is defined by SAP). Does anyone have a tip on how to proceed?
    Best Regards
    Patrik Bergströ

    Hi everyone,
    I have a need for an "enhanced" rule for date determination to be used in a contract profile for a sales contract.
    In our current system (SAP ECC 6.0) only the following rules are possible to choose:
    01 Today's date
    02 Contract start date
    04 Acceptance date
    05 Installation date
    06 Date contract signed
    07 Billing date/Invoice date
    08 CntrctStDate+contract duration
    09 Contract end date
    In supplement to these I would like to create
    ZZ CntrctStDate+to year end
    This rule should set the end date in the contract according to the following logic.
    If the Contract start date is between YYYY-01-01 and YYYY-05-31 the Contract end date should be calculated to YYYY-12-31 in the current year. Else (if Contract start date is between YYYY-06-01 and YYYY-12-31) the Contract end date should be calculated to YYYY-12-31 in the following year.
    I have searched the IMG and Development Workbench but I canu2019t find any place where it is possible to create own rules like the ones above (that is defined by SAP). Does anyone have a tip on how to proceed?
    Best Regards
    Patrik Bergströ

  • Creating something better than Photoshop CC ?

    The basic CC concept  just doesn't work for many people, including myself. Bottom line: there must be a  perpetual license option for a basic photo image editing program. For many photographers, Photoshop Elements just isn't robust enough. My guess is that other companies will jump into this huge new market, but that's going to take time.
    It looks like Adobe is the only company in the position to produce a solution in the short term. So let's start there.
    Over at the Kelby Blog and NAPP (the "Photoshop Guys," NAPP memebers and Blog contributors) they are actually working on a product concept to present to Adobe in response to CC. It's initially being called "LightShop" and its basic premise is to be a stripped-down Photoshop CC that integrates with Lightroom.  It will have minimal Type, no 3D, no video, and less special effects and other bloat -- just a clear Lightroom-like interface that is smooth and fast. Most important, it sells as a perpetual license like Lightroom, for under $200. This concept sounds interesting -- if you're into Lightroom. I'm not.
    Another idea is for Adobe to offer something like a Photoshop Elements "Extended Edition." Now that they have killed the Standard Edition of Photoshop, a product like that would not encroach upon the now professional market focus of Photoshop CC. It would be relatively easy to produce because most of the code is already in Photoshop Elements for more advanced features  -- it's just turned off. ACR already comes with Elements, and Bridge could be included as before.  If some of the deficiencies of standard Elements could be addressed, and some of the consumer oriented bling thrown out, then it could be ideal for amateur to semi-pro photographers. Photoshop plug-ins would work as they do now. Sell a perpetual license for under $200, and I think a lot of non-CC customers would be happy. An upgrade from CS3 onwards would be great too, for maybe $100.
    But exactly what features would be best for a Photoshop CC alternative product? Is 16-bit necessary if you are global-editing RAW in ACR or Lightroom? Can you really tell the difference in a print or on the Web? What about Blend Modes -- do we need that many? How about just one sharpening filter -- the upcoming version of Smart Sharpen?

    You bring up a great point. Lets say when we eventually die and lets say our family or even clients want to see what we have done. Adobe with cc in a way has cut off your legacy by not having a perpetual program that can automatically open your files. Which is different from saving as older file type.
    If cc had more price options i would be very temped to join it. Ither a 30-40$/month plan for say a suite as they have done for years or pick your favorite 3 programs and 1-2 minior ones like bridge or acrobat. I would also like to see a 10-15/month plan for just 1 program but that is not a special offer but long standing price. Im sure the cc price will change within the next 12 months which is for good or bad why you can only lock in a 1 year plan. It would be nice if like a phone you could lock in your plan price for 2 years. At least you would know what to expect. Adobe should look at phone subscriptions and see how we get people to pay 90/month for a phone which for many is a toy and they cant get people to pay 50/month for tools. With phones when you renew your contract gennerally every 2 years you get a massive discount on some new phones and some will actaully be free or upto 70% off. Adobe shoudl consider this. The more adobe products you have the bigger your renew discount should be. They could do it as 2 year contract or have several durations besides monthly and yearly. Have a 6 month, 18 and 24 month. Say you pay 50/month for your contract duration of 1 year, when it comes time to renew you should have a discount lets say 10-20% off which would be 40-45$ which is handy. If you upgrade to cc and have a suite you should have a biggerest discount than just 1 program say instead of 40/month like 30/month for that contract duration and if you have master collection maybe 20/month for the duration. Then with those 2 suites when its time to renew still give a discount but maybe less. Maybe a suite becomes 40/month and master 30/month but give more discount than those who just renewed. Give us what feels like incentives not punishments.
    Ya having 3 almost 4 photoshops was getting a big crazy. Photoshop extended, photohop, photoshop elements and light room. I guess its good for adobe to consolidate but they could have done it with out the cloud. Just make elements and lightroom merged and bump up the price maybe 40%. I think thats fair. Similarly with photoshop and extended, merge the 2 and increase price to 1/2 way between both. Starts getting weird when you have many overlapping things. Like web design has dream weaver and muse. I would love to get that as 1 program or a package deal since they do the same thing but go about it differently. Merge them as 1 and increase price 40%. Same with indesign and incopy, merge them together and increase price 40%. This will make each program stronger and a better buy. Just good house keeping to simplify. Adobe offers so many things I honestly dont know what some of their new things like fusion do. Many have only been around 1-2 years and its becoming complicated to know about all their stuff especially when they start overlapping.
    Good luck adobe. I do love you but you are breaking my heart. I want to stay but you need to make some changes to help me want to.

  • Excel 2013 Powerpivot datamodel error with DATE formula

    Hello forum users and Excel guru's alike.
    I have a question relating the datamodel in Excel 2013 Powerpivot. I am using a Dutch version of Excel (on Office 365) but formula's in Datamodel are all in English so I think most of you will understand the issue:
    What I want to do: Take a date and adjust this date to incorparate a number of months that is added in a other column.
    Example:
    Start of contract date: 24-5-2014 (this is a date field in the datamodel and it is called [StartContract])
    Contract duration in months: 10 (this is a number field in the datamodel and it is called [DurationInMonths])
    Output: 24-03-2015
    (this is the calculated field that doesn't work)
    My current formula looks like this:
    =DATE(YEAR([StartContract]);MONTH([StartContract]+[DurationInMonths]);DAY([StartContract]))
    It shows an error as soon as I hit Enter. The formula works fine when I replace [DurationInMonths] with the value "10" or when I leave out "+[DurationInMonths]". But that isn't an option!
    The following variation also doesn't work.
    =DATE(YEAR([StartContract]);MONTH([StartContract])+[DurationInMonths];DAY([StartContract]))
    Please, is there any one with a solution?
    Kind regards,
    Erik van Hurck

    Hi Tony,
    I have tried your solution, to no succes I am sad to say.
    I do agree that the formula works in Excel, but now switch over to the
    PowerPivot Data model and try the formula there. And it will repport an error:
    =DATE(year([StartDate]);month([StartDate]+[DurationInMonths]);DAY([StartDate]))
    is the formula I used in the Datamodel.
    The DurationInMonths field is:
    Whole numbers and formatted as: General
    The StartDate is:
    Auto (Date) and formatted as: Short Date
    For more Information I get this error:
    Cannot query internal supporting structures for column "EndDate" because they depend on a column, relationship, or measure that is not processed. please refresh or recalculate the model. Maybe this link will help further:
    http://office.microsoft.com/en-au/excel-help/upgrade-power-pivot-data-models-to-excel-2013-HA103356104.aspx

  • How to calculate net price based on customized formula

    Hi  all expert,
    I have a requirement in a rental process:
    The price of a rental is defined as daily rate (e.g. 100/day) and monthly rate (e.g. 2500/month).
    when I create a rental contract, I'd like SAP to calculate net price based on contract duration with both rate and use the lower one.
    e.g. rental 5 days. use daily rate = 500; monthly rate = 2500; So use 500.
    e.g. rental >=26 days. use daily rate >= 2600; monthly rate = 2500; So use monthly rate 2500.
    I was think to use price condition scales to set:
    1 - 25 days: 100/day
    >=26 days: 2500/month
    But the problem is there are 30day a month and 31 days a month. When the contract has to calculate partial month, daily rate has to be calculated as monthly rate/actual days in the month.
    How to handle it?
    Thank you in advance!    

    There might be more than one method to resolve the requirement.
    You can develop a routine in t.code VOFM and add it in the column  AltCTy. The logic in the routine can be if the netvalue exceeds 2500, then the net value should be 2500.
    The second option is you can try with using standard. In VK12, after maintaining the pricing as 100/day, go to details. Then in upper limit add value as 2500. Then create a test sales order for 25 days and more than 25 days, then check the values. I think this can help with your scenario.
    Regards,

  • Oracle Apps Requirement for IBM South Africa

    There are job openings for IBM South Africa, the details are as follows.
    Please forward to your relevant contacts and ask them to send resume to [email protected] if interested.
    1. Oracle Apps HRMS Techno functional Consultant
    Client : IBM South Africa
    Mode of Job : Contract
    Duration : 1+ year
    Experience : 3-5 years
    Job Location : Johannesburg , South Africa
    CTC : Best In the Industry
    Joining Date : ASAP
    We will arrange for accommodation, food and car if required and will be suitably charged from Salary.
    2 Oracle Apps DEPO REPAIR Techno functional Consultant
    Client : IBM South Africa
    Mode of Job : Contract
    Duration : 1+ year
    Experience : 3-5 years
    Job Location : Johannesburg , South Africa
    CTC : Best In the Industry
    Joining Date : ASAP
    We will arrange for accommodation and car if required and will be suitably charged from Salary.
    Thanks and Regards
    Sanjay

    There are job openings for IBM South Africa, the details are as follows.
    Please forward to your relevant contacts and ask them to send resume to [email protected] if interested.
    1. Oracle Apps HRMS Techno functional Consultant
    Client : IBM South Africa
    Mode of Job : Contract
    Duration : 1+ year
    Experience : 3-5 years
    Job Location : Johannesburg , South Africa
    CTC : Best In the Industry
    Joining Date : ASAP
    We will arrange for accommodation, food and car if required and will be suitably charged from Salary.
    2 Oracle Apps DEPO REPAIR Techno functional Consultant
    Client : IBM South Africa
    Mode of Job : Contract
    Duration : 1+ year
    Experience : 3-5 years
    Job Location : Johannesburg , South Africa
    CTC : Best In the Industry
    Joining Date : ASAP
    We will arrange for accommodation and car if required and will be suitably charged from Salary.
    Thanks and Regards
    Sanjay

  • CRM Pricing Exits

    Hi,
    I am new to CRM pricing, and want to port my R/3 exits and ZZ fields to CRM. Would really appreciate if someone can send me some sample code about CRM_COND_COM_BADI and Java-exits, as to how do I manipulate the ZZ fields I have added to CRM Catalog. If there is any documentation available on this also please send me the same at [email protected]
    Thanks in Advance,
    Indi

    Also, have a look at the following BADI implementation for CRM_COND_COM_BADI :
    METHOD if_ex_crm_cond_com_badi~item_communication_structure .
      INCLUDE crm_object_names_con.
    * Internal Table Declaration
      DATA: lit_header_guid         TYPE crmt_object_guid_tab,
            lit_item_guid           TYPE crmt_object_guid_tab,
            lit_requested_objects   TYPE crmt_object_name_tab,
            lit_partner             TYPE crmt_partner_external_wrkt,
            lit_partner_tmp         TYPE TABLE OF crmt_partner_external_wrk,
            lit_customer_i          TYPE crmt_customer_i_wrkt,
            lit_customer_h          TYPE crmt_customer_h_wrkt,
            lit_orderadm_i          TYPE crmt_orderadm_i_wrkt,
            lit_appointment         TYPE crmt_appointment_wrkt,
            lit_pricing             TYPE crmt_pricing_wrkt,
            lit_pricing_tmp         TYPE TABLE OF crmt_pricing_wrk,
            lit_appointment_tmp     TYPE TABLE OF crmt_appointment_wrk.
    * Work Area declaration
      DATA: wa_crmt_partner_external_wrk TYPE crmt_partner_external_wrk,
            wa_crmt_customer_i_wrk       TYPE crmt_customer_i_wrk,
            wa_crmt_customer_h_wrk       TYPE crmt_customer_h_wrk,
            wa_crmt_appointment_wrk      TYPE crmt_appointment_wrk,
            wa_crmt_orderadm_i           TYPE crmt_orderadm_i_wrk,
            wa_pricing                   TYPE crmt_pricing_wrk,
            wa_product_guid              TYPE comt_product_guid,
            wa_zcsme_std                 TYPE zcsme_std,
            wa_partner                   LIKE LINE OF lit_partner,
            wa_utilitydivision           TYPE crm_util_division.
    *Variable Declaration
      DATA:   lv_ldz                   TYPE zeew_dataelement0141,
              lv_aqband                TYPE zz_aqband,
              lv_sp_aq                 TYPE zeew_dataelement0139,
              lv_temp                  TYPE i,
              lv_partner_guid          TYPE but000-partner_guid,
              lv_item_guid             TYPE crmt_item_guid,
              lv_pod_id                TYPE guid_22,
              lv_premise_typ           TYPE eui_vbsart,
              lv_but000                TYPE bus000,
              lv_productguid           TYPE comm_producth-product_guid,
    *          lv_address               TYPE bus000_ext,
              lv_cst_apr               TYPE zcsme_cst_apr,
              lv_payment_meth          TYPE crmt_buag_paymeth,
              lv_fragment_guid         TYPE comt_frg_guid,
              lv_catid                 TYPE comt_category_id,
              lv_partnerno             TYPE but000-partner,
              lv_dialog                TYPE c.
    *Constants Declaration
      CONSTANTS: lc_max_score(6)          TYPE n VALUE 9999,
                 lc_cont_dur(10)          TYPE c VALUE 'CONTDURA',
                 lc_type_h                TYPE c VALUE 'A',
                 lc_type_i                TYPE c VALUE 'B',
                 lc_msg_id(10)            TYPE c VALUE 'ZCRM_APPL',
                 lc_msg_typ               TYPE c VALUE 'I',
                 lc_msg_no_091(3)         TYPE c VALUE '091',
                 lc_part_fct_z00001(6)    TYPE c VALUE 'Z00001',
                 lc_part_fct_00000001(10) TYPE c VALUE '00000001',
                 lc_spec_items            TYPE crmt_boolean VALUE 'X'.
    * Check if header information is incomplete......................
      CHECK cs_acs_i_com IS NOT INITIAL.
    * Read the contents of the table entries of CRMT_ACS_I_SEL...
      INSERT cs_acs_i_com-header_guid INTO TABLE lit_header_guid.
      INSERT cs_acs_i_com-guid        INTO TABLE lit_item_guid.
    * Populate the internal table which will be passed to the function
    * module CRM_ORDER_READ so that only the requested information will be
    * retrieved.
      INSERT gc_object_name-customer_h  INTO TABLE lit_requested_objects.
      INSERT gc_object_name-customer_i  INTO TABLE lit_requested_objects.
      INSERT gc_object_name-orderadm_i  INTO TABLE lit_requested_objects.
      INSERT gc_object_name-appointment INTO TABLE lit_requested_objects.
      INSERT gc_object_name-partner     INTO TABLE lit_requested_objects.
      INSERT gc_object_name-pricing     INTO TABLE lit_requested_objects.
    * Read Order details.........................................
      CALL FUNCTION 'CRM_ORDER_READ'
        EXPORTING
          it_header_guid       = lit_header_guid
          it_item_guid         = lit_item_guid
          it_requested_objects = lit_requested_objects
          iv_only_spec_items   = lc_spec_items
        IMPORTING
          et_orderadm_i        = lit_orderadm_i
          et_customer_h        = lit_customer_h
          et_customer_i        = lit_customer_i
          et_appointment       = lit_appointment
          et_partner           = lit_partner
          et_pricing           = lit_pricing
        EXCEPTIONS
          document_not_found   = 0
          error_occurred       = 0
          document_locked      = 0
          no_change_authority  = 0
          no_display_authority = 0
          no_change_allowed    = 0
          OTHERS               = 0.
    * Read Business Partner details
      READ TABLE lit_partner INTO wa_partner
      WITH KEY ref_kind = lc_type_h
               ref_partner_fct   = lc_part_fct_00000001.
      MOVE wa_partner-partner_no TO lv_partnerno.
      IF sy-subrc EQ 0.
        CALL FUNCTION 'BUP_PARTNER_GET'
          EXPORTING
            i_partner         = lv_partnerno
          IMPORTING
            e_but000          = lv_but000
          EXCEPTIONS
            partner_not_found = 1
            wrong_parameters  = 2
            internal_error    = 3
            OTHERS            = 4.
        IF sy-subrc <> 0.
        ENDIF.
      ENDIF.
    * Copy the custom fields to IPC
    * Determine LDZ and AQBAND..........................................
      IF lit_customer_i[] IS NOT INITIAL.
    * Table type is sorted so no need to sort the internal table and use of
    * BINARY SEARCH
        READ TABLE lit_customer_i INTO wa_crmt_customer_i_wrk
        WITH KEY guid = cs_acs_i_com-guid.
        IF sy-subrc EQ 0.
          lv_ldz   = wa_crmt_customer_i_wrk-zzcustomer_i0141.
          lv_sp_aq = wa_crmt_customer_i_wrk-zzcustomer_i0139.
          cs_acs_i_com-zz_ldz = lv_ldz(2).       " Copy LDZ...
          IF lv_sp_aq  IS NOT INITIAL.
            SELECT SINGLE zz_aqband
                     FROM ztcrm_aq_to_band
                     INTO lv_aqband
                    WHERE zz_aq_from LE lv_sp_aq
                      AND zz_aq_to GE lv_sp_aq.
            IF sy-subrc EQ 0.
              cs_acs_i_com-zz_aqband = lv_aqband.  " Copy AQBAND...
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
    * Determine Credit Score
      IF lit_customer_h[] IS NOT INITIAL.
    * Table type is sorted so no need to sort the internal table and use of
    * BINARY SEARCH
        READ TABLE lit_customer_h INTO wa_crmt_customer_h_wrk
        WITH KEY guid = cs_acs_i_com-guid.
        IF sy-subrc EQ 0.
          IF wa_crmt_customer_h_wrk-zzcustomer_h0311 IS INITIAL.
            cs_acs_i_com-zz_credit_score = lc_max_score.
          ELSE.
            cs_acs_i_com-zz_credit_score
            = wa_crmt_customer_h_wrk-zzcustomer_h0311.
          ENDIF.
        ELSE.
          cs_acs_i_com-zz_credit_score = lc_max_score.
        ENDIF.
      ELSE.
        cs_acs_i_com-zz_credit_score = lc_max_score.
      ENDIF.
    * Determine Contract duration.
      IF lit_appointment[] IS NOT INITIAL.
        lit_appointment_tmp[] = lit_appointment[].
        SORT lit_appointment_tmp BY ref_guid ref_kind appt_type.
        READ TABLE lit_appointment_tmp INTO wa_crmt_appointment_wrk
        WITH KEY ref_guid = cs_acs_i_com-header_guid
                 ref_kind = lc_type_h
                 appt_type = lc_cont_dur
        BINARY SEARCH.
        IF sy-subrc EQ 0 AND
          wa_crmt_appointment_wrk-duration NE space.
          cs_acs_i_com-zz_duration = wa_crmt_appointment_wrk-duration.
        ENDIF.
      ENDIF.
    * Copy BP type,  potential value, elasticity index
    * and cost to server.
      IF lv_but000 IS NOT INITIAL.
        cs_acs_i_com-zz_bptype        = lv_but000-bpkind.
        IF lv_but000-zzpnt_val0001 IS INITIAL.
          cs_acs_i_com-zz_potentialval = lc_max_score.
        ELSE.
          cs_acs_i_com-zz_potentialval  = lv_but000-zzpnt_val0001.
        ENDIF.
        IF lv_but000-zzei_indx0001 IS INITIAL.
          cs_acs_i_com-zz_elstct_indx   = lc_max_score.
        ELSE.
          cs_acs_i_com-zz_elstct_indx   = lv_but000-zzei_indx0001.
        ENDIF.
        IF lv_but000-zzcost_to_se0001 IS INITIAL.
          cs_acs_i_com-zz_cost_to_serve   = lc_max_score.
        ELSE.
          cs_acs_i_com-zz_cost_to_serve   = lv_but000-zzcost_to_se0001.
        ENDIF.
      ENDIF.
    * Determine Broker.
      IF lit_partner[] IS NOT INITIAL.
        lit_partner_tmp[] = lit_partner[].
        SORT lit_partner_tmp BY  ref_guid partner_fct.
        READ TABLE lit_partner_tmp
        INTO wa_crmt_partner_external_wrk
        WITH KEY  ref_guid = cs_acs_i_com-guid
                  partner_fct = lc_part_fct_z00001
        BINARY SEARCH.
        IF sy-subrc EQ 0.
          cs_acs_i_com-zz_broker
          = wa_crmt_partner_external_wrk-ref_partner_no.
        ENDIF.
      ENDIF.
    * Determine SIC_CODE..........................................
      lv_item_guid = cs_acs_i_com-crm_item_guid.
      IF lv_item_guid IS NOT INITIAL.
        CALL FUNCTION 'ECRM_ISU_GET_PODGUID'   " Retrieve the pod ID
          EXPORTING
            x_orderadm_i_guid = lv_item_guid
          IMPORTING
            y_podguid         = lv_pod_id.
        IF lv_pod_id IS NOT INITIAL.
          SELECT SINGLE vbsart                 " Retrieve the pod
                   FROM isu_pod
                   INTO lv_premise_typ
                  WHERE int_ui = lv_pod_id.
          IF sy-subrc EQ 0.
            cs_acs_i_com-zz_sic_code = lv_premise_typ. " Set the SIC_CODE
            IF cs_acs_i_com-zz_sic_code IS INITIAL.
              cs_acs_i_com-zz_sic_code = lc_max_score.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
    * Determine customer approach,Utility Division and standing charge value
      CALL FUNCTION 'ZCRM_READ_PRODUCT_DTLS'
        EXPORTING
          x_product_guid      = cs_acs_i_com-product
        IMPORTING
          y_sme_product_dtls  = wa_zcsme_std
        EXCEPTIONS
          table_not_found     = 1
          settype_not_found   = 2
          no_authority        = 3
          frg_not_found       = 4
          prod_dtls_not_found = 5
          OTHERS              = 6.
      IF sy-subrc EQ 0.
        cs_acs_i_com-zz_csme_cst_apr = wa_zcsme_std-zz0012.
        cs_acs_i_com-zz_csme_std_chg = wa_zcsme_std-zz0014.
        cs_acs_i_com-zz_utildivision = wa_zcsme_std-zz0015.
      ENDIF.
    * Determine Payment Method......................
      IF lit_pricing[] IS NOT INITIAL.
        lit_pricing_tmp[] = lit_pricing[].
        SORT lit_pricing_tmp BY ref_guid.
        READ TABLE lit_pricing_tmp INTO wa_pricing
        WITH KEY ref_guid = cs_acs_i_com-crm_item_guid
        BINARY SEARCH.
        IF sy-subrc EQ 0.
          cs_acs_i_com-zz_paymenthod = wa_pricing-payment_method.
        ENDIF.
      ENDIF.
    * Determine Business Partner type
      cs_acs_i_com-zz_bptype = lv_but000-bpkind.
    * Set a flag if this module is called in background
      CALL FUNCTION 'DIALOG_GET_STATUS'
        IMPORTING
          dialog_status = lv_dialog.
      cs_acs_i_com-zz_dialog = lv_dialog.
    <b>Reward points if it helps.</b>

  • TimeStamp - Add Months

    Dear All,
    I have the requirement to calculate an opportunity 'contract end date' as follows:
    User Populates:
    Contract Start Date = 01/11/2008
    Contract Duration (Months) = 4
    Calculation Required:
    Contract End Date = 01/03/2009
    Any suggestions?
    A simple calculation "[<ContractStartDate>] + [<ContractDuration>]" gives me the correct result in days, i'm just not sure how to add months instead?
    Thanks
    Innoveer
    Edited by: Innoveer on Oct 31, 2008 4:14 AM
    Edited by: Innoveer on Oct 31, 2008 4:47 AM

    Hi !
    To do this calculation, your field Contract Duration must be a numeric field
    Two things to do:
    To calculate this field after creating an opportunity, use the field default value (Contract Start Date + Contract Duration).
    To recalculate it after a modification of the Contract Start Date or on the Contract Duration, you'll need to create a WorkFlow rule :
    Record type : Opportunity
    Trigger event : Before saving modifications
    Condition : [<Contract Start Date>]&lt;&gt;PRE('Contract Start Date') OR [<Contract Duration>]&lt;&gt;PRE('Contract Duration')
    Action : Update value Contract End Date with value Contract Start Date + Contract Duration and overwrite existing value.
    Hope this will help, feel free to ask more !
    Max

Maybe you are looking for

  • Send email through SO_NEW_DOCUMENT_ATT_SEND_API1 with PDF attachement of smartforms.

    Hi, I am converting a smartform to PDF and then sending it as an attachment to email using FM SO_NEW_DOCUMENT_ATT_SEND_API1. But I am getting this error. 'Error calling FM <SBCOMS_SEND_REQUEST_CREATE> in <SO_DOCUMENT_SEND_API1> with SY-SUBRC <1>' I a

  • Having trouble making DVD

    I made this great movie in Imovie. It was made of photos and video run together of a trip I took recently. I had trouble figuring out how to make a DVD of the project. Finally I imported it to IDVD. The photos and music came through but the video tha

  • Ipod -usb port

    Hi. Just got a 5th gen ipod. When I am done syncing my ipod with itunes I eject the ipod. I also use the "safely remove hardware" option in winxp. When I do that it turnes off the ipod. With my sons ipod {first video model] it stays on and charges. M

  • I have an iPod 2nd gen. that keeps having an error code 9 when trying to restore. Any ideas on how to fix?

    I have an iPod 2nd gen that keeps having an error code 9 when trying to restore. Any ideas on how to fix?

  • MSS different cost center by approved time sheet

    Hello, In Table CATSDB seen we the results from time entry. The fields Send cost center and receiver cost center. An employee has an standard costcenter as masterdata. When this person works a couple of hours on a cost center that differs from his st