on 04-30-2012 2:57 PM
Hello,
Within the Opportunity Search the Results list shows the 'CREATED_A'T' field, this field is not available on the Search Criteria. is there a way to include this in the Search Criteria ?
Regards
Chan
Hi Chan,
I guess your requirement can be addressed using standard field 'CREATED_AT_RANGE'.
Try the following steps:
1. Refer the document : http://scn.sap.com/docs/DOC-26636
2. Follow this document till step 3 only.
3. Instead of fieldname ZZCONTDATE you need to give 'CREATED_AT_RANGE', No need to start the fieldname withh ZZ or yy, give the exact name 'CREATED_AT_RANGE' with type datum.
Handling for this field is already there at backend.
Let me know if it works for you.
Regards,
Ajay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ajay
I have appended the structure and included the component as a date. I didn't create a Design Layer as the field has become available for selection in the Search view. I then selected this field as Search Criteria and selected a date for which I know Opportunities exist, but it doesn't seem to take this date into consideration when filtering the data as it is showing all Opportunities.
Regards
Chan
Hi Chan,
Please check if you have given the field name as 'CREATED_AT_RANGE' in structure enhancement. Also, check what value is getting passed for this selection parameter. for example if you are searching Create At = 25 Apr 2012, then check in debug mode value for 'CREATED_AT_RANGE' should be equal to 20120425.
It worked for me in debug mode.
Also, you can put a break point on line number 2520 in program (se38): LCRM_BSP_OIC_1O_SEARCHF04 and check.
Regards,
Ajay
Ok, you are on CRM 2007.
the you can try the following:
Goto se37 and open FM 'CRM_BSP_OIC_1O_SEARCH_FROM_RF'
Then double click on Perform extend_query_for_multivalues
inside this perfom, try to search for *CREATED_AT* or something similar and you will find a CASE WHEN condition with *CREATED_AT*, use this as fieldname in your structure enhancement.
I dont have access to SAP CRM 2007 system other wise I would have given you the exact details.
Hope this would help you.
Regards,
Ajay
Hi Chan,
Did you debug the EH_ONSEARCH method of your view?
ok let me put my views after debug...
1.When you click on EH_ONSEARCH it collects all the selection parameters..including CREATED_AT(custom field)
2.IT goes to class CL_CRM_QOPP_RUN_BTIL and method GET_DYNAMIC_QUERY_RESULT
if you see line number 98,you can see paramter conversion
3.please see CRMD_ORDERADM_H ...POSTING DATE and CREATED_AT fields contains same value
now what we can do is
EH_ONSEARCH
conver your paramter name to VALID_FROM
and send the value..
so system will check take it as start date range and gets the values of orders created from that particular date..
i know it returns the values created from that date and we need only the values created on that date...for this also you can achieve further more and find exact attribute which gets the values based on posting date field..
so try converting u r paramter name t POSTING_DATE it would work...
please look at class CL_CRM_Q1O_SEARCH and method PREPARE_FILTER_TABLES line number 194..
sure you will get a clue...first u change in debug mode to diff parameter names then u can change directly in code at eh_onsearch level..
Hi Sivaram,
Thanks for your precise explanation, Changing the parameter name to 'POSTING_DATE' works fine for all Search operators for this field, e.g, 'is', 'between' etc. This is fine in debug mode but as I am not familiar with BSP progamming, any hints as to how I could code this by redefining method EH_ONSEARCH ?
Regards
Chan
Hi Chan
Sorry for late reply.
It make sense if we code at genil level for this conversion.
SO try this apraoch
Pleas create a custom class which is having super class as CL_CRM_QOPP_RUN_BTIL .
make the above class and maintain at the view CRMC_OBJ_BTIL_C along with object name.
now in custom class redfeine the method IF_CRM_QUERY_RUNTIME_BTIL~GET_DYNAMIC_QUERY_RESULT
and there just to add our custom code at line number 98..
as like start_date_range..just place the piece of code for created_at -->posting date conversion..
please let me know if it now works.
Please go to SE24
Give a name ZCL_CRM_QOPP_RUN_BTIL and click on Create.
In next screen please go to Attributes tab and click on Super Class and enter CL_CRM_QOPP_RUN_BTIL as super class.
Save and activate.
now please place the cursor at our method (make sure you remove the check box Filter) and click on REDEFINE mthod avlable at class.
Before redefining copy the code in that ,after redfeining paste the same code and change/insert the code at line number specified above.
now pleas go to view (given above) and make an entry with BTQopp and the new z class...
SPRO->CRM->CROss Application Components->generic Interaction Layer->Component Specific Steetings->Busines Transactions->Define Custom Handler Classes for Business Transaction Model Nodes.
Please make an entry
External Object Name as BTQOpp
Structure name as --Z class
then re start the webui..put debug point in custom class and run the search and check our luck .
Extend the query input structure with the new field. If the field is not available in the BOL structures then extend the relevant structures so that this information is captured as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
First you need to add the field to below structures
Search Structure : CRMST_QUERY_OPP_BTIL
Search Result Structure: CRMST_QUERY_R_OPP_BTIL
Next step is you need to write your own logic in API to retrieve the result based on your custom field.
As per your requirement as it is CREATED_AT which is standard field..please try to change the paramter name to CREATED_AT_DATE on EH_ONSERCH while passing the paramters to search query.
Please debug from EH_ONSEARCH method you will get the whole logic how it works,what to do etc..
Yes,
Please click on F2 and get component details and view details
you can find the EH_ONSEARCH method in view impl class.
put a debug point in that method.
Are you familiar with component work bench.?i given answer with assumption of you know about webui framework..if not let me know i ll provide step by step answer
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.