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

Similar Messages

  • Role of Partner Function in One Time Vendors..

    Hi All,
    Can any one let me know the significance of the Partner function in a vendor. Should we have to define the partner function for One Time Vendor in R/3 system, which will be replicated in SRM??
    Thanks in Advance.
    BR,
    Mahesh. J

    Hi Ravinagh, many thanks for the information.
    I've tested your proposed solution but unfortunately can't get it to work.
    I've activated the delivered scenario 0003 (RECIPIENT BANK ORIENTED) & created a general bank chain as follows via transaction FIBB:
    In the Bank Chains screen, BankChn ID = 00001, No. = 1, Typ = 2, Corr. ctry, Corr.Bank key & Bank acct all completed with intermediary bank details.
    In the Assignment screen, Crcy = USD, Sender Ctry = GB, Sender Bank Key - 200000, Recipient Ctry = KY, Recipient Bank key = blank, PmntMthSu = blank, BankChn ID = 00001.
    I then created a OTV invoice with bank details of Bank Country = KY (& valid bank key & account).
    The payment program selects the invoice to be paid using currency USD, house bank which uses bank key 200000 and uses the bank details as entered in the OTV.  It pays the invoice but no mention is made in the log of intermediary banks, and when I check table REGUH there are no entries in the intermediary bank fields for the payment proposal.
    I'd be grateful for any further suggestions!

  • How can I add search parameter "Partner Function" to the inbox in ICweb?

    Hello
    I need to add search parameter "Partner Function" to the inbox ICweb search.
    Today I can search for My open transaction.
    The meaning of "My" in the EM Responsible parameter is that my BP number assign to any transaction in any partner function.
    I wont to limit the search to look in a particular partner function. for example: 00000014 Employee responsible.
    I mean in hardcode and not as a parameter selection screen.
    I know that this functionality exist in CRM5 but i am in CRM4
    Thanks
    Merav

    Hi Darren,
    I have implemented this BAdi and when I am trying to activate this it is giving me short dump saying 'SYSTEM_CORE_DUMPED', please help.
    During the course of my actions I implemeted this BAdi using transaction SE19, the activated this it is activated correctly, then I did some changes in method 'CUSTOM_HIT_LIST_SORT' but then whenever I try activate either the metod or the implemetation it is gives me a pop up saying 'Work Process restarted, session terminated' and the session terminates. On ERMS web page I see the Rabex error and in ST22 I see the SYSTEM_CORE_DUMPED error with following dump details
    Runtime Errors         SYSTEM_CORE_DUMPED
           Occurred on     07/21/2006 at 09:07:51
    Process terminated by signal 0.
    What happened?
    The current ABAP program had to be terminated because the
    ABAP processor detected an internal system error.
    The current ABAP program "ZCL_IM_TTT_IC_INBOX_BADI_2====CP " had to be
    terminated because the ABAP
    processor discovered an invalid system state.
    Information on where termination occurred
    The termination occurred during generation of the ABAP program
    "ZCL_IM_TTT_IC_INBOX_BADI_2====CP ".
    The point of termination was in line 5 of the ABAP source code of the
    (Include) program "CL_CRM_AUI_ENTITY=============CU ".
    of the program "CL_CRM_AUI_ENTITY=============CU " (when calling the editor
    50).
    Source code extract
    000010   class CL_CRM_AUI_ENTITY definition
    000020     public
    000030     inheriting from CL_CRM_BOL_ENTITY
    000040     abstract
         >     create public .
    000060
    000070   " public components of class CL_CRM_AUI_ENTITY
    000080   " do not include other source files here!!!
    000090   public section.
    000100
    000110     interfaces IF_CRM_IC_CONTACT .
    000120
    000130     methods ACCEPT
    000140     abstract
    000150       importing
    000160         !IR_ENTITY type ref to CL_CRM_BOL_ENTITY
    Please help.
    Regards,
    Tarun Goel

  • Assigning Partner Function to Ship to party.

    Hiya
    How could we assign a partner function[sales employee] to a ship to party and call it in an order...
    Thanks

    Hi Rajendra,
                 You fallow these steps this may help you to full fill your requirement.
    1.Define the partner function in the IMG-->Sales and Distribution >Basic functions>Partner Dterminatin.
    3.You pur that partner function in your ship to party procedure then chek the mark as mandatory.
    3.you assign that partner function to your ship to party account group
    4.You assign that ship to party procedure to your ship to party account group.
    5. Now you create master data with that account group here you enter the sales employee in the Partner functions tab in the sales area data.
    (Bur you need to main tain the master data for that sales employee).
    6.if you create sales order with that ship to party sales employ also will come in the sales order.
    I hope this will help you
    Regards,
    Murali.

  • Error Message: Assign partner functions to 0010

    Hello All,
    When i confirm the BP in IC WebClient I get the following error message
    Customizing settings missing. assign partner functions to 0010
    Please suggest me how to solve this error message.
    Cheers Raj.

    Hi Raj
    Did u managed to fix this?
    Jogi

  • At the time of creation of POaccount assignment is coming mandatory

    Dear all;
    At the time of creation of PO system showing the msg that the  account assignment is mandatory for the material ,how to overcome this?
    Kindly suggest whre in material master record I can change settings for account assingment ,or the control is somewhere else.
    Regards;
    Joydeep Mukherjee

    Hi
    In OMS2 t-code
    for your material type and  plant ,you have to mark value based and qunaity based updation mark
    Regards
    kailas Ugale

  • How to Add Partner function in the main screen of the Sales order???????

    Hello All,
    I am working on ECC 6.00 SD module
    I want to add partner function in the main screen of the sales order, that mean add more partner function beside Sold to party and the ship to party to be in the order header, Is it possible and how?
    Regards
    Jacopo Françoise

    Hi
    If you want in the sales order , above the sold to party as the  box then you need to go for enhancements
    Regards
    Srinath
    Edited by: sri nath on Jun 11, 2008 6:56 PM

  • Additonal partner functions at the business agreement

    Hi Experts,
    We have a requirement to pass on one of the partner functions to the clerk responsible field at the contract account in IS-U.
    For this ,we want to use the additional partner functions section at the buisness agreement level in CRM.
    We have maintained the partner function which we want to replicate in IS-U in the configurations settings for IS-U under the following path-
    SPRO->Financial Accounting->Contract Account AR&AP->Integration->Customer Relationship Mgmt->Buisness Agreement->Define determination of Clerk responsible for Replication from CRM.
    Now the problem, is when we are giving the partner function along with the business partner value in the "addtional partner functions" section under the BA tab in CRM,and saving it , the changes are not getting saved and no B-Doc is getting fired.
    However, when we are using any other partner function like alternate payer, dunning recipent in the same BA tab and saving it, it is working fine and the partner function value is replicated in the clerk responsible field at the contract account in IS-U.
    Can anyone please help me in solving the issue?
    Thanks in advance.
    Cheers,
    Amlan

    Try use BADI BUPA_GENERAL_EXPORT. In method GENERAL_DATA_EXPORT you can check main BP data and raise error.
    Example for method if_ex_bupa_general_export~general_data_export:
    DATA: l_but000 TYPE but000,
            return TYPE bapiret2.
      SELECT SINGLE * FROM but000 INTO l_but000
        WHERE name_last = is_but000-name_last
        AND   name_first = is_but000-name_first.
      IF sy-subrc IS INITIAL.
        return-type = 'E'.
        return-id = 'BC'.
        return-number = '701'.
        return-message_v1 = 'Check error'.
        APPEND return TO ct_return.
      ENDIF.

  • Different batch no in prod order at the time of creation of prod order

    Hi, we need different batch numbers in production order at the time of creation of production order. tried in system, i can able to create only one batch no at the time of creation of order. we need different batch no at the time of order creation and same no should be assigned at the time of GR from prod order. pls advise how to map this.

    Dear,
    Use the Exit EXIT_SAPLCOBT_001 under enhancement PPCO0001 where-in based on your requirement you can create batch for your order. You can use CALL FUNCTION 'VB_CREATE_BATCH' to create the batches as per your requirement.
    Also make sure the automatic batch creation setting in Prodn Scheduling profile has been turned-off so that the batch is created only through the user-exit.
    Refer this thread,
    Re: Batch creation
    Please try and revert back.
    Regards,
    R.Brahmankar

  • Issue at the time of creation of transfer order for inbound delivery

    Hello,
    I am facing one issue at the time of creation of transfer order for inbound delivery.
    If I create inbound delivery for purchase order with account assignment as 'M' (Ind. cust. w/o KD-CO), inbound delivery is not updated. Also document flow for inbounde delivery s not updated. I can create N number of transfer orders for on inbound delivery. Need help to resolve issue.
    If I create inbound delivery for purchase order with account assignment other than 'M' (Ind. cust. w/o KD-CO), inbound delivery and document flow is updated.
    Thanks and Regards,
    Nikhil

    Hi
    In OMS2 t-code
    for your material type and  plant ,you have to mark value based and qunaity based updation mark
    Regards
    kailas Ugale

  • The time for transit, transportation lead time and loading time of the mate

    Dear Friends,
    Please mail to me, where should I give the time for transit, transportation lead time and loading time of the material at the ware house.
    This is at the time of Transportation scheduling, for a specific material.
    With regards,

    i am giving u the exact & specific answer.
    please follow the menu path in SPRO
    IMG, Logistics execution, shipping, basic shipping functions, scheduling, delivery and tranportation scheduling, maintain duration,
    In that screen, maintain the settings
    Hope it answers
    Do reward points if it is useful

  • Alert message is needed at the time of creation ,if it reaches ,the maximu

    DEAR SA EXPERTS,
    Can you please me that alert message is needed at the time of creation ,if it reaches ,the maximum stock level (Stock+level)
    Thanks
    Mohit

    Hi,
    Please refer the below links.
    Alert Message
    Re: Alert Message
    Hope it helps you.
    Thanks.

  • Problem at the time of creation order

    Dear Gurus,
    facing update termination error at the time of creation/change the sales order..in development system
    after some analysis,  found one more error due to which above mention error is coming
    report run : "RMCSUTIC" : check utility logistic info system
    after running this report system giving error message "Unit O2 : No DDIC Information for source field OI0BW_ADQN - OIMSEHI1"
    but when but in production server it's working fine without error message
    kindly suggest some solution for the same
    Regards,

    No DDIC Information for source field
    You may have to check the following notes.  Take the help of your basis team.
    1)  542872
    2)  557683
    3)  579022
    4)  645136
    thanks
    G. Lakshmipathi

  • Rule Modeler - Automatic assignment Partner Function based on PC of IBASE

    Hi Experts,
    I have the following requirement. The IC Agent when receiving a call has to create a Service Ticket (Service Order). By creating the Service Ticket the responsible Service Partner has to be assigned to solve the service incident based on the Postal code of the IBase (Installed Base).
    The following steps I have done:
    1. I have created the Service-ID Z_RE_RULE_EXEC (Rule Invocation) with the following properties:
        CONTEXT               Context
        DEF_ROUTING    Default Routing
        LOG_LEVEL        Logging Level
        POLICY                Root Policy
    2. Under Repository I have defined a new context: Z_TICKET_ASSIGMT with the following properties:
    Context Properties: No Customizing
    Authorization Groups: No Customizing
    Attributes: 
    Name: ZPOST_CODE1_IB
    Show Attribute: Flag marked
    X Path Expression: /parts/currentIbase/ComponentAddress/POST_CODE1/text()
    Fact Gathering Service: FG_IC_REF_OBJ
    Attrib. Ext. Class: CL_CRM_ERMS_ATXT_TEXT_NCAT
    Actions:
    Action-ID: Z_PARTNER_ID
    Show Action: Flag marked
    Action Service ID: DD_AH_PARTNER_ID
    Action Parameters:
    Parameter-ID: PARTNER_ID
    Display Mode: O
    Inp Spt Class: CL_CRM_DD_F4_BP
    Afterwards I created the Rule Policy: Z_PRUEBA2 with the condition that if the Postal Code of the IBase is 08030 or 08035
    the Partner Function ID 56 has to be assigned to the Service Ticket. I have released the Rule Policy afterwards.
    Into the standard Service Manager Profile SAP_ORDERROUTING I have added the created
    Service-ID Z_RE_RULE_EXEC with the following properties:
    CONTEXT:     Z_TICKET_ASSIGMT
    LOG_LEVEL:     0
    POLICY:     Z_PRUEBAS2
    Now I want to test the rule policy by entering with the ROle SAP_CRM_UIU_IC_MANAGER (IC Manager) but I can not see any possibility to do that. So my questions is how I can test the rule policy Z_PRUEBAS2? Do I have to assign the Service Manager Profile to the IC Center Agent Role?
    Best Regards
    Oliver

    Solution: Problem solved. Error was the name of the attribute. It has to be POST_CODE1_IB
    and not ZPOST_CODE1_IB.

  • How to get the Partner Function of the corresponding index

    Hi experts,
    We have a requirement where in we need to fetch the corresponding partner function(PARTNER_FCT value) , when we click on the value help icon of a Partner_No_descr field of the component BTPARTNER.
    For eg:- When we click on the value help icon of second entry in the assignment block 'parties involved',
    we should fetch the Partner Function (PARTNER_FCT)value of the second entry.
    We tried using the GET_CURRENT ( ) ,GET_BY_INDEX ( ) etc method , but to no avail.
    Any helpful pointers would be rewarded.
    Kindly help.

    This thread remains closed.

Maybe you are looking for