Changing partners using BAPI_ACTIVITYCRM_CHANGEMULTI

Hello,
I'm using the BAPI "BAPI_ACTIVITYCRM_CHANGEMULTI" to change the partner of an activity. But each time the update (Verbucher) throws a dump.
The problem: I'm using the users, not businesspartners.
Here my code:
    ls_partner-ref_guid           = activity_guid.
    ls_partner-ref_kind           = 'A'.  "header data
    ls_partner-ref_partner_handle = '0000'.
    ls_partner-ref_partner_fct    = '00000022'.
    ls_partner-ref_partner_no     = old_uname.
    ls_partner-ref_no_type        = 'US'.
    ls_partner-ref_display_type   = 'US'.
    ls_partner-kind_of_entry      = 'C'.
    ls_partner-partner_fct  = '00000022'.
    ls_partner-partner_no   = new_uname.
    ls_partner-no_type      = 'US'.
    ls_partner-display_type = 'US'.
    APPEND ls_partner TO lt_partner.
    ls_inputfields-ref_guid = activity_guid.
    ls_inputfields-ref_kind = 'A'.
    ls_inputfields-objectname = 'PARTNER'.
    ls_inputfields-logical_key = '0000'.
    ls_inputfields-fieldname = 'DISPLAY_TYPE'.
    ls_inputfields-changeable = ' '.
    APPEND ls_inputfields TO lt_inputfields.
    ls_inputfields-fieldname = 'KIND_OF_ENTRY'.
    APPEND ls_inputfields TO lt_inputfields.
    ls_inputfields-fieldname = 'PARTNER_NO'.
    APPEND ls_inputfields TO lt_inputfields.
I tried building up the logical key_
    DATA: id TYPE char4.
    CONCATENATE '0000' ls_partner-partner_fct ls_partner-partner_no INTO ls_inputfields-logical_key.
    CONCATENATE ls_partner-ref_no_type ls_partner-ref_no_type INTO id.
    WRITE id TO ls_inputfields-logical_key+28.
but that did not work.
The update alway goes wrong in FM "CRM_ORDER_INDEX_UPDATE_DU". (Report: LCRM_ORDER_INDEXU03).
Question: how do I have to fill the fields to change the partner_no?
Regards,
Friederike

I surrendered.
I'm now using the BAPI "CRM_ORDER_MAINTAIN" to change the partners.
Here is how I fill the tables:
data: ls_com_partner TYPE crmt_partner_com,
        lt_com_partner TYPE crmt_partner_comt,
        ls_ifields     TYPE crmt_input_field,
        lt_ifields     TYPE crmt_input_field_tab,
        ls_field_names TYPE crmt_input_field_names,
        lt_field_names TYPE crmt_input_field_names_tab.
    ls_com_partner-ref_guid           =  activity_guid.
    ls_com_partner-ref_kind           = 'A'.
    ls_com_partner-ref_partner_handle = 0000.
    ls_com_partner-ref_partner_fct    = '00000022'.
    ls_com_partner-ref_partner_no     = old_uname.
    ls_com_partner-ref_no_type        = 'US'.
    ls_com_partner-ref_display_type   = 'US'.
    ls_com_partner-kind_of_entry      = 'C'.
    ls_com_partner-partner_fct        = '00000022'.
    ls_com_partner-partner_no         = new_uname.
    ls_com_partner-display_type       = 'US'.
    ls_com_partner-no_type            = 'US'.
    ls_com_partner-mainpartner        = 'X'.
    APPEND ls_com_partner TO lt_com_partner.
** inputfields for bapi
    CLEAR: ls_ifields, ls_field_names.
    ls_ifields-ref_guid   = activity_guid.
    ls_ifields-ref_kind   = 'A'.
    ls_ifields-objectname = 'PARTNER'.
    DATA: id TYPE char4.
    CONCATENATE ls_com_partner-ref_partner_handle ls_com_partner-partner_fct ls_com_partner-ref_partner_no INTO ls_ifields-logical_key.
    CONCATENATE ls_com_partner-ref_no_type ls_com_partner-ref_no_type INTO id.
    WRITE id TO ls_ifields-logical_key+28.
    ls_field_names-fieldname   = 'PARTNER_NO'.
    ls_field_names-changeable  = ' '.
    INSERT ls_field_names INTO TABLE lt_field_names.
    ls_field_names-fieldname   = 'NO_TYPE'.
    INSERT ls_field_names INTO TABLE lt_field_names.
    ls_field_names-fieldname   = 'KIND_OF_ENTRY'.
    INSERT ls_field_names INTO TABLE lt_field_names.
    ls_field_names-fieldname   = 'DISPLAY_TYPE'.
    INSERT ls_field_names INTO TABLE lt_field_names.
    ls_ifields-field_names = lt_field_names.
    INSERT ls_ifields INTO TABLE lt_ifields.
* the bapi
    CALL FUNCTION 'CRM_ORDER_MAINTAIN'
      EXPORTING
        it_activity_h     = lt_activity_h
        it_partner        = lt_com_partner
      IMPORTING
        et_exception      = lt_exception
      CHANGING
        ct_orderadm_h     = lt_orderadm_h
        ct_input_fields   = lt_ifields
      EXCEPTIONS
        error_occurred    = 1
        document_locked   = 2
        no_change_allowed = 3
        no_authority      = 4
        OTHERS            = 5.
Have fun.
Regards,
Friederike

Similar Messages

  • Change in Useful life of asset in mid year, but the previous posted depreciation should not be changed

    Dear Experts,
    I have a requirement in one of my client, We need to extend the useful life of asset in mid of an asset fiscal year and the depreciation which was posted in the previous should not be changed.
    Requirement:
    Useful life of asset  is to be extended after completing depreciation for 4 years and in-between the current asset fiscal year. Provided the present asset value has to be taken as the new book value of the asset and the depreciation posted henceforth to be posted based on the new asset value till the remaining useful life.
    Previously posted depreciation should be unchanged.
    Analysis:
    1.      The fiscal Year followed - October to September.
    2.      The useful life of asset will be changed, and the depreciated value posted till 31/mar 2014 will have the old depreciation value ( based on the original acquisition value)
    3.      The Depreciation key used in of type LINR (linear), depreciation value will be calculated based on the Book value till the asset value becomes ZERO at the end of useful life of the asset.
    4.      We can change the useful life of the asset at the end of a Asset fiscal year say FY- 2014, if this is done the existing configuration will take the Book value of the asset at the end of the Fiscal as the asset value and the new depreciation will be calculated based on the new useful life of the asset. The asset value will become ZERO at the end of the newly changed Useful Life.
    5.      But the requirement is that the useful life of the asset will be changed exactly half way in between existing Asset fiscal (i.e., 31/03/2014), if this is done system will change the depreciation value based on the new useful life ( since the Dep Key is LINR), but the depreciation value will change from the fiscal start say October 2013 to September 2014 ), which will not satisfy the requirement of the client. Since the depreciation which is already posted from October 2013 to March 2014 should not be changed.
    Note:
    1. We are not willing to retire the asset and create a new asset with the remaining book value as asset value and start depreciation.
    Kindly let me know if the requirement can be fulfilled without retiring the asset.

    Dear All,
    This requirement has been completed.
    1. I created New Multi level valuation method with base 26 ( Net book value w/o Revaluation ).
    2. New depreciation key was created and the above method was assigned to it. I never changed the Base method.
    3. new interval was created in the depreciation area, with this created dep key and extended the useful life of the asset. The depreciation was calculated according to the requirement.
    Originally the asset had useful life of  5 Years, I changed the asset useful life to 8 years now with new Depreciation key 2001.
    Depreciation was already posted to the asset till 04- 2013 for an amount of 148.27 SAR.
    Net Book value carried forward to 2013 = 1575.56 SAR
    Depreciation already posted till 4th period =   148.27 SAR
    Current Net book value after useful life extension           = 1427.29 SAR .
    Now the new depreciation key 2001 with Multilevel method 201, will take this Net-book value as Asset value and will depreciate along the useful life of the asset till it becomes zero.
    Planned depreciation of 2013 ( remaining 6 months) = 166.24 SAR
    Planned depreciation of 2014 = 225.96 SAR
    Planned depreciation of 2015 = 225.96 SAR
    Planned depreciation of 2016 = 225.96 SAR
    Planned depreciation of 2017 = 225.96 SAR
    Planned depreciation of 2018 = 225.96 SAR
    Planned depreciation of 2019 = 131.25 SAR
    Total      = 1427.29 SAR ( the Asset value becomes zero at the end of its remaining useful life.
    The previously posted depreciation from 01.01.2013 to 30.04.2013 was untouched.

  • HOW TO CHANGE THE USEFUL LIFE FOR MORE ASSETS AT A TIME FOR ASSET CLASS

    Hi All,
    Asset which is under Asset Class Support system-B700. Here every thing is ok but the problem in USE FULL LIFE which is come by default. It must be 4 instead of  5.   So can any body help me out from this how to change the Useful life in that Asset class.  In that Asset Class we have the morethan 200 Assets. It was happend in Prdocution system so now the problem is where i can change the useful life for the asset class either in DEV or PRD.
           Also i want to know the information of How these assets are Uploaded into the system (Lsmw or etc). this is very urgent for me.
    Thanks in Advance,
    Regards,
    Siva.

    Hi Ashok,
         Can i know the reason how it was happend. i mean instead of 4 years the system showing is 5yesrs any reason is there behind that.
    Thanks in Advance.

  • Changing quantity using bapi_salesorder_change function

    hi ,
    i am changing quantity using 'bapi_salesorder_change' function.what are the minimum parameteres that needs to be passsed to the function.i am not able to change the quantity for some items.also for some sales orders i am not getting any error message but commit work is not working.
    thanks ,
    nitin

    Hi Nitin,
    After you call the BAPI_SALESORDER_CHANGE, specifically call BAPI_TRANSACTION_COMMIT , as BAPI_SALESORDER_CHANGE does not run a database commit.(as per the documentation provided by SAP for BAPI_SALESORDER_CHANGE)
    Thanks
    Lakshman

  • I am no longer able to change songs using my headphones

    After updating to iOS 6.0 on my iphone 4S I am no longer able to change songs using the headphone controls and when i double click on the home button it no longer allows me to turn my music on and off without unlocking the screen and going into the music app on the phone.
    Any ideas why this is?  Is it a known bug?

    Start by opening Disk Utility, from Applications > Utilities, then select the internal storage MacIntosh HD, and then Repair Permissions.  You should see some printer libraries noted as having the wrong permissions, that may be part of the problem.
    Be sure you have the latest printer/scanner drivers installed by going to the Canon site and download the latest available.
    You can also try using the Mac OS X built-in scanning software by going to Applications > Image Capture and see if that handles the scanning for you - works great with my Epson scanner.

  • Any issues pulling files from external partners using PI File adapter?

    I would like to know if there are any issues with pulling files directly from external partners using PI File adapter.
    We are estimating 60 communication channels to pull files from the external vendors (25 vendors). Polling for these communication channels will be done for every 5 minutes. We have a load of around 500 files per day with peak size as 50MB and average file size as 2MB. We are currently using PI 7.0 SP12.
    Did any one face any problems with respect to performance or any other issues?

    The volume as described would be handled with no issues.
    Memory tuning and threads tuning may be required - see this guide:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2016a0b1-1780-2b10-97bd-be3ac62214c7?quicklink=index&overridelayout=true

  • Idoc to Different Trading partners using AS2 Adapter

    Hello experts,
    I have a requirement where we have to send an Idoc to different trading partners using van.
    On the receiver side AS2 adapters will be used.There are many trading partners here.Can someone guide me through? ..
    The entire scenario will be done in SAP PO 7.4
    Breaking the entire scenario in the following parts---
    1)IDoc on sender side--What will be partner profile type? Will it LS or any other (BP, GP or KU??)
    2)AS2 configuration details---AS2 adapter is available in the dropdown of adapter list.What are the config details for AS2?
    3)Trading partner mechanism-How this can be achieved?..what this essentially achieves ? any step by step guide available? Does it take care of sending the Idoc only to VAN or sending Idoc to different trading partners directly bypassing VAN?
    4)Is using NWDS suggestible?--Is it convenient?
    Any help/step by step blog will be of great help.
    If I miss anything in the entire scenario, please let me know
    Thanks
    Ayan Chaudhuri

    Hi Ajay,
    1)IDoc on sender side--What will be partner profile type? Will it LS or any other (BP, GP or KU??)
    -->>The partner type is depend on your scenario. AS2 adapter is used for B2B communication and usually to vendor and customers.
    This purchase Order should go to the particular vendor as a sales order. Then we use partner type as LI -- Vendor.
    Similarly when we sell some materials to our customers, we create the Sales order to our customer. Then we use Partner type as KU - Customer
    Partner Type GP---Business Partner
    Partner Type KU---Customer
    Partner Type LI---Vendor
    Partner Type LS---Logical system
    Partner Type US--User
    2)AS2 configuration details---AS2 adapter is available in the dropdown of adapter list.What are the config details for AS2?
    -->> to configure as2 connection you need following details from trading partner
    AS2 ID
    server address with URL extension
    TP certificate
    MDN address and type (Sync, asyn and signed or not signed)
    Message communication encryption algorithm
    Compression is required or not and if req. which algorithm to use
    3)Trading partner mechanism-How this can be achieved?..what this essentially achieves ? any step by step guide available? Does it take care of sending the Idoc only to VAN or sending Idoc to different trading partners directly bypassing VAN?
    -->> If you are communicating through VAN then you need to send the message to VAN and VAN will route the message to respective TP.
    4)Is using NWDS suggestible?--Is it convenient?
    -->> NWDS is another option to create scenario, it is depend on developer which one he want to use.
    The belog blog might be useful
    Easy-to-use AS2 software - part IV
    B2B- EDI Inbound -Step by Step Configuration
    regards,
    Harish

  • Sending EDI To Multiple Partners Using Single Send Port in Orchestration

    Hi Guys,
    I am having a scenario where i am receiving a Xml(which can be in between 11-15). I am having 150 Trading Partners with whom these datsets have to be shared. Now every Trading partner is having there own character Sets and unique numbers so i have created 150
    party agreements for all the Trading partners. I am interested to use a single port. I have created an orchestration to achieve this. Below are the steps i used to create orchestration :-
    1) Receiving 11 XML from receive shape.
    2) Extracting the value of Node TSP(this value is used to know the trading partners unique number on which i am deciding to which party agreement this Xml needs to go) using xpath.
    3) I am constructing the message in construct.                                                                                                                     
    3.1) Mapping  from XML To EDI.                                                                
    3.2) As all 11 datasets are having different version. So i am overidding the value ISA and GS in Message Assignment(SourceName).
    4) Decide shape to decide on the value of TSP to which port it has to be send.
    But according to me this is not an optimized solution. Below are reasons:-
    1) I have to create 150 branch into decide shape. As i am receiving 11 different Xml messages i need to create decide shape for all the different Xml messages.
    2) I have to create 150 different ports which are having 15 operation(depanding upon Xml we received).
    Note:- I have to create 150 different Send Ports only because of Party Agreement. So is there any solution? i only want Single Send port and i can select the party Agreement in the orchestrations.

    Duplicate thread.  See:
    http://social.msdn.microsoft.com/Forums/en-US/c12a377e-ccf6-4fbe-9986-14da63d72282/sending-edi-to-multiple-partners-using-single-send-port-in-orchestration?forum=biztalkgeneral

  • Look for a progarm that will let me have 2 moniters but one will lock on and will not change when using spaces

    look for a progarm that will let me have 2 moniters but one will lock on and will not change when using spaces

    ok so i have one moniter to the right of me and i want to keep my google chrome on that one but still be abel to use space on the many monter. cuz when you go to spaces it movies both moniter i hope that help and i hope that you can help me.

  • I have iMac osx  version 10.8.5 and i forgot my account login password. i can't change it using my apple ID nor i remember my password.also my fire vault is not on and my keychain won't help. PS i can't also use the terminal idea it always not found.help

    have iMac osx  version 10.8.5 and i forgot my account login password. i can't change it using my apple ID nor i remember my password.also my fire vault is not on and my keychain won't help. PS i can't also use the terminal idea it always not found please help !!

    You need to restart the iMac and hold down the Command and R keys immediately.
    You will then have the utilities drop down and you choose Terminal
    When Terminal opens, type exactly:
    resetpassword
    and press Return.
    When the Reset Password window opens, select the user for which you want to change the password.
    Enter the new password twice, and then click Save.
    Accept the next dialog window,
    And then Apply
    When finished click the apple at the left side of the menu bar, and the Restart.

  • Bambus - A small and simple GTK Gui to change Wallpapers using feh,...

    It is a old project, which I wrote a year ago.
    Bambus - A small and simple GTK Gui to change Wallpapers using feh, Esetroot, hsetroot, habak or any other command tool.
    Aur package: bambus
    To restore a Wallpaper at a WM start-up (Openbox, Awesome,...) execute the command
    bambus -restore
    To restore a Wallpaper randomly execute
    bambus -any
    To restore Wallpapers in a special order execute
    bambus -each
    Screenshots:
    Last edited by ying (2010-11-10 06:35:06)

    Hey thx a lot for your posts.
    @ApotheoZ: Hmm I don't know where I got them from(Take a look at wallbase.com). But I'll load it up for you.
    Last edited by ying (2010-11-10 16:36:26)

  • Change of use of equipment

    Hi Experts
    The structure of our group made ​​up of several companies esr (Technical), each company is composed of several teams assigned to it, if we seek a procedure on SAP to track the change in the allocation of such equipment between companies
    Currently, we modify the plug equipment directly (Changing the Division location, Company, Computer technical and business area) to trace the change of use.
    Thinks in advance

    OK , Let me give an example
    initial state
    Functional Location 1  = Company 1
        The Car 1 is assigned as a Functional Location 1
    Functional Location 2  = Company 2
    Is there a procedure in which SAP can track and trace the change in the allocation of the company to a company without going through two direct editing of the plug equipment??????
    State final
    Functional Location 1  = Company 1
    Functional Location 2  = Company 2
       The Car 1 is assigned as a Functional Location 2
    Thainks

  • Regarding changing and using

    Hello experts:
        First thank you in advance for all your replies.
        would you please explain the difference of changing and using preferably by an example?
        couldn't thank you more.
    Best regards.
    Frank

    Hi,
    USING and CHANGING in PERFORMS means like this.
    USING- Call by value
    CHANGING- Call by reference
    Check the example below.
    PERFORM conv_atinnnam_no USING l_refbatch CHANGING w_refbatch.
    FORM conv_atinnnam_no USING    p_name
                          CHANGING p_no.
      CALL FUNCTION 'CONVERSION_EXIT_ATINN_INPUT'
           EXPORTING
                input  = p_w_name
           IMPORTING
                output = p_w_no.
    ENDFORM.                    " conv_atinnnam_no
    The parameters passing under USING will not change if the corrosponding parameter in the FORM changes unless it is global variable. But in case of parameter under changing what ever changes we are making inside FORM will be reflected to Original variables.
    In case of global variables USING and CHANGING works in
    the same way.
    Thanks,
    Vinod,

  • Is it possible to ignore "Rigid relationships between attributes cannot be changed" when using ProcessUpdate for Dimension?

    As per the title is it possible to ignore "Rigid relationships between attributes cannot be changed" when using ProcessUpdate for Dimension?
    We have a case where very rarely an item might have been miscategorised so the brand is manually changed.  We want this dimension to be rigid to speed up ProcessUpdate.
    We do a ProcessFull each night, so it will get corrected then, but during the hourly updates we would just like to ignore this error if possible?

    Hello,
    The rigid relationship should be defined when the members will not change over time. Here are some threads regarding rigid relationship for your reference, please see:
    Processing OLAP Cube: http://social.technet.microsoft.com/Forums/sqlserver/en-US/17a55593-9543-404e-a579-0a011965585d/processing-olap-cube?forum=sqlanalysisservices
    Flexible and rigid relationship: http://social.msdn.microsoft.com/Forums/sqlserver/en-US/2d8f5443-065d-4485-9385-6f0b5fa417da/flexible-and-rigid-relationship?forum=sqlanalysisservices
    If you have any feedback on our support, please click
    here.
    Regards,
    Elvis Long
    TechNet Community Support

  • I am having a problem changing a color in a selected area. Using the Quick Selection tool I am able to select the area I wish to change. Using the Brush tool, color, color mode and click drag in my selected area, nothing happens, no color changes.   I hav

    I am having a problem changing a color in a selected area. Using the Quick Selection tool I am able to select the area I wish to change. Using the Brush tool, color, color mode and click drag in my selected area, nothing happens, no color changes. I have viewed some videos and read numerous articles but haven't found the one to help me. Please point me in the best direction. Thank you Vincent TC

    For the sake of clarity and to save people time, Todd is asking about the behaviour of the Patch tool when using it to repair the area next to the young lad's head.  Todd gets a blurred dark tone pretty much regardless of the options he uses.
    IMO that's what I would expect to happen because of the close proximity of the other image elements i.e. the lad's neck and the strong lines of his shirt.  I would not choose to use the Patch tool in this situation.  Content Aware Fill makes a better stab at it. 

Maybe you are looking for