2023 May 26 4:00 PM
Hi,
I need to create a search help with fields from 2 tables namely PRPS and WCOCOH .The tables do not share any foreign-key relationship in order to create a view.So,is there any other way to create a search help without including search help exit .If not ,are there any standard search help exits which could help here.
2023 May 26 4:00 PM
Hello Epparla,
Thank you for visiting SAP Community to get answers to your questions. Since you're asking a question here for the first time, I recommend that you familiarize yourself with https://community.sap.com/resources/questions-and-answers, as it provides tips for preparing questions that draw responses from our members.
Feel free to take our Q&A tutorial at https://developers.sap.com/tutorials/community-qa.html as well, as that will also help you when preparing questions for the community.
Should you wish, you can revise your question by selecting Actions, then Edit.
Kind regards,
Anne
2023 May 26 4:15 PM
2023 May 26 8:49 PM
2023 May 28 8:49 AM
Hi Raymond,
Thanks for the reply.But there is no foreign key relationship between the tables in order to create a help view.
2023 May 28 9:41 AM
2023 May 29 12:38 PM
Table PRPS does hold WBS elements. Table WCOCOH does hold contract header data.
You want a search help on these 2 tables a.k.a. on these 2 data sets but you do not indicate how these 2 data sets are to be linked.
There are some suggestions on your question by using a CDS or maintenance (or help or database) view. But then it must first be clear how these 2 tables are linked.
A contract does hold contract items and a contract item can potentially have a WBS element.
If you want search help on this linked data then there are 2 possibilities:
* Contract items on WBS element
cl_lord_services=>get_items_for_wbselmts(
EXPORTING
it_wbselmt = VALUE #( ( ls_item-pspnr->* ) )
it_vbtyp = VALUE #( ( if_sd_doc_category=>contract ) )
iv_filter_items = abap_true
IMPORTING
et_sditem = lt_sditem ).
2023 May 29 4:54 PM
jack.graus2 Just to clarify, Raymond and I were not proposing "CDS or maintenance view", we proposed respectively a help view and a database view 😉
(but I agree that the question needs to be clarified and your comment is worth being converted into an answer)