on 03-31-2006 7:36 AM
Hi,
I am developin a activity report in CRM 4.0 for the data create throught "Maintain Activities" ( t-code: CRMD_ORDER. Can any one help in in understanding which all table have to be used to get data for the same.
Pls help as the requirement is urgent.
Rgds
Roopa
Hi John,
You need not bother about the tables, there is a function module which gives you everything CRM_ORDER_READ.
What selection criteria are you using for the report ?
1. Transaction Number : Get the corresponding GUIDS for the transaction number from the table CRMD_ORDERADM_H and then pass all the GUIDs to CRM_ORDER_READ in the et_header table.
2. Transaction Type : Get all the GUIDs for the transaction type from the table CRMD_ORDER_INDEX
Refer these two tables to get the HEADER GUIDs to be passed to CRM_ORDER_READ function module.
Refer the following code for you ref.
SELECT header
INTO TABLE git_guid
FROM crmd_order_index
WHERE process_type_ix IN git_t_type
AND object_type = gc_subobject
AND partner_no IN git_pnum
%_HINTS ORACLE 'INDEX("CRMD_ORDER_INDEX" "CRMD_ORDER_INDEX~DWP")'.
or
SELECT guid
INTO TABLE git_guid
FROM crmd_orderadm_h
WHERE process_type IN git_t_type
AND object_type = gc_subobject.
*Call CRM_ORDER_READ
FORM f3000_get_activity_det .
DATA: lit_requested_objects TYPE crmt_object_name_tab,
lit_guid_temp TYPE TABLE OF ty_guid_temp.
DATA: wa_guid_temp LIKE LINE OF lit_guid_temp.
*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.
Note : it_requested_objects to optimize the performance.
<b>Reward points if it helps.</b>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Amit,
I have 2 questions. Would certainly appreciate if you can answer:
1) What is gc_object_name? How is it defined and used. I saw the note that lit_requested_objects is used to optimize performance. But if you can tell more about the gc_object_name variable, it will help me understand and see how I can use it in my case.
2) Is there any advantage using CRM_ORDER_READ over BAPI_ACTIVITYCRM_GETDETAILMULT?
Appreciate you response.
Thanks!
I would also like an answer to the question about the advantage of using CRM_ORDER_READ. I'm currently using BAPI_ACTIVITYCRM_GETDETAILMULT and am having huge performance issues! It appears that this BAPI is accessing CRMD_ORDERADM_H sequentially within the routine for some reason. And we have millions of records in this table. I could not find an OSS note regarding the performance of this BAPI. Any help would be greatly appreciated.
Vicky
Wolfgang,
Do you know the underlying tables used for CRMLDB_ACT_MON report. For performance issue I have to create report directly from database. But cannot identify which table to hit and from where I shall have the GUID of the activities first and can go to other tables. So if you have the information then please reply at anjan.nandy@gmail.com.
Thanks,
Anjan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anjan,
as a matter of fact I don't know all underlying tables. But you should start with table CRMD_ORDERADM_H and search for all entries with object type BUS2000126 (for business activities), then select additional activity data from CRMD_ACTIVITY_H. Partners may be found via view CRMV_LINKPARTNER. However, I don't know how performant they are.
You can use BAPI_ACTIVITYCRM_GETDETAILMULT as soon as you've selected all relevant guids.
Regards
Wolfgang
Anjan,
I am facing the same issue and having to create the Activity Monitor report directly from the Database instead of using the Logical Database.
Can you share your experience with me on this? What tables to use, overall logic and any other points that can save my time.
I would appreciate all your help and ofcourse won't hesitate while rewarding you the points.
Thanks,
John
Hi Roopa,
take a look at the SAP standard activity monitor. Check SAP menu "Activities -> Activity Monitor" (trx. S_AE2_89000019). It's based on a logical database.
Kind regards
Wolfgang
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can get the activity related data from the below given tables.
CRMD_ORDERADM_H Business Transactions CRM
CRMD_ACTIVITY_H Activity
CRMD_OPPORT_H Opportunity
CRMD_LINK Transaction - Set Link
CRMD_CUSTOMER_H Transaction - Customer Extension
CRMD_ORDERADM_I Business Transaction Item
CRMD_ACTIVITY_I Activity Reporting: Activity Line Item Extension
Thanks,
Thirumala.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.