Create Activity using BAPI_PROJECT_MAINTAIN !!!

All,
I have been working to create the PD, WBS Elements, Networks & Activities using the FM BAPI_PROJECT_MAINTAIN.
I am able to create the PD, WBS Elements & Networks.
Now when I am trying to create the Activities, I am unable to find what OBJECTKEY needs to be given in the I_METHOD_PROJECT Table of the FM.
OBJECTTYPE = NETWORKACTIVITY
METHOD        = CREATE
OBJECTKEY  = ????
I get an Error as - "An incorrect object key was entered for object type NetworkActivity" - when I give the OBJECTKEY as the Network Number for which I want to create the Activity.
I have serached everywhere I could but unable to get the solution.
Please advise - I have literally given up now.
Regards,
Pankaj Agarwal.

Project Definition needs to be passed in OBJECTKEY, if OBJECTTYPE = 'PROJECTDEFINITION'.
Edited by: Poorna Chandrasekhar on Jan 29, 2009 5:12 PM

Similar Messages

  • How to create services using BAPI_PROJECT_MAINTAIN

    Hi Gurus,
    I wish to create services ( in Ext Processing tab in tcode CN22) using BAPI_PROJECT_MAINTAIN. Please help me.
    Regards
    Ajay
    Moderator message: please search for available information/documentation before asking, try solving problems yourself first.
    Edited by: Thomas Zloch on Dec 8, 2010 2:50 PM

    Hi Lalyn.
    Firstly, I would like to suggest you not to use "REWARD POINTS" which is againts the rules of engagement.
    Hope you take things positively.
    I would like to suggest a couple of references, which are similar to your issue,
    [SDN - Reference for Updating value of WBS element - BAPI_PROJECT_MAINTAIN|Update WBS element;
    [SDN - Reference for issues related to creation of WBS element using BAPI_PROJECT_MAINTAIN|Problems with BAPI_PROJECT_MAINTAIN;
    [SDN Wiki - Standard Reference for ABAP Program to Upload WBS ELEMENTS IN Hierarchy|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abap%2bprogram%2bto%2bupload%2bwbs%2belements%2bin%2bhierarchy ]
    Hope that's usefull.
    Good Luck & Regards.

  • Code to create WBS using BAPI_PROJECT_MAINTAIN

    Hi,
    I am creating a program for mass upload of project definition and WBS elements. I was able to create the project definition using BAPI_PROJECTDEF_CREATE. For the WBS, I am using BAPI_PROJECT_MAINTAIN. But I was not able to create WBS yet. Can you give me a sample code for the BAPI_PROJECT_MAINTAIN that can create a WBS? What should be the values to be populated in the table i_method_project, i_wbs_element_table, etc.
    Please help.. I will reward points.
    Thanks,
    Lalyn

    Hi Lalyn.
    Firstly, I would like to suggest you not to use "REWARD POINTS" which is againts the rules of engagement.
    Hope you take things positively.
    I would like to suggest a couple of references, which are similar to your issue,
    [SDN - Reference for Updating value of WBS element - BAPI_PROJECT_MAINTAIN|Update WBS element;
    [SDN - Reference for issues related to creation of WBS element using BAPI_PROJECT_MAINTAIN|Problems with BAPI_PROJECT_MAINTAIN;
    [SDN Wiki - Standard Reference for ABAP Program to Upload WBS ELEMENTS IN Hierarchy|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abap%2bprogram%2bto%2bupload%2bwbs%2belements%2bin%2bhierarchy ]
    Hope that's usefull.
    Good Luck & Regards.

  • Date Issue while creating Activity using BAPI_ACTIVITYCRM_CREATEMULTI

    Hi,
    I'm creating an activity using BAPI BAPI_ACTIVITYCRM_CREATEMULTI and this is working fine. The only thing which is not reflecting in the activity is the date which I'm passing to this BAPI. The system  always puts the default date, which is system date.
    Below are the parameters I'm passing in DATE and DATEX parameters of BAPI_ACTIVITYCRM_CREATEMULTI. Let me know if I'm doing something wrong.
    Can someone help me? Any help in resolving this would be appreciated and rewarded with points. Thanks!
        lt_date-ref_handle = lt_header-handle. "handle for activity
        lt_date-ref_kind   = 'A'. "Adm header
        lt_date-appt_type  = 'ORDERACTUAL'. "Order actual date type
        lt_date-date_from  = '20060120'. "e.g.
        lt_date-time_from  = '1200000'. "e.g.
        lt_date-date_to    = '20060120'."e.g.
        lt_date-time_to    = '1200000'. "e.g.
        lt_date-show_local = 'X'.
        lt_date-mode       = 'A'."Create
        lt_datex-ref_handle = 'X'.
        lt_datex-ref_kind   = 'X'.
        lt_datex-appt_type  = 'X'.
        lt_datex-date_from  = 'X'.
        lt_datex-time_from  = 'X'.
        lt_datex-date_to    = 'X'.
        lt_datex-time_to    = 'X'.
        lt_datex-show_local = 'X'.
        lt_datex-mode      = 'X'.
        append: lt_date, lt_datex.
    Regards,
    Sandeep

    Hi,
    Here is a sample code for you.
    *& Report  YAM_TEST_CONT_END_DATE                                      *
    REPORT  yam_test_cont_end_date                  .
    DATA: lit_header_guid TYPE crmt_object_guid_tab,
          lit_appointment TYPE crmt_appointment_comt,
          lit_status_comt TYPE crmt_status_comt,
          wa_status_comt  LIKE LINE OF lit_status_comt.
    DATA : lit_ret          TYPE TABLE OF bapiret2,
           lit_obj_to_save  TYPE TABLE OF bapibus20001_guid_dis,
           lit_saved_obj    TYPE TABLE OF bapibus20001_object_id.
    DATA: lv_header_guid   TYPE crmt_object_guid,
          lv_item_guid     TYPE crmt_object_guid,
          lv_timestamp(15) TYPE c.
    DATA: lit_fname TYPE crmt_input_field_names_tab,
          wa_fname  TYPE crmt_input_field_names.
    DATA: lit_input TYPE crmt_input_field_tab,
          wa_input  TYPE crmt_input_field.
    DATA: wa_appointment      TYPE  crmt_appointment_com,
          wa_logical_date_key TYPE  crmt_date_logical_date_key.
    CONSTANTS: lc_end       TYPE crmt_apptype     VALUE 'CONTEND',
               lc_appt      TYPE crmt_fieldname   VALUE 'APPT_TYPE',
               lc_from      TYPE crmt_fieldname   VALUE 'TIMESTAMP_FROM',
               lc_to        TYPE crmt_fieldname   VALUE 'TIMESTAMP_TO',
               lc_obj       TYPE crmt_object_name VALUE 'APPOINTMENT',
               lc_tzone_from(13) TYPE c           VALUE 'TIMEZONE_FROM',
               lc_tzone_to(11)   TYPE c           VALUE 'TIMEZONE_TO'.
    PARAMETER: p_objid TYPE crmt_object_id.
    START-OF-SELECTION.
    * Get the HEADER GUID for the Contract Number
      SELECT SINGLE guid
        INTO lv_header_guid
        FROM crmd_orderadm_h
       WHERE object_id EQ p_objid.
      CHECK sy-subrc EQ 0.
    * Get the Item GUID for the HEADER GUID
      SELECT SINGLE guid
        INTO lv_item_guid
        FROM crmd_orderadm_i
       WHERE header EQ lv_header_guid.
      CHECK sy-subrc EQ 0.
      APPEND lv_header_guid TO lit_header_guid.
      APPEND lv_header_guid TO lit_obj_to_save.
    * Convert System date and time to timestamp
      CONCATENATE sy-datum sy-uzeit INTO lv_timestamp.
    * Setting Contract End Date
      MOVE: lv_item_guid          TO wa_appointment-ref_guid,
            'B'                   TO wa_appointment-ref_kind,
            'CONTEND'             TO wa_appointment-appt_type,
            lv_timestamp          TO wa_appointment-timestamp_from,
            lv_timestamp          TO wa_appointment-timestamp_to,
            sy-zonlo              TO wa_appointment-timezone_to,
            sy-zonlo              TO wa_appointment-timezone_from.
    * Filling the Input Fields for Appointment
      wa_fname-fieldname = lc_appt.
      INSERT wa_fname INTO TABLE lit_fname.
      CLEAR: wa_fname.
      wa_fname-fieldname = lc_from.
      INSERT wa_fname INTO TABLE lit_fname.
      CLEAR: wa_fname.
      wa_fname-fieldname = lc_to.
      INSERT wa_fname INTO TABLE lit_fname.
      CLEAR: wa_fname.
      wa_fname-fieldname = lc_tzone_from.
      INSERT wa_fname INTO TABLE lit_fname.
      CLEAR: wa_fname.
      wa_fname-fieldname = lc_tzone_to.
      INSERT wa_fname INTO TABLE lit_fname.
      CLEAR: wa_fname.
      wa_logical_date_key-appt_type = lc_end.
      MOVE: lv_item_guid          TO wa_input-ref_guid,
            'B'                   TO wa_input-ref_kind,
            lc_obj                TO wa_input-objectname,
            wa_logical_date_key   TO wa_input-logical_key,
            lit_fname             TO wa_input-field_names.
      APPEND wa_input TO lit_input.
      CLEAR: wa_input, wa_logical_date_key.
      APPEND wa_appointment TO lit_appointment.
      CALL FUNCTION 'CRM_ORDER_MAINTAIN'
        EXPORTING
          it_appointment    = lit_appointment
          it_status         = lit_status_comt
        CHANGING
          ct_input_fields   = lit_input
        EXCEPTIONS
          error_occurred    = 1
          document_locked   = 2
          no_change_allowed = 3
          no_authority      = 4
          OTHERS            = 5.
      CHECK sy-subrc EQ 0.
    * Saving the items alone
      CALL FUNCTION 'BAPI_BUSPROCESSND_SAVE'
        TABLES
          objects_to_save = lit_obj_to_save
          saved_objects   = lit_saved_obj
          return          = lit_ret.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.
    <b>Reward points if it helps.</b>
    Regards,
    Amit Mishra

  • Error in Creating Level2 WBS using BAPI_PROJECT_MAINTAIN

    Hi All,
    I am trying to Create a WBS-element at Level 2 of an already existing WBS-element using BAPI_PROJECT_MAINTAIN.
    I suppose the 'hierarchy table' has to be populated for positioning a WBS in the structure. But I am getting the error 'The transfered hierarchy is inconsistent. Too many errors.'.
    I desire to have the following WBS structure in place :
    Project Definition :   PROJ_DEF
    WBS for level 1   :   WBS1
    WBS for level 2   :   WBS2 (This has to be at a sub-node of WBS1,and NOT at the same level as  WBS1)
    Can some one give me solution to this error, and suggest a way to create the WBS in this pattern.
    Regards,
    Somil
    I have written the following code to populate the hierarchy table :
      l_hierarchy-wbs_element         = 'WBS1'.
      l_hierarchy-project_definition   = 'PROJ_DEF'.
      l_hierarchy-up                        = ' '.
      l_hierarchy-down                    = 'WBS2'.
      l_hierarchy-right                     = ' '.
      l_hierarchy-left                       = ' '.
      APPEND l_hierarchy TO t_hierarchy_table.
      l_hierarchy-wbs_element         = 'WBS2'.
      l_hierarchy-project_definition    = 'PROJ_DEF'.
      l_hierarchy-up                         = 'WBS1'.
      l_hierarchy-right                      = ' '.
      l_hierarchy-left                        = ' '.
      l_hierarchy-down                    = ''.
      APPEND l_hierarchy TO t_hierarchy_table.

    For create the network and the activity I use this:
    ***  NETWORK ACTIVITY
       wa_network-network = '000000000001'.
    *  wa_network-network_type = 'PS02'.
       wa_network-short_text = 'Network'.
       wa_network-wbs_element = ld_wbs.
       wa_network-project_definition = ld_projdef.
       APPEND wa_network TO it_network.
       wa_projmethod-objecttype = 'Network'.
       wa_projmethod-method = 'Create'.
       wa_projmethod-objectkey = ld_wbs.
       wa_projmethod-refnumber = '000001'.
       APPEND wa_projmethod TO it_projmethod.
       CLEAR wa_projmethod.
       d_refnumber = '000001'.
       wa_activity-network = wa_network-network.
       wa_activity-project_definition = ld_projdef.
       wa_activity-wbs_element = ld_wbs.
       wa_activity-activity = '0010'.
       wa_activity-control_key = 'PS02'.
       wa_activity-description = 'Activity 1'.
       wa_activity-plant = '1000'.
       wa_activity-cost_elem = '0000705003'.
       wa_activity-purch_org = '1000'.
       wa_activity-pur_group = '100'.
       wa_activity-matl_group = '90'.
       wa_activity-constraint_type_start = '5'.
       wa_activity-constraint_type_finish = '5'.
       APPEND wa_activity TO it_activity.
       CLEAR wa_activity.
       wa_projmethod-objecttype = 'NetworkActivity'.
       wa_projmethod-method = 'Create'.
       wa_projmethod-objectkey = ld_wbs.
       wa_projmethod-refnumber = d_refnumber.
       APPEND wa_projmethod TO it_projmethod.
       d_refnumber = d_refnumber + 1.
       CLEAR wa_projmethod.

  • How to use BAPI_PROJECT_MAINTAIN to create network activities under WBS elements ?

    Hello ABAPers,
    I have been using BAPI_PROJECT_MAINTAIN to create Project and WBS elements and I have done them without any errors.
    Now I need help on how to create network activities.
    Can anyone share on how to pass data to I_NETWORK table and I_ACTIVITY table and a brief description on what they are ?
    Thanks in advance,
    Kiran

    Hi Kiran,
    Do the following steps
    1.pass the following to i_method_project
    method_project-refnumber = lv_refnum.
    method_project-objecttype = 'NETWORK-ACTIVITY'.
    method_project-method = 'UPDATE'.
    concatenate aufnr(network nr) vornr(activity) into method_project-objectkey.
    2.Into i_activity
    activity-network = aufnr.
    activity-activity = vornr.
    3.i_activity_update
    activity_update-network = 'X'.
    activity_update-activity = 'X'.
    It should work.If not let me know.
    Rgds,
    K.S.

  • Can we create External & Service Activities using BAPI_PROJECT_MAINTAIN?

    <Subject changed>
    Hi All,
    Using Function module bapi_project_maintain, is that possible to create External activity & Service Activity in project system module?
    If Yes, Pls. provide me the way to do it.
    Regards
    Suresh
    Moderator Message: Please use a more meaningful subject in future.
    Edited by: Suhas Saha on Jan 6, 2012 11:57 AM

    Hi,
    Refer the bellow thread which may help you in using  BAPI_PROJECT_MAINTAIN.
    Facing Problem in BAPI_PROJECT_MAINTAIN
    Thanks & Regards,
    Goutam Kolluru.
    Edited by: goutam kolluru on Jan 6, 2012 5:35 AM
    Edited by: goutam kolluru on Jan 6, 2012 5:36 AM
    Edited by: goutam kolluru on Jan 6, 2012 5:40 AM
    Edited by: goutam kolluru on Jan 6, 2012 5:41 AM

  • Creating Proj Defn using BAPI_PROJECT_MAINTAIN

    Hi all,
    I ahve created Proj defn and an WBS element using BAPI_PROJECT_MAINTAIN...
    Now i want ot know the procedure to create network header and an activity...
    I have created an Network header also....
    and i got error while creating an activity
    the error reads as
    "Relationship type could not converted to the internal format..."
    Hw to overcome this error...
    thanx in advance

    Check this note
    Note 501332 - No type of relationship for BOR 'Network'
    if this note does not resolve your problem , then you may need to use conversion exit for Relationship Type.

  • Error while creating activity by using BAPI

    Hi,
    While creating activity by using BAPI Im getting error as follows,
    Start processing of refference object handle generated.
    Integrity rule a d0008 broken
    business partner with function from vbkakom not vbpakom
    Integrity rule a d0008 broken
    edit all incomplete field .
    Please help me for solving this issue.
    Regards,
    Suresh

    Not received any proper reply Closing the issue.

  • How to create Incoming Email Activity using BAPI or Function module

    To create an Incoming Email Activity using BAPI 'BAPI_ACTIVITYCRM_CREATEMULTI' or using 'CRM_ORDER_MAINTAIN' . what parameters i need to pass to a bapi.
    Suggest me with a solution.
    Regards,
    Sanjani

    For activity you must fill the following structures of 'CRM_ORDER_MAINTAIN'...
      CALL FUNCTION 'CRM_ORDER_MAINTAIN'
        EXPORTING
          it_activity_h             = t_activity_h
          iv_collect_exceptions = ''
        CHANGING
          ct_orderadm_h         = t_orderadm_h
          ct_input_fields       = t_input_fields
        EXCEPTIONS
          error_occurred        = 1
          document_locked       = 2
          no_change_allowed     = 3
          no_authority          = 4
          OTHERS                = 5.
    And at the end you must use also 'CRM_ORDER_SAVE' to performe the save.
    Regards.

  • Err in creating Activit under tab Ext. Process using BAPI_NETWORK_MAINTAIN

    Hi Gurus,
    I need to create activity under tab Ext. Processing for a network and i am planning to use BAPI "BAPI_NETWORK_MAINTAIN" for this purpose. I am able to create activity under "Int. Processing" using this BAPI but got error for "Ext. Processing" tab.
    Below is the code i am doing for ext. processing tab.
    ****to move 3rd activity number for external processing
    itemsg-internal_object_id = '000004000873'.
    activity = '0030'.
    CONCATENATE itemsg-internal_object_id activity INTO v_str.
          MOVE  itemsg-internal_object_id+0(12) TO itactivity-network.
        MOVE '0030' TO itactivity-activity.
        MOVE 'Activity2' TO itactivity-description.
        MOVE 'PS02' TO itactivity-control_key.
        MOVE '5001-KOS-0061' TO itactivity-project_definition.
        MOVE '5001-KOS-0061-BA' TO itactivity-wbs_element.
       MOVE 'AA' TO itactivity-factory_calendar.
       move '2000' to itactivity-DURATION_NORMAL.
       MOVE 'DAY' to itactivity-DURATION_NORMAL_UNIT.
       MOVE '2000' to itactivity-WORK_ACTIVITY.
       MOVE 'Z0004' to itactivity-MILESTONE.
       MOVE 'M3'    to itactivity-UN_WORK.
        MOVE '099' to itactivity-MATL_GROUP.
        MOVE 'PGL' to itactivity-PUR_GROUP.
        APPEND itactivity.
        MOVE '000003' TO itnetmethod-refnumber.
        MOVE 'NETWORKACTIVITY' TO itnetmethod-objecttype.
        MOVE 'CREATE' TO itnetmethod-method.
        MOVE  v_str TO itnetmethod-objectkey.
        APPEND itnetmethod.
        CLEAR  itnetmethod.
    Below is the error message i got when i load this code.
    Enter a time unit, since you have entered either work or actual work
    Termination: Too many errors (more than 10% of methods)
    The order or network could not be saved
    Please help me to resolve this issue.
    Thanks in advance
    Ajay

    Hi,
    1)
    I would suggest declaring a structure of type BAPE_VBAP & BAPE_VBEP...Then move the values instead of using offset..
    Example
    DATA: S_BAPE_VBAP TYPE BAPE_VBAP.
    Populate the Extension structure WITH Order commited flag
    LW_EXT_STRUCTURE-STRUCTURE = C_BAPE_VBAP.
    S_BAPE_VBAP-VBELN = W_VBAP-VBELN.
    S_BAPE_VBAP-POSNR = W_VBAP-POSNR.
    S_BAPE_VBAP-ZZORDCOFL = W_VBAP-ZZ_ORDCOFL.
    LW_EXT_STRUCTURE-VALUEPART1 = S_BAPE_VBAP.
    This will make sure the BAPE_VBAP is extended with the Z fields..
    2)
    You are checking only for abort messages...You are not checking for error messages..
    Instead of this..
    READ TO CHECK THE ERROR AND ABORT MESSAGES DURING BAPI CALL
    READ TABLE LT_RETURN_TAB INTO LW_RETURN_TAB
    WITH KEY TYPE = C_MSGTYP_A
    BINARY SEARCH.
    Have this code..
    LOOP AT LT_RETURN_TAB WHERE TYPE = 'E' OR TYPE = 'A'.
      EXIT.
    ENDLOOP.
    IF SY-SUBRC = 0.
      WRITE: / 'ERROR'.
    ELSE.
      WRITE: / 'SUCCESS'.
    ENDIF.
    This will make sure there are no error messages..Also check the return table for error messages in the debugging mode..
    Thanks,
    Naren

  • How to create an activity using business partner of document flow

    hi guys,
    Can anybody help me how to create an activity by using the business partner of document flow.
    i am using the function module BAPI_ACTIVITYCRM_CREATEMULTI but it was giving some sort of error in level based.
    so if anybody used above type of scenario can help me out. if you have an sample code please post it which is very much usefull..
    thnaks
    viswam

    Hi Viswa,
    I used this function module to create activity with the doc flow in my case successfully.
    CALL FUNCTION 'CRMXIF_ORDER_SAVE'
        EXPORTING
          data   = lt_contract
        IMPORTING
          return = lt_return.
    Regards
    Andy

  • How to create a sales activity using BAPI_BPCONTACT_CREATEFROMDATA 170183

    Hello everyone ,
    Please help me to create a sales activity using this BAPI's  :
    BAPI_BPCONTACT_CREATEFROMDATA
    BAPI_BPCONTACT_SAVEFROMMEMORY
    BAPI_TRANSACTION_COMMIT
    Ref. OSS 170183
    advance thank for all
    Halley

    Here is an example.  Values and partners depend on your config of course.  I'm assuming you can define the local variables - the code is too long for me to post it.
    * BAPI field initialization
      LS_GENERALDATA-ACTIVITY_TYPE    = 'Your value'.
      LS_GENERALDATA-SALESORG         = 'Your value'.
      LS_GENERALDATA-DISTR_CHAN       = 'Your value'.
      LS_GENERALDATA-DIVISION         = 'Your value'.
      LS_GENERALDATA-FROM_DATE        =  SY-DATUM.
      LS_GENERALDATA-TO_DATE          =  SY-DATUM.
      LS_GENERALDATA-FROM_TIME        =  SY-UZEIT.
      LS_GENERALDATA-TO_TIME          =  SY-UZEIT.
      LS_GENERALDATA-REASON           = 'Your value'.
      LS_GENERALDATA-RESULT           = 'Your value'.
      LS_GENERALDATA-STATE            = '0'.
      LS_GENERALDATA-ACTIVITY_COMMENT = 'Your value'.
      LS_GENERALDATA-PARTN_ROLE       = 'AG'.
      LS_GENERALDATA-PARTN_ID         = 'Sold-to account number'.
      APPEND LS_GENERALDATA TO LT_GENERALDATA.
      LS_BUSINESSPARTNER-ITM_NUMBER   = '000000'.
      LS_BUSINESSPARTNER-PARTN_ROLE   = 'AG'.
      LS_BUSINESSPARTNER-PARTN_ID     =  'Sold-to Account'.
      APPEND LS_BUSINESSPARTNER TO LT_BUSINESSPARTNER.
    * MRL notes
      LS_NOTES-TDFORMAT = '*'.
      LS_NOTES-TDLINE = 'Your long comments text here'.
      LS_TEXT-TEXT_ID   = '0001'.
      LS_TEXT-FUNCTION  = '009'.
      LS_TEXT-LANGU     =  SY-LANGU.
      LS_TEXT-TEXT_LINE =  LS_NOTES.
      APPEND LS_TEXT TO LT_TEXT.
      CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
        IMPORTING
          OWN_LOGICAL_SYSTEM             = LV_SYS
        EXCEPTIONS
          OWN_LOGICAL_SYSTEM_NOT_DEFINED = 1
          OTHERS                         = 2.
    * Call BAPI
      CALL FUNCTION 'BAPI_BPCONTACT_CREATEFROMDATA'
        EXPORTING
          SENDER          = LV_SYS
        TABLES
          GENERALDATA     = LT_GENERALDATA
          BUSINESSPARTNER = LT_BUSINESSPARTNER
          TEXT            = LT_TEXT
          RETURN          = LT_RETURN.
    * Check for error
      LOOP AT LT_RETURN INTO LS_RETURN WHERE TYPE CA 'AEX'.
        EXIT.
      ENDLOOP.
      IF SY-SUBRC NE 0.
        REFRESH LT_RETURN.
        CALL FUNCTION 'BAPI_BPCONTACT_SAVEFROMMEMORY'
          TABLES
            SALESACTIVITYIDOUT = LT_SALESACTIVITYIDOUT
            RETURN             = LT_RETURN.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
      ENDIF.

  • I am trying to create worklist using RMCA dunning.Activity assigned is wl01

    Hi,
    I am trying to create worklist using RMCA dunning.Activity assigned is wl01.
    Getting an error during dunning activity run is 'Error determining responsible persons' Please help.
    Jayant

    Jayant:
    I will assume that the settings for that activity use 'Determine responsible agent', and in that case you need to maintain the rules and responsibilties for the workitems so that they can be routed correctly.  You will need to create organization structure as well.
    regards,
    bill.

  • Creating Activity object for a Service Request object...

    <b>[This thread was migrated from the On Demand Developer Forum in the old Siebel Community] </b>
    drangineni
    New Contributor
    Ho do we use Activity object of a Service Request object. I am trying to
    create an Activity object for a existing Service Request object.
    I am looking for some sample code.
    I greatly appreciate your help.
    Product: CRM OnDemand
    11-26-2006 12:40 PM
    Re: Creating Activity object for a Service Request object...
    BigSlick
    Valued Contributor
    drangineni, What programming language are you using?
    BS
    12-04-2006 10:56 AM
    Re: Creating Activity object for a Service Request object...
    drangineni
    New Contributor
    Hi, I am using C# .
    12-04-2006 07:40 PM
    Re: Creating Activity object for a Service Request object...
    BigSlick
    Valued Contributor
    drangineni, assuming you know the service requestid or externalId of the
    Sr you are dealin gwith you would first set that value.
    ServiceRequest1[] objSRList =new ServiceRequest1[1];
    objSRList[0] = new ServiceRequest1();
    objSRList[0].ServiceRequestId = <YourSRId>;
    Then you create an array of activities and initialize the first one:
    objSRList[0].ListOfActivity = new Activity[1];
    objSRList[0].ListOfActivity[0] = new Activity();
    Now set the data fields
    objSRList[0].ListOfActivity[0].Subject ="My Subject";
    objSRList[0].ListOfActivity[0].Description ="My Description";
    objSRList[0].ListOfActivity[0].Display = "Task"; //valid values are either
    "Task" or "Appointment"
    Then call the ServiceREquestInsertOrUpdate method on the ServiceRequest
    WebService and pass in the above variable.
    BS
    12-06-2006 12:36 PM
    Re: Creating Activity object for a Service Request object...
    drangineni
    New Contributor
    Thank you BigSlick.
    The following error is thrown when I use the
    ServiceRequestInsertOrUpdate(objInput)
    "No user key can be used for the Integration Component instance 'Service <br/>
    Request_Action'.(SBL-EAI-04397)"
    When I use the prxySrvcRequest.ServiceRequestInsert(objInput), no error is
    thrown and the Activity gets added, but a new Service Request object is
    created, but the Activity gets added to an existing Service Request
    object. I greatly appreciate your help.
    The following is the code:
    int ActivityLength = 0;
    WSOD_ServiceRequest.ServiceRequest1[] ServiceRequest = new
    WSOD_ServiceRequest.ServiceRequest1[1];
    ServiceRequest[0] = new WSOD_ServiceRequest.ServiceRequest1();
    ServiceRequest[0].ServiceRequestId = this.Request.QueryString["id"];
    ServiceRequest[0].ListOfActivity = new
    WebSelfService.WSOD_ServiceRequest.Activity[ActivityLength + 1];
    ServiceRequest[0].ListOfActivity[0] = new WSOD_ServiceRequest.Activity();
    ServiceRequest[0].ListOfActivity[ActivityLength].Description =
    this.txtDescription.Text;
    ServiceRequest[0].ListOfActivity[ActivityLength].Display = "Task";
    ServiceRequest[0].ListOfActivity[ActivityLength].Subject = "My Subject";
    WSOD_ServiceRequest.ServiceRequest prxySrvcRequest = new
    WebSelfService.WSOD_ServiceRequest.ServiceRequest();
    WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Input
    objInput = new
    WebSelfService.WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Input();
    WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Output
    objOutput = new
    WebSelfService.WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Output();
    objInput.ListOfServiceRequest = ServiceRequest;
    Session objSession;
    objSession = (Session) Application["Session"];
    prxySrvcRequest.Url = objSession.GetURL();
    try
    objOutput = prxySrvcRequest.ServiceRequestInsertOrUpdate(objInput);
    catch(Exception e)
    12-09-2006 09:53 AM
    Re: Creating Activity object for a Service Request object...
    drangineni
    New Contributor
    Thank you BigSlick.
    The following error is thrown when I use the
    ServiceRequestInsertOrUpdate(objInput)
    "No user key can be used for the Integration Component instance 'Service <br/>
    Request_Action'.(SBL-EAI-04397)"
    When I use the prxySrvcRequest.ServiceRequestInsert(objInput), no error is
    thrown and the Activity gets added, but a new Service Request object is
    created, but the Activity gets added to an existing Service Request
    object. I greatly appreciate your help.
    The following is the code:
    int ActivityLength = 0;
    WSOD_ServiceRequest.ServiceRequest1[] ServiceRequest = new
    WSOD_ServiceRequest.ServiceRequest1[1];
    ServiceRequest[0] = new WSOD_ServiceRequest.ServiceRequest1();
    ServiceRequest[0].ServiceRequestId = this.Request.QueryString["id"];
    ServiceRequest[0].ListOfActivity = new
    WebSelfService.WSOD_ServiceRequest.Activity[ActivityLength + 1];
    ServiceRequest[0].ListOfActivity[0] = new WSOD_ServiceRequest.Activity();
    ServiceRequest[0].ListOfActivity[ActivityLength].Description =
    this.txtDescription.Text;
    ServiceRequest[0].ListOfActivity[ActivityLength].Display = "Task";
    ServiceRequest[0].ListOfActivity[ActivityLength].Subject = "My Subject";
    WSOD_ServiceRequest.ServiceRequest prxySrvcRequest = new
    WebSelfService.WSOD_ServiceRequest.ServiceRequest();
    WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Input
    objInput = new
    WebSelfService.WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Input();
    WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Output
    objOutput = new
    WebSelfService.WSOD_ServiceRequest.ServiceRequestWS_ServiceRequestInsertOrUpdate_Output();
    objInput.ListOfServiceRequest = ServiceRequest;
    Session objSession;
    objSession = (Session) Application["Session"];
    prxySrvcRequest.Url = objSession.GetURL();
    try
    objOutput = prxySrvcRequest.ServiceRequestInsertOrUpdate(objInput);
    catch(Exception e)
    12-10-2006 08:49 AM
    Re: Creating Activity object for a Service Request object...
    BigSlick
    Valued Contributor
    Ah yes, I forgot you also need to specify a unquie Id for the activity.
    It's kinda strange.
    Try adding this:
    ServiceRequest[0].ListOfActivity[ActivityLength].ActivityId = "DummyId";
    //OD will overwrite this with a real Id
    Or if you have a unquie ID for your Activities you can use:
    ServiceRequest[0].ListOfActivity[ActivityLength].ExternalSystemId = <Your
    Unique Value>;
    Hope that helps,
    BS
    12-11-2006 10:52 AM
    Re: Creating Activity object for a Service Request object...
    surgientweb
    New Contributor
    Hi all,
    I have a similar problem, but mine is returning a message that field
    "Display" is required. Looking at this post and the documentation it is
    obvious that Display is a required field, but my WSDL did not include a
    field called "Display", so my proxy did not generate one.
    I tried adding a field called Display to the WSDL and the proxy class, but
    I get a different error... I figure I maybe cannot add it manually like
    that - but I think the bigger problem is it is not part of the WSDL that
    Siebel OD generates for me in my admin account.
    On top of that Display is not shown in the list of fields for Activity
    through the admin interface.. is it possible my account is bugged? Am I
    missing something simple here? BigSlick, I see you mention a .Display in
    your code sample so I thought you might understand what is wrong. Here is
    my code (I am trying to add a activity to a lead).
    Thanks for any insight into this!
    private void InsertLeadActivity(Session session, NameValueCollection data,
    string leadID)
    try
    if (blnDebug)
    Response.Write("Setting up Activity<br>";
    // instantiate the proxy service
    Activity_Service.Activity activityProxy = new Activity_Service.Activity();
    // set up the target URL
    activityProxy.Url = session.GetURL();
    activityProxy.CookieContainer = session.GetCookieContainer();
    // set up input argument
    ActivityNWS_Activity_Insert_Input input = new
    ActivityNWS_Activity_Insert_Input();
    input.ListOfActivity = new Activity1[1];
    input.ListOfActivity[0] = new Activity1();
    if (blnDebug)
    Response.Write("Getting Data<br>";
    // dg note: name value
    // input.ListOfActivity[0].MrMrs = data["MrMrs"];
    input.ListOfActivity[0].LeadId = leadID.ToString();
    input.ListOfActivity[0].Description = DataToString(data);
    input.ListOfActivity[0].Subject = "Website Submission Activity";
    input.ListOfActivity[0].Priority = "3-Low";
    //input.ListOfActivity[0].DueDate =
    DateTime.Now.AddDays(7).ToShortDateString();
    input.ListOfActivity[0].Owner = this.defaultLeadOwner;
    input.ListOfActivity[0].Type = "Call";
    //input.ListOfActivity[0].Display = "Task";
    input.ListOfActivity[0].ActivityId = "DummyId";
    input.ListOfActivity[0].ExternalSystemId = "web";
    activityProxy.Activity_Insert(input);
    catch (Exception exInsertActivity1)
    if (blnDebug)
    Response.Write("<br>Error inserting activity.<br><br>" +
    exInsertActivity1.ToString() + "<br>";
    01-06-2007 05:05 PM
    Re: Creating Activity object for a Service Request object...
    surgientweb
    New Contributor
    Figured it out.. the field "Display" is also known as "Activity"........
    Here are some notes for other people.. good luck and feel free to write me
    at raskawa-at-gmail-com if you want a code sample.
    Some unpublished nice to knows for Siebel On Demand Activities....
    In summary:
    - .Activity is also known as Display in documentation and on the error
    messages coming back from the WS. Also, it appears based on these boards
    some people actually have a .Display field. Maybe different accounts
    generate different WSDL's.... buggy.
    - If a error message is thrown saying "Description is required" it really
    means "Subject is required" (make sure .Subject has a value)
    - If a error message is thrown complaining that ActionType is not right..
    that is really .Type.. make sure it's lookup value is valid for the
    dropdown values in your CRM OD system.
    My code/values that worked..
    input.ListOfActivity[0].LeadId = leadID.ToString();
    input.ListOfActivity[0].Description = DataToString(data);
    input.ListOfActivity[0].Subject = "Website Submission Activity";
    input.ListOfActivity[0].Priority = "3-Low";
    //input.ListOfActivity[0].DueDate =
    DateTime.Now.AddDays(7).ToShortDateString();
    input.ListOfActivity[0].Owner = this.defaultLeadOwner;
    input.ListOfActivity[0].Type = "Call";
    input.ListOfActivity[0].ActivityId = "DummyId";
    input.ListOfActivity[0].ExternalSystemId = "web";
    //input.ListOfActivity[0].Display = "Task"; //doesn't work
    input.ListOfActivity[0].Activity = "Task"; //does work.
    01-06-2007 05:17 PM
    Re: Creating Activity object for a Service Request object...
    raskawa
    First Time Contributor
    Hi,
    This is surgientweb (under my own login now..)
    Anyway, I wanted to add that I figured out that there are two ways to add
    a Activity to a Lead. Via the Lead object (by getting a ListOfActivities)
    OR by creating a Activity directly and just adding your "LeadID" to it (or
    you can also add a "ContactID" to relate the activity to a Contact.)
    Feel free to email me for a code example (raskawa....at....gmail)
    -David
    01-09-2007 02:58 PM

    Hi Stephane,
    You can definitely read the categories using Tables in CRM. The logic is a bit complicated though.
    Use the following steps to retrieve Categories using Std. CRM Tables:
    1. Pass transaction GUID in field GUID of table CRMV_REPORT_SUBJ and get KATALOGART, CODEGRUPPE and CODE field values in lv_catalog, lv_codegrp and lv_code.
    2. Now you need to concatenate these 3 fields values carefully like this:
    CONCATENATE lv_catelog lv_codegrp '    ' lv_code into lv_category1.
    Remember there are 4 spaces between lv_codegrp and lv_code.
    3. Now pass this lv_category1 in field OBJEXT in table CRMC_ERMS_CAT_OK and get OBJGUID in field lv_objguid.
    4. Pass this lv_objguid in field OBJ_GUID and LNK_TYPE = 'IS_CODE' in table CRMC_ERMS_CAT_LN and get value of CAT_GUID in lv_cat_guid.
    5. Pass this lv_cat_guid in field CAT_GUID in table CRMC_ERMS_CAT_CA and get value of CAT_ID in field lv_cat_text.
    Remember this lv_cat_text is the text value of your last level of category of transaction.
    6. To get its upper cateogry level value, simply use table CRMC_ERMS_CAT_HI and get parent guid value and pass this as CAT_GUID again in table CRMC_ERMS_CAT_CA to get its text.
    Alternatively, you can also use class method cl_crm_ml_category_util=>get_parse_all to get all levels of categories.
    Hope this helps.
    Thanks
    Vishal

Maybe you are looking for

  • Can not seem to print from 64 bit mac osx photoshop cs4 in landscape

    we have like 5 mac computers in the building and about 20 pcs. all the pcs and all the 32 bit macs work fine. the 2 64 bit macs will not print in landscape only from photoshop cs4 i can print from indesign in landscape and illustrator in landscape. s

  • Can I locate the position of my device, last time it was connected to internet?

    My Ipad 2 was stolen and it's been connected to internet just once, I was not on at that moment and I couldnt track the position, I did online swipe and online lock, any tip? thank you in advanced. guerra0350

  • Need help troubleshooting problem with shadow images

    Has anyone encountered this problem and found a way to resolve it - I'm working in Captivate 2. I've created a training project that includes screens (slides) where popup windows appear. These popups mysteriously appear as faint images in a subsequen

  • Can somebody please help me, it's a bit urgent

    hello so far I've finally managed to print my JTable in landscape but I still have a problem I can't seem to print the header of the table i've tried to put the table and the header in a JPanel and then print the JPanel, but if I do this, I get an em

  • HT201272 Problem with book downloads

    I have downloaded two books to my mac and although the book covers appear in my apps (and on my iPad when I sync) I can't actually open them to read - what am I doing wrong?