cancel
Showing results for 
Search instead for 
Did you mean: 

Information regarding function module BCONTACT_CREATE

Former Member
0 Kudos

Hi Experts,

If anyone has used function module BCONTACT_CREATE please let me know how it works and tell the description of the parameters of the function module.

Regards,

Pravesh

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi:

Why you are not using Where used list. For an example as

CALL FUNCTION 'BCONTACT_CREATE'

EXPORTING

x_upd_online = 'X' "#EC NOTEXT

x_no_dialog = 'X' "#EC NOTEXT

x_auto = i_contact_auto

x_prgcontext = 'SAPLEPD_IMPLEMENT' "#EC NOTEXT

x_subcontext = '0001'

x_partner = i_contactdata-partner.

Regards

Shashi

Former Member
0 Kudos

Refer the code:

PERFORM create_bcontact.

FORM create_bcontact.

  • Local Declarations

DATA:

lv_con_struct TYPE bapibcontact,

lt_text TYPE bapibcontact_textline OCCURS 0,

ls_return TYPE bapireturn1,

lv_contact LIKE BAPIBCONTACT_KEY-CONTACT,

lv_desc(11) TYPE c VALUE 'Send Letter'.

  • concatenating the send letter with template id description.

CONCATENATE lv_desc gv_desc INTO gv_desc separated by space.

  • Pass the values to create Bcontact.

lv_con_struct-partner = p_partnr.

lv_con_struct-class = ' '. " Class

lv_con_struct-activity = ' '. " Activity

lv_con_struct-type = ' '. " Type

lv_con_struct-direction = '2'.

lv_con_struct-contact_date = sy-datum.

lv_con_struct-contact_time = sy-uzeit.

lv_con_struct-created_by = sy-uname.

lv_con_struct-text_line = gv_desc.

  • The Function Module BAPI_BCONTACT_CREATEFROMDATA is called for

  • the creation of Customer Contacts.

CALL FUNCTION 'BAPI_BCONTACT_CREATEFROMDATA'

EXPORTING

contactdata = lv_con_struct

IMPORTING

RETURN = ls_return

CONTACT = lv_contact.

  • Check sy-subrc

IF ls_return IS NOT INITIAL.

MESSAGE

Exit.

Else.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

ENDIF.

ENDFORM. " create_bcontact

Regards,

Shiva Kumar