cancel
Showing results for 
Search instead for 
Did you mean: 

CRM 2007 - Create activity with reference to predecessor (order)?

rb
Active Participant
0 Kudos

Hi there,

i want to create an activity with reference to the order. Like you can do it in WebUI. To create an activity i actually use the Bapi BAPI_ACTIVITYCRM_CREATEMULTI. To test the Bapi i use the CRM_CALL_ACTIVITY_INTERFACE Programm.

Now if i enter the object id (guid) and bor object type of the related order header in the object link section it doesnt work. I get a short dump which says that i want to create an item relation without a header realation.

So has anybody some ideas for me?

Bye Richard

Accepted Solutions (0)

Answers (2)

Answers (2)

rb
Active Participant
0 Kudos

Thanks i have solved it the same way as suggested

BGarcia
Active Contributor
0 Kudos

Hi Richard,

Try to fill the 'Object Link' data like this:

Object ID: Your Order GUID

BOR Object Type: Your Order Object type (BUS2000116 if service order)

Relatshp Cat.: INTO (this is the relation type I mostly use, but check within your scenario)

Level: A (header level)

Kind regards,

Former Member
0 Kudos

Hi,

You can use FM, CRM_ORDER_MAINTAIN to create follow up documents.

you need to fill the parameters.. ct_doc_flow, ct_input_fields ..

See some sample code, below..

CLEAR : ls_doc_flow, ls_doc_link .

ls_doc_flow-ref_kind = lc_ref_kind.

ls_doc_flow-ref_handle = lc_ref_handle.

ls_doc_link-objkey_a = p_lv_guid. "Guid of Preceding Doc

ls_doc_link-vona_kind = 'A'.

ls_doc_link-handle_b = '1'.

ls_doc_link-brel_kind = 'A'.

ls_doc_link-brel_mode = 'A'.

INSERT ls_doc_link INTO TABLE lt_doc_link.

ls_doc_flow-doc_link = lt_doc_link.

APPEND ls_doc_flow TO lt_doc_flow.

Thanks,

Sreekanth