cancel
Showing results for 
Search instead for 
Did you mean: 

IBase components and attachments in BAPI_ACTIVITYCRM_CREATEMULTI

Former Member
0 Kudos

Hi.

I'd like to use BAPI_ACTIVITYCRM_CREATEMULTI to create CRM-activity.

Which import-parameters of BAPI_ACTIVITYCRM_CREATEMULTI I must maintain for IBase component and attachment?

Best Regards.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Its not possible to maintain IBase components and attachment for activities using BAPI_ACTIVITYCRM_CREATEMULTI.

~Kiran

Former Member
0 Kudos

Hi. Thanks.

Kiran, Is there another FM in Solution Manager to change IBase component in order?

Former Member
0 Kudos

How can I use CRM_REFOBJ_CHANGE_OW function module to change CRM-order IBase instance?

Former Member
0 Kudos

Hi,

you can use the FM crm_order_maintain, fill the table it_service_os, some sample code to populate the inputs fields is here.

lw_field_name-fieldname = 'IB_BASE'.

INSERT lw_field_name INTO TABLE lit_field_names.

lw_field_name-fieldname = 'IB_INSTANCE'.

INSERT lw_field_name INTO TABLE lit_field_names.

INSERT lw_srv_com INTO TABLE lit_srv_com.

lw_input_fields-ref_guid = lv_service_h_guid.

lw_input_fields-objectname = 'SERVICE_OS'.

lw_input_fields-ref_kind = 'A'.

lw_input_fields-field_names[] = lit_field_names.

INSERT lw_input_fields INTO TABLE lit_input_field.

CALL FUNCTION 'CRM_ORDER_MAINTAIN'

EXPORTING

it_service_os = lit_srv_com

CHANGING

ct_input_fields = lit_input_field

EXCEPTIONS

error_occurred = 1

document_locked = 2

no_change_allowed = 3

no_authority = 4

OTHERS = 5.

IF sy-subrc <> 0.

ENDIF.

Former Member
0 Kudos

Hi. Kiran, thanks for your reply, but I still couldn't change IBase instance.

Please, look at my source and tell me what is incorrect:

data:

n type i,

t_CRMT_SRV_OSSET_COMT type CRMT_SRV_OSSET_COMT,

str_CRMT_SRV_OSSET_COM type CRMT_SRV_OSSET_COM occurs 0 with header line,

t_CRMT_SRV_OSSET_COMT1 type CRMT_SRV_OSSET_COMT1, " &#1074; CRMT_SRV_OSSET_COM-OSSET

str_CRMT_SRV_OSSET_COM1 type CRMT_SRV_OSSET_COM1 occurs 0 with header line,

t_CRMT_SRV_REFOBJ_COMT type CRMT_SRV_REFOBJ_COMT, " &#1074; CRMT_SRV_OSSET_COM1-REFOBJECT

str_CRMT_SRV_REFOBJ_COM type CRMT_SRV_REFOBJ_COM occurs 0 with header line,

t_CRMT_INPUT_FIELD_TAB type CRMT_INPUT_FIELD_TAB,

str_CRMT_INPUT_FIELD type CRMT_INPUT_FIELD occurs 0 with header line,

t_CRMT_INPUT_FIELD_NAMES_TAB type CRMT_INPUT_FIELD_NAMES_TAB,

str_CRMT_INPUT_FIELD_NAMES type CRMT_INPUT_FIELD_NAMES occurs 0 with header line.

*----


str_CRMT_INPUT_FIELD_NAMES-FIELDNAME = 'IB_INSTANCE'.

insert str_CRMT_INPUT_FIELD_NAMES into table t_CRMT_INPUT_FIELD_NAMES_TAB.

str_CRMT_INPUT_FIELD_NAMES-FIELDNAME = 'IB_IBASE'.

insert str_CRMT_INPUT_FIELD_NAMES into table t_CRMT_INPUT_FIELD_NAMES_TAB.

append str_CRMT_INPUT_FIELD_NAMES to str_CRMT_INPUT_FIELD-FIELD_NAMES.

str_CRMT_INPUT_FIELD-ref_guid = ls_activity_bapi-GUID.

str_CRMT_INPUT_FIELD-objectname = 'SERVICE_OS'.

str_CRMT_INPUT_FIELD-ref_kind = 'A'.

str_CRMT_INPUT_FIELD-field_names[] = t_CRMT_INPUT_FIELD_NAMES_TAB.

append str_CRMT_INPUT_FIELD to t_CRMT_INPUT_FIELD_TAB.

*----


str_CRMT_SRV_REFOBJ_COM-IB_IBASE = '267'.

str_CRMT_SRV_REFOBJ_COM-IB_INSTANCE = '534'.

str_CRMT_SRV_REFOBJ_COM-MODE = 'A'.

str_CRMT_SRV_REFOBJ_COM-REF_GUID = ls_activity_bapi-GUID.

append str_CRMT_SRV_REFOBJ_COM to t_CRMT_SRV_REFOBJ_COMT.

append str_CRMT_SRV_REFOBJ_COM to str_CRMT_SRV_OSSET_COM1-REFOBJECT.

str_CRMT_SRV_OSSET_COM1-REF_GUID = ls_activity_bapi-GUID.

str_CRMT_SRV_OSSET_COM1-MODE = 'A'.

append str_CRMT_SRV_OSSET_COM1 to t_CRMT_SRV_OSSET_COMT1.

append str_CRMT_SRV_OSSET_COM1 to str_CRMT_SRV_OSSET_COM-osset.

str_CRMT_SRV_OSSET_COM-REF_GUID = ls_activity_bapi-GUID.

str_CRMT_SRV_OSSET_COM-REF_KIND = 'A'.

str_CRMT_SRV_OSSET_COM-MODE = 'A'.

append str_CRMT_SRV_OSSET_COM to t_CRMT_SRV_OSSET_COMT.

CALL FUNCTION 'CRM_ORDER_MAINTAIN'

EXPORTING

IT_SERVICE_OS = t_CRMT_SRV_OSSET_COMT

CHANGING

ct_input_fields = t_CRMT_INPUT_FIELD_TAB.

Best Regards.