on 09-23-2008 3:28 AM
Hello,
In the standard Accounts search, all business partners(accounts, contacts, org units, etc) that have the general business partner role are displayed in the result. We would like to display just the accounts. What would be the easiest way of doing this?
Thanks,
B
Points will be awarded of course.
Very easy, first you need to remove the shuffler which allow to select the kind of Accounts you want to search for (since you don"t want to allow the user to have the choice). This is done by going into the view and comment out the lines that call the shuffler component.
Then, in the EH_ONSEARCH method, you can replace the code which reads value from the shuffler by your own code where you always set the value for BP type to what you need.
Hope you understand and i can tell you that it works since i did the same already
Cu,
Xavier
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Xavier,
Can you please explain how a shuffler-which filters Corporate, Individual or Group accounts is going to affect this requirement?
And what parameters should be set in the query so that it only filters Business Partners?
I tried setting role=Sold to Party, but it displays contact persons with role sold to party.
Thanks and Regards,
Rohit
COMPONENT BP_HEAD_SEARCH, view MainSearch.
Then to remove the shuffler from th UI, comment out the following lines in the view itself (MainSearch.htm):
<bsp:call comp_id = "<%= controller->GET_VIEWAREA_CONTENT_ID( 'SearchShuffler' ) %>"
url = "<%= controller->GET_VIEWAREA_CONTENT_URL( 'SearchShuffler' ) %>" />
For the Account only selection, enhance the IMPL class and in method EH_ONSEARCH, replace the following line:
lv_category = lr_shuffler->get_property_as_string( iv_attr_name = 'CATEGORY' )."#EC NOTEXT
by
lv_category = '2'.
I think 2 is for Corporate accounts, if not, just try with 1 ... but I think 2 should be ok.
Regards,
Xavier
Hi, see my answer. But shufller is used to allow the selection of ALL or only specified BPs. In that case, he does not want to get anything else than Accounts, meaning Corporate accounts, so first he does not need the DDLB called shuffler anymore, and then by setting the CATEGORY to the value of CORPORATE accounts, it works as he wants it to work.
Regards,
Xavier
Hi Xavier,
Just for your info-Whenever we create an Organization Unit, a business partner is also created in the background( Corporate Business Partner) with role=Organizational Unit.
So if we search for Corporate Business Partners, it will also display the Organizational Units.
So just hiding the shuffler and passing category = '2' is not going to work over here.
This is a tricky one..:-)).
Thanks and Regards,
Rohit
Hi, it is true that Org units are retrieved, if of course you customized your organizational structure to use BP (which is recommended for lot of things, i know). So to get rid of this, you'll have to additionaly implement the BADI for BP search to filter out the BPs that have the role "Organizational Unit". And then this should work as desired.
Regards,
Xavier
Hello,
thanks for your hints on this issue.
I first changed the get_p_category method to limit the drop down box entries to "Corporate Account", but afterwards the first search after logon showed no result entries.
If I implement your solution, it works fine, but the number of results is not shown anymore, after I redefine the EH_ONSEARCH method.
Do you have a hint concerning this issue?
Thank you very much.
Kind regards
Michael
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.