OKS_CONTRACT_PUB - Creating a service Contract

Hi,
We are working on release 12, and I am trying to Create and Update Contracts through and API.
At the moment the API I am using to create the contract is OKS_CONTRACT_PUB.Create_Contract, but it keeps giving me errors.
Like You must enter a value for column lse_id .which is the error I am getting at the moment.
If there are anybody that has succesfully used this API, or can give me any assistance, it will be greatly appreciated.
Regards
Carin Webb

The best way to avoid errors is to make note of the mandatory columns that the API needs to create contract successfully like lse_id is a mandatory column.
You can also check from the front end what fields need to be mandatorily entered while creating a contract.

Similar Messages

  • Ibase and configuration error while creating a Service Contract

    Hi,
    I am creating a Service Contract programatically and not manually through the T-code CRMD_ORDER.
    I am using the Function module CRMXIF_ORDER_SAVE for the same as the FM BAPI_BUSPROCESSND_CREATEMULTI and CRM_ORDER_MAINTAIN did not work for me because of the number of parameters that needs to be passed for creating the Service contract.
    The Service contract does get created but there are errors corresponding to the Point of delivery and configuration missing.
    The error corresponding to the point of delivery says "IS-U:allocate a point of delivery to the item" even though I am passing the values in the REF_OBJECTS field of the CRMXIF_BUSTRANS_ITEM structure.
    Structure for the same is :
    ls_objects_i-TYPE_REF_OBJ = 'B'.
      ls_objects_i-object_task = 'I'.
      ls_objects_i-PRODUCT_GUID = lv_product_guid.
      ls_objects_i-PRODUCT_ID = p_product_id.
      ls_objects_i-IBASE_COMP_GUID = ls_output-IBASE_GUID.
      ls_objects_i-IB_INSTANCE = 1582.
      ls_objects_i-IB_COMP_VALID = '20070926093651'.
      ls_objects_i-SERIAL_NUMBER = '0102 46CC9C278B92025BE10000000AD5920E'.
      append ls_objects_i to lt_objects_i.
      p_ls_item-REF_OBJECT-data = lt_objects_i.
      p_ls_item-REF_OBJECT-datax = 'X'.
    Similarly,the error for the configuration says "Configuration for the item missing" and here again I am passing the values in the CONFIGURATION structure.
    Structure for this is :
      p_ls_item-configuration-data-consist = 'T'.
      p_ls_item-configuration-data-kbname = 32.
      p_ls_item-configuration-data-kbvers = '0.0'.
      p_ls_item-configuration-data-kbprofile = 'E_H_B'.
      p_ls_item-configuration-data-complete = 'T'.
      p_ls_item-configuration-data-spras = 'E'.
      p_ls_item-configuration-data-cfginfo = 'VCOND=VARIANT_CONDITION_KEY'
      ls_cuins-OBJ_TYPE = 'SERV'.
      ls_cuins-class_type = 300.
      ls_cuins-obj_key = 'E_H_B'.
      ls_cuins-obj_txt = 'E_H_B'.
      ls_cuins-QUANTITY = '1.0'.
      ls_cuins-COMPLETE = 'T'.
      ls_cuins-CONSIST = 'T'.
      append ls_cuins to lt_cuins.
      ls_config_i-instance = lt_cuins.
      p_ls_item-configuration-data = ls_config_i.
      p_ls_item-configuration-datax = 'X'.
      clear ls_config_i.
      ls_cuval-charc = 'DISCOUNT_EUR'.
      ls_cuval-charc_txt = 'DISCOUNT_EUR'.
      ls_cuval-value = '0.0'.
    ls_cuval-value_txt
      append ls_cuval to lt_cuval.
      ls_instance-value = lt_cuval.
      insert ls_instance into table lt_instance.
    ls_config_i-instance = lt_instance.
    p_ls_item-configuration-data = ls_config_i.
    p_ls_item-configuration-datax = 'X'.
    clear ls_config_i.
    Kindly help if anyone has worked on this.......
    Regards,
    Puneet Jhari.

    Hi,
    I am creating a Service Contract programatically and not manually through the T-code CRMD_ORDER.
    I am using the Function module CRMXIF_ORDER_SAVE for the same as the FM BAPI_BUSPROCESSND_CREATEMULTI and CRM_ORDER_MAINTAIN did not work for me because of the number of parameters that needs to be passed for creating the Service contract.
    The Service contract does get created but there are errors corresponding to the Point of delivery and configuration missing.
    The error corresponding to the point of delivery says "IS-U:allocate a point of delivery to the item" even though I am passing the values in the REF_OBJECTS field of the CRMXIF_BUSTRANS_ITEM structure.
    Structure for the same is :
    ls_objects_i-TYPE_REF_OBJ = 'B'.
      ls_objects_i-object_task = 'I'.
      ls_objects_i-PRODUCT_GUID = lv_product_guid.
      ls_objects_i-PRODUCT_ID = p_product_id.
      ls_objects_i-IBASE_COMP_GUID = ls_output-IBASE_GUID.
      ls_objects_i-IB_INSTANCE = 1582.
      ls_objects_i-IB_COMP_VALID = '20070926093651'.
      ls_objects_i-SERIAL_NUMBER = '0102 46CC9C278B92025BE10000000AD5920E'.
      append ls_objects_i to lt_objects_i.
      p_ls_item-REF_OBJECT-data = lt_objects_i.
      p_ls_item-REF_OBJECT-datax = 'X'.
    Similarly,the error for the configuration says "Configuration for the item missing" and here again I am passing the values in the CONFIGURATION structure.
    Structure for this is :
      p_ls_item-configuration-data-consist = 'T'.
      p_ls_item-configuration-data-kbname = 32.
      p_ls_item-configuration-data-kbvers = '0.0'.
      p_ls_item-configuration-data-kbprofile = 'E_H_B'.
      p_ls_item-configuration-data-complete = 'T'.
      p_ls_item-configuration-data-spras = 'E'.
      p_ls_item-configuration-data-cfginfo = 'VCOND=VARIANT_CONDITION_KEY'
      ls_cuins-OBJ_TYPE = 'SERV'.
      ls_cuins-class_type = 300.
      ls_cuins-obj_key = 'E_H_B'.
      ls_cuins-obj_txt = 'E_H_B'.
      ls_cuins-QUANTITY = '1.0'.
      ls_cuins-COMPLETE = 'T'.
      ls_cuins-CONSIST = 'T'.
      append ls_cuins to lt_cuins.
      ls_config_i-instance = lt_cuins.
      p_ls_item-configuration-data = ls_config_i.
      p_ls_item-configuration-datax = 'X'.
      clear ls_config_i.
      ls_cuval-charc = 'DISCOUNT_EUR'.
      ls_cuval-charc_txt = 'DISCOUNT_EUR'.
      ls_cuval-value = '0.0'.
    ls_cuval-value_txt
      append ls_cuval to lt_cuval.
      ls_instance-value = lt_cuval.
      insert ls_instance into table lt_instance.
    ls_config_i-instance = lt_instance.
    p_ls_item-configuration-data = ls_config_i.
    p_ls_item-configuration-datax = 'X'.
    clear ls_config_i.
    Kindly help if anyone has worked on this.......
    Regards,
    Puneet Jhari.

  • Unable to create a service contract from IDoc BLAORD FM IDOC_INPUT_BLAORD

    I've been testing creating service contracts using BLAORD and it appears that SAP does not have any way of creating a service contract using IDOC_INPUT_BLAORD. Inside this function a BDC is built and either ME31K or ME32K is called. There is processing that checks the service line package numbers, but it doesn't appear to be creating them (Maybe I'm overlooking something). When the BDC is being built the services screen is ignored. There is a user exit that could be used to populate the BDC for these screens.
    I recently had to develop a custom BDC to create service contracts becuase, to the knowledge of our best ABAP-ers, there is no SAP standard functionality to create service contracts programmatically besides using a BDC. My custom BDC will fail when run in background because of a GUI control on the services screen. It runs fine in the foreground. The short dump is 'RAISE_EXCEPTION'. Short text: Exception condition "CNTL_ERROR" raised. Termination is occurring in CL_GUI_DOCKING_CONTAINER->CONSTRUCTOR. We're on ECC 6.0.
    I checked the SAP Notes system and I was unable to find anything related specifically to contracts for this issues. I did see that SAP has released OSS notes for other BDC processes so that they would be able to run in background.
    I am wondering if there is anyone who currently is able to create service contracts using IDOC_INPUT_BLAORD. My plan is to set up an RFC between SAP systems. The customer wants to be able to receive contracts on demand. Has anyone done this before for service contracts? What has your approach been? Is there anyway of having the function run in foreground when it receives a IDoc?
    Thanks for your input,
    Steve

    Hello Steve,
    Did you get a solution to Service Contract (Purchase) creation through BLAORD or through any other FM please?
    BAPI_CONTRAT_CREATE does not handle services.
    Have a similar requirement and trying to avoid BDC.
    Thanks & Regards
    Prashanth

  • SLA for service request\service order  without create a service contract

    Hello Experts,
    We are using CRM 7
    Is there a possibility to determine SLA for service request\service order  without create a service contract?
    We have defined:
    1. Trasaction Code: CRMD_SERV_SLA-  Response Profile / Response Times
    2. In Customizing we have defined our date profile with the relevant duration
    3. In  Customizing for transaction types  we defined  SLA Prof. Det. Proc= IT000001
    4. we assign the Service Profile and Response Profile to BP (from "service levels" block) .
    Everthing seems ok but the SLA time is not determined automatically.
    Hope you can help me out.
    Thanks,
    Tal

    Hi Tal Tal
    Your steps are correct and i hope you did these too
    a) In the SLA determination procedure ,you have defined the access sequence for service product item or org
    b) If service product item ,take any service product for ex INVESTIGATION assign the two Service and response profile in the service tab
    c) if org the above two profiles can be assigned to org attributes.
    d) In my opinion the date profile you should have assigned it to item category as I think the SLA date calculation is done at the item level
    e) You should assign the SLA det prof to the transaction type in the service process business category - customizing header.
    f) when you create a transaction type sla dates will be determined as follows
        a) you have to enter service product entered in the item ,then dates will be visible,and also if your access sequence is based on service product,the respons profile and service profile will be determined.
        b) if you have given indicators as all these three "category,priority,codes' in your response profile, then you have to enter all three and then hit enter
       c) After hitting enter,the response profile determined above,will use the above 3 inputs of category,priority etc and determine the duration times ,which should be maintained in your date profile.hence the durations determined will be used in the dates calculation.
    Let me know if you have any other questions.

  • How to create a Service Contract ? (ABAP related devlopment)

    Dear All,
    How to create a Service Contract ? (ABAP related devlopment)
    The Info I have is that
    Service contract will contain:
    u2022     Validity Start
    u2022     Validity End
    u2022     Duration u2013 minimum period for contracts
    Additional Info:
    1. Creation of service contract will take place automatically via u201Cfunction moduleu201D. This step will take place if all serial numbers are known in the sales order.
    2. When ever a Sales Order is created in Seibel containing a line item of servie contract I need to create a service contract
    I searched a BAPI -- BAPI_CONTRACT_CREATE
    I searched a Tran  --  VA41- create Contarct ( type - WV - Service and maint)
    I am i in right direction ---> , If you have any good solution kindly answer
    Please help.

    Hi Iqbal,
    You can use
    BAPI_CONTRACT_CREATE
    BAPI_CONTRACTS_CREATEFROMDATA .
    Once you create the contract, update the technical objects for the contracts
    using two function modules called one after another.
    IWOL_WV_ADD_OBJECTS
    IWOL_WV_POST_OBJECT_LIST
    Check this link:
    http://abap.wikiprog.com/wiki/BAPI_CONTRACT_CREATE
    Regards,
    Chandra Sekhar

  • Create a service contract under SAP CRM

    Hi,
    I try to create a service contract under SAP CRM with transaction code CRMD_ORDER but when I click on "Create" button, nothing display !
    Is it possible to create a contract under SAP CRM ?
    In the end, I would like to replicate a contract from CRM to ISU.
    Thanks by advance for your help !
    Best regards,
    Rémi

    Hi Remi,
    In transaction CRMD_ORDER, click F5 button and under "Service Contract", just choose the transaction type you'd like to use. Examples:
    Contract w. ERP Bill
    ITIL Serv. Contract
    Remote Service Contr
    Serv Cont Quote.
    Service Contract
    UBB Service Contract
    If nothing is displayed, this may mean that transactions have been blocked. Therefore, you have to follow the path under IMG: Customer Relationship Management -> Transactions -> Basic Settings -> Define Transaction Types, and disable the "Inactive" flag.
    So yes, it is definitely possible to create a service contract in SAP CRM. However, it is recommended that you use WebClient UI with business role SERVICEPRO instead of GUI, for most of the time.
    Edited by: Kivanc Bilgin on May 18, 2011 2:39 PM

  • Error while creating Service Contract

    Folks,
    While I create a service contract, I am getting the error:
    "An error occurred in system PEC510 during account assignment"
    Could someone help me out with this?
    Thanks,
    Divya.

    Hi Divya,
    Please check the following in IMG:
    CRM -> Transactions -> Settings for Service Processes -> Integration -> Set up time sheet and controlling integration
    After that you should enter the corresponding R/3 System. In R/3 customizing use the following path: Settings for Service Processing -> Controlling Integration -> Establish Controlling type, controlling level and controlling scenarios.
    Here you should check if a controlling scenario for single object controlling (usually) has been maintained. See also paragraph 3.1.1.10.3 in BP guide C26 at the following location: http://help.sap.com/bp_crmv250/CRM_DE/BBLibrary/Documentation/C26_BB_ConfigGuide_EN_US.doc
    Kind regards,
    KZ

  • Not able to create Service Contract from another svc.contract as followup

    Hi,
    I am trying to create a service contract from another service contract as folllow up document as a part of contract renewal process. However, when I click on follow up button, in the popup, not able to the option Service Contract. Hence I am unable to create.
    Could you please let me know, what needs to be done such that Service Contract also will be shown in the popup.
    Thanks for all the replies.
    Thanks,
    Sandeep

    Hello Sandeep,
    It is not possible to create a follow up service contract (BUS2000112) for another service contract (BUS2000112).
    I do not know your business scenario, you can debug method GET_FOLLOWUP_CUST of class CL_CRM_UIU_BT_GET_PROCTYPES and see where the follow-up transaction types are filtered out.
    I met similar case before, the solution provided at that time was
    - modify FM CRM_UBB_FILTER_SUC_PROC_TYPE in line 49. You can comment out the following line:
    delete ct_suc_proc_type where process_type = ls_suc_proc_type-process_type.
    Hope this could be helpful.
    Best regards,
    Maggie

  • Is it necessary to create a Billing Plan for the Service Contracts

    Hi All,
      Is it necessary to create a billing plan for the service contracts.
      My requirement.
      In CRM 7.0, we created a service contract. For the item in that service contract there is a Billing Plan tab.
      In that tab we have the dates for Period, Billing Date etc.
      Now our requirement is to get the Billing Date quarterly. For this we created date rules and date profiles and assigned these date profiles to header and item level transactions.
    And we are able to see the date rules under the drop down of the billing date.
    I copied the standard date rule BILL004 to ZBILL004.
      But when we changed to our date rule it is not changing to quarterly date.
      Can you please let me know  what are the configurations to be done for this.
      Is the billing plan has to be created for this kind of scenario.
    Thanks in advance
    Thanks and Regards,
    Raghu

    Hi
    On OK button's action  you can Destroy the window and navigate to Page1.
    Go through this link for more details and a step by step guide for creation of pop ups  and dialog boxes
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/903fed0d-7be4-2a10-cd96-9136707374e1?quicklink=index&overridelayout=true
    Hope it works
    Regards
    Suresh

  • Problem in Creating Service contract Quote

    Hi,
    I have a problem while creating Service Contract Quote. The Problem is "No Items being created in Service Contract Quote."
    I am copying these line items from the Package Quote(Programatically). I am reading the Package Quote Lines Items using CRM_ORDER_READ and I am looping these one by one, and copying into one Item Table. Passed this table, to MAINTAIN_ORDERADM_I function module. And Then I am calling SAVE function module.
    But, for me service contract Quote is being created with no line items.
    Can you please let me know, how can I solve this problem.
    And let me know what are the necessary steps to be taken progrmtically,  for creating Service Contract Quote from a Package Quote.
    Thanks,
    Sandeep

    A standard way of doing this would be to create an action in service contract with method call processing type, and method COPY_DOCUMENT. For this you need to do the following:
    1) Create a new action called "SRV_CNTRCT_QUOTE_CREATE" in action pofile already attached to Package Quote. Use
        CRMC_ACTION_DEF Tcode for this.
    2) Choose processing type as method call and method as COPY_DOCUMENT.
    3) Choose parameter CRMD_ORDERADM_H, PROCESS_TYPE with initial value as transaction type of Serv Contract Quote.
    4) Institute start and scheduled conditions if required in CRMC_ACTION_CONF.
    Note: For this copying controls at transaction level, item category level and itemcat determination while copying should have been determined.
    Regds,
    Raghu

  • Changing Billing Schedule Level for Service Contracts created in OM

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

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

  • Create 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, <b>Serial number, Sold-to party, Ship-to party, Installation date, Contract start date, Contract end date, Service profile, Response profile.</b>
    Please suggest me what are the Import parameters should I pass in this BAPI to create Service Contract?
    Thanks in Advance,
    Deepesh

    Hi Deepesh ,
    Please use BAPI_BUSPROCESSND_CREATEMULTI for creating the service contract.This is better in terms of functionality and usage , though very similar to BAPI_SLSTRANSACT_CREATEMULTI in terms of its interface.
    You need to call :
    1. BAPI_BUSPROCESSND_CREATEMULTI
    2. BAPI_BUSPROCESSND_SAVE
    3. BAPI_TRANSACTION_COMMIT 
    in succession.
    As far as filling the import parameters is concerned,
    1.All your dates would go to APPOINTMENT_H or APPOINTMENT_I ( Header or Item)
    2.Sold-to Party, Ship-to Party would go to PARTNER.
    Regards,
    Rishi.

  • 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 Contract-Urgent

    Hii All,
    Can anyone tell me what all the requirements needed to create a service contract?
    I shall be thankful to anyone who could please please send me the step by step procedure to create the service contract.
    Thanks
    Gopi.

    Hi Gopal ,
    Use following steps for creating service contract.
    1] Use t-code <b>ME31K</b>
    2] Enter details like Vendor , Agreement type (MK) , Purch Orgn Purch.group.In the same , enter Item Category as "<b>D</b>" and respective account assignment category (K,F etc.)
    3]In second screen enter Validity period , then short text for the desired services.In next screen , enter Service details and proper account assnmnt
    Save the contract
    Regards
    Nilesh

  • Creating Service Contract through program

    Hi Experts,
    Could you please direct me to create a Service Contract (Billable) through program...?
    I am trying to use FM - 'CRM_ORDER_MAINTAIN'.
    But fully confused what parameters to pass.
    Please help...
    Regards,
    Venkat

    Hi Mohammed,
    Thanks for the reply.
    Filling the fields and relevant data to structures and filling CT_INPUT_FIELDS is okay for me.
    Where I have doubt is when filling these REF_HANDLE, LOGICAL_KEY etc.,

Maybe you are looking for

  • Populating apex item checkbox in report row based on database value

    Hi All I am looking for help setting an apex item checkbox to 'checked' depending on a record exisiting in a database and I would appreciate a little guidance. At the moment I have a report which looks a bit like this SELECT licence_user_identifier,

  • Adobe Flash Player crashes in all browsers

    Hi, I have had issues with playing videos before. They would constantly freeze (while the sound continued), it was like I was watching stop motion videos all the time. This was a recent problem that started happening within the last month or so. I go

  • Thin grid lines in PDF export

    I am using the current version of Numbers (3.2). The problem I am facing is that it seems to be impossible to export a spreadsheet with invisible grid lines to a PDF. Every time I do so, thin (I guess 1px) grid lines appear in the PDF where the shoul

  • How to use warning message

    Hello everyone! The message type of 'w' should have a yellow symbol on the status bar, right? But when I execute the code below, it produces the red symbol (X)... REPORT zmsgsamp        MESSAGE-ID s1. SELECTION-SCREEN BEGIN OF BLOCK a. PARAMETERS  : 

  • JAVA, JAVA WEB dynpro and possibility of JAVA workflow

    Hi all Just a take here -- I'm just getting some feelers on the way WF SHOULD be going in future. Since starting to use the JAVA WD system and netweaver developer studio it seems that having to encapsulate a lot of NEW Workflows as ABAP objects is go