How to create Service Monitor - best Way

I have a task at hand : 
Creating monitor to alert when a service is stopped.
We are using SCOM 2012
I checked and found various ways to do so http://www.bictt.com/blogs/bictt.php/2011/03/16/scom-monitoring-a-service-part1
My requirement is : there are like 100 such services on 100 different windows computers that i need to monitor.
The services are not common , so 2 computers have the same service , Maybe some service that i need to be monitored be on 2 computers but overall every service is unique.
What is my best option:
1.Create a basic unit monitor and target to Windows computer class ? Create is as disabled ? Override for just the machine that has it.
Will it clutter my Windows Server class health explorer . (How bad is that as per performance)
2.Create a Service monitor using Windows Service templates 
Do i have to create 100 target groups , as i have to Target the monitor to specific computer only
Since template service monitor create discoveries , targets etc on its own  (Am i going to clutter SCOM with a lot of those) 100 
3.Do i create a attribute for each service , so as to extend the windows base class to discover the computer that has specific service (Using registry)
too much work is it and how good of an option is this.
4.MP Authoring ,Create new class discovery based on WMI / Registry to find computer and then target the monitor 
What would you do in such a case.

An example is the windows service monitoring from the Windows Management Packs. Microsoft does not discover any of these services. The MPs discover the Windows 2003  \ 2008 \ 2012 Operating System Class and the basic service monitors are targetted at
this class. This means it is relatively light weight monitoring (less overhead on the agent and less discovery information in the databases) but it does mean that you can't add any of these services to a distributed application or report on their availability.
You don't report on individual monitors but on objects which may have many monitors targetted at them.
Windows Server 2003
ü 
Computer Browser Service
ü 
DHCP Client Service
ü 
DNS Client Service
ü 
Plug and Play Service
ü 
RPC Service
ü 
Server Service
ü 
TCP \ IP NetBios Service
ü 
Windows Event Log Service
ü 
Workstation Service
Windows Server 2008 (including R2)
ü 
Computer Browser Service
ü 
DHCP Client Service
ü 
DNS Client Service
ü 
Plug and Play Service
ü 
RPC Service
ü 
Server Service
ü 
TCP \ IP NetBios Service
ü 
Windows Event Log Service
ü 
Workstation Service
Windows Server 2012
ü 
Computer Browser Service
ü 
DHCP Client Service
ü 
DNS Client Service
ü 
Plug and Play Service
ü 
RPC Service
ü 
Server Service
ü 
TCP \ IP NetBios Service
ü 
Windows Event Log Service
ü 
Workstation Service
If you want to actually report on the availability of this windows service (or add it to a Distributed Application) then you do need to discover it - either via the Authoring Template or authoring your own discoveries.
Only you can decide what you need and you might have a different need for each service depending on what it is doing.
Jonathan Almquist has a good walk through here about how to change service monitoring to allow for consecutive occurrences of a service being unavailable but it is deep authoring. 
http://blogs.technet.com/b/jonathanalmquist/archive/2011/06/24/windows-service-monitoring-reduce-false-alerts-part-2.aspx
Regards Graham New System Center 2012 Blog! -
http://www.systemcentersolutions.co.uk
View OpsMgr tips and tricks at
http://systemcentersolutions.wordpress.com/

Similar Messages

  • How to create SERVICE PR using BAPI_PR_CREATE

    Hi everyone,
    How to create SERVICE PR using BAPI_PR_CREATE
    Regards,
    My Code(it doesn't work,I don't know what's wrong.):
    *& Report  ZWTEST
    REPORT  zwtest.
    DATA: header TYPE bapimereqheader,
          headerx TYPE bapimereqheaderx,
          item LIKE TABLE OF bapimereqitemimp WITH HEADER LINE,
          itemx LIKE TABLE OF bapimereqitemx WITH HEADER LINE,
          account  LIKE TABLE OF bapimereqaccount WITH HEADER LINE,
          accountx LIKE TABLE OF bapimereqaccountx WITH HEADER LINE,
          service LIKE TABLE OF bapi_srv_service_line WITH HEADER LINE,
          servicex LIKE TABLE OF bapi_srv_service_linex WITH HEADER LINE,
          serviceaccount LIKE TABLE OF  bapi_srv_acc_data WITH HEADER LINE,
          serviceaccountx  LIKE TABLE OF bapi_srv_acc_datax WITH HEADER LINE,
          preq_no LIKE  bapimereqheader-preq_no,
          lt_return LIKE TABLE OF bapiret2 WITH HEADER LINE,
          wa_return LIKE bapiret2.
    header-pr_type = 'NB'."订单类型(采购)
    headerx-pr_type = 'X'.
    CLEAR: item.
    item-preq_item = '00010'.
    item-pur_group = '426'."采购组
    item-short_text = '服务类PR'."短文本
    item-plant = '1051'."工厂
    item-matl_group = 'AS07'."物料组
    item-item_cat = '9'."项目类别
    item-acctasscat = 'K'."科目分配类别
    item-pckg_no = '0000000001'."软件包编号
    APPEND item.
    CLEAR: itemx.
    itemx-preq_item = '00010'.
    itemx-preq_itemx = 'X'.
    itemx-pur_group = 'X'."采购组
    itemx-short_text = 'X'."短文本
    itemx-plant = 'X'."工厂
    itemx-matl_group = 'X'."物料组
    itemx-item_cat = 'X'."项目类别
    itemx-acctasscat = 'X'."科目分配类别
    itemx-pckg_no = 'X'."软件包编号
    APPEND  itemx.
    CLEAR: account.
    account-preq_item = '00010'.
    account-serial_no = '01'.
    *account-quantity = '0.955'.
    *account-distr_perc = '95.5'.
    account-gl_account = '4205020000'.
    account-costcenter = '1042000001'.
    *account-co_area = 'CNOC'.
    *account-profit_ctr = '9999999999'.
    APPEND account.
    CLEAR: accountx.
    accountx-preq_item = '00010'.
    accountx-serial_no = '01'.
    accountx-preq_itemx = 'X'.
    accountx-serial_nox = 'X'.
    *accountx-quantity = 'X'.
    *accountx-distr_perc = 'X'.
    accountx-gl_account = 'X'.
    accountx-costcenter = 'X'.
    *accountx-co_area = 'X'.
    *accountx-profit_ctr = 'X'.
    APPEND accountx.
    CLEAR: service.
    service-doc_item = '00010'.
    service-outline = '0000000001'.
    service-srv_line = '0000000010'.
    service-short_text = 'service test'.
    service-quantity = '10.000'.
    service-uom = 'AU'.
    service-gross_price = '10.00'.
    service-currency = 'CNY'.
    *service-matl_group = 'AS07'."物料组
    APPEND service.
    CLEAR: servicex.
    servicex-doc_item = '00010'.
    servicex-outline = '0000000001'.
    servicex-srv_line = '0000000010'.
    servicex-short_text = 'X'.
    servicex-quantity = 'X'.
    servicex-uom = 'X'.
    servicex-gross_price = 'X'.
    servicex-currency = 'X'.
    *servicex-matl_group = 'X'.
    APPEND servicex.
    CLEAR: serviceaccount.
    serviceaccount-doc_item = '00010'.
    serviceaccount-outline = '0000000001'.
    serviceaccount-srv_line = '0000000010'.
    serviceaccount-serial_no = '01'.
    serviceaccount-serial_no_item = '01'.
    serviceaccount-percent = '100'.
    APPEND serviceaccount.
    CLEAR: serviceaccountx.
    serviceaccountx-doc_item = '00010'.
    serviceaccountx-outline = '0000000001'.
    serviceaccountx-srv_line = '0000000010'.
    serviceaccountx-serial_no = '01'.
    serviceaccountx-serial_no_item = 'X'.
    serviceaccountx-percent = 'X'.
    APPEND serviceaccountx.
    CALL FUNCTION 'BAPI_PR_CREATE'
      EXPORTING
        prheader               = header
        prheaderx              = headerx
    *   TESTRUN                =
      IMPORTING
        number                 = preq_no
    *   PRHEADEREXP            =
      TABLES
        return                 = lt_return
        pritem                 = item
        pritemx                = itemx
    *   PRITEMEXP              =
    *   PRITEMSOURCE           =
        praccount              = account
    *   PRACCOUNTPROITSEGMENT  =
        praccountx             = accountx
    *   PRADDRDELIVERY         =
    *   PRITEMTEXT             =
    *   PRHEADERTEXT           =
    *   EXTENSIONIN            =
    *   EXTENSIONOUT           =
    *   PRVERSION              =
    *   PRVERSIONX             =
    *   ALLVERSIONS            =
    *   PRCOMPONENTS           =
    *   PRCOMPONENTSX          =
    *   SERVICEOUTLINE         =
    *   SERVICEOUTLINEX        =
        servicelines           = service
        servicelinesx          = servicex
    *   SERVICELIMIT           =
    *   SERVICELIMITX          =
    *   SERVICECONTRACTLIMITS  =
    *   SERVICECONTRACTLIMITSX =
        serviceaccount         = serviceaccount
        serviceaccountx        = serviceaccountx
    *   SERVICELONGTEXTS       =
    *   SERIALNUMBER           =
    *   SERIALNUMBERX          =
    * 处理错误消息:通过判断消息的类型,来判断BAPI是否成功
    READ TABLE lt_return INTO wa_return WITH KEY type = 'E'.
    IF sy-subrc = 0.
      CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
    ELSE.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.
      WRITE: / '成功创建采购申请', preq_no.
    ENDIF.
    LOOP AT lt_return INTO wa_return.
      WRITE: / wa_return-message, wa_return-type, wa_return-id, wa_return-number.
    ENDLOOP.

    see note:
    1950319 - How to create service PR with BAPI_PR_CREATE.pdf

  • How to create Service and response profiles

    Hello Gurus
              I have configured the IC Web Client in solution manager 4.0 system. But in sservice ticket i am not able to see the SLA info. Please tell me
      where to give these SLA parameters ?
      How to create service and response profiles?
      Shuold i use SLF1 instead of  SLFN to maintain SLA ?
    Please tell me how to do these it will be very helpful....

    Hi Naveen
    The Service and Response Profiles can be created in the easy access menu using the path
    SAP Menu> Service> Service Contracts and Service Plans--> Maintain availability and Response Time
    Availability time is also know as service profile
    And then assign these service and response profiles to your Servie Product Master which will be used in the service ticket.
    For the field to be available to enter teh service and response profile in the product master, assign the set types COMM_PR_SRV to the category in which the product will be created
    Hope this would help.
    Regards,
    Rekha Dadwal
    <b>
    You gain a point for every point that you reward. So reward helpful answers generously</b>

  • How to creat service material

    how to creat service material ?

    Dear Jeevan
    Go to MM01 and give respective material type regarding to service .
    You have to use service item category group. Standards are LEIH or DIEN.
    Please revert if do u have any clarifications
    Thanks&Regards
    Raghu.k

  • How to create service in Windows XP for jar file?

    Dear friends,
    I'm having an jar file in my Windows XP OS. I would like to create new service Windows XP to run this jar file. When i start the service then the jar file to be executed.
    I did search in google but i didn't get any proper solution for this.
    Could anyone please tell me the best and easiest way to create service for my jar in Windows XP os.
    Thanks in advance,
    Sathish

    Hi Chennail123,
    Just have a read : [*Converting Your Java App into a Windows Service*|http://www.devx.com/Java/Article/34438].

  • I need your help how to create service plan using programm

    Hello everybody
    I met some difficulities when writing a programm which is used to create service plan.
    I used the function module 'crm_order_maintain'.
    Can you tell me how to set the parameters:
       IT_SERVICEPLAN_I
       IT_SERVICEPLAN_IE
    The two parameters is used as cycle data.
    I'm waiting for your help.
    If you have any idea,please apply to my message .Thank you very much. ^ ^

    Hi,
    I think there is standard way of creating service plans using actions..
    The standard method used is CREATE_ORDER_SRVPLAN.
    Regards,
    PePe

  • How To Create Service/Install Modifier?

    I've been working for some time to figure out how to create a modifier, if it's even possible, to calculate install time for our users, and either add a separate line (say, an item named 'Install'), or something else.
    What we have are projects for our customers where there is installation that needs to be billed separately. We know how much time is required for each component, and at present, we track this in a spreadsheet outside of the application. The users then user Configurator to build their project out, and then manually input the quantities and items into the spreadsheet, and use a macro to calculate the install time, adding that as another line item on the order. Obviously this works, but it adds a large potential for error.
    So, what I am thinking in my head is that we can create a new DFF for the items, and store the installation time there. Can a modifier look at the DFF and sum that across the order, changing the quantity on a line?
    I am guessing someone else has been down this road, and maybe I'm either missing something easier or someone can point me in the right direction. Any help would be GREATLY appreciated!

    In QP, there is a method to create promotional goods modifier to add an item to an order when another item is ordered. You could have pricing attributes that limit the conditions when this occurs. However, I don't know that there is a way to specify the "Quantity" for the promotional item -- at least not dynamically.
    Another option would be an extension that uses the Process Order API to automatically add the line based on the conditions that you provide within the code. This logic could look at the DFF values on your prior lines and determine the item and quantity for the additional line.
    Your probably might be how this extension is initiated. With the pricing engine idea, you might gain because it would automatically add the item during the pricing call -- based on the phase that you choose in your setup. With a non-QP extension, you might need to have the users manually invoke the process. For example, you could have a personalization on the OM Lines screen so that the user clicks Tools > Add Service Item. This would execute the PL/SQL to add the new line to the order. The Personalization could also requery the ilnes the refresh the display.
    Another option would be triggering the same PL/SQL Process Order API via Workflow. Perhaps at the time of Booking the order, you could add a custom workflow activity to execute the calculations and use Process order API to add the line to the order at that time.
    Thanks,
    Jason

  • How to create rule/monitor to generate alert for a reboot of Linux (Redhat) server?

    Need to receive an alert when a Linux server reboots. How can this rule/monitor be created?

    You can use the "Shell Command" templates to create a UNIX/Linux Shell Command (Alert) rule.  See the walkthrough and background here:
    http://operatingquadrant.com/2012/01/30/opsmgr-2012-unixlinux-authoring-templates-shell-command/
    The following command will identify the seconds the system has been "up" and return OK if it is greater than 15 minutes, and REBOOTED if the seconds up are less than 15 minutes.  Your Shell Command rule should alert if the StdOut value contains
    REBOOTED. 
    upseconds=`cat /proc/uptime |awk '{print int ($1 )}'`;if [ $upseconds -lt 900 ];then echo REBOOTED;else echo OK;fi
    www.operatingquadrant.com

  • How to create service order in CRM

    Hi All,
    Now I can create a service plan. I want to know how to create a service order in CRM. Then I can get service plan from solution manager side for testing. Could anyone tell me how to do that on system ICT/ICP?
    Thanks a lot.

    Hi Vincent,
    If you are only talking about creating of service orders in SAP CRM, you can follow this path: [Create Service Orders|http://help.sap.com/saphelp_crm60/helpdata/en/1a/c697d376f24869a755dcf83bbbc9d2/frameset.htm]. This will tell you the overall process along with the items which are necessary to create service orders.
    [Service Orders|http://help.sap.com/saphelp_crm60/helpdata/en/1a/023d63b8387c4a8dfea6592f3a23a7/frameset.htm] will also give you a very comprehensive overview on Service Orders and its creation.
    But I'm still not clear with the system details that you mentioned here. What is ICT/ICP? And what kind of Service Plan data are you expecting from Solution Manager? Is this a SAP CRM Setup for a Demo or are you show casing this solution for some mid-sized clients or customers?
    Hope this helps.
    Thanks,
    Samantak.

  • How to create Service PR from Projects in PS module

    Dear Friends,
    We are doing the customer project, while do executing the projects if any man power is required, customer will send the PO, as per his PO the required Manpower we are procuring (hiring) from our vendor. From our company we are sending this manpower to customer. Here our requirement is we want create a service PO for procuring of these services.
    Friends please explain the above process how we need to do through Project Systems.
    Regards,
    Hari Krishna

    hi
    use the External Processing activity and create the Service master attach this service master in the service tab of the external processing with quantity and rate. and release the activity
    it will create PR based on the setting you make in the network profile.
    create PO
    Create service entry sheet against the PO
    release the service entry sheet
    pay the vendor.

  • How to create service for new database

    i am working on 8i.i want to create new database instead of existing for which first service have to create.i had created parameter file and perform changes,now with oradim i am trying to create service but it is giving incorrect version bcaz i have win2000 and oradim works with winnt only.

    Goodfire wrote:
    I want after creation of a custom database to execute a script that will create a Network Service without having to go through the UI
    Its just adding those 5 lines at tsnames.ora on the client dir
    How can I do i through a script?
    So I can plant it after Create DB script and have both in 1 step.
    P.S.
    The most obvious keywords on main SE don't return something for this so it worths adding it
    keywords : how to create client network service from script oracleWrong approach.
    Better: create database template and execute dbca in silent mode.
    Also execute netca in silent mode as Harrison suggest.
    PS: Adding the 5 lines to tnsnames.ora does not create a network service, first you have to set the "service_names" init parameter and the listener will create the service when the database starts (simplified explanation).
    :p

  • How to create Service Requests(SR's) from customer/user mails.

    Looking for "how to enable the feature of creating Service Requests (SR's) in tele Service Module based on the information
    in E-mail coming from Customers/users" in 11.5.10.2 E-Business Suite.
    Any reference notes/pointers is appreciated.

    I think you should have to setup email center..
    Just go through the implementation guide...to get some idea about it..
    Thanks

  • How to create services for sql querry with joint 2 tables ?

    Hi all,
    I start to learn the php services function for mysql querry in flex 4.5 and all seam to be ok.
    But i don't find anny help or tutorial to create service that call a sql querry with joint to tables, like this :
    Select table01.fieldA table02.fieldA WHERE table01.fieldC LIKE table02.fieldC
    Are there a way to do that in flashBuilder creation services interfaces, or not ?
    Does we make a special value Object and all the AS3  classes and not use the template opperations ?
    Thank's for your help or link
    fbm

    Hi Fabien,
    I'm afraid you'll have to learn a bit more about PHP...
    Joined tables is a relational database feature. It has nothing to do with PHP, and PHP has nothing to do with Flex...
    The "magic" of the flex framework is that it can plug itself into any backend (.Net, Java, PHP...)
    The new way Flash Builder interacts with PHP is through AMF (Actionscript Messaging Format) with the help of Zend and Zend_Amf. You've been able to do it on your own for a while, but it was a bit tricky to set up... The new IDE helps you doing those mapping with wizards. What it does is that it serializes and deserializes objects from PHP to Actionscript, and also generates Actionscript value objects.
    So what you'll have to do is to write your own PHP services to retrieve your data from joined tables in MySQL. Those services will return simple arrays. Then start the wizard, select your services. Flash Builder will then map the objects contained in the PHP arrays into Actionscript typed objects.
    I suggest you have a deep look into Zend_Tables...
    Hope it'll help.
    Julien.

  • How to creating Service Contract using BAPI_SLSTRANSACT_CREATEMULTI

    Hi,
    In my requirement, I have to create a Service Contract from flat file by using BAPI - BAPI_SLSTRANSACT_CREATEMULTI  and data which are comming from flat files are, Serial number, Sold-to party, Ship-to party, Installation date, Contract start date, Contract end date, Service profile, Response profile.
    Please suggest me what are the Import parameters should I pass in this BAPI to create Service Contract?
    Thanks in Advance,
    Deepesh

    Hi All,
    for everybody's benefit (and to avoid you the time I've spent to work this out...), here is a working example on how to create an sales order (TA) via the BAPI_SLSTRANSACT_CREATEMULTI.
    Not really a Service Contract, but it tells you how to call the BAPI.
    Points appreciated, if you find this helpful...
    I use the convention entryField for the values that should be set based on your system.
    Cheers
    G
    *& Report  ZZGVBAPISALESORDER
    REPORT  ZZGVBAPISALESORDER.
    include constants
    include crm_direct.
    // GUIDs
    data: lv_guid_h       type GUID_32,
          lv_guid_i       type GUID_32,
          lv_guid_sl      type GUID_32,
          lv_guid_p       type GUID_32.
    // Handles
    data: lv_current_handle type crmt_handle,
          lv_handle_h      type crmt_handle,
          lv_handle_i      type crmt_handle,
          lv_handle_sl     type crmt_handle,
          lv_handle_p      type crmt_handle.
    // Administration header + item + etc
    data: lt_salesorder_header type table of bapibus20001_header_ins,
          ls_salesorder_header type bapibus20001_header_ins,
          lt_salesorder_item   type table of bapibus20001_item,
          ls_salesorder_item   type bapibus20001_item,
          lt_scheduleline      type table of BAPIBUS20001_SCHEDLIN,
          ls_scheduleline      type BAPIBUS20001_SCHEDLIN,
          lt_partner           type table of BAPIBUS20001_PARTNER_INS,
          ls_partner           type BAPIBUS20001_PARTNER_INS,
          ls_logical_key       TYPE crmt_partner_logic_partner_key,
          lt_organisation      type table of BAPIBUS20001_ORGMAN_INS,
          ls_organisation      type BAPIBUS20001_ORGMAN_INS.
    // Saved sales orders
    data: lt_saved_process type table of bapibus20001_object_id,
          ls_saved_process type bapibus20001_object_id,
          ls_salesorder    type CRMT_RETURN_OBJECTS_STRUC.
    data: lt_input_fields type table of bapibus20001_input_fields,
          ls_input_fields type bapibus20001_input_fields,
          lt_return type table of bapiret2,
          ls_return type bapiret2.
    // Macro definition to populate structure and input field
    This, called as
    setfield ls_salesorder_header GUID lv_guid_h
    is exploded as
    ls_salesorder_header-GUID = lv_guid_h.
    ls_input_fields-fieldname = 'GUID'.
    append ls_input_fields to lt_input_fields.
    Note 1: &2 (field name) MUST be uppercase
    Note 2: for the salesorder header, I haven't used the macro,
    to show how the code should look.
    I've used the macro everywhere else.
    define setfield.
      &1-&2          = &3.
      ls_input_fields-fieldname  = '&2'.
      append ls_input_fields to lt_input_fields.
    end-of-definition.
    // end of macro definition
      // fill order administration header
    perform get_guid changing lv_guid_h.
    add 1 to lv_handle_h.
    ls_salesorder_header-guid          = lv_guid_h.
    ls_salesorder_header-handle        = lv_handle_h.
    ls_salesorder_header-process_type  = 'TA'.
    clear ls_input_fields.
    ls_input_fields-ref_handle = lv_handle_h.
    ls_input_fields-ref_guid = lv_guid_h.
    *ls_input_fields-ref_kind   = gc_object_ref_kind-orderadm_h.
    ls_input_fields-objectname = gc_object_name-orderadm_h.
    ls_input_fields-fieldname  = 'GUID'.
    append ls_input_fields to lt_input_fields.
    ls_input_fields-fieldname  = 'HANDLE'.
    append ls_input_fields to lt_input_fields.
    ls_input_fields-fieldname  = 'PROCESS_TYPE'.
    append ls_input_fields to lt_input_fields.
    append ls_salesorder_header to lt_salesorder_header.
      // fill organisation data (I needed this, you may rely on
    sales org determination instead...)
    clear ls_input_fields.
    ls_input_fields-ref_handle  = lv_handle_h.
    ls_input_fields-ref_guid    = lv_guid_h.
    ls_input_fields-ref_kind    = gc_object_ref_kind-orderadm_h.
    ls_input_fields-objectname  = gc_object_name-orgman.
    setfield ls_organisation REF_GUID lv_guid_h.
    setfield ls_organisation REF_HANDLE lv_handle_h.
    setfield ls_organisation REF_KIND gc_object_ref_kind-orderadm_h.
    setfield ls_organisation SALES_ORG_RESP salesOrgResp(input).
    setfield ls_organisation SALES_ORG salesOrg(input).
    setfield ls_organisation DIS_CHANNEL disChannel(input).
    append ls_organisation to lt_organisation.
      // fill order administration item
    perform get_guid changing lv_guid_i.
    lv_handle_i = lv_handle_h.
    add 1 to lv_handle_i.
    clear ls_input_fields.
    ls_input_fields-ref_guid   = lv_guid_i.
    ls_input_fields-ref_handle  = lv_handle_i.
    *ls_input_fields-ref_kind   = gc_object_ref_kind-orderadm_i.
    ls_input_fields-objectname = gc_object_name-orderadm_i.
    setfield ls_salesorder_item GUID lv_guid_i.
    setfield ls_salesorder_item HEADER lv_guid_h.
    setfield ls_salesorder_item HANDLE lv_handle_i.
    setfield ls_salesorder_item HEADER_HANDLE lv_handle_h.
    setfield ls_salesorder_item ORDERED_PROD product(input).
    *_set_field ls_salesorder_item ITM_TYPE 'TAN'.
    setfield ls_salesorder_item MODE 'A'.
    *adjustment taken from standard include LCMS_MAPPERF04
    *(see where-used-list for BAPI_SLSTRANSACT_CREATEMULTI, program LCMS_MAPPERU11)
    delete lt_input_fields where fieldname = 'HANDLE'
                                    OR
                                 fieldname = 'HEADER_HANDLE'.
    append ls_salesorder_item to lt_salesorder_item.
      // fill schedule line for item
    perform get_guid changing lv_guid_sl.
    add 1 to lv_handle_sl.
    clear ls_input_fields.
    ls_input_fields-ref_guid   = lv_guid_i.
    ls_input_fields-ref_handle  = lv_handle_i.
    ls_input_fields-ref_kind   = gc_object_ref_kind-orderadm_i.
    ls_input_fields-objectname = gc_object_name-schedlin.
    setfield ls_scheduleline ITEM_GUID lv_guid_i.
    setfield ls_scheduleline GUID lv_guid_sl.
    setfield ls_scheduleline HANDLE lv_handle_sl.
    setfield ls_scheduleline ITEM_HANDLE lv_handle_i.
    setfield ls_scheduleline QUANTITY '1.000'.
    append ls_scheduleline to lt_scheduleline.
      // fill partner line
    *perform get_guid changing lv_guid_p.
    *the partner use the logical key as well
    ls_logical_key-ref_partner_handle = '0001'.
    clear ls_input_fields.
    ls_input_fields-ref_guid   = lv_guid_h.
    ls_input_fields-ref_handle = lv_handle_h.
    ls_input_fields-ref_kind   = gc_object_ref_kind-orderadm_h.
    ls_input_fields-objectname = gc_object_name-partner.
    ls_input_fields-logical_key = ls_logical_key.
    setfield ls_partner REF_GUID lv_guid_h.
    setfield ls_partner REF_HANDLE lv_handle_h.
    setfield ls_partner REF_KIND gc_object_ref_kind-orderadm_h.
    setfield ls_partner REF_PARTNER_HANDLE '0001'.
    setfield ls_partner KIND_OF_ENTRY 'C'.
    setfield ls_partner PARTNER_FCT '00000001'.
    setfield ls_partner PARTNER_NO bpNumber(input).
    setfield ls_partner NO_TYPE 'BP'.
    setfield ls_partner DISPLAY_TYPE 'BP'.
    move-corresponding ls_partner to ls_logical_key.
    append ls_partner to lt_partner.
    //  example of a second partner function (custom) with data
        override
    ls_logical_key-ref_partner_handle = '0002'.
    clear ls_input_fields.
    ls_input_fields-ref_guid   = lv_guid_h.
    ls_input_fields-ref_handle = lv_handle_h.
    ls_input_fields-ref_kind   = gc_object_ref_kind-orderadm_h.
    ls_input_fields-objectname = gc_object_name-partner.
    ls_input_fields-logical_key = ls_logical_key.
    setfield ls_partner REF_GUID lv_guid_h.
    setfield ls_partner REF_HANDLE lv_handle_h.
    setfield ls_partner REF_KIND gc_object_ref_kind-orderadm_h.
    setfield ls_partner REF_PARTNER_HANDLE '0002'.
    setfield ls_partner KIND_OF_ENTRY 'B'.            "manual entry...
    setfield ls_partner PARTNER_FCT customFct(input).
    setfield ls_partner PARTNER_NO bpNumber(input).
    setfield ls_partner NO_TYPE 'BP'.
    setfield ls_partner DISPLAY_TYPE 'BP'.
    setfield ls_partner TITLE 'Mr.'.
    setfield ls_partner FIRSTNAME 'John'.
    setfield ls_partner LASTNAME 'Smith'.
    setfield ls_partner STR_SUPPL1 'John Smith and Co'.
    setfield ls_partner STREET 'Street1'.
    setfield ls_partner STR_SUPPL3 'Street4'.
    setfield ls_partner HOUSE_NO '42'.
    setfield ls_partner CITY 'Townville'.
    setfield ls_partner DISTRICT 'Districtshire'.
    setfield ls_partner POSTL_COD1 'AA1 2BB'.
    note now ...
    *adjustment taken from standard include LCMS_MAPPERF04
    *(see where-used-list for BAPI_SLSTRANSACT_CREATEMULTI, program LCMS_MAPPERU11)
    I don't use macro because name of the field in input_table is different
    *_set_field ls_partner COUNTRYISO 'GB'.
    *instead
    ls_partner-COUNTRYISO = 'GB'.
    ls_input_fields-fieldname = 'COUNTRY'.
    append ls_input_fields to lt_input_fields.
    *_set_field ls_partner LANGU_ISO 'EN'.
    ls_partner-LANGU_ISO = 'EN'.
    ls_input_fields-fieldname = 'LANGU'.
    append ls_input_fields to lt_input_fields.
    move-corresponding ls_partner to ls_logical_key.
    append ls_partner to lt_partner.
    Create sales orders                                                  *
    call function 'BAPI_SLSTRANSACT_CREATEMULTI'
      EXPORTING
        testrun       = false
      TABLES
        header        = lt_salesorder_header[]
        item          = lt_salesorder_item[]
        partner       = lt_partner[]
        organisation  = lt_organisation[]
        input_fields  = lt_input_fields[]
        scheduleline  = lt_scheduleline[]
        saved_process = lt_saved_process[]
        return        = lt_return[].
    // get the GUID of the created object
    call function 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        wait = 'X'.
    INCLUDE ZZGVBAPISALESORDER_GET_GUIDF01.
    The include contains only this:
    ***INCLUDE ZZGVBAPISALESORDER_GET_GUIDF01 .
    *&      Form  get_guid
          text
         <--guid  text
    FORM get_guid  CHANGING GUID.
      CALL FUNCTION 'SYSTEM_UUID_C_CREATE'
          IMPORTING
               UUID    = GUID.
    ENDFORM.                    " get_guid

  • How to create service PO

    Hi,
       How can i create service PO. Im trying to create one service PO. But it is asking G/L account & cost center. Both are not matching. Is there any tcode to set G/L account to Cost center.

    no,
    cost center:
    An organizational unit within a controlling area that represents a defined location of cost incurrence.
    The definition can be based on:
    Functional requirements
    Allocation criteria
    Physical location
    Responsibility for costs
    Cost Element Accounting, Cost Center Accounting, and Order Controlling are closely linked together in the SAP System. Every posting to a cost element account is assigned to an object in cost accounting.
    Note the following differentiation when you create a cost element:
    Primary cost element
    You can create a primary cost element, only after you indicate it as a G/L account in the chart of accounts, and create it as a G/L account in Financial Accounting.
    A primary cost element must have a corresponding account in Financial Accounting. When you create a cost element, the SAP System checks if a corresponding account was created in Financial Accounting.
    Secondary cost element
    A secondary cost element is used only in cost accounting, and may not be created in Financial Accounting.
    The cost element category has a technical control function, which determines whether a cost element can be posted to directly or indirectly.
    Direct posting
    You post an amount to each account, specifying the account number.
    You can make direct postings to all primary cost elements.
    Indirect posting
    The SAP System always determines the account during the posting transaction. You cannot enter the account number during the posting transaction.
    You can only make indirect postings to secondary cost elements.
    cost element categories:
    The classification of cost elements according to their usage or origin.
    Examples of cost element categories are:
    Material cost elements
    Settlement cost elements for orders
    Cost elements for allocating internal activities
    regards,
    indranil

Maybe you are looking for

  • HP Color LaserJet MFP M570dw and HP Web Services

    Hi, I have a HP Color LaserJet MFP M570dw printer and have tried to enable the HP Web Services, but without success. My printer is configured on a fixed ip-address, with a default gateway and of course with static DNS servers (8.8.8.8 and 8.8.4.4). E

  • 2 Video Ipods Sharing One Itunes Library ?

    OK I have the 30 Gig 5th Gen Ipod and I love it. Now I want to swap my Zune for a friends 30 Gig 5th Gen Ipod. That would leave me with 2, 30 GB Ipods. My question is how do I use 2 Ipods with one Itunes Library & account? I'm probably going to want

  • I want to swich from Symbian E7 to Lumia 800, but ...

    I don't want to be a testing cobai with my money and i want to be sure that WP is a up-grade, not a down-grade - and so - to sell it and loose money. I have read the user guide and is preauty simple. So, i have 27 questions and i hope you have the ti

  • Why my table is not being audited?

    hi all, please help ! thanks! i don't understand. why there is no record in dba_audit_trail table for my 'insert' statement? SQL> show parameter audit_trail NAME TYPE VALUE audit_trail string DB SQL> SQL>audit all; Audit succeeded. SQL> audit all pri

  • Help: Lock Screen Image Not Changing :(

    This is so annoying...even when I change wallpaper, the lock screen picture stays put. Tried resetting wallpaper to factory installed one but still doesn't change. How do I go about this pls? Or is there a way it can be changed without changing the w