Usage of BAPI_LEAD_CHANGEMULTI ( of CRM)

Hello All,
  I am using the BAPI BAPI_LEAD_CHANGEMULTI to change the status and texts of a lead in CRM. I am able to change the status but not the texts.
  Any information on this BAPI is welcome. Sample code would be great.
Thanks.
Srinivas

Maybe this FM can help:
FUNCTION Z_CREATE_LEAD.
""Local interface:
*"  TABLES
*" HEADER STRUCTURE  BAPIBUS2000108_HEADER_INS OPTIONAL
*" HEADERX STRUCTURE  BAPIBUS2000108_HEADER_INSX OPTIONAL
*" PARTNER STRUCTURE  BAPIBUS20001_PARTNER_INS OPTIONAL
*" PARTNERX STRUCTURE  BAPIBUS20001_PARTNER_INSX OPTIONAL
*" PRODUCT STRUCTURE  BAPIBUS20001_PRODUCT_INS OPTIONAL
*" PRODUCTX STRUCTURE  BAPIBUS20001_PRODUCT_INSX OPTIONAL
*" TEXT STRUCTURE  BAPIBUS20001_TEXT_INS OPTIONAL
*" TEXTX STRUCTURE  BAPIBUS20001_TEXT_INSX OPTIONAL
*" INPUT_FIELDS STRUCTURE  BAPIBUS20001_INPUT_FIELDS OPTIONAL
*" CREATED_PROCESS STRUCTURE  BAPIBUS20001_HEADER_INS OPTIONAL
*" RETURN STRUCTURE  BAPIRET2 OPTIONAL
*" SAVED_PROCESS STRUCTURE  BAPIBUS20001_OBJECT_ID OPTIONAL
  data: ls_lead_bapi  type BAPIBUS2000108_HEADER_INS,
        ls_lead_bapix type BAPIBUS2000108_HEADER_INSx.
// BAPI Tables
  data:
lt_lead_bapi  type table of BAPIBUS2000108_HEADER_INS,
lt_lead_bapix type table of BAPIBUS2000108_HEADER_INSx.
clear ls_lead_bapi.
clear lt_lead_bapi.
clear ls_lead_bapix.
clear lt_lead_bapix.
clear RETURN.
clear CREATED_PROCESS.
clear INPUT_FIELDS.
clear SAVED_PROCESS.
loop at HEADER.
  call function 'GUID_CREATE'
      IMPORTING
        ev_guid_32 = ls_lead_bapi-guid.
ls_lead_bapix-guid         = 'X'.
  ls_lead_bapi-description   = HEADER-description.
  ls_lead_bapix-description  = 'X'.
  ls_lead_bapi-posting_date  = sy-DATUM.
  ls_lead_bapix-posting_date = 'X'.
  ls_lead_bapi-process_type  = 'LEAD'.
  ls_lead_bapix-process_type = 'X'.
  ls_lead_bapi-SOURCE        = '001'.
  ls_lead_bapiX-SOURCE        = 'X'.
  ls_lead_bapi-QUAL_LEVEL_MAN = '03'.
  ls_lead_bapiX-QUAL_LEVEL_MAN = 'X'.
  append ls_lead_bapi  to lt_lead_bapi.
  append ls_lead_bapix to lt_lead_bapix.
endloop.
Move the RFC the BAPI table with the
coresponding lines and the X-structure.
CALL FUNCTION 'BAPI_LEAD_CREATEMULTI'
    TABLES
      HEADER              = lt_lead_bapi
      HEADERX             = lt_lead_bapiX
      INPUT_FIELDS        = INPUT_FIELDS
      CREATED_PROCESS     = CREATED_PROCESS
      RETURN              = RETURN
      SAVED_PROCESS       = SAVED_PROCESS.
  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
endfunction.
Hope it will help.
It worked for me using the 'BAPI_LEAD_CREATEMULTI' make use to the 'BAPI_LEAD_CHANGEMULTI' in the same way.
Tomer Patron

Similar Messages

  • Deleting address usage not replicating in CRM

    Hello Friends,
    Below is the code to replicate the problem i have in my system. This report will check if the BP in processing has address usage of type 0003 which is Forwarding address in our system, then delete it and assign the standard address of BP as forwarding address usage 0003.
    The problem is when performing deletion the CRM system is not updated correctly. BDOC created doesnot deletes the entry in CRM.
    Note :- You must change BP data in BP screen. This report runs in R/3.
    Steps:-
    1. Create a new BP.
    2. Run program.
    2.1 Add two addresses to BP.
    3. Assign the non-standard as forwarding address or any other address
    usage you will put in the code. " lt_add-ADDRESSTYPE = '0003'.
    4. save it.
    This will trigger BDOC's to update CRM system. After the run you can see
    the difference between the BP address usage in two systems.
    Please advise what can be done?
    Regards,
    Pankaj
    REPORT  Z_BP_CHANGE                              .
    DATA: W_BUT020 TYPE BUT020,
          W_BUT021 TYPE BUT021,
          GUID     TYPE     BUT020-GUID,
          TASK TYPE BU_UPDFLAG.
    DATA : LT_ADD TYPE BAPIBUS1006_ADDRESSUSAGE occurs 0 with header line,
             LT_ADD_X TYPE bAPIBUS1006_ADDRESSUSAGE_X occurs 0 with header line,
             LT_RETURN TYPE STANDARD TABLE OF BAPIRET2.
    PARAMETER BP TYPE BU_PARTNER.
    *CHANGE ISU PARTNER
    CALL FUNCTION 'ISU_S_PARTNER_CHANGE'
      EXPORTING
        X_PARTNER      = BP
      EXCEPTIONS
        NOT_FOUND      = 1
        FOREIGN_LOCK   = 2
        NOT_AUTHORIZED = 3
        CANCELLED      = 4
        INPUT_ERROR    = 5
        GENERAL_FAULT  = 6
        OTHERS         = 7.
    SELECT SINGLE * FROM BUT021 INTO W_BUT021 WHERE PARTNER = BP AND ADR_KIND = '0003'.
    *CHECK IF ADDRESS USAGE IS ALREADY ASSIGNED. IF YES DELETE ASSIGNMENT
    IF SY-SUBRC = 0.
      SELECT SINGLE * FROM BUT020 INTO W_BUT020 WHERE PARTNER = BP AND ADDRNUMBER = W_BUT021-ADDRNUMBER.
      GUID = W_BUT020-ADDRESS_GUID.
      TASK = 'D'.
    *DELETE EXISTING ADDRESS USUAGE.
      PERFORM UPDATE_BP USING TASK.
    ENDIF.
    CLEAR: GUID, W_BUT021, W_BUT020, TASK.
    REFRESH: lt_add_x, lt_add.
    *ADD STANDARD ADDRESS USAGE
    SELECT SINGLE * FROM BUT020 INTO W_BUT020 WHERE PARTNER = BP AND XDFADR = 'X'.
    GUID = W_BUT020-ADDRESS_GUID.
    TASK = 'I'.
    *ADD STANDARD ADDRESS USUAGE.
    PERFORM UPDATE_BP USING TASK.
    MAINTAIN BP ADDRESS
    FORM UPDATE_BP USING TASK TYPE BU_UPDFLAG.
      lt_add-ADDRESSTYPE = '0003'.
      lt_add-STANDARDADDRESSUSAGE = 'X'.
      append lt_add.
      lt_add_x-STANDARDADDRESSUSAGE = 'X'.
      lt_add_x-ADDRESSTYPE = 'X'.
      lt_add_x-UPDATEFLAG = TASK.
      append lt_add_x.
      CALL FUNCTION 'BAPI_BUPA_ADDRESS_CHANGE'
        EXPORTING
          BUSINESSPARTNER = BP
          ADDRESSGUID     = GUID
          ACCEPT_ERROR    = 'X'
        TABLES
          ADDRESSUSAGE    = lt_add
          ADDRESSUSAGE_X  = lt_add_x
          RETURN          = LT_RETURN.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    ENDFORM.                    "UPDATE_BP
    Edited by: PANKAJ ARORA on Apr 22, 2008 4:15 AM

    Hello Sourabh,
    Thanx for your reply. The return is empty. All the changes are carried out perfectly except the updates in CRM. and only when the program does the deletion of the address usage, the BODC to CRM doesnot delete the address. It seems middleware buffering issue to me but not sure.
    Did you try to run this report and reproduce the problem in your system?
    Regards,
    Pankaj

  • Setting up Free Goods in CRM 5.0 Standalone

    Dear Friends,
    We are trying to set up Free Goods in our CRM 5.0 standalone environment. What we want to realize is that, if customer buys product A, product B will be added to the order automatically as free of charge. So far we have no idea how to get this set up in the system.
    In R/3 you can specify 'requirement' in each condition type. In the 'requirement' section you can add a small ABAP program that might realize the functionality. However, it doesn't seem to be the case in CRM.
    Please advise. Many thanks!
    Leon

    Hi,
    While defining the Condition types in IMG system will ask the Application and Usage,select the applicatioin CRM, Usage is Free goods.
    CRM Standalone condition records maintain from the  Transaction code
    /SAPCND/GCM - Condition Maintenance, after entering this code give the Application CRM than select your Free goods condition type maintain the values.
    Relationship maintains in the condition records only, Once you select the Free godds conditin type than all required coloumns will pop up enter your product and Qty with the offered free goods product.
    Regards
    Naren..

  • SAP CRM Role assignment block - Customer cc

    hi there, can anyone please tell me what the Customer CC refers to in the SAP CRM Role assignment block
    Thanks, Sue

    hi ahmedi khan,
    the role key what you have created that will be assign to your business role.
    go to CRMC_UI_PROFILE or
    SPRO >> Customer relationship Management >>UI Framework >>Business Roles >> Define Business Role
    click on your business role and under role config key you have to pass your custom role key..
    like this..
    go through this link you can get to know..
    The Usage of the SAP CRM Role Configuration Key –Detailed example
    Thanks & Regards,
    Srinivask

  • BAPI or FM which recalculates the price when saving an order in CRM

    Hi,
            Is there any BAPI or FM which will actually recalculate the price for an order when saving that particular order?
    Or any suggestions on how to achieve this!

    Hi Vin,
    Can you please let me know if the same function module "PRC_PD_ITEM_UPDATE" is called when data is entered in the usage confirmation screen in CRM. I put a break point in PRC_PD_ITEM_UPDATE but debugger does not stop in it.
    Is there any other function module that is called to recalculate the price after usage conformation data is entered ?
    Pleads let me know.
    Thanks,
    Vivek

  • CRM LEAD STATUS CHANGE : BAPI_LEAD_CHANGEMULTI

    Hi everyone,
    I see that you were able to change status via BAPI_LEAD_CHANGEMULTI. I am currently using CRM 4.0
    trying to do the same thing; but unsuccessfully.
    Any help in this matter will be greatly appreciated.
    I undated statusx-status = 'X', filled out status table
    as well as the input_fields. But comes back with wrong object type (STATUS) error message.(input field invalid)
    Thanks in advance,
    David

    Hi David,
    If you want to change the status try CRM_MA_ACT_SAVE
    FM.
    Best Regards,
    Chetan

  • Usage of TREX  for SAP CRM

    Hi Admins,
    Can some one throw some light on usage of TREX in the CRM space.  The specific questions i have are :
    1. I know its optional but  which module of CRM needs it more - Please confirm 
    Regards,
    Rakesh Neni.

    Hi Rakesh,
    Please check below wiki link.
    Enable full text search using TREX (Embedded Search - Enterprise Search) - CRM - SCN Wiki
    and below thread for configuration.
    CRM - Trex configuration
    Best Regards,
    Atul

  • CRM usage in SAP ECC 6.0

    Dear SAP Guru's,
    I am working on SAP ECC 6.0 version.
    It has the MY SAP COMPONENTS with CRM and BI.
    Please tell me I am new to CRM will I be able to Use the CRM module in 6.0 versio.
    If it is possible to use the CRM components in R/3 system.
    What is the disadvantage as we also have a dedicated CRM server.
    Please explain.
    regards,
    Amlan Sarkar

    Hello,
    this is not the correct forum. Please send your request in a CRM forum, not in an SD forum, because there are the specialists for CRM.
    Regards
    Claudia

  • Dynamics CRM usage of CRMAF_ filters in sub reports

    Have a main SSRS report which uses CRM pre filtering via the "CRMAF_" prefix, this report calls a sub report which needs to use the same pre filtering as selected and applied via the main report.
    The sub report is a summary total presenting the information in a different order than the main report but needs to run over the same dataset that the main report did.
    Would like to see a worked example of how this can be achieved ? 

    I'm thinking I may just have to go with two seperate reports that both use the same CRMAF pre filtering.
    The advantage of using the automatic pre-filtering is when the report is deployed I assign the related record type and can then run it over 'selected records' from the list screen.
    With the explicit pre-filtering when the report is deployed I can assign the related record type but then it can only be run over 'all records' from the list screen.
    So with explicit pre filtering I loose the ability to run the report over a selected subset of the related records.
    Looks easier to create two seperate reports (rather than a main and a subreport), the user can choose the records to report on from the related list and then just run the two reports after each other.
    Thanks for your help guys.
    Jon Rowbotham

  • Question regarding usage of CRM pricing conditions using date ranges

    Hi,
    I wonder if someone has a suggestion regarding how to set up pricing conditions in CRM to accomplish the following scenario:
    For existing customers we want to “freeze” the product price for certain customers,
    but at the same time let other customers get another prize for the same product
    and period.
    (We have scenarios where the product price changes retroactively, years back in time, but only for those custoemrs that  fulfill a specific criteria at the time where the prize change was decided to take place..)
    We want the prize to be dependent on the customer status AND when this status was set
    (before a specific date), but there doesn’t seem to be a way to set up pricing
    conditions with date ranges (i e "customer status changed before YYYYMMDD
    renders prize X").
    Since we are talking about quite a lot of customers we do not want to add each and every
    one of them as “individual price items” in the pricing conditions tables.
    Does anyone have an idea regarding how to set this up?
    Thanks
    /Marika Wasserman

    Hi Marika,
    condition records have validity (FROM - TO). Let us assume you have a condition record for product A with 50 EUR per piece and this record is valid from 01.01.2014 until 31.12.2014.
    If you create CRM Sales Order having product A at 4.12.2014 and this date is used as pricing date for the conditon determination, then it will find this condition record with price 50 EUR per piece. This 50 EUR should be the froen price.
    Now how can you achieve that for the same CRM Sales Order another product price is determined for certain customer or a certain customer group?
    The idea is to pass an additional pricing attribute, e.g. customer group. Then you can create a new condition table with this field with the key fields product and customer group. In the access seqeunce first the new condition table is checked and if no record is found, then the second conditon table is checked as shown below:
    Access Sequence ABC
    Access 10: condition table with key fields product + customer group
    Access 20: condition table only key field product
    Instead of customer group you define also any other field. You create your own implementation of the BAdI  CRM_COND_COM_BADI that passes this field with a value to pricing.
    Best regards,
    Baris Yalcin

  • How can one monitor the level of usage of Fact Sheet in SAP CRM?

    I am trying to understand how often users are actually using the Fact Sheet utility in our CRM instance.  Anyone know a way to gather this statistic?  Thanks

    Hello
    To my knowledge, CRM does not store any statistics. Some telephony software (BCM, Genesys, etc.) provide such statistics. Even I think that BI has a "reporting agent" report.
    Regards
    Joaquin

  • CRM Order Item Category Usage

    Where in the CRMD_ORDER screen we can maintain the Item category usage for an order item? In the CRMD_ORDER screen in Item details tab I can find the Item Category, but not the item category usage.

    Hi Maggie,
    in case a new item is created via an action, you can maintain/define the item usage via the container element within the action definition. Field to be maintained: ITM_TYPE_USAGE enter needed value under tab "Intial Value".
    Best regards,
    Susanne

  • Usage problem: BI Query results as input for CRM Function module

    Hi all,
    In my VC model I have maintained a dataservice (BI query) which delivers a customer key to me. I would like to use this specific customer key output as an input parameter in a function module from my CRM system.
    I have implemented both data services and mapped the fields. However, the problem is as follows:
    The query gives an output customer number: 001044082163. The customer_id in CRM is 44082163, so the output from BW needs to be changed to 0044082163 (as we need to input 10 characters).
    So the question is: How can we change the output from BI query 001044082163 to 0044082163 within the VC model?
    Best regards,
    Jan Laros

    Hi
    try this expression
    '00'&MID(@BI_CUST_NO,4,8)
    Good luck
    Ola

  • ERP Reference sales area usage in CRM organization determination

    Hi Experts,
    Our client, in its ERP applies reference sales area to reduce mater data maintenace efforts. (It manages about 30-40 division which definition is based on product portfolio basis.)
    As result of this structure, in CRM business partners are created only this reference sales area level, meanwhile in the business transaction we should need information about the real division.
    Is there any experiences on this area?
    Thanks for your support in advance.
    Anett

    Go to organization management and see what kind of profile options are assigned to ur user.

  • CRM SERVICES USAGE BASED BILLING

    Hi,
    I need some information on UBB, especially on the setup and configuration side. Can any body help me out here. I am confused in terms like usage function credit overview. I am unable to make a clear picture of this functionality.
    Thanks in advance.
    Aditya

    Hi Aditya,
        Not so sure try to check this Doc Link: http://www.scribd.com/doc/64693553/50/Usage-Based-Service-Contract-Management
    Try to Download it if you don't see some part of the doc.
    Regards

Maybe you are looking for