Creation of Lead

Hi All
Can anyone please help with for creating a lead through BAPI
bapi_lead_createmulti
Please provide the parameters also which are necessary to create it.its urgent
Points will be awarded

Hi Mona,
Refer to : [bapi for lead creation;
If you need further info, let me know,
Regards,
Arjun
pl. do reward points

Similar Messages

  • Error in creation of Lead by Channel Manager

    Hi All,
    I created Channel Manger Portal for creation of Lead using blview=MKT_LEAD_M,BSP Application=CRM_BSP_FRAME and CRM Application=CRMD_BUS2000108.
    It is working fine for search only.when i click on create button then no process is going and i am getting the following error message on the top of page:
    "Erorr:Please select at least one entry to execute the function".
    Please help me
    kushal

    Hi,
    As the error message implies - you are trying to insert a record into a table with duplicate keys to a record that already exists.
    You need to look further into the termination to determine which table it was failing on and then figure out why it was trying to insert a duplicate key entry. Find out if it is a standard or custom table and see if there is any custom code in user-exits or BADI's that might be causing it.
    Thanks.
    Ashok.

  • Regarding creation of LEAD.

    hi,
    can anyone help me in providing an example or standard code for creation of LEAD using BAPI_LEAD_CREATEMULTI ?
    Thanks in Advance,
    shwetha

    hi ,
         When i create a lead using the function module BAPI_LEAD_CREATEMULTI, i am unable to view the lead that is generated. what are the feilds that are to be considerd? can anyone suggest me in this regards with a sample code.
    " USEFUL ANSWERS WILL BE REWARDED"
    Thanks in advance,
    Shwetha

  • Prices not showing up during creation of Lead to opportunity

    hello all,
    iam working on CRM2007,i have a created a Hot lead and i have a follow up creation of opportunity
    for the hot lead,during this process my product data has been copied from the lead but  neither Net Value nor the Expected total value is showing up in the Assignment block for the Item in that opportunity,
    can you please tell me what could be the problem,
    do i have to make any customizing setting for this.
    helpful answers will be rewarded.
    regards
    chandrashekar

    Hello
       Have you maintained the Pricing procedure for the Business Transaction for the required Organization, Document pricing procedure and Customer Pricing procedure?
    Regards,
    Sowmiya

  • Problen in assigning partner function at the time of creation of lead .

    Hi ALL ,
              I have requirement , where as soon as bp will be created a lead has to be generated mentioning the BP as sales prospect (partner function) . I have to assign  employee reponsible partner  function too in lead , at the same time .
    I have used BAPI :BAPI  BAPI_LEAD_CREATEMULTI  to create the lead .
    But its not accepting the partner function as well as organisation details , giving error like Ref field for  Partner ,Orgman are not allowed.
    Can any one tell me where and how can I assign the Partner function in case of my reuirement .
    Thanks & Regards
    Debasri sarkar

    Hi Debasri,
    I am able to develop a code to add a partner
    Check this:
    *- Data
      DATA: lt_partner            TYPE crmt_partner_comt.
      DATA: ls_partner            TYPE crmt_partner_com.
      DATA: lt_input_fields       TYPE CRMT_INPUT_FIELD_TAB.
      DATA: ls_input_fields       LIKE LINE OF lt_input_fields.
      DATA: ls_input_fields_names TYPE LINE OF CRMT_INPUT_FIELD_NAMES_TAB.
      DATA: LV_Guid type CRMT_OBJECT_GUID.
      DATA: LV_AddPartner type NOTES-UDATE.
      DATA : lt_orderadm_h TYPE CRMT_ORDERADM_H_COMT,
             ls_orderadm_h like line of lt_orderadm_h,
             gt_obj_guids TYPE  crmt_object_guid_tab.
       LV_Guid = '96CB40512AA2BD4C95EEE26BFD8E6187'.
       LV_AddPartner = '00000012'.
    *- Partner info
      ls_partner-ref_kind = 'A'.
      ls_partner-kind_of_entry = 'C'.
      ls_partner-no_type = 'BP'.
      ls_partner-display_type = 'BP'.
      ls_partner-ref_guid = LV_Guid.
      ls_partner-ref_partner_fct = LV_AddPartner.
      ls_partner-partner_fct = LV_AddPartner.
      ls_partner-PARTNER_NO = '0000409993'.
      INSERT ls_partner INTO TABLE lt_partner.
    *- Input Fields info
    *  ls_input_fields-ref_handle = '1'.
      ls_input_fields-ref_guid = LV_Guid.
      ls_input_fields-ref_kind = 'A'.
      ls_input_fields-objectname = 'PARTNER'.
      CONCATENATE ls_partner-ref_partner_handle LV_AddPartner
                  INTO ls_input_fields-logical_key.
      ls_input_fields_names-fieldname = 'PARTNER_FCT'.
      INSERT ls_input_fields_names INTO TABLE ls_input_fields-field_names.
      ls_input_fields_names-fieldname = 'NO_TYPE'.
      INSERT ls_input_fields_names INTO TABLE ls_input_fields-field_names.
      ls_input_fields_names-fieldname = 'DISPLAY_TYPE'.
      INSERT ls_input_fields_names INTO TABLE ls_input_fields-field_names.
      ls_input_fields_names-fieldname = 'PARTNER_NO'.
      INSERT ls_input_fields_names INTO TABLE ls_input_fields-field_names.
      ls_input_fields_names-fieldname = 'KIND_OF_ENTRY'.
      INSERT ls_input_fields_names INTO TABLE ls_input_fields-field_names.
      INSERT ls_input_fields INTO TABLE lt_input_fields.
    *- Make the changes in memory
      CALL FUNCTION 'CRM_ORDER_MAINTAIN'
        EXPORTING
          IT_PARTNER        = lt_partner
        CHANGING
          ct_orderadm_h     = lt_orderadm_h
          CT_INPUT_FIELDS   = lt_input_fields
        EXCEPTIONS
          ERROR_OCCURRED    = 1
          DOCUMENT_LOCKED   = 2
          NO_CHANGE_ALLOWED = 3
          NO_AUTHORITY      = 4
          OTHERS            = 5.
      IF SY-SUBRC <> 0.
          Write 'Error!'.
      ENDIF.
    * Get guids
      LOOP AT lt_orderadm_h INTO ls_orderadm_h.
        INSERT ls_orderadm_h-GUID INTO TABLE gt_obj_guids.
      ENDLOOP.
      CALL FUNCTION 'CRM_ORDER_SAVE'
        EXPORTING
          it_objects_to_save = gt_obj_guids
        EXCEPTIONS
          document_not_saved = 1.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    Hope this solves the issue.
    Regards,
    Saumya

  • Creation of Leads through the Interaction Centre (IC_AGENT) Role

    Hi,
    How Can I create Leads through the Interaction Centre(IC_AGENT) Role in WEB UI?
    Regards,
    Srinivas

    Hi,
    If you are using IC_AGENT as the role you can try it this way,Go to the INDEX Workcenter and from there you can try creating a LEAD.
    Hope this helps you out!
    Regards.

  • Error in lead creation

    Hi Experts,
    Has any one used bapi- BAPI_LEAD_CREATEMULTI for creation of lead? I am trying to create lead using BAPI_LEAD_CREATEMULTI but it is throwing one or the other error and the lead is not getting created. I am passing the prospect and contact information as partners. Also, i need to pass text information.
    Please check the below code and let me know where I am going wrong.
    The code is as follows:
    { loop at i_inputfile into st_inputfile.
       CLEAR: st_header, l_guid, l_handle, l_phandle.
       l_handle  = sy-tabix.
       l_phandle = sy-tabix.
    GUID Handle
       st_header-handle = l_handle.
       st_headerx-guid = c_x.
       st_header-process_type = c_zald.
       st_headerx-process_type = c_x.
       st_header-description = st_inputfile-description.
       st_headerx-description = c_x.
       st_header-posting_date = sy-datum.
       st_headerx-posting_date = c_x.
       st_header-source = st_inputfile-source.
       st_headerx-source = c_x.
       st_header-lead_type = st_inputfile-lead_type.
       st_headerx-lead_type = c_x.
       st_header-qual_level_man = st_inputfile-qual_level_man.
       st_headerx-qual_level_man = c_x.
       APPEND st_header TO i_header.
       APPEND st_headerx TO i_headerx.
    To fill the PartnerX Structure
    st_partnerx-ref_handle = c_x.
    st_partnerx-ref_kind = c_x.
    st_partnerx-ref_partner_handle = c_x.
    st_partnerx-kind_of_entry = c_x.
    st_partnerx-partner_no = c_x.
    st_partnerx-partner_fct = c_x.
    st_partnerx-no_type = c_x.
    st_partnerx-display_type = c_x.
    st_partnerx-mainpartner = c_x.
    APPEND st_partnerx TO i_partnerx.
    *To fill the Partner Structure
    CLEAR:st_partner.
    st_partner-ref_handle = l_handle.
    st_partner-ref_kind = c_a.
    st_partner-ref_partner_handle = l_phandle. "'0001'.
    st_partner-kind_of_entry = C_C. "'C'. """""""A
    clear: st_pc_exist.
    READ TABLE i_pc_exist INTO st_pc_exist with key ext_id = st_inputfile-ext_id
                                                    acc_id = st_inputfile-acc_id
                                                    cnt_id = st_inputfile-cnt_id BINARY SEARCH.
      IF SY-SUBRC = 0.
        st_partner-partner_no = st_pc_exist-prospect.
      ELSE.
        st_partner-partner_no = st_inputfile-acc_id.
      ENDIF.
    st_partner-partner_fct = C_PROSPECT.
    st_partner-no_type = C_BP. "'BP'.
    st_partner-display_type = C_BP. "'BP'.
    st_partner-MAINPARTNER = C_X. "'X'.
    APPEND st_partner TO i_partner.
    st_partner-ref_handle = l_handle.
    st_partner-ref_kind = c_a.
    st_partner-ref_partner_handle = l_phandle. "'0001'.
    st_partner-kind_of_entry = C_C. "'C'""""""""A
      IF st_pc_exist-contact IS NOT INITIAL.
        st_partner-partner_no = st_pc_exist-contact.
      ELSE.
        st_partner-partner_no = st_inputfile-acc_id.
      ENDIF.
    st_partner-partner_fct = C_CONTACT.
    st_partner-no_type = C_BP.
    st_partner-display_type = C_BP.
    st_partner-MAINPARTNER = C_X.
    APPEND st_partner TO i_partner.
    CLEAR: st_partner.
    Fill input fields
    CLEAR:st_inputfields.
    st_inputfields-ref_handle = l_handle.
    st_inputfields-ref_kind = c_a.
    st_inputfields-objectname = c_orderadm_h.
    st_inputfields-fieldname = c_process_type.
    APPEND st_inputfields TO i_inputfields.
    CLEAR st_inputfields.
    st_inputfields-ref_handle = l_handle.
    st_inputfields-ref_kind = c_a.
    st_inputfields-objectname = c_lead_h.
    st_inputfields-fieldname = c_source.
    APPEND st_inputfields TO i_inputfields.
    CLEAR st_inputfields.
    st_inputfields-ref_handle = l_handle.
    st_inputfields-ref_kind = c_a.
    st_inputfields-objectname = c_lead_h.
    st_inputfields-fieldname = c_qual_level_man.
    APPEND st_inputfields TO i_inputfields.
    CLEAR: st_inputfields.
    st_inputfields-ref_handle = l_handle.
    st_inputfields-ref_kind = c_a.
    st_inputfields-objectname = c_lead_h.
    st_inputfields-fieldname = c_leadtype.
    APPEND st_inputfields TO i_inputfields.
    CLEAR: st_inputfields.
    st_inputfields-ref_handle = l_handle.
    st_inputfields-ref_kind = c_a.
    st_inputfields-objectname = c_lead_h.
    st_inputfields-fieldname = c_description.
    APPEND st_inputfields TO i_inputfields.
    CLEAR: st_inputfields.
    st_inputfields-ref_handle = l_handle.
    st_inputfields-ref_kind = c_a.
    st_inputfields-objectname = c_lead_h.
    st_inputfields-fieldname = c_status.
    APPEND st_inputfields TO i_inputfields.
    CLEAR: st_inputfields.
    st_inputfields-ref_handle = l_handle.
    st_inputfields-ref_kind = c_a.
    st_inputfields-objectname = c_orderadm_h.
    st_inputfields-fieldname = c_posting_date.
    APPEND st_inputfields TO i_inputfields.
    CLEAR st_inputfields.
    clear: st_header, st_inputfile.
    endloop.
    Simulated test run
    CALL FUNCTION 'BAPI_LEAD_CREATEMULTI'
    EXPORTING
    TABLES
       HEADERX               = i_headerx
      ITEMX                 =
       PARTNERX              = i_partnerx
       HEADER                = i_header
      ITEM                  =
       PARTNER               = i_partner
       TEXT                 = i_text
       textx                = i_textx
       INPUT_FIELDS          = i_inputfields
       RETURN                = i_return_l
       SAVED_PROCESS         = i_save. }
    Help will be appreciated.
    Thanks and Regards
    Sangeeta.
    Edited by: Sangeeta on Nov 4, 2010 5:08 AM
    Edited by: Sangeeta on Nov 4, 2010 5:10 AM

    Hi Sanggeta,
    Samantak replied with a great tip. You can share which error is returned?
    Also, you can check SM13 and tell us if there are any update request with error.
    Best regards,
    Caíque Escaler

  • Using Interactive Adobe Forms in LEAD processing(SAP CRM 7.0)

    Hi,
    I am new to Adobe forms. I want to create it for lead. After creation of lead adobe form should get mailed to required partner automaticaly. This partner will fill the data and send back to update the system.
    Please suugest me any documentation to achieve this.
    Regards,
    Nikhil

    Dear Nitin,
    The first I am not sure, so hopefully someone else can help you with that.
    For the second, If you want a Z-field to be used in the action conditions, you should add an attribute to your BOR-object in SWO1.
    How to do this can be found here.
    [http://sapcrmweblog.blogspot.com/2011/01/adding-attributes-to-bor-object.html|http://sapcrmweblog.blogspot.com/2011/01/adding-attributes-to-bor-object.html]
    Hope it helps...
    Regards,
    Pieter Rijlaarsdam

  • Can we save the warning message in the message log of Lead.

    Hi,
    I have an requirement where i have to raise an warning message while "creation of lead from campaign" on campaign UI, I can raise that warning message using below code.
    DATA lr_message_service TYPE REF TO cl_bsp_wd_message_service.
    lr_message_service = cl_bsp_wd_message_service=>get_instance( ).
    lr_message_service->add_message( iv_msg_type = if_genil_message_container=>mt_warning
    iv_msg_id = 'ztest'
    iv_msg_number = 006
    iv_msg_level = '1' ).
    but how can i retain this warning message in the lead message log ? "when ever i will open that lead again that warning message should be there"
    thanks & regards
    raman khurana.

    Hi,
    Below are the steps to write to the log and then read it,
    1. Create a Log useing FM BAL_LOG_CREATE. This will return the log handle.
    2. Add messages to log using FM BAL_LOG_MSG_ADD. Importing parameters are log handle and the message.
    3. You can read the log by passing the log handle to FM BAL_GLD_SEARCH_MSG. This will return the message handle.
    4. Now pass the message handle to FM BAL_LOG_MSG_READ. This inturn return the message id and class. Pass the msg. details to FM BAL_DSP_TXT_MSG_READ to read the message text.
    Regards,
    Arun Kumar

  • Creating BP and then a Lead transaction from the incoming Email.

    Hi CRM Gurus,
    I am in a situation where our business needs to create a BP and then a Lead Transaction from the incoming mail from the customer.
    Can some one please help me out with the configuration, which needs to be done to achieve the mentioned requirement.
    Thanks in advance..
    Cheers!!!
    Ajay

    Hi
    this example is not for ERMS but in it there should be quite similar possibility.
    for Interaction Center you have Agent Inbox functionality, in SPRO tcode your will find configuration for Agent Inbox, where you may review it. To find workflow which is used by system you may go to SWETYPV tcode and look for object CICSUPRT2 and event MAILRECEIVED. Or go to SWEL and check whuch workflows were executed at a time when email arrived.
    Then best will be to copy this workflow in tcode SWDD to a new one, and set it in above configuration to be executed.
    In SWDD in this workflow add tasks for BP creation and Lead creation. Possibly you will find methods to be used in tcode SWO1 for objects like Lead or Business Partner. Or you may develop yours object in SWO1 with own menthods, and use it later in SWDD for tasks creation.
    Regards

  • Performance of BAPI's to create Leads and Activities

    Hi,
    I'm using the BAPI's BAPI_LEAD_CREATEMULTI and BAPI_ACTIVITYCRM_CREATEMULTI to create Leads and Activities.
    The scenario is:
    1) The input file has 3 types of records coming in
       (a) Leads only
       (b) Activities only (Prospect Lead activities)
       (c) LEad + Activity (rescheduled activities)
    2) Depending on the type of record, I'm required to create the relevant order and if required link the lead and activity (scenario - C)(using the FM CRM_DOC_FLOW_MAINTAIN_OW).
    3) In addition to this, I'm also required to link campaign elements to both Leads and Activities (done within the BAPI's BAPI_LEAD_CREATEMULTI and BAPI_ACTIVITYCRM_CREATEMULTI in the doc_flow structure).
    ISSUE:
    The issue that I am facing is that it is taking a lot of time to create these. I'm basically running a custom conversion program for LEads and Activities. The rate is almost 6-8 secs for each record, and we have about 500,000 records to be converted.
    Also, I'm having to use the following function modules after the creation of Leads and Activities:
    1) CRM_MA_ACT_SAVE - to set the status of the activity to OPEN or IN PROGRESS. This is being done after the creation of an activity because the BAPI BAPI_ACTIVITYCRM_CREATEMULTI seems to always default the status to OPEN.
    2) CRM_ORDER_CHANGE_STATUS - to set the status of the LEad to OPEN or IN PROGRESS. This is being done after the creation of an activity because the BAPI BAPI_LEAD_CREATEMULTI seems to always default the status to OPEN.
    3) BAPI_LEAD_ATT_CHANGE - to set the STATUS SINCE field for a Lead. This is being done because I'm unable to set the STATUS_SINCE field using the BAPI BAPI_LEAD_CREATEMULTI.
    The logic being used within the code is to process a batch of records (500/1000 records - value is an input selection parameter) from the input file in one go, and then commit all of them after their creation. After this, the next batch of records is again processed and committed.
    We've also tried to create LEads and Activities record by record and not in batches... but the performance still remains the same.
    I'm not sure what is slowing down the process. If whether it is all the commits, or if it is the additional use of the FM's to change the 'status' and 'Stauts-since' values after having committed the leads and activities.
    When we look at the LEads and Activities that are created, everything looks fine. It is only that the performance is really slow.
    Thanks for all your patience and suggestions,
    - Akarsh

    In order to improve the performance you could use several processes. Just start you conversion-program with several variants at the same time.
    Last time I converted 80.000 contracts it took me 6 hours with 5 processes.
    Hopes this helps.

  • Performance of BAPI's to create Leads and Activities in CRM

    Hi,
    I'm using the BAPI's BAPI_LEAD_CREATEMULTI and BAPI_ACTIVITYCRM_CREATEMULTI to create Leads and Activities.
    The scenario is:
    1) The input file has 3 types of records coming in
    (a) Leads only
    (b) Activities only (Prospect Lead activities)
    (c) LEad + Activity (rescheduled activities)
    2) Depending on the type of record, I'm required to create the relevant order and if required link the lead and activity (scenario - C)(using the FM CRM_DOC_FLOW_MAINTAIN_OW).
    3) In addition to this, I'm also required to link campaign elements to both Leads and Activities (done within the BAPI's BAPI_LEAD_CREATEMULTI and BAPI_ACTIVITYCRM_CREATEMULTI in the doc_flow structure).
    ISSUE:
    The issue that I am facing is that it is taking a lot of time to create these. I'm basically running a custom conversion program for LEads and Activities. The rate is almost 6-8 secs for each record, and we have about 500,000 records to be converted.
    Also, I'm having to use the following function modules after the creation of Leads and Activities:
    1) CRM_MA_ACT_SAVE - to set the status of the activity to OPEN or IN PROGRESS. This is being done after the creation of an activity because the BAPI BAPI_ACTIVITYCRM_CREATEMULTI seems to always default the status to OPEN.
    2) CRM_ORDER_CHANGE_STATUS - to set the status of the LEad to OPEN or IN PROGRESS. This is being done after the creation of an activity because the BAPI BAPI_LEAD_CREATEMULTI seems to always default the status to OPEN.
    3) BAPI_LEAD_ATT_CHANGE - to set the STATUS SINCE field for a Lead. This is being done because I'm unable to set the STATUS_SINCE field using the BAPI BAPI_LEAD_CREATEMULTI.
    The logic being used within the code is to process a batch of records (500/1000 records - value is an input selection parameter) from the input file in one go, and then commit all of them after their creation. After this, the next batch of records is again processed and committed.
    We've also tried to create LEads and Activities record by record and not in batches... but the performance still remains the same.
    I'm not sure what is slowing down the process. If whether it is all the commits, or if it is the additional use of the FM's to change the 'status' and 'Stauts-since' values after having committed the leads and activities.
    When we look at the LEads and Activities that are created, everything looks fine. It is only that the performance is really slow.
    Thanks for all your patience and suggestions,
    - Akarsh

    In order to improve the performance you could use several processes. Just start you conversion-program with several variants at the same time.
    Last time I converted 80.000 contracts it took me 6 hours with 5 processes.
    Hopes this helps.

  • Campaigns to Service Orders

    Hi
    In one of the process for the Service Planning for the project I am into we plan to create a Service Oders for all the Target Group Customers individually assigned to the Campaign when its Released/Executed (Just like creation of Leads from Campaign),
    Like to know if their is any standard proceeder for the above mentioned Process,
    Await your Expert Suggestions.............
    Tanx
    Krish

    Hi,
    I am not sure if this is the right strategy !! May be you would consider discussing with business on this at your company/client.
    Service Order needs a Service Ticket or Service Request as a standard process . Similarly, Campaigns are supoosed to identify prospects and convert them to potential customers via Lead management. A successful Campaign ends with Opportunity creations and then the sales process starts where opportunities are converted into  Quotations and then to sales orders.
    I do not this there is a standard way you can create service orders from a campaign as it is never the scenario of SAP best practices and hence SAP might not have solution for this scenario.
    Thanks & Regards
    Suchita

  • Regarding copying of campaign notes onto activity or oppurtunity

    Hello Experts,
    We are having the following requirements:
    u2022 Include Sales Rep instructions on required activities associated with task (i.e.: Campaign Name and objective, call on account by X, answer survey questions, create opportunity for newly identified business, etc)
    We need to copy the campaign notes which will be present in the notes assignment block onto activity or oppurtunity created.
    Provide me some pointers on this requirement.

    Hi Anup,
    Thanks for your reply.There are three methods inside the BADI CRM_MKT_MODIFY_ORDER.They are:
    1.MODIFY_ACTIVITY_OBJ-Modifies Creation of Contacts/Tasks
    2.MODIFY_LEAD_OBJ-Modifies Creation of Leads
    3.MODIFY_SALES_ORDER_OBJ-Modifies Creation of Sales Orders.
    So as I am new to SAP CRM,I just want to know which are the fields which are required for copying the notes in these three methods and also I want to know how to implement the logic inside the methods.Please help.

  • Parameters not gettin passed while lead creation..........

    Hi...
                 I am passing the values of the fields SOURCE and IMPORTANCE in the exporting parameter IT_LEAD_H to the FM CRM_ORDER_MAINTAIN while lead creation...When I check the CRM_LEADH table I find that these values arent gettin reflected ...The guid and the leadtype are gettin saved but the values of these two fields are not present...This is the code I'm using.....
    CT_ORDERADM_H
        ls_orderadm_h-handle        = '1'.
    .   ls_orderadm_h-PROCESS_TYPE  = 'LEAD'.
        ls_orderadm_h-mode          = 'A'.
        INSERT ls_orderadm_h INTO TABLE lt_orderadm_h.
      build table with change fields
        FREE lt_input_field_names.
        ls_input_field_names-fieldname = 'PROCESS_TYPE'.
        INSERT ls_input_field_names INTO TABLE lt_input_field_names.
        ls_input_field_names-fieldname = 'MODE'.
        INSERT ls_input_field_names INTO TABLE lt_input_field_names.
        CLEAR ls_input_fields.
        ls_input_fields-ref_handle  = '1'.
      ls_input_fields-objectname  = 'ORDERADM_H'.
        ls_input_fields-field_names = lt_input_field_names.
        INSERT ls_input_fields INTO TABLE ct_input_fields.
    CRMT_LEAD_H_COMT
      IF IT_LEAD_H IS INITIAL.
        ls_lead_h-ref_handle     = '1'.
        ls_lead_h-SOURCE         = '002'.
        ls_lead_h-IMPORTANCE     = '2'.
      ENDIF.
        INSERT ls_lead_h INTO TABLE lt_lead_h.
      build table with change fields
        FREE lt_input_field_names.
        IF ls_lead_h-SOURCE IS NOT INITIAL.
          ls_input_field_names-fieldname = 'SOURCE'.
          INSERT ls_input_field_names INTO TABLE lt_input_field_names.
        ENDIF.
        IF ls_lead_h-IMPORTANCE IS NOT INITIAL.
          ls_input_field_names-fieldname = 'IMPORTANCE'.
          INSERT ls_input_field_names INTO TABLE lt_input_field_names.
        ENDIF.
        CLEAR ls_input_fields.
        ls_input_fields-ref_handle  = '1'.
        ls_input_fields-ref_kind    = 'A'.
        ls_input_fields-objectname  = 'LT_LEAD_H'.
        ls_input_fields-field_names = lt_input_field_names.
        INSERT ls_input_fields INTO TABLE ct_input_fields.
    IT_STATUS
      IF is_status IS INITIAL.
        ls_status-ref_handle     = '1'.
        ls_status-status         = STATUS.
       ls_status-user_stat_proc = 'CRMLEAD'.
        ls_status-activate       = 'X'.
       ls_status-process        = 'ACCI'.
      ENDIF.
        INSERT ls_status INTO TABLE lt_status.
      build table with change fields
        FREE lt_input_field_names.
        IF ls_status-status IS NOT INITIAL.
          ls_input_field_names-fieldname = 'STATUS'.
          INSERT ls_input_field_names INTO TABLE lt_input_field_names.
        ENDIF.
        IF ls_status-activate IS NOT INITIAL.
          ls_input_field_names-fieldname = 'ACTIVATE'.
          INSERT ls_input_field_names INTO TABLE lt_input_field_names.
        ENDIF.
        CLEAR ls_input_fields.
        ls_input_fields-ref_handle  = '1'.
        ls_input_fields-ref_kind    = 'A'.
        ls_input_fields-objectname  = 'STATUS'.
        ls_input_fields-field_names = lt_input_field_names.
        INSERT ls_input_fields INTO TABLE ct_input_fields.
    ENDIF.
    bring changed fields with values to object layer
      CALL FUNCTION 'CRM_ORDER_MAINTAIN'
        EXPORTING
          it_lead_h         = lt_lead_h
          it_survey         = it_survey
          it_status         = lt_status
        CHANGING
          ct_orderadm_h     = lt_orderadm_h
          ct_orderadm_i     = lt_orderadm_i
          ct_input_fields   = ct_input_fields
        EXCEPTIONS
          error_occurred    = 1
          document_locked   = 2
          no_change_allowed = 3
          no_authority      = 4
          OTHERS            = 5.
    Are there any other parameters that I have to pass?Plz suggest a solution for this......

    Hi Francois,
    Thank you for looking into the issue. Your first response was did you try get_form_field. Yes I did, and it did not work. I realised later (hopefully correctly) that get_form_field will work only if the field below is treated as an input field within <htmlb:form> and </htmlb:form>.
    I shall re-explain the scenario. In default.htm, I enter an IDoc Number(input field) and click submit button. In the <form action > I have mentioned idoc.htm page. In idoc.htm, in On Initialization , I create a tree.
    Method of creating tree
    a) I create a table of type TVIEWNODE and populate the relevant details, except for the link field. The parameters that needs to be passed to the next page is a structure. In order to achieve this(I found this method in one of the posts in the forum),
    Step I -- Serialize the structure data using CL_BSP_UTILITY=>SERIALIZE_DATA and fill a table LT_PARAMETER_LIST.
    Step II -- I then construct a URL using CL_BSP_RUNTIME=>IF_BSP_RUNTIME~CONSTRUCT_BSP_URL passing APPLICATION NAME, 'SEGMENT.HTM' and table LT_PARAMETER_LIST.
    Step III -- This method returns a URL which is then appended in the TVIEWNODE table and the tree is created.
    The tree is created perfectly and the links are perfect as well.
    However as mentioned in my earlier post when I click on the link, the URL shows all the attributes but I am not able to fetch the same using GET_ATTRIBUTE method or GET_FORM_DATA method.
    Next point mentioned was create an attribute. This is an interesting point that you have mentioned. In page attributes, when I try pa_s_idoc-segnam, it mentions special characters not allowed.
    I will explore the possibility of creating fields of internal table as page attributes i.e. using SEGNAM instead of pa_s_idoc-SEGNAM and then pass values to these.
    If there are any other solutions do let me know.
    Thanks again, Francois.

Maybe you are looking for