Update activity..

hi experts,
i need to develop the rfc where i am taking activity ID, and 2 custom fields : SKU ID and SAP Vendor ID.
SKU ID is present in  activity and sap vendor id is present in opportunity.
ill get the opportunity id through activity id using 'CRM_ORDER_READ'.
my issue is i need to update both the custom fields SKU_ID and sap_vendor_id.
please help me with the bapi or a class that would update these custom fields.
thanks,
regards,
akshay ruia.

hii,
thanks for the reply.
i tried to update the field using 'CRMD_ORDER_SAVE'. But i am not able to see any changes in the activity order.
code is as follows :
  IV_INITIALIZE_WHOLE_BUFFER       =
  IV_INIT_FRAME_LOG                =
  IV_LOG_HANDLE                    =
  IV_KEEP_LOCK                     = FALSE
IMPORTING
  ET_INITIALIZED_OBJECTS           =
EXCEPTIONS
  ERROR_OCCURRED                   = 1
  OTHERS                           = 2
    it_opport_h                   = it_opp_h
IMPORTING
  ET_EXCEPTION                  =
***********maintain activity
  wa_act_h-ref_handle = '0000000000'.
  wa_act_h-ref_guid = guid.
  INSERT wa_act_h INTO TABLE it_act_h.
  cw_order_h-handle = '0000000000'.
  cw_order_h-guid = guid.
  cw_order_h-zzfld00001k = sku.
  INSERT cw_order_h INTO TABLE ct_order_h.
  cw_input-ref_handle = '0000000000'.
  cw_input-ref_guid = guid.
  cw_input-ref_kind = 'A'.
  cw_input-objectname = 'ACTIVITY'.
  wa_fieldname-fieldname = 'ZZFLD00001K'.
  INSERT wa_fieldname INTO TABLE it_fieldname.
  cw_input-field_names = it_fieldname.
  INSERT cw_input INTO TABLE ct_input.
*cw_input-LOGICAL_KEY =
CALL FUNCTION 'CRM_ORDER_INITIALIZE'
EXPORTING
   IT_GUIDS_TO_INIT                 = it_header_guid
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
  CALL FUNCTION 'CRM_ORDER_MAINTAIN'
   EXPORTING
     it_activity_h                 = it_act_h
   CHANGING
     ct_orderadm_h                 = ct_order_h
     ct_input_fields               = ct_input
   EXCEPTIONS
     error_occurred                = 1
     document_locked               = 2
     no_change_allowed             = 3
     no_authority                  = 4
     OTHERS                        = 5
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
  wa_save-GUID = guid.
  APPEND wa_save TO it_save.
CALL FUNCTION 'CRM_ORDER_SAVE'
  EXPORTING
    it_objects_to_save         = it_save
EXCEPTIONS
   DOCUMENT_NOT_SAVED         = 1
   OTHERS                     = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

Similar Messages

  • How to update Activity of Customer/Contact

    Hi All..
    I am Abap Consultant and i need develop a report to Update Activity for customer/contact using bapi FM.
    can you please tell me what is Activity of customer ? is it similar like Partner Functions?? where we menstioned this PF for a perticular Customer? any t code to change this partner function for a customer? is it my changes are update the table KNVP (customer Partner function table)?....
    any bapi function module is there to change/update the activity of customer?
    thank you in advance,
    Madhu.

    bapi function module is there to change/update the activity of customer?
    Edited by: madhubabu rao on Jan 29, 2009 12:13 PM

  • HT2357 I accidently deleted all of my updates and they're not coming back. Is there any quick way to get these updates active again?

    I accidentally deleted all of my updates and they're not coming back. I haven't been able to make any updates since 2006. I have a log of my past updates but I cannot seem to get them active again. Is there any easy way to get these updates active again?
    This was a while ago back in 2006 but from what I can remember I actually deleted/permanently removed these updates from my list of updates. I tried keeping all the updates except for two that I did not need and somehow deleted all of the updates I wanted to keep. I've tried reseting my ignored updates but that does not bring back the updates. If i delete the two that I originally attempted to remove - it only brings those two back. I hope there is still some way to get these updates back. I appreciate any help that anyone is able to give me.
    Thanks!
    Plum<3

    10.4.11 is the latest version of 10.4.
    The security updates for 10.4 are listed here:
    http://support.apple.com/kb/HT5165
    If you are interested in updating to 10.5, see this tip.

  • How to update Activity POC Weight (AFVC-EVGEW)

    Hi
    I need to update Activity POC Weight, Which BAPI or Function Module sould i use?

    The structure of this bapi does not have this field to be modified
    Help-me

  • Updating Activity Type.

    Hi,
    Can you please tell me how to update Activity type present in Cat2 sheet?
    Thank you.

    Hi
    Changing Activity type is not possible in CAT2.
    However you can acheive this by changing in the work center or HR personal master data of that person.
    I suggest you to read and understand the PS in this forum or SAP helo sites to better familarize with terminology and adopting the PS module very quickly.
    Regards,
    PSR

  • Making LDAP calls to update Active directory attributes

    Hi,
    I see a lot of postings about authenticating using LDAP, Ibut I am trying to make LDAP calls to update Active directory attributes
    How can I do this from my BPEL process ? My input xml file will have a list of users whose attributes need to be updated.
    I need to query by making LDAP calls and update as needed.
    I am a novice to a step by step guidance will be very helpful.
    Thanks much!

    This is really an AD question. Basically the easist way is to expose a web service to do this then BPEL calls that web service. I think later versions of AD do this out of the box.
    Otherwise there are many examples on Google using differnt technology.
    cheers
    James

  • Update activity status based on Customer request status,

    Hello,
    I have a requirement to update the status field of a service request activity to Completed when the service request status = closed. Any suggestions?
    Thanks,
    SKJ

    If the field they are updating is in the same object it shouldn't be an issue. If another object needs to be updated then the workflow won't work.
    Integration events can be used for this. generate a event and have a external process poll the integration event queue for new events. when received, it can do whatever is necessary via web services.

  • BAPI_NETWORK_MAINTAIN for UPDATE ACTIVITY-CN 307-You are not authorized to

    Hi all,
    sorry for disturb,
    I have a problem and I don't understand why....
    I use BAPI_NETWORK_MAINTAIN with simple code.
    I have tried with SE37 with the same values and it correctly update the activity. without error messages.
    but with the same values in the program  returns me an error message and it doesn't update the data:
    E CN 307 You are not authorized to change activity or element S11021201 0108
    I have a USER with SAPALL.....
    DATA: i_method_project  LIKE bapi_method_project         OCCURS 0 WITH HEADER LINE.
    DATA: i_activity               LIKE bapi_network_activity       OCCURS 0 WITH HEADER LINE.
    DATA: i_activity_update  LIKE bapi_network_activity_up OCCURS 0 WITH HEADER LINE.
      i_method_project-refnumber                     = 000001.
      i_method_project-objecttype                     = 'NETWORKACTIVITY'.
      i_method_project-method                          = 'UPDATE'.
      i_method_project-objectkey                       = 'S110202010108'.
      APPEND i_method_project. CLEAR: i_method_project.
      i_method_project-method                          = 'SAVE'.
      APPEND i_method_project. CLEAR: i_method_project.
      i_activity-network                                     = 'S11020201'.
      i_activity_update-network                        = 'X'.
      i_activity-activity                                       = '0108'.
      i_activity_update-activity                          = 'X'.
      i_activity-control_key                                = 'PS01'.
      i_activity_update-control_key                   = 'X'.
      i_activity-duration_normal                         = 8,5.
      i_activity_update-duration_normal            = 'X'.
      APPEND i_activity. CLEAR: i_activity.
      CALL FUNCTION 'BAPI_NETWORK_MAINTAIN'
        IMPORTING
          return                                 = return
        TABLES
          i_method_project                = i_method_project
          i_activity                             = i_activity
          i_activity_update                = i_activity_update
          e_message_table               = e_message_table.
    thx in advance all
    Regards
    Marco Echino.
    Edited by: Marco Echino on Jun 22, 2011 5:04 PM

    Hello Marco,
                        To get more details you need to debub the both options as in the logic SAP is calling another report "R_BAPI_NETWORK_MAINTAIN" using submit statement inside the FM "BAPI_NETWORK_MAINTAIN".
    And also befor the submit statement they gad used the EXPORT statement to save the data to the SAP memory.
    Inside the Report  BAPI_NETWORK_MAINTAIN" SAP logic is calling the FM "2002_NETWORK_MAINTAIN" for doing the update.
    So if the Export memory content gets changed due to another execution then the returm value may get changed and end up with conflicts.
    So better you need to debub the both scenarios (SE37 & from program call).
    You can knock out the problem you are facing.
    Hope this answers your question.
    Thanks,
    Greetson

  • Updating activity field in confirmation of po

    Hi team,
    while PO is getting created the data is getting transfered from SC with Activity field. But when we are trying to confirm the PO the Activity field is not getting updated.
    In doc_change BADI piece of code has to be written to update the Activity field. Can you please help me in providing the solution.
    Thanks & Regards,
    Goutam.

    Problem has been resolved. Error occured due to Valuation grouping code was missing for the plant.

  • Updating active records of ODS directly

    Hi
    I have an ODS which is loaded from 3 other ODS using export datasources. In the start routines of the updation   I am direclty updating a few columns of the active table of my ODS because the data package structure doesnt have these fields. Does this process have any adverse effects in BI??
    I now have a requirement in which i have to insert new records into the ODS by comparing the ODS records and the reocrds in a Z table. I was thinking of updating the active table records directly in the start routine, but i am not sure if it is the right way.
    Regards,
    Sujai

    Hi,
    I think you should create a infosource containing the fields you want to update as well as the keyfields of the ods. Assign a dummy datasource to it (e.g. a flat file datasource with a dummy file containing just one record) and do everything you need in the start routine after you deleted the dummy row from the data package.
    regards
    Siggi

  • Material Type value update activation

    There is a requirement to convert a material type from only qty update to Value update . The transactions like procurement and consumption are happening for this material type .
    In case , Value update is also activated for this material type and accounting view is created for these materials , what will be the  implications during the cut over activities .
    The suggestions and information from the members , who have experience in the similar scenario are welcome
    Regards
    Mani

    Hi,
    It is very well possible to have materials with value updation only.
    It is useful when no inventory i.e no stock is to be maintained. Only value is the required.
    For eg: Pipeline material is directly consumed. No inventory is required to be maintained against it.
    Such materials are also called as non-stockable materials.
    These materials will always be procured against an account assigment category in PO. The value is directly posted to Consumption Account picked via Acc *** Category during GR.
    No stock/inventory account will be posted during GR.
    Regards,
    Komal

  • P6 web service update activity date

    Hi guys,
    I am using P6 web service to display the activity start and finish date in a .net web application.
    When I change the finish date on the website, the date in p6 will also be updated. However, the date in p6 is always one work-day earlier than date in my web site.
    For example, I read the date from P6 to web. It is 02-March-2014, same in P6 and my web. Then I change it to 12-Nov-2014, click update. The UpdateActivitiesResponse is true.
    Then I go to P6 and refresh the date, the corresponding date become 11-Nov-2014.
    The problem only happens on those un-actualized finish date. The activity start dates and actualized finish date can be updated perfectly.
    Anybody has some idea about this bug? I don't think it is the web service problem, maybe the setting up of the project.
    Thank you in advance.
    Michelle

    Hi Kean,
    when you are updating an existing line you must use SetCurrentLine so the UI knows which line you want to update. Here is a short sample where i will update the quatity and price of every line in my existing sales order:
        Dim oSO As SAPbobsCOM.Documents
        Dim i As Integer
        Set oSO = ocmp.GetBusinessObject(oOrders)
        If oSO.GetByKey(191) = True Then
            If oSO.Lines.Count > 0 Then
                For i = 0 To oSO.Lines.Count - 1
                oSO.Lines.SetCurrentLine
                oSO.Lines.Quantity = 200
                oSO.Lines.UnitPrice = 10
                Next i
            End If
        End If
        ret = oSO.Update
    Cheers,
    Lisa
    Business One Forums Team

  • ATV3 After Recent Update Activation Failed(Skipped)

    I'm a new user to apple products, I bought ATV3 couple of weeks ago. It was working fine. I used AirParrot to mirror my PC (Win7) and airplay was working fine on my friend's iPhone. After a restart (I guess it was updated to iOS 7), I couldn't mirror my PC nor run music from my iTunes. I can only see my shared libraries from ATV3 GUI.
    I tried to reset, but i got activation failed. I tried all the rest options (Restore All settings, Restore and Restore from iTunes), all led me to the same results, activation failed and no mirroring is available neither from AirParrot nor iPhone.
    Please help.

    Thanks for your response. Still Activation Failed
    - The DNS is already set to Auto. I modified it to manual then automatic again.
    - I tried Ethernet, restarted a few times.
    - I didn't change the location of the Wi-Fi, specially it is located in the same room. Youtube is working perfectly via ATV.
    I can see my iTunes library on ATV, why I can't mirror any device??
    If downgrading will fix the problem, I'm willing to do it.

  • How to update Activity Status in PS

    Dear Sir,
    We have defined various Activities under a WBS Element .  Instead of Updating the Status of the Activity from the CJ20n screen , We want to confirm the Activities using a Z program ( utilizing BAPI etc ... ) . 
    Kindly guide us about the steps need to be followed for the same pl .
    With Thanks and Rgds
    S Agarwal

    you can use BAP to confirm, write LSMW via transaction CN25 or write a Z program via CN25 or CN22 to update status etc

  • IOS6 update/activation

    I restored my iPhone 4S after the iOS6 update failed and it tells me it can't be activated because the activation server is temporarily unavailable. Connected to iTunes it tells me there is an error processing my request. Is there anything else I can do? Plus after it works again how do I keep it from happening again?

    me too cannot get a soloution from any one. have had no phonoe for 2 days now.

Maybe you are looking for

  • Firefox 4 Add-on manager causes application to stop responding

    I just upgraded from the latest updated of version of Firefox v3.0 to 4.0. When I try and use the new Add-on Manager, all of Firefox stops responding. Essentially nothing works. I click on Tools - Add-ons, the tab opens, I download a selected add-on,

  • Help with installing OSX Lion on iMac with broken display

    Hi, Having some trouble installing OSX Lion on my 5 year old iMac which has a broken display. The display has been dead for a couple of years now and I've been using an external monitor without any problems. Today I decided to upgrade to Lion - I dow

  • Confirm quantity for an prod order

    After confirming quantity for an order, can I use the same stock for another order

  • RTMT logs Analysis tool

    Dears, is there any tool to analyse the RTMT logs and IOS logs. it is hard to go line by line for troubleshooting thanks in advance Anas

  • How to check double byte characters

    Hi My requirement: I have to accept the string (may include double byte characters and special characters). Need to check that wether that string contains any special characters(like %,&,..), if so should display error message. My solution: Starting