Skip to Content
author's profile photo Former Member
Former Member

Set user as employee responsible at account creation

Dear all,

Currently, in CRM 2007 i have a customized IC profile, that uses the component IUICMD for account creation.

When an account is created by an IC agent, the employee responsible is not set, and the relationship (is employee responsible) is not created between the USER and the ACCOUNT.

I would like to know how to set this relationship in customizing. Otherwise, if it has to be coded, is there a FM i can use?

Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 13, 2012 at 01:40 PM

    Hello everyone,

    In the end, i implemented EH_ONSAVE, in component IUICMD/CreateOrg , IUICMD/CreatePerson , to create the relationship, using the following FM :

    CALL FUNCTION 'BAPI_BUPR_RELATIONSHIP_CREATE'

    EXPORTING

    BUSINESSPARTNER1 = lv_bp

    BUSINESSPARTNER2 = lv_bp_user

    RELATIONSHIPCATEGORY = 'BUR011'

    .

    " Then it is necessary to call this FM to commit the changes.

    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

    .

    Thank you all for your replies.

    Cheers.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 13, 2012 at 05:04 AM

    Hi Blaz,

    You have to create an account first. Then you have to attach your user as an employee to this account. For that, you need to select the BP role employee in bp transaction. Then go to the identification tab->employee data, enter your employee number and user name.

    Best Regards,

    Leon

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Sorry Blaz. I missed out your earlier post.

      If you want to replicate the same , then first you need to identify the view where Account creation is happening . Probably in the DO_PREPARE_OUTPUT of the view , you have to create the employee relationship entity via relation BuilEmpRelationRel .

      Check out the method ON_NEW_FOCUS of context node EMPLOYEERESPONSIBLE in BP_HEAD. There you can see many checks are being performed. You can replicate the same and create the child entity and finally set the values in the created entity.

      Regards,

      Nithish

  • Posted on Jun 13, 2012 at 10:59 AM

    Could you check if this BADI is called when an account is created.

    Badi : BADI_CRM_BP_UIU_DEFAULTS

    Create an implementation for BADI_CRM_BP_UIU_DEFAULTS

    Method : IF_UIU_BP_DEFAULTS~GET_DEFAULT_VALUES

    Try if this method is being called in your case(IUICMD ) . If it is being called then you can code here

    Hope it helps

    Regards

    Chandrakant Kulkarni

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.