on 12-19-2011 3:29 PM
Hi Experts
I am implementing a requirement to make Sales Organization field as search criteria on BP Account
Main Search Screen(UI Comp: BP_HEAD_SEARCH).
I enhanced the structure CRMT_BUPA_IL_HEADER_SEARCH with SALES_ORG
(Component type CRMT_SALES_ORG).And added to UI configuration.
Result: Filed is not showing any F4 Search help and not giving any
relevant results with search term sales org id entered as free text.
Then I saw a [Wiki by Melanie|http://wiki.sdn.sap.com/wiki/display/CRM/Howtoaddanexistingfieldtoasearchpageofadifferent+component?showComments=true&showCommentArea=true#addcomment] and did the same steps according to the wiki.
In the BADI enhancement, modified the code according to SALES ORG. I am getting result list which does not related to the given search criteria of Sales Org.
Please advise.
Thanks
Shaik
Hello Shaik,
I have check the code given in wiki and it seems to be search BP based on the sales office. However as I understand from your comment that you want to search BP based on the sales org. Let me know if my understanding is correct.
For example,
Let us assume the Org structure
O 50000001 ->orgunit
-->S 50000002 -> position |
--> Shaik -> BP
if your requiremnet is to find the BP's assigned to orgunit '50000001' then use the following code inside your badi.
CALL FUNCTION 'RH_STRUC_GET'
EXPORTING
ACT_OTYPE = 'O'
ACT_OBJID = '50000001'
ACT_WEGID = 'DISPORES'
TABLES
RESULT_TAB = lt_result
RESULT_OBJEC = lt_objec
EXCEPTIONS
NO_PLVAR_FOUND = 1
NO_ENTRY_FOUND = 2
OTHERS = 3
.
Now you look into the internal table lt_result or lt_object and filter for OTYPE 'BP'. There you get the list of BP assigned to that particular sales org. If you would also like to get the BP's which are assigned to its sub org also then you need to change the import parameter ACT_WEGID to 'DISPO_BP'.
Hope this solves your problem. Please reward if the information is helpful.
Thanks,
Gopal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The steps you followed are correct.
What table are you using to make your search in the BAdI implementation?
Please check if a manual select on the table based on your select query conditions fetches the result.
Your Select query conditions might need to be modified.
Regards,
Parul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
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.