Limit Search field values
Hello,
I am trying to limit some of the values in the value list in quotation search page.
Ex: when you want to search by "Partner Function", there are more than 50 values present. I want to delete some of the values from this list.
How can I do this?
Some post in SDN says that this is possible by modifying the method "GET_DQUERY_DEFINITIONS"?
Thanks in advance
Praveen,
Check if there is a GET_V method for this field in the Search Page IMPL class...
You can delete the entries here.
Regards,
Masood Imrani S.
Similar Messages
-
Search Fields value based on the input.
Hi Experts,
I was trying to develop a web dynpro with two input-fields and process the logic based on the input-fields.
The scenario is,have two Input fields, the value for the first input-field a static search help is assigned and for the second input-field the value are populated on the based of the values selected in the first input-fields.
so here the values for second input-field depends on the first input-field.
Please put in your thoughts or suggestion for the scenario.
Thanks
Best Regards,
Lalitkumar.
Moderator message: wrong forum, please post again in Webdynpro forum.
Edited by: Thomas Zloch on Jul 9, 2010 1:36 PMPlease refer the following for achieving the same.
http://wiki.sdn.sap.com/wiki/display/Snippets/OVSsearchhelp -
Error in searching field value by pressing enter
Hi all,
I am able to get a pop up with the values of the field and select in that pop up to the main screen on pressing enter.
But i get all the values of the column present in the table and not the one which i want to search. Also the main screen gives error message if the cursor is in the field on main page and works properly if the cursor is not there in the field.
Error is as follows:
<b>BSP exception: Access to URL /sap(bD1lbiZjPTAwMQ==)/bc/bsp/sap/z_startingwith/POST is forbidden</b>
Does it have anything to do with <form method = "POST">
as the values from main screen are not passing to the next screen!!
<b>Find.htm:</b> (Main screen)
<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<script language="JavaScript" type="text/javascript">
document.onkeydown = function(){
if(window.event && window.event.keyCode == 13)
popUp=window.open('help.htm','_blank', 'Emp Details','width=100,height=300');
</script>
<htmlb:content design="design2003" >
<htmlb:page title="Add Employee Details " >
<htmlb:form action="POST" id = "form1">
Empid:
<htmlb:inputField id = "partner"
showHelp = "true"
submitOnEnter = "true"
value = "<%= partner %>" />
</htmlb:form>
</htmlb:page>
</htmlb:content>
<b>Help.htm</b>
<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<htmlb:content design="design2003" >
<htmlb:page title="Test" >
<htmlb:form id="my_window" >
<%
data TV_ITERATOR Type Ref To zcl_itr." - Iterator Function
data iterator type ref to IF_HTMLB_TABLEVIEW_ITERATOR.
create object tv_iterator exporting appl_cons = appl.
iterator = tv_iterator.
%>
<htmlb:tableView id = "pop"
width = "200"
headerVisible = "true"
design = "alternating"
visibleRowCount = "10"
fillUpEmptyRows = "true"
selectionMode = "SINGLESELECT"
selectedRowIndex = "<%= row_index %>"
onRowSelection = "MyEventRowSelection"
showNoMatchText = "true"
filter = "server"
sort = "server"
onHeaderClick = "MyEventHeaderClick"
table = "<%= details %>"
iterator = "<%= iterator %>" >
</htmlb:tableView>
<%
if partner is not initial.
%>
<htmlb:inputField id = "checked"
visible = "True"
value = "<%= partner %>" />
<script for="checked" language="javascript" event="onLoad()">
opener.document.form1.partner.value = <%= partner %>;
window.self.close();
</script>
<%
endif.
%>
</htmlb:form>
</htmlb:page>
</htmlb:content>
<b>Oncreate:</b>
select partner from zcrmm_buag into corresponding fields of table details.
<b>OnInputProcessing:</b>
DATA: IND TYPE I.
DATA: TV TYPE REF TO CL_HTMLB_TABLEVIEW.
DATA: EVENT1 TYPE REF TO CL_HTMLB_EVENT.
EVENT1 = CL_HTMLB_MANAGER=>GET_EVENT( RUNTIME->SERVER->REQUEST ).
TV ?= CL_HTMLB_MANAGER=>GET_DATA(
REQUEST = RUNTIME->SERVER->REQUEST
NAME = 'tableView'
ID = 'pop' ).
IF TV IS NOT INITIAL.
DATA: TV_DATA TYPE REF TO CL_HTMLB_EVENT_TABLEVIEW.
TV_DATA = TV->DATA.
IF TV_DATA->SELECTEDROWINDEX IS NOT INITIAL.
FIELD-SYMBOLS: <row> LIKE LINE OF details.
READ TABLE details INDEX tv_data->selectedrowindex ASSIGNING <row>.
if <row> is assigned.
partner = <row>-partner.
endif.
ENDIF.
ENDIF.
Any help is welcome.
Regards,
Rohit Khetarpal<i>actually when the pop up comes,the page on the back(i.e. Find.htm) shows error message as mentioned below..
BSP exception: Access to URL /sap(bD1lbiZjPTAwMQ==)/bc/bsp/sap/z_startingwith/POST is forbidden</i>
-->Remove "method="post" in FORM tag. I tested.
<b>To pass the value from Find.htm to Help.htm</b> - see the below code
<script language="JavaScript" type="text/javascript">
document.onkeydown = function(){
if(window.event && window.event.keyCode == 13)
var val;
val = document.getElementById("partner").value;
* Here the VAL will have the value of query value(what user entered as Filter value) from Find.htm
popUp=window.open('help.htm?partner'+val,'_blank', 'Emp Details','width=100,height=300');
</script>
<b>And also make the "Patner" in help.htm as "AUTO parameter.</b>
Hope this will solve your peoblme.
Raja T
Message was edited by:
Raja Thangamani -
Field values are repeating for search help.
Hello Friends.
I have a problem. When I create a search help for a field the identical field values are repeating. What should I do to trigger only the first time.
for example:
<u>Field-name</u>- <u>field-value</u>
Supplier Nr --- Commodity
5001 -
casting
5002 -
casting
5003 -
casting
So when I create the search help for commodity it is showing 'casting' 3 times in a pop-up window. It should not repeat. Can you please give me the solution what should I do?Hi
Search helps
Standard search help
Types of search helps
Concept of search help
Search Help Interface
Dialog behavior of search helps
Selection method for search helps
Performance of search helps
Attaching search helps
Hierarchy of search helps
Standard Search Help
The input help (F4 help) is a standard function of the R/3 System. It permits the user to display a list of possible values for a screen field. A value can be directly copied to an input field by list selection.
The fields having an input help are shown in the R/3 System by the input help key to the right of the field. This key appears as soon as the cursor is positioned on the corresponding screen field. The help can be started either by clicking on this screen element or with function key F4.
If the number of possible entries for a field is very large, you can limit the set of displayed values by entering further restrictions.
Further meaningful information about the displayed values is included in the display of possible entries, especially if the field requires that a formal key be entered.
TYPES OF SEARCH HELPS
Elementary search helps
Describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).
Collective search help
Combine several elementary search helps. A collective search help thus can offer several alternative search paths.
Search Help Interface
Search help interface determines how the exchange of values between the screen template and the selection method is implemented.
The search help interface defines the context data that can be used in the input help and the data that can be returned to the input mask. Analogously to the interface of a function module, the search help interface comprises interface parameters.
When you define an interface parameter of a search help, you must also define whether it should be used to copy data to the input help (IMPORT parameter) or whether it should be used to return data from the input help (EXPORT parameter). A parameter of a search help can also have both attributes at the same time.
The location from which the IMPORT parameters of a search help get their values and the screen fields in which the contents of the EXPORT parameters of the search help are returned are defined in the search help attachment. The search help itself should always be attached to an EXPORT parameter of the search help. If this parameter is also the IMPORT parameter, its contents are only used in the input help if it is a search string (that is, if it contains a ´*´ or a ´+´).
You must define the parameter types of a search help. You can do this by assigning them data elements.
Value Transport for Input Helps
NOTE:In the above example, screen fields A, B and C are linked with parameters of the search help. As a result, values can only be transported between the screen and the search help for these three fields. Existing contents of screen fields A and B can be used for selecting the hit list since they are linked with an import parameter of the search help. The values of parameters A and C can be returned to the screen from the hit list since these parameters are declared as export parameters of the search help.
Description of dialog behavior
A hit list might contain plentiful number of entries. A
dialog provides the user with an option to restrict the
entries displayed on the hit list.
In an input help process, the set of possible entries is presented in the dialog box as a list for displaying the hit list. The user selects the required value from this list by double clicking. Since the possible entries are often formal keys, you must be able to display further explanatory information about the possible entries in the list.
If the set of possible entries is very large, the user should be able to define additional conditions for the attributes of the selected entry. Restricting the set of data in this way both increases the clarity of the list and reduces the system load. Additional conditions can be entered in a further dialog window, the dialog box for restricting values.
Specifying the dialog type of a search help defines whether the dialog box for restricting values should be offered and if so under what conditions.
The attributes in the dialog box for displaying the hit list or in the dialog box for restricting values must be defined as internal parameters of the search help. An internal parameter can also be used in only one of the two dialog boxes. It can also belong to the search help interface.
The internal parameter types are also defined with data elements. These data elements define how the parameters are displayed in the two dialog boxes.
Reward if usefull -
Search help for a field in table control based on another field value
Hi,
I want to attach the Search help for a field in table control based on another field value.
Please help me asap.
Will be highly rewardedHI,..
Check these links
search help in table control
Re: How to create Search Help for a field in Table control !!
How to create Search Help for a field in Table control !!
F4 Help In Table Control
Control table F4 help
Problem in F4 help in screen field
check this code
DATA: BEGIN OF it_value4 OCCURS 0,
TEXTCODE LIKE ZXX-TEXTCODE,
TEXTDESC LIKE ZXX-TEXTDESC,
END OF it_value4.
progname = sy-repid.
dynnum = sy-dynnr.
SELECT TEXTCODE TEXTDESC
FROM xxxx
INTO CORRESPONDING FIELDS OF TABLE<b> it_value4</b>
WHERE LOSS_CODE =<b> IT_VALUE1 .</b>
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'TEXTCODE'
dynpprog = progname
dynpnr = dynnum
dynprofield = 'ITVALUE-TEXTCODE' "-->UR 4 th filed value in screen
value_org = 'S'
TABLES
value_tab = it_value4.
endmodule.
Message was edited by:
veereshbabu ponnada -
Apex 4.0: Change the Search Field to a Multi Value Check Box IR
I am new here, but hoping to be active :)
Well, now I am focusing on Apex 4 and I find really new things here. And even new order to develope needs time to get used.
Still, I am trying to change the Search Field to a Multi Value Check Box in IR. I have found how to make it in Apex version 3, but not at 4 any more.
Tutorials for apex v.3 write:
1.Click Edit Page 1 on the Developer toolbar.
The Page Definition for page 1 appears.
2. Under Items, click P1_REPORT_SEARCH.
3. From Display As, select Checkbox ans so on...
But I do not find any word "Items" in IR and especially P1_REPORT_SEARCH (I assume this should be by default). Under "Report Atributes" I find "Search bar" region, just there is no option for that. Is here any way to make search with checkboxes in v4?Hi,
Tutorial you have check for APEX 3.x probably works still in APEX 4.x if you use classic report.
As I understand you have now create interactive report that provide out of box search features.
There is no option to change IR search text field to multi select item.
What you can do with IR, is hide/disable search field.
Then you create multi select item and use it in report query where clause.
Regards,
Jari
My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
Twitter: http://www.twitter.com/jariolai -
Implementation of F4 value help for a search field which is an EEWB field
Hi...
I am trying to create a F4 value help for a search field which is an eewb field.The f4 value help jus need to be a pop up containing the values of the field existing in the system.Since this is a search field the GET_V method cannot be used. I tried implementing it by creating a search help and then using it in the GET_DQUERY_VALUEHELPS method.But the problem when u use the search help is that all the values including the null values and duplicate entries will be populated when f4 is clicked.Is there any way to filter the values that get populated when f4 is clicked?If any other method can be used to implement the functionality please let me know..Thanks in advance....Hi,
the GET_V methods worked for me most of the time. Even in advanced searchs. Only time they do not is if there is a different aproach considered in the GET_DQUERY_VALUEHELPS.
As the GET_V_ you created obviously was called I suppose you found the correct place to Populate it to be used in the search.
I do not know what the problem with the NULL values and duplicate entries is you talked about, but it sounds to me the creation of your valuehelp class is flawed. Not the integration into the UI.
Maybe have a look at SAPs' standard implementations of Search Components. You should get a feeling for how search helps work. See. BT111S_OPPT, BP_HEAD_SEARCH
cheers Carsten -
Automatic population of search help value to another field in module pool
Hello there,
I am developing a module pool screen, in which i have a table control field with fields PERNR and ARBPL along with other fields.
I have to give a search help for Pernr first field for which i have given a search help with the use of PM02 search help, given in the screen field level, in the same search help there is another field ARBPL, when the pernr is selected i have to get the corresponding Arbpl field value in the search help hit list and pass it to my field arbpl in my table control.
I tried with POV event as well with FM f4if_field_value_request but the return structure always filling one value only PERNR.
Is there any chance to get the both field values from the search help.
Thank you in advance.
Regards,
Kumar.Try the following logic in your table control, in table control you have get the selected index using function DYNP_GET_STEPL.
TYPE-POOLS: shlp.
PARAMETERS:p_matnr TYPE marc-matnr,
p_werks TYPE marc-werks,
p_ekgrp type marc-ekgrp.
TYPES:BEGIN OF ty_marc,
matnr TYPE marc-matnr,
werks TYPE marc-werks,
ekgrp TYPE marc-ekgrp,
END OF ty_marc.
DATA:i_marc TYPE TABLE OF ty_marc,
i_val TYPE TABLE OF ddshretval,
wa_val TYPE ddshretval.
DATA:wa_dynpfields TYPE dynpread,
i_dynpfields LIKE STANDARD TABLE OF dynpread.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_matnr.
SELECT matnr werks ekgrp FROM marc INTO TABLE i_marc UP TO 100 ROWS.
CHECK i_marc[] IS NOT INITIAL.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MATNR'
value_org = 'S'
callback_program = sy-repid
callback_form = 'CALLBACK_ROUTINE'
dynpnr = sy-dynnr
TABLES
value_tab = i_marc
return_tab = i_val
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
LOOP AT i_val INTO wa_val.
IF sy-tabix = 1.
wa_dynpfields-fieldname = 'P_MATNR'.
wa_dynpfields-fieldvalue = wa_val-fieldval.
ELSEIF sy-tabix = 2.
wa_dynpfields-fieldname = 'P_WERKS'.
wa_dynpfields-fieldvalue = wa_val-fieldval.
ELSEIF sy-tabix = 3.
wa_dynpfields-fieldname = 'P_EKGRP'.
wa_dynpfields-fieldvalue = wa_val-fieldval.
ENDIF.
APPEND wa_dynpfields TO i_dynpfields.
ENDLOOP.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
TABLES
dynpfields = i_dynpfields.
FORM callback_routine TABLES i_val TYPE ddshreslts
CHANGING wa_shlp TYPE shlp_descr
wa_callcontrol LIKE ddshf4ctrl.
DATA:
wa_intf LIKE LINE OF wa_shlp-interface.
wa_intf-shlpfield = 'F0002'.
wa_intf-valfield = 'X'.
wa_intf-f4field = 'X'.
wa_intf-value = '~'.
APPEND wa_intf TO wa_shlp-interface.
wa_intf-shlpfield = 'F0003'.
wa_intf-valfield = 'X'.
wa_intf-f4field = 'X'.
wa_intf-value = '~'.
APPEND wa_intf TO wa_shlp-interface.
ENDFORM. " CALLBACK_F4 -
How to add search field in Messenger Express Address Window?
Hi
I tried to add a new search field in the en/lookup_fs.html like this:
'<option value="'+ main.attr_list['mailhost']+'">Mail Host</option>\n' +
It returns a blank screen when click SEARCH button. It has no problem displaying the search window if I rename an existing search field, e.g. Email to MailHost. Is there a limit on the number of search fields to use? How can I solve this problem as I need to add in new search field? Also what is the js script or html to change to include this search field in the ldap search?
rdgs
LaiWell - it's a report so there won't be a user exit. I think your options are what the others (and you) have suggested - change the standard program or make a copy.
There are different opinions on the forum about which to do.
Rob
PS - you're not bothering anyone. We like problems.
Message was edited by: Rob Burbank -
UME user search with multiple search fields (AND / OR search)
Hi,
I'm struggling with a UME user search problem. I have multiple search fields: lastname, firstname, department
Searching in this fields is working with the default IPrincipalSearchFilter.SEARCHMETHOD_AND (default)
<a href="http://help.sap.com/javadocs/NW04/current/um/com/sap/security/api/IPrincipalSearchFilter.html#setSearchMethod(int)">JavaDocs SearchMethod_AND</a>
Now I would like to add an additional search field for searching in telephone, cellphone as well. BUT searching for a phone number with searching for one of the other fields should not be a AND search. Is this possible?
Here is the actual non-working code:
Vector retVector = new Vector();
//get Userdata with IUserFactory
IResourceFactory resourceFactory = ResourceFactory.getInstance();
IURLGeneratorService urlGen = (IURLGeneratorService)resourceFactory.getServiceFactory().getService(IServiceTypesConst.URLGENERATOR_SERVICE);
IUserFactory userFac = UMFactory.getUserFactory();
IUserSearchFilter srcFilter = null;
try
srcFilter = userFac.getUserSearchFilter();
} catch (UMException e)
// TODO Auto-generated catch block
e.printStackTrace();
if(lastName.length() > 0)
srcFilter.setLastName(lastName + "*",ISearchAttribute.LIKE_OPERATOR, false);
if(firstName.length() > 0)
srcFilter.setFirstName(firstName + "*",ISearchAttribute.LIKE_OPERATOR, false);
if(department.length() > 0)
srcFilter.setDepartment(department + "*", ISearchAttribute.LIKE_OPERATOR, false);
//Here I need help!!!!!!! Please advice!!!
if(telephone.length() > 0)
srcFilter.setTelephone("*" + telephone, ISearchAttribute.LIKE_OPERATOR, false);
srcFilter.setCellPhone("*" + telephone, ISearchAttribute.LIKE_OPERATOR, false);
//if(mobil.length() > 0)
// srcFilter.setCellPhone("*" + mobil, ISearchAttribute.LIKE_OPERATOR, false);
//Set maxium value for Result and thus limit the static variable SIZE_LIMIT_EXCEEDED
//This method can only be used, if only one search attribute is specified -> thanks SAP
if(srcFilter.getElementSize() <= 1)
srcFilter.setMaxSearchResultSize(300);
ISearchResult srcResult = null;
try
srcResult = userFac.searchUsers(srcFilter);
} catch (UMException e1)
// TODO Auto-generated catch block
e1.printStackTrace();
Thanks for any help...
StefanHello,
I could still need some help. Is there no one who could give me a tip? Could I explain my problem clearly enough or do you need some more information about my problem?
Or is the search topic with searchFilter not a very common used thing?
Is there a possibility to do a search in the received search result? Can anyone explain how this would work?
Any ideas are welcome.
Regards,
Stefan -
Adding new search field in IC web client
Hi experts,
I need to add two search fields search term1 and search term2 in IC web client for the view 'search for Employees' as that is present in GUI with transaction BP.Please send me step by step details how to do that.
Thanks in advance
KoustavHi Koustav,
If you have added an append to the BuilEmpSearch BOL object, than the parameters are added to the query_service automaticaly.
Here is an example of the eh_OnSearch method for the search on business partners. (B2C scenario). The principle is the same. You can add you pre-search checks here. Don't fire the query before all required data is in the query_search object. (standard all parameters from the BuilEmpSearch object are in there).
METHOD eh_onsearch .
* 2. Business Partner Search
lv_wrapper = typed_context->SearchCustomer->get_collection_wrapper( ).
query_service ?= lv_wrapper->get_current( ).
lv_country =
query_service->IF_BOL_BO_PROPERTY_ACCESS~GET_PROPERTY_AS_STRING( 'COUNTRY' ).
IF NOT lv_country IS INITIAL.
CALL METHOD query_service->if_bol_bo_property_access~set_property
EXPORTING
iv_attr_name = 'COUNTRY_FOR_TEL'
iv_value = lv_country.
ENDIF.
* MVNI(EX00885)21022006: Begin of Insert
lv_firstname =
query_service->IF_BOL_BO_PROPERTY_ACCESS~GET_PROPERTY_AS_STRING( 'MC_NAME2' ).
lv_lastname =
query_service->IF_BOL_BO_PROPERTY_ACCESS~GET_PROPERTY_AS_STRING( 'MC_NAME1' ).
lv_insz =
query_service->IF_BOL_BO_PROPERTY_ACCESS~GET_PROPERTY_AS_STRING( 'ZZINSZ' ).
lv_birthdate =
query_service->IF_BOL_BO_PROPERTY_ACCESS~GET_PROPERTY_AS_STRING( 'ZBIRTHDATE' ).
replace all occurrences of '.' in lv_insz with ''.
replace all occurrences of '-' in lv_insz with ''.
condense lv_insz no-gaps.
* MVNI(EX00885)21022006: End of Insert
* check customizing for role
IF NOT ls_profile-customer_role IS INITIAL.
CALL METHOD query_service->if_bol_bo_property_access~set_property
EXPORTING
iv_attr_name = 'ROLE'
iv_value = ls_profile-customer_role.
ENDIF.
* limit search to maximum number of hits.
CALL METHOD query_service->if_bol_bo_property_access~set_property
EXPORTING
iv_attr_name = 'MAX_HIT'
iv_value = lv_bupacontroller->max_hits.
* fire query
TRY.
bo_col ?= query_service->get_query_result( ).
CATCH cx_sy_ref_is_initial.
ENDTRY.
entity_col ?= bo_col.
* set result into context
typed_context->customers->set_collection( entity_col ).
* navigate
IF entity_col->if_bol_bo_col~size( ) EQ 1.
op_showbupa( ).
ELSEIF entity_col->if_bol_bo_col~size( ) GT 1.
op_listcustomers( ).
if entity_col->if_bol_bo_col~size( ) eq lv_bupacontroller->max_hits.
lv_msgsrv = cl_bsp_wd_message_service=>get_instance( ).
lv_max_hit = lv_bupacontroller->MAX_HITS .
lv_msgsrv->add_message( iv_msg_type = 'I'
iv_msg_id = 'CRM_IC_APPL_UI_BPID'
iv_msg_number = '009'
IV_MSG_V1 = lv_max_hit ).
endif.
ELSE.
lv_msgsrv = cl_bsp_wd_message_service=>get_instance( ).
lv_msgsrv->add_message( iv_msg_type = 'I'
iv_msg_id = 'CRM_IC_APPL_UI_BPID'
iv_msg_number = '011' ).
* clear result list
view_manager->navigate(
SOURCE_REP_VIEW = rep_view
OUTBOUND_PLUG = 'showEmpty' ).
ENDIF.
ENDMETHOD.
In the class CL_BUIL_EMP (which has the superclass CL_BUIL_HEADER) you need to do a repair (changing of a standard SAP class) of method get_result_table.
What I have done is I've read the parameters that were added (automatically) to the query_service and added them to my FM to do the search.
You also need to take a copy of the BUPA_SEARCH_2 FM and add the parameters as importing parameters. Now you can add your search logic to the FM.
Here is the coding of the GET_RESULTS_TABLE:
METHOD get_result_table.
* CHANGES BY MVNI ON 03/07/2007.
* MARKER: MVNI(EX00885)03072007
* REASON: SPAU Upgrade 5.0.
* CHANGES BY MVNI ON 12/02/2008.
* MARKER: MVNI(EX00885)12022008
* REASON: CLM
DATA: ls_header_search TYPE crmst_header_search_buil,
lv_mc_name1 TYPE bu_mcname1,
lv_mc_name2 TYPE bu_mcname2,
ls_address TYPE bupa_addr_search,
ls_fax_data TYPE bapibus1006_fax_data,
lt_return TYPE TABLE OF bapiret2,
lv_xaddrversion TYPE abap_bool,
lv_no_hits TYPE i.
DATA: lt_but100 TYPE TABLE OF but100.
DATA: lv_role_category TYPE bu_role.
FIELD-SYMBOLS: <fs_result> LIKE LINE OF et_bupa_search_result.
* MVNI(EX00885)03072007: Begin of Insert
DATA: iv_birthdate TYPE bu_birthdt,
iv_insz TYPE ZBU_00000000,
lv_insz(15) TYPE c,
lv_bednr(15) TYPE c,
lv_vestnr(15) TYPE c,
ls_parameters TYPE crmt_name_value_pair.
* MVNI(EX00885)03072007: End of Insert
* MVNI(EX00885)03072007: Begin of Insert
CONSTANTS: C_IDENTIFICATIONTYPE TYPE BU_ID_TYPE VALUE 'ZINSZ'.
* MVNI(EX00885)03072007: End of Insert
* define structure we use for input parameters
MOVE-CORRESPONDING is_parameters TO ls_header_search.
MOVE-CORRESPONDING is_parameters TO ls_address.
MOVE-CORRESPONDING is_parameters TO ls_fax_data.
IF ls_header_search-fax IS NOT INITIAL.
IF ls_fax_data-country_for_fax IS NOT INITIAL.
ls_fax_data-fax_no = ls_header_search-fax.
ELSE.
ls_fax_data-fax_no = ls_header_search-fax.
ls_fax_data-country_for_fax = ls_header_search-country.
ENDIF.
ENDIF.
lv_mc_name1 = ls_header_search-mc_name1.
lv_mc_name2 = ls_header_search-mc_name2.
** MVNI(EX00885)03072007: Begin of Replace
* LOOP AT is_parameters INTO ls_parameters.
* ENDLOOP.
* ls_parameters-name = 'BIRTHDATE'.
* MOVE ls_parameters-value TO iv_birthdate.
* ELSEIF ls_parameters-name = 'ZZINSZ'.
* MOVE ls_parameters-value TO iv_insz.
* endif.
* Remove all allowed non-digits
lv_insz = ls_header_search-zzinsz.
replace all occurrences of '.' in lv_insz with space.
replace all occurrences of '-' in lv_insz with space.
condense lv_insz no-gaps.
ls_header_search-zzinsz = lv_insz.
* MVNI(EX00885)03072007: End of Replace
* MVNI(EX00885)12022008: Begin of insert
lv_bednr = ls_header_search-zzbednr.
replace all occurrences of '.' in lv_bednr with space.
replace all occurrences of '-' in lv_bednr with space.
condense lv_bednr no-gaps.
ls_header_search-zzbednr = lv_bednr.
lv_vestnr = ls_header_search-zzvestnr.
replace all occurrences of '.' in lv_vestnr with space.
replace all occurrences of '-' in lv_vestnr with space.
condense lv_vestnr no-gaps.
ls_header_search-zzvestnr = lv_vestnr.
* MVNI(EX00885)12022008: End of insert
* check if international address versions are active:
IF address_version_id IS INITIAL.
CALL METHOD check_for_int_add_versions( ).
ENDIF.
* check for customizing in IC WebClient
IF ls_header_search-no_trex IS INITIAL.
ls_header_search-no_trex = cl_crm_buil_services=>check_for_trex( ).
ENDIF.
CLASS crm_saf_get_settings DEFINITION LOAD.
IF NOT address_version_id IS INITIAL.
lv_xaddrversion = abap_true.
ENDIF.
* Optimization for combined search, Refer note 962864
IF ls_address-country IS NOT INITIAL
AND ls_address-city1 IS INITIAL
AND ls_address-post_code1 IS INITIAL
AND ls_address-region IS INITIAL
AND ls_address-street IS INITIAL
AND ls_address-house_num1 IS INITIAL.
IF ls_header_search-telephone IS NOT INITIAL OR
ls_header_search-email IS NOT INITIAL.
CLEAR ls_address-country.
ENDIF.
IF ls_header_search-email IS NOT INITIAL.
CLEAR ls_header_search-country_for_tel.
ENDIF.
IF ls_fax_data-fax_no IS INITIAL.
CLEAR ls_fax_data-country_for_fax.
ENDIF.
ENDIF.
* MVNI(EX00885)03072007: Begin of Replace
* CALL FUNCTION 'TREX_BUPA_SEARCH'
* EXPORTING
* iv_application = crm_saf_get_settings=>gc_app_name_bp
* iv_telephone = ls_header_search-telephone
* iv_email = ls_header_search-email
* iv_url = ls_header_search-url
* is_address = ls_address
* iv_mc_name1 = lv_mc_name1
* iv_mc_name2 = lv_mc_name2
* iv_fax_data = ls_fax_data
* iv_partner = ls_header_search-partner
* iv_partnerrole = ls_header_search-role
* iv_country_for_tel = ls_header_search-country_for_tel
* iv_category = ls_header_search-category
* iv_max_partners = ls_header_search-max_hit
* iv_xaddrversion = lv_xaddrversion
* iv_not_trex = ls_header_search-no_trex
* TABLES
* et_search_result = et_bupa_search_result
* et_return = lt_return.
* MVNI(EX00885)12022008: Begin of insert
CALL FUNCTION 'ZBUPA_SEARCH_2'
EXPORTING
IV_TELEPHONE = ls_header_search-telephone
IV_EMAIL = ls_header_search-email
IV_URL = ls_header_search-url
IS_ADDRESS = ls_address
IV_MC_NAME1 = lv_mc_name1
IV_MC_NAME2 = lv_mc_name2
IV_PARTNER = ls_header_search-partner
IV_PARTNERROLE = ls_header_search-role
* IV_X_ALL_PARTNERROLES =
* IV_PARTNERROLE =
* IV_SORT1 =
* IV_SORT2 =
* IV_COUNTRY_FOR_TEL =
* IV_CATEGORY =
IV_FAX_DATA = ls_fax_data
IV_XADDRVERSION = lv_xaddrversion
IV_MAX_PARTNERS = ls_header_search-max_hit
* IV_NATION_VERS =
* IV_OLD_ROLE_PROCESS =
* IV_NO_SEARCH_FOR_CONTP =
* IV_VALID_DATE = SY-DATLO
* IV_TIME_INDEPENDENT =
IV_RRNR = ls_header_search-zzinsz
IV_BIRTHDATE = ls_header_search-zbirthdate
IV_BEDNR = ls_header_search-zzbednr
IV_VESTNR = ls_header_search-zzvestnr
TABLES
ET_SEARCH_RESULT = et_bupa_search_result
ET_RETURN = lt_return.
* MVNI(EX00885)12022008: End of insert
* MVNI(EX00885)12022008: Begin of delete
* CALL FUNCTION 'ZBUPA_SEARCH'
* EXPORTING
* IV_TELEPHONE = ls_header_search-telephone
* IV_EMAIL = ls_header_search-email
* IV_URL = ls_header_search-url
* IS_ADDRESS = ls_address
* IV_MC_NAME1 = lv_mc_name1
* IV_MC_NAME2 = lv_mc_name2
* IV_PARTNER = ls_header_search-partner
* IV_PARTNERROLE = ls_header_search-role
* IV_SORT1 =
* IV_SORT2 =
* IV_COUNTRY_FOR_TEL =
* IV_CATEGORY =
* IV_FAX_DATA = ls_fax_data
* IV_XADDRVERSION = 'X'
* IV_MAX_PARTNERS = '50'
* IV_NATION_VERS =
* IV_NO_SEARCH_FOR_CONTP =
* IV_BIRTHDATE = ls_header_search-zbirthdate
* IV_INSZ = ls_header_search-zzinsz
* TABLES
* ET_SEARCH_RESULT = et_bupa_search_result
* ET_RETURN = lt_return.
* MVNI(EX00885)03072007: End of Replace
* MVNI(EX00885)12022008: End of delete
IF lt_return IS NOT INITIAL.
* no error handling
ENDIF.
* filter out real employees if role is not 'Employee'
* (and if category is not specified)
IF NOT et_bupa_search_result[] IS INITIAL
AND ls_header_search-category IS INITIAL
AND NOT ls_header_search-role IS INITIAL.
* function module has a buffer
CALL FUNCTION 'BUCP_EMPLOYEE_ROLE_GET'
IMPORTING
e_employee_role = lv_role_category.
IF NOT ls_header_search-role EQ lv_role_category.
SELECT * FROM but100 INTO TABLE lt_but100
FOR ALL ENTRIES IN et_bupa_search_result
WHERE partner = et_bupa_search_result-partner
ORDER BY PRIMARY KEY.
LOOP AT et_bupa_search_result ASSIGNING <fs_result>.
READ TABLE lt_but100 WITH KEY partner = <fs_result>-partner
TRANSPORTING NO FIELDS
BINARY SEARCH.
IF sy-subrc NE 0.
CONTINUE.
ENDIF.
DELETE lt_but100 WHERE partner = <fs_result>-partner
AND rltyp = lv_role_category.
READ TABLE lt_but100 WITH KEY partner = <fs_result>-partner
TRANSPORTING NO FIELDS
BINARY SEARCH.
IF sy-subrc NE 0.
DELETE et_bupa_search_result.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
* if TREX is disabled and addressversions are active -> MAX_HIT does not work
* workaround:
DESCRIBE TABLE et_bupa_search_result LINES lv_no_hits.
IF lv_no_hits GT ls_header_search-max_hit.
ev_max_hits = ls_header_search-max_hit.
ENDIF.
ENDMETHOD.
Hope this helps!
Kind regards,
Micha -
How can I pass field value betwen view in ICWC?
Hi experts,
I am new to this BSP programming. I have some requirements to modify standard ICWC in CRM 5.0
Hope can get some advices and helps here.
I have added a new field called <status> to context note SEARCHCUSTOMER in BupaSearchB2B view and also the same field name to context note CUSTOMER in BupaCreate view.
I have added the field into both the HTM views and able to execute thru WebClient. However, I have one problem in passing the <status> value from BupaSearchB2B view to the BupaCreate view when I click on the 'create' button.
I do search and saw this thread How can I pass field value beetwen view in IC Web Client? , but i cant figure out how it works.
Do I need to create the field <status> to context note CUSTOMER in BupaSearchB2B? Currently the context note does not have any attributes.
Really appreciate for any help.
Edited by: mervyn tay on Apr 7, 2009 11:42 AMsolved by myself...
code in the CREATE_ACCOUNT method.
ev_entity->set_property( iv_attr_name = 'ZZICNO'
iv_value = lv_icnum1 ). -
Retrieving lookup field values from a main table using MDM JAVA APIs
Hi all,
am trying to retrieve the main table data...., i could able to retrieve all the data except lookup field values..., iam facing some runtime exceptions and i dont know why exactly it is throwing this exception..., i pasted piece of code where exactly the error is and the exception also.
in the below sode i set some result set definitions and passing them to retrieveLimitedRecordsCommand. it is showing some exception at retrieveLimitedRecordsCommand.execute(); command.
//*** Code ***//
supportingMainResultDefinitions = new ResultDefinition[] { rdQual ,rdFlat, rdqFlat };
retrieveLimitedRecordsCommand.setResultDefinition(rd);
retrieveLimitedRecordsCommand.setSearch(new Search(tableId));
retrieveLimitedRecordsCommand.setSession(sessionId);
retrieveLimitedRecordsCommand.setSupportingResultDefinitions(supportingMainResultDefinitions);
try {
retrieveLimitedRecordsCommand.execute();
PrintRecords.toConsole(retrieveLimitedRecordsCommand.getRecords());
} catch (CommandException e) {
e.printStackTrace();
//*** Below is the Exception raised ***//
java.lang.UnsupportedOperationException: Unexpected field type -1
at com.sap.mdm.internal.schema.PropertiesHelper.createField(PropertiesHelper.java:274)
at com.sap.mdm.internal.schema.PropertiesHelper.convertFrom(PropertiesHelper.java:281)
at com.sap.mdm.internal.data.RecordMetadata.<init>(Unknown Source)
at com.sap.mdm.internal.data.RecordsLoader.<init>(Unknown Source)
at com.sap.mdm.internal.data.RecordsLoader.<init>(Unknown Source)
at com.sap.mdm.internal.data.RecordResultSetHelper.convertFrom(Unknown Source)
at com.sap.mdm.data.commands.RetrieveLimitedRecordsCommand.execute(Unknown Source)
at com.sap.mdm.apitutorial.lesson2.RecordsDisplay.getDisplayRecords(RecordsDisplay.java:303)
at org.apache.jsp.Sample_jsp._jspService(Sample_jsp.java:190)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:534)
If anyonw worked on this concept..., please provide me the solution
Regards
Praveen kWhich version are you using? Can you please try and narrow down to the offending field? You can do this by limiting the fields you provide to ResultDefinition.
-
Issue with custom search fields in agent inbox
Hi All,
I am working on CRM agent inbox 7.0. The issue I am facing is like this:
I have added custom search fields in inbox. When give a combination of standard search field and custom search field, the result is only based on standard field. The value of custom field is not considered.
Is this a standard behaviour? Are standard fields given higher priority that custom fields?
Any pointers on this would be highly helpful.
Thanks,
NarendraHi Naren,
Did you add custom field using AET? If yes then while adding custom field using AET did you make it search and result relevant?
There is nothing like priority in standard SAP fields and custom fields.
Please let me know so that I can further help you.
Thanks,
Bhushan -
Passing a table-field value in Crystal to a Store Procedure in SQL Server
I have been checking all over the interenet via searches and although some seem to come close to this, its still not what I want.
Essentially I need to pass value from Table-Field record (for each record read/selected) via a paramete to a Stored Procedure(SP) in SQL Server 2205/2008. I do NOT want to be prompted for a value for this parameter each time the report is run, simple pass the value in which will be used along with other select criteria to bring back one value for the report to use in a calcuation per record.
The value of the parameter is a date, but I understand it would be better to pass it in as a varchar(8) - 'YYYYMMDD' - and then reconvert it inside the SP, as follows:
In Crystal Reports 2008 SP3, I have a formula defined as,
trans_date = ToText ({F1ARS_STMT_WS_TRAN.TRANS_DATEI}, 'YYYYMMDD')
and essential just want to pass this to the SP below ... i.e. trans_date ---> @strTransDate
I then link the key fields [EXCH_RATE_TABLE_NAME] and [TRANS_CCY_CODE] to other tables in the Database Expert, and put [EXCH_RATE_AMT] on the report and use it to calculate what I want.
This works fine when the prompt comes up and I put in a proper date, but I don't what it to prompt, but simple pass the F1ARS_STMT_WS_TRAN.TRANS_DATEI in via the fornula/parameter and let teh SQL do the rest for each record selected..
CREATE PROCEDURE [dbo].sp_GET_EXCH_RATE_AMT (@strTransDate varchar(8)) --use format 'YYYYMMDD' to represent the date as a string.
-- Add the parameters for the stored procedure here
-- @TransDate datetime = now
AS
declare @TransDate datetime
set @TransDate = CONVERT(DATETIME, @strTransDate, 112)
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
SELECT [EXCH_RATE_TABLE_NAME], [TRANS_CCY_CODE], [EXCH_RATE_AMT]
FROM [F1CCY_EXCH_RATE]
WHERE [MAJOR_CCY_CODE] = 'BBD'
AND [START_DATEI] =
SELECT MAX([START_DATEI])
FROM [F1CCY_EXCH_RATE]
WHERE [MAJOR_CCY_CODE] = 'BBD'
AND [START_DATEI] <= @TransDate
END
GO
GRANT EXECUTE ON sp_GET_EXCH_RATE_AMT TO PUBLIC
GO
Thanks for any help. Can't tell the headache this has caused my both literally and figuratively.Hello,
I moved your post to the Report Design forum. Lots of SQL help in here...
I believe the problem is due to you using a Parameterized Stored Procedure. The first thing CR has to do is connect to your DB source which requires the date parameter before it can run the query to add the date filter, it's the SP that is prompting for the parameter. Therefore the report has not run so it can't get the field value from the report until you fill in the info for the SP. Catch 22 problem.... Which came first, the Chicken or the Parameter....
The report will work as you have noted but I don't know of anyway to refresh unless parameter is filled in again....
Jason has a lot of great solutions when it comes to these dilemmas, Possibly using a Command Object may help but I believe you will still run into the same issue....
Only way I can think of is to not use a parameter in the SP and let CR do the filtering client side. Of course this means all data is coming back to the client PC as you are likely trying to find a work around for.
Thank you
Don
Maybe you are looking for
-
Just did a software update, and all that my Macbook Pro does is just beep. Does anyone have any solutions?
-
Can't locate Wi-Fi on Nokia N96.
i cant locate wifi on my Nokia n96 Moderator's note: The subject was edited. A new thread was created.
-
ABAP Function Module to BW Users.
Hello All. Someone know if exists a standard Function Module in BW to return a specific user with your Cubes and Queries difined in BW authorizations. I have a Java application using BI Java SDK ....when i connect in BW ...the BI Java SDK return all
-
Quad core MacbookPro Airtunes lag
I recently purchased a new MacbookPro (2.3 GHz quad core) and whenever I try to use Airtunes in conjunction with the speakers on the MBP as well, the MBP has a slight, yet annoying lag. This did not, and does not happen with my old MBP (2.6 GHz dual
-
Where do I find my OEM Lenovo Yoga IdeaPad 13 Windows 8 activation key?
Hello, a couple of days ago, I received my Lenovo Yoga Ideapad 13 in the mail. I turned it on and soon noticed that Lenovo had really screwed the pooch on how they partitioned the device. The SSD was 128GB but only 60GB was given to the C drive. The