BAPI_LEAD_CHANGEMULTI

Does anyone has an example on how to add partner function to an order? I am not able to add a partner function using this BAPI, is there any other way to do the same?
Thanks in advance.
Vijay
I am passaing GUID for the header, partner data, needed changes are in the input fields, setting headerx, partnerX.

Does anyone has an example on how to add partner function to an order? I am not able to add a partner function using this BAPI, is there any other way to do the same?
Thanks in advance.
Vijay
I am passaing GUID for the header, partner data, needed changes are in the input fields, setting headerx, partnerX.

Similar Messages

  • Changing LEAD info using BAPI_LEAD_CHANGEMULTI

    I have tried to change the status and product info. using BAPI_LEAD_CHANGEMULTI. I am able to change status and volume unit, but not the quantity of product.
    How can I change the quantity of the product ??????
    how do I add more than one product ???
    regards,
    Ashish Walke

    Hi,
    I did this before.
    Search "Quantity change using CRM_ORDER_MAINTAIN" in the forumns and you will see my reply.
    Thanks
    kamal

  • Help required :BAPI_LEAD_CHANGEMULTI

    Hi Experts,
      I have created a Lead from T-code CRMD_BUS2000108.
    The status of the LEAD is Open.
    I want to change the status of lead from Open to Closed with the help of BAPI :BAPI_LEAD_CHANGEMULTI but the lead is not getting updated.
    Please provide me the input parameters to this BAPI. Do i need to call some other BAPI before calling this BAPI.
    Plesase sugest some points. Below is the parameters which I am passing to the BAPI . Please suggest if something is missing.
    CALL FUNCTION 'BAPI_LEAD_CHANGEMULTI'
    TABLES
    statusx             = i_statusx
    status              = i_status
    return              = i_return.
    Also please let me know the mapping of GUID which would be passed in i_status.
    Help will be appreciated.
    Regards
    Sourabh Verma

    Hi Vinod!
             Below is my code! my exact requirement is, i have created Sales order success fully,
    Now i want to fetch the invoice no as well delivery invoice amount by using customer no.. can you pls help me?
      I don;t know  am going in a right way?  pls advice me!
            try {
                function = this.createFunction("BAPI_INCOMINGINVOICE_CREATE");
                if (function == null) {
                    System.exit(1);
                mConnection.execute(function);
         mStructure = function.getImportParameterList().getStructure("HEARDATA-INV_REF_NO");
          String doc = "ZHAT";                                
          mStructure.setValue(doc,"DOC_TYPE");
          //mStructure.setv
          mStructure.setValue("1000","SALES_ORG");
          mStructure.setValue("10","DISTR_CHAN");
          mStructure.setValue("10","DIVISION");
              codes = function.getTableParameterList().getTable("VBRK");
                for (int loop = 0; loop < codes.getNumRows(); loop++)
                    myArrList.add(codes.getValue("KUNAG"));
                    codes.nextRow();
                System.out.println( myArrList);
                if (myArrList.isEmpty()) {
                    System.out.println("No data retirved for selection criteria");   
                    System.exit(1);
    Regards,
    Raja M

  • V Urg. - parameters for BAPI_LEAD_CHANGEMULTI

    does anyone know what parameters to send for the BAPI BAPI_LEAD_CHANGEMULTI.
    I want to add the foll. product data related to Lead:-
      product name, quantity and units.
    I dont know which tables and table fields to pass to the BAPI.

    hey Jaswanth first of all thanks for the reply.
    I have done that already, but that adds only a single product. I want to add multiple products. And I am using the foll. tables :-
    item table - product name
    schedln    - quantity
    product    - unit
    but, somewhere in schedln I guess there is an error.
    I want the parameters and some sample values to be passed to schedln table(for multiple products).

  • Minimum parameters for BAPI_LEAD_CHANGEMULTI

    Team,
    I want to load over 10,000 leads with status CLOSED (E0004).
    I am doing this in two steps:
    1) Create lead
    2) Change lead
    My question #1 is what are the minimum parameters I need to pass to fm BAPI_LEAD_CHANGEMULTI:
    REF_GUID
    REF_HANDLE
    REF_KIND
    STATUS       =  'E0004'
    USER_STAT_PROC
    ACTIVATE
    PROCESS
    CALL FUNCTION 'BAPI_LEAD_CHANGEMULTI'
    EXPORTING
      TESTRUN             =
    TABLES
      HEADERX             = tt_lead_bapiX
      ORGANISATIONX       =
      PARTNERX            = tt_partnerX
      DATEX               =
      TEXTX               =
      ITEMX               =
      PRODUCTX            =
       STATUSX             = TT_statusX
      SERVICE_OSX         =
      SCHED_LINX          =
      HEADER              = tt_lead_bapi
      ORGANISATION        =
      PARTNER             = tt_partner
      DATE                =
      TEXT                =
      ITEM                =
      PRODUCT             =
       STATUS              = TT_status
      SERVICE_OS          =
      INPUT_FIELDS        =
      RETURN              =
      SCHED_LIN           =
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    Question #2. Do I need to create separate pgm for Change Leads or one pprogram can contain both codes, i.e. 'Create Lead' and then 'Change Lead' in the same program.
    Any sample code and/or ideas will be helpful.
    Thanks

    Team,
    I want to load over 10,000 leads with status CLOSED (E0004).
    I am doing this in two steps:
    1) Create lead
    2) Change lead
    My question #1 is what are the minimum parameters I need to pass to fm BAPI_LEAD_CHANGEMULTI:
    REF_GUID
    REF_HANDLE
    REF_KIND
    STATUS       =  'E0004'
    USER_STAT_PROC
    ACTIVATE
    PROCESS
    CALL FUNCTION 'BAPI_LEAD_CHANGEMULTI'
    EXPORTING
      TESTRUN             =
    TABLES
      HEADERX             = tt_lead_bapiX
      ORGANISATIONX       =
      PARTNERX            = tt_partnerX
      DATEX               =
      TEXTX               =
      ITEMX               =
      PRODUCTX            =
       STATUSX             = TT_statusX
      SERVICE_OSX         =
      SCHED_LINX          =
      HEADER              = tt_lead_bapi
      ORGANISATION        =
      PARTNER             = tt_partner
      DATE                =
      TEXT                =
      ITEM                =
      PRODUCT             =
       STATUS              = TT_status
      SERVICE_OS          =
      INPUT_FIELDS        =
      RETURN              =
      SCHED_LIN           =
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    Question #2. Do I need to create separate pgm for Change Leads or one pprogram can contain both codes, i.e. 'Create Lead' and then 'Change Lead' in the same program.
    Any sample code and/or ideas will be helpful.
    Thanks

  • Input requrired for BAPI_LEAD_CHANGEMULTI

    Hi Experts,
    I have created a Lead from T-code CRMD_BUS2000108.
    The status of the LEAD is Open.
    I want to change the status of lead from Open to Closed with the help of BAPI :BAPI_LEAD_CHANGEMULTI but the lead is not getting updated.
    Please provide me the input parameters to this BAPI. Do i need to call some other BAPI before calling this BAPI.
    Plesase sugest some points. Below is the parameters which I am passing to the BAPI . Please suggest if something is missing.
    CALL FUNCTION 'BAPI_LEAD_CHANGEMULTI'
    TABLES
    statusx = i_statusx
    status = i_status
    return = i_return.
    Also please let me know the mapping of GUID which would be passed in i_status.
    Help will be appreciated.
    Regards
    Sourabh Verma

    Hi Sourabh,
    You need to pass details of input fields to be changed in the table
    "INPUT_FIELDS"  to the bapi : BAPI_LEAD_CHANGEMULTI.as example
    REF_HANDLE     N     10      0000000000
    REF_GUID     X     16      A13B35BF4ED2D342B3052E93B3BC6960 "header GUID
    REF_KIND        C     1      A
    OBJECTNAME     C     30      STATUS
    LOGICAL_KEY     C     42      E0002CRMLEAD                              " this value changes with config.
    FIELD_NAMES     h     8      Table[1x64]                                     "Field name "ACTIVATE"
    After the call of BAPI_LEAD_CHANGEMULTI, check RETURN export table; if it has any error message. If there is not error mesage, call BAPI_TRANSACTION_COMMIT.
    Hope this will help.
    Regards,
    Arjun.
    Pl. do reward the points

  • 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

  • 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

  • Update lead

    HI Gurus !
    I have to update the description in Lead (CRM) . I am using BAPI_LEAD_CHANGEMULTI. Pls tell me how to do that.
    Regds
    Navneet

    I think that I have my syntax issue figure out, but it doesn't behave like I expect it to. Actually, it doesn't do anything.
    IIf(LookupValue("Status","Qualified") AND ('<Lead Name>' != 'Qualified Lead'),True,FALSE)
    What I'm still confused on is how to look up the *'type'* in the function --> LookupValue (type, lang_ind_code). I'm not thinking I may have the incorrect and the reason for no action being taken.
    The status field is a read-only picklist, does this make a difference?
    Edited: Carrot-type not equal to sign was parsed out of my message for some reason.
    Edited by: sivartk on Jul 2, 2009 1:24 PM

Maybe you are looking for