cancel
Showing results for 
Search instead for 
Did you mean: 

Function module for CRM Activities retrieve

Former Member
0 Kudos
463

Hello All ,

I am looking for FM that return all activities by Activity type.

I tryied to use :"CRM_BUPA_READ_ORDER_OBJECTS" but I can't filter it by Activity type.

All help will be appriciate

Thank you,

Rika

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thank you ,

I already found this FM , it looks good , but may be you know some function module that can be filtered by activity type from ... to ...,

For example from z000 to z003

Thanks,

Rika

former_member927251
Active Contributor
0 Kudos

There is no function module which does the filter like this.

Alternatively, what you can do is :

1. Get all the respective guids of the required activity types from the following query.

SELECT guid

INTO TABLE git_guid

FROM crmd_orderadm_h

WHERE process_type IN git_t_type " git_t_type contains the activity types

AND object_type = 'BUS2000126'.

2. Then pass these guids to the CRM_ORDER_READ function module to get the activity details.

*Populate the requested objects to be passed to CRM_ORDER_READ

INSERT gc_object_name-activity_h INTO TABLE lit_requested_objects.

INSERT gc_object_name-appointment INTO TABLE lit_requested_objects.

INSERT gc_object_name-customer_h INTO TABLE lit_requested_objects.

INSERT gc_object_name-orderadm_h INTO TABLE lit_requested_objects.

INSERT gc_object_name-partner INTO TABLE lit_requested_objects.

INSERT gc_object_name-service_os INTO TABLE lit_requested_objects.

INSERT gc_object_name-status INTO TABLE lit_requested_objects.

*Retrieve all the activity details for the GUIDs

CALL FUNCTION 'CRM_ORDER_READ'

EXPORTING

it_header_guid = git_guid

it_requested_objects = lit_requested_objects

IMPORTING

et_orderadm_h = git_orderadm_h

et_activity_h = git_activity_h

et_customer_h = git_customer_h

et_appointment = git_appointment

et_partner = git_partnerdata

et_service_os = git_service_os

et_status = git_status

EXCEPTIONS

document_not_found = 1

error_occurred = 2

document_locked = 3

no_change_authority = 4

no_display_authority = 5

no_change_allowed = 6

OTHERS = 7.

<b>Reward points if it helps.</b>

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank you ,

We will try your suggestion ,

Rika

Former Member
0 Kudos

Hi Rika

Try this CRM_SEARCH_BUSINESSACTIVITY

Regards

Ranjit