cancel
Showing results for 
Search instead for 
Did you mean: 

Bapi for business partners creation in CRM

Former Member
0 Kudos

Hi,

We are trying to insert multiple organizations (business partners) in CRM from a file.

We are using the function module: "BAPI_BUPA_FS_CREATE_FROM_DATA2".

We can create the organizations with success using the above mentioned fm, but we can not make entries in "marketing attributes" tab (bp transaction).

We want all business partners that we are going to create to have the same "attribute set" with differnet values each.

The attribute set is already created.

How can we insert the attribute set and values to each business partner that we are ging to create?

Thanks in advanced.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

All these are really nice but I recently had to automatically create bussness partner for users created the same day, so I ended up using a standart FM that uses the BAPI but makes the life a lot easier when supplying the data. I had a UNAME of the user so this is what I used:


TYPES: BEGIN OF ltype_gen,

          fieldname(30)   TYPE c,

          counter         TYPE i,

          fieldvalue(132) TYPE c,

        END OF ltype_gen.

DATA: lt_gen_tab         TYPE STANDARD TABLE OF ltype_gen.

     SELECT BNAME FROM USR02 INTO ls_gen_tab-fieldvalue

      WHERE ERDAT EQ sy-datum.

      IF SY-SUBRC = 0.

        ls_gen_tab-fieldname  = 'UNAME'.

        APPEND ls_gen_tab TO lt_gen_tab.

      ENDIF.

      EXIT.

    ENDSELECT.

*---FILL user DETAILS ---*

    CALL FUNCTION '/SDF/SOLMAN_GET_USER_DETAIL'

*    DESTINATION lf_rfcdest

      TABLES

        pt_gen_tab = lt_gen_tab

        return     = lt_return.

      

      

*--- CREATE THE BP---*

    CALL FUNCTION 'CRM_DNO_MAINTAIN_BUPA_FROM_USR'

* EXPORTING

*   IV_COMMIT       = TRUE

      TABLES

        TI_DATA         = lt_gen_tab

        TE_RETURN       = lt_return

So the magic FM is CRM_DNO_MAINTAIN_BUPA_FROM_USR.

I tried to simplify the example code here so read it before running it

I got this by debugging tcode BP_gen.

And do not forget the authority checks:


  AUTHORITY-CHECK OBJECT 'B_BUPA_RLT'

      ID 'ACTVT' FIELD '03'

      ID 'RLTYP' DUMMY.

  AUTHORITY-CHECK OBJECT 'B_BUPA_GRP'

      ID 'ACTVT' FIELD '03'.

Former Member
0 Kudos

We used Function modules BAPI_BUPA_FS_CREATE_FROM_DATA2

and

CRM_MKTLIST_FILL_ATTRIBUTES.

Former Member
0 Kudos

Hi,

you can use External List Management for this functionality. you can go through [http://help.sap.com/saphelp_crm700_ehp01/helpdata/en/43/1fde88d7923566e10000000a11466f/frameset.htm] for more information on ELM.

Using ELM you can upload orgs into CRM along with their marketing attributes and you can avoid writing separate programs for that.

hope this helps.

Thanks,

Rajini Aleti.