Automating offset reqmt date on service order component line

Hi,
I have an issue with automating the offset on component detail screen when creating the new component line.
When creating the new component line we are using EXIT_SAPLCOMK_007 to default plant and storage location based on functional location and stock determination group. this works no problems.
Now based on the same I want to default a value into reqmt date offset on the new component line. I could not find a suitable exit or BADI for this so I enhanced the FM CO_MK_GET_USER_PLANT_STLOC that is calling the exit EXIT_SAPLCOMK_007 and fill the values into the offset fields in resbd structure. the value is set on the offset on the created component line but the reqmt date is not calculated right.
After a little debugging I have concluded that the initial creation of the component line always uses the calendar from the operation, whereas when I manually enter an offset the calendar of the plant is used. I can see that I can implement a BADI so that when entering manually the calendar from the operation is used, but the calculation must be based on the calendar of the plant.
Any ideas how to set the offset automatic on a newly created component line and have the reqmt date calculation work as standard when entered manually?
extra info:
calculation of date is done in FM CX_SCHED_VIA_OPERATING_TIME.
when updated manually its called from FG COMD subroutine FUNCT_BDTER_CHK
when set on creation it is called from FG COMK subroutine BDTER_FILL.
Thanks in advance,
Steffen Høegh.

Hi,
just to update on the solution.
Ended up doing an implicit enhancement at the end of routine bdter_fill in FG comk.
algorithm:
If Offset and manual maintenance of req. mt. date is initial.
  if certain order types
    Logic for determinig offset
       write new offset to resbd_g fields nlfzv and nlfmv
now the rescheduling part in code.
BEGIN determine calendar
Logic for determinig if calendar from plant or operation should be used.
This logic is derived from sub funct_bdter_chk in FG COMD
      TRY.
          GET BADI badi_cx_offset_calid.
   --> call BADI to determine calender for offset
          CALL BADI badi_cx_offset_calid->change_calid
            EXPORTING
              is_caufvd        = caufvd
              is_afvgd         = afvgd
            IMPORTING
              flg_use_wc_calid = flg_wc_cal.
        CATCH cx_badi_not_implemented.
    no implementation
        CATCH cx_badi_multiply_implemented.
        CATCH cx_badi.
      ENDTRY.
      IF NOT flg_wc_cal IS INITIAL.
        l_calid = afvgd-kalid.
      ELSE.
        IF l_t001w-werks <> t001w-werks.
          CALL FUNCTION 'CO_TA_T001W_READ'
            EXPORTING
              t001w_werk = resbd_g-werks
            IMPORTING
              t001wwa    = l_t001w
            EXCEPTIONS
              not_found  = 1
              OTHERS     = 2.
        ELSE.
          l_t001w = t001w.
        ENDIF.
        l_calid = l_t001w-fabkl.
      ENDIF.
END determine calendar
*BEGIN Scheduling
*logic is from above
      IF caufvd-autyp = auftragstyp-fert OR
         caufvd-autyp = auftragstyp-bord.
        CALL FUNCTION 'CX_SCHED_VIA_OPERATING_TIME'
          EXPORTING
            i_date_start = resbd_g-bdter
            i_time_start = resbd_g-bdztp
            i_duration   = resbd_g-nlfzv
            i_unit       = resbd_g-nlfmv
            i_fcalid     = afvgd_g-kalid
          IMPORTING
            e_date_end   = resbd_g-bdter
            e_time_end   = resbd_g-bdztp.
      ELSE.
        IF NOT resbd_g-bdter IS INITIAL.                    "note683510
          IF resbd_g-nlfzv < 0.
            l_time = time_const-beg.
          ELSE.
            l_time = time_const-end.
          ENDIF.
          CALL FUNCTION 'CX_SCHED_VIA_OPERATING_TIME'
            EXPORTING
              i_date_start = resbd_g-bdter
              i_time_start = l_time
              i_duration   = resbd_g-nlfzv
              i_unit       = resbd_g-nlfmv
              i_fcalid     = l_calid
            IMPORTING
              e_date_end   = resbd_g-bdter.
        ENDIF.
      ENDIF.
    ENDIF.
Regards and thanks for the help,
Steffen Høegh
Vestas Wind Systems

Similar Messages

  • Organization Data for Service Orders and Service Confirmation

    Hi,
    Whenever I create any Service Order or Service Confirmation, the Organization Data is automatically populated.
    My doubts are :
    1. Is is mandatory to provide Organization Data for Service Order/Confirmation Creation ?
    2. What/ Where are the customization for the Organization Management for the above scenario ?
    Thanks and Regards,
    Samantak.

    Dear Samantak,
    org determination should only be made, if you have customized it.
    So please check which org. data profil has been assigned to the involved transaction types (in SPRO Define transaction types).
    And what the profil does (the rule behind) can be found also in SPRO
    - Master Data
      - Organizational Management
        - Organizational Data Determination
          - Change Rules and Profiles
             -Maintain Organizational Data Profile
    Please check the documentation there!
    Regards, Gerhard

  • Plant Maintenance / Customer Service Orders - Component Data

    I asked this question yesterday but was told to go and look at SAP Help. Which I had done anyway but i've looked again and I'm still confused. On our SAP ECC system we use PM/CS Orders. I can see that I can extract the data from these orders using the 2LIS_17 & 2LIS_18 (Cubes 0PM_C04 & OCS_C03) . However these dont show the linked component data it's pureley operation data. I can see there is a goods movement cube that shows goods movements but is there any standard PM/CS cube that show stock and nonstock components that are linked to operations?
    Thanks
    Joel

    Hi,
    Thanks for your suggestion.
    I've also already turned on the BC for inventory management and I can see the stock / non stock data there but i want to actually link it to the operation on the order. If the inventory management stuff si the only way to do it I guess we'll have to see if there is anyway of customising to get there.

  • Pricing date for Service Order and Service Confirmation

    Hi,
    I cretated a Service Confirmation as followup for Service Order.
    Client is asking "Pricing Date" should be same Same in Service Order and Service Confirmation. But, I am not seeing any such field in the screen.
    I need to check T&C field and Zone field. But, I am not seeing these fields also.
    Can you please let me know, where can I find this fields. (In which assignment block).
    Thanks,
    Sandeep
    Edited by: Sandeep Reddy on May 31, 2010 7:21 PM

    Hi,
    I think by PRICING DATE they mean BILLING DATE.
    In date profile of SERVICE ORDER and SERVICE CONFIRMATION you assign the BILLING DATE date type (i think it is there in the standard itself- however just ensure it).
    Or customize a PRINCING DATE date type in the DATE PROFILE of SERVICE ORDER and CONFIRMATION and copy the date set in SERVICE ORDER to SERVICE CONFIRMATION.
    This is one strategy you can use.
    Regards
    Surendra More

  • Basic Finish Date in Service Order

    Hi Gurus,
      I want to change the Basic Finish date in the service order. The
    system is allowing me to change it in the change mode of service order
    (IW32), but after saving when I come back and see the order again, it is
    showing the old date only. I want to change the Basic Finish date as
    10.09.2007. Could anybody please guide?
      Prassee

    Hi Thyagarajan,
    Thanks, I have already checked the same. For the order type and palanning plant, the date adjustments set as " Adjust basic date.......", but still it is not allowing me to change the basic date.
    Prasanth
    > hi prasanth
    >
    > check for you order what scheduling parameters are
    > you maintained.if the Adjust shchduling is set as" DO
    > not adjust basic dates:, then i think your problem
    > will occur.
    >
    > regards
    > thyagarajan

  • Service Order Component User Status

    Hello All -
    Has anyone successfully tied a user status profile to the component item on the service order?  I've added the object type from BS12 and BS02, but I can't find a configuration assignment at the component level.  Any help is greatly appreciated!

    Hi ,
    What i get with your query is that you want to know the user status at component level. I mean to say for example if suppose product has come for repair than at each level of service what is the status of the process at user level you want to know that.you can get that into table crmc_status_proc table. this table is UI filter in order to restrict visibility of status management in the CRM business transaction to the necessary functions there.
    Entries in the CRMC_STATUS_PROC table control the following:
    Which system status should be displayed in the CRM business transaction?
    Which of the system statuses used in the CRM business transaction are lifecycle statuses?
    Which system statuses may be set manually in the CRM business transaction?
    Which system statuses may be deleted manually in the CRM business transaction?
    If a system status may be manually set or reset, which business transactions should be used for setting or resetting?
    Should the display or maintenance be restricted to specific business object types?
    Which of the system statuses used in the CRM business transaction should be displayed in the toolbars for status maintenance?
    Visualization of the system status using an icon
    thanks
    hemant ghiya

  • Classification in Service Order Component level

    Hi All,
    We have a requirement to maintain various codes at the component level of the service order. 
    At header level (Servicable Material / Product) of service order, we can do it by maintaining the material for  classification and there by allowing for configuration.  Can we do similar thing in component level?
    If configuration at component level is not possible, is there any way that I can add 5 to 6 columns in the component tab without changing the SAP standard code?
    Please let me know how this can be achieved .
    Thanks in advance.
    Regards,
    Surya.

    Hi Surya,
    It is not possible to enter configurable material as components in service order.
    See SAP Note 409513 (RMA: Repair of configurable material). You want to repair a configurable material in the RMA process. After posting of the returns delivery for the repair order the system generates a repair item and a service order is generated in the background. However, the generation of the service order terminates and the system displays error message IW292: 'No configurable material can be assigned to the order'.
    However, I think you can use classified materials, if it is of any help to you.
    Regards
    Nikhilesh

  • Set Profile in Control Data of Service Order as required

    Hi gurus,
    We need to set Dynamic Profile Field (FFPRF) in Service Order - Control Data Tab as mandatory.
    As per usual procedure: SPRO - Plant Maintenance and Customer Service - Maintenance and Service processing - Maintenance and Service Orders --> Define Field Selection....We are not able to find field "Dynamic item Profile" in the list to set it as Required.
    Any idea how to proceed?
    Thanks!
    VL

    Hi Narasimhan,
    Thanks for your quick response.
    We already considered setting as default DIP per Service Order but this is would not work for us as we have for one Service Order multiple possible Dynamic Item Profiles.
    Would be great if we could set it as a required data so order can not be saved without DIP filled in. Isn´t it possible to do it via standard?
    In addition to that would be great if we could set as default the DIP per Company Code to which the Service Order is assigned to. (enhancement IWO10009?) but relation Company Code - DIP would need to be maintained in a Z table...
    Thanks,
    VL

  • Automation determination of quotation in service order

    Hello All,
    I want to achieve automatic determination of quotation in service order. Thank you.

    hi,
    Use this User exit :
    LMEKO002 - Enhance communication structure KOMP for price determination
    Regards
    Priyanka.P

  • Service order component not reflecting in sales order

    Dear All,
    I have mapped service notification type & service order type now if i create sales order directly from the service notification sales order is not reflecting the componets assigned in service order for that service notification. can anybody help me out?

    Sanjay,
    This is not standard, although it is possible through development (e.g. via action-box).
    However, there is the advance shipment functionality in the service order which does allow you to create a sales order from the service order components...
    PeteA

  • Retrieve item level dates during service order creation before saving

    I have a requirement where I need to retrieve item level date (First Response i.e. APPT_TYPE as SRV_RFIRST) and modify the date and put it back to the same screen field when ever a line item is entered.
    To do this we found a BADI CRM_SERVICE_I_BADI which triggers when ever we enter line item. We tried many FM which retrieves item level dates from buffer CRM_DATES_READ_MULTIPLE_OB; CRM_DATES_READ_SINGLE_OB;
    CRM_DATES_READ_SINGLE_OW;
    Most of them are returning all the dates except first response. No configuration issues. Can anyone help me how to get the first response date during creation.
    Thanks
    Vamsee

    Hi Vamsee,
    Do you happen to know the solution? We have similar issue too as we can not retrieve the new entered dates and process it in BADI CRM_SERVICE_I_BADI.
    I would appreciate your reply if you have a solution.
    Thanks,
    Bin

  • How system updating the delivery dates in sale order schedule line

    Hello
    i created a sales order with 2 line items. For the first line item the confirmed delivery date in the schedule line is 06.02.2012 and for the second line item the confirmed delivery date in the schedule line is 14.02.2012 . Both the line items are third party items and the PR created against the line items in the sales order .
    We created the PO with reference to the PR of the SO and we find there are different delivery dates coming in the PO document for the 2 line items . For the first line item the delivery date is coming as 14.11.2011 and for the second line item in the PO , the delivery date coming as 11.11.2011 . Firstly we are not understanding from where the delivery dates are picking in the PO.
    Secondly , once we saved the Purchase order and once we come back to the sales order , the schedule line dates are getting changed automatically in the sales order . For the first line item in the sales order the delivery date is changing to 22.11.2011 and for the second line item in the sales order the delivery date is changing to 22.11.2011.
    Now my question , is from where the delivery dates are updating in the Purchase order and once we save the purchase order how the delivery dates in the schedule line are getting changed .

    Now my question , is from where the delivery dates are updating in the Purchase order and once we save the purchase order how the delivery dates in the schedule line are getting changed .
    For third party processing, the delivery dates are updated in the purchase order based on the settings in the field Planned delivery time in the MRP2 view of the material master(defined in purchase info record in t.code ME11/ME12) and purchasing processing time defined in t.code OMEW. This means, since the date of PO created, it will take the days mentioned in the planned delivery time field and purchasing processing times to determine the delivery date, which will be copied into the sales order as delivery date. In your case, the purchase order delivery date is not copied into the sales order, hence you may need to check OSS note. How the PO is handled? Any confirmation control functionality is used?
    Regards,

  • Service order posting date error.

    In DBM Service order posting date is taken from the controlling document because of that error comes as
    Document date 03.12.2011(Curent date)is greater than billing date 02.12.2011(Date given in Billing date in service order header)
    But this error is not coming in sales document..
    I need to post service order in the date i mentioned in the service order..
    How dould i resolve this issue..?

    Hi Arvind,
    there a many notes describing this problem:
    1474254, 1473093, 1422246, 1482159, 1588751, 1359333, 1658317
    Best regards
    Robert

  • Customer Service Order

    My client will soon be implementing customer service order and I need to know what are the FI and CO entires related to a creation of a CS order. ....
    eg... I know expenses and materials will be assigned to a cs order.... so will it hit the FI system or will they be managed in CO until the CS order is settled?
    how is WIP calculated for a CS order?
    Thanks

    Hi,
    When you issue goods to service order,
    The inventory gets Dr & Credit, at this time it is not hit to P&L account,
    Once if you make any invoice(Resource related billing), then revenue come, and after order settlement,the revenue which is genrated from this order  & whatever cost like labour cost & cost of components is hit to COPA,(It flow in P&L accounts),
    If you don't want to flow this  cost of goods used for order then
    IW32 (Change service order) >>> Component tab >>> Select component >>> click on genral data >>> Costing relevancy - Make it not relevent for costing.]
    Kapil

  • Approval Procedure in service request/Service Order

    Hi,
    We are implementing approval procedure to set up an approval process in service request & order.
    We have made the necessary configurations in IMG->CRM->Transactions->Basic settings->Approval settings.
    The web UI component for approal procedure is BT_APPROVAL does not show up in assignment block of SRQM_INCIDENT_H or BT116H_SRVO. Therefore we are note able to view approval procedure in web ui.
    Please let us how to activate this component in service order & request in web ui
    Regards
    Sushant

    Hi Vikas/Sushant,
    This has been implemented in standard in the component "SRQM_RFC_H". This is the component for Request For Change.
    In your case you will have to do the same if you want this approval block for Service Order or Incidents.
    It could be executed in 3 major steps:
    a) Add BT_APPROVAL as an Usage in these Components through the UI Runtime Repository tool from the component workbench
    b) Make this assignment visible by adding it to the Overview page in Runtime Repository and changing the Overview Page Configuration to accommodate this view
    c) Make changes to pass the data to BT_APPROVAL. This will require you to enhance the component. the enhance the Component Controller and then change the method WD_USAGE_INITIALIZE in the component controller to bind the BTADMINH of the Service Order component with that of the BT_APPROVAL. Something like below
        when 'CUBTAPPROVAL'.
          iv_usage->bind_context_node( iv_controller_type  = cl_bsp_wd_controller=>co_type_component
                                       iv_target_node_name = 'BTADMINH'
                                       iv_node_2_bind      = 'BTADMINH' ). 
    Please check RFC the component mentioned above for finer details.
    Thanks!
    Amrut Tadas

Maybe you are looking for