Backend Search to Header with Detail (SUP + DOE)
I have created a hierarchical data object with header and detail.
So I created a backend search to it but the code generated by SUP doesn´t
contains the structure of detail.
If the backend search function must be like bapiwrapper LIST,
How can I build a backend search to return the header with its details?
Siva R Krishna replied
I would be happy to help you if you can provide more details on your requirement.
But neverthless, check this example
1. You have a Business Partner data which has header details like Name, Main Address and communication data. Also you have a Item level data which contains other addresses like Office, Temporary, permanent etc.
2. So you create a GetList & GetDetail BAPI wrappers to create a data object - which is sufficent enough to download all data to DOE and based on some distribution rule the data will be distributed to various devices.
3. Now lets assume that you downloaded the data to DOE based on Region(because you need only Business Partners in America region). But if any user travels to Europe and if he requires to search for a business parter in Europe region then this can be facilitated via Backend search.
4. For this you would have created a Backend search function module, which can have any number of importing parameters but the exporting/tables parameter has to be the root/header structure of your Getlist/Getdetail BAPI wrapper.
5. So on device, you can provide a search screen with the importing parameters as search criteria and then you can search for Busines partners in Europe region(Remember the result list can be huge here. But you can control that by either having a maximum results paramerter as one your import criteria and default to some value from device or you can directly default that on your Search Function module in the backend itself)
6. Once you get the results back on your device in europe region, you might want to check additional addresses which are at the item level. In this case, you can perform a Backend read operation. From the BAPI wrappers perspective you dont have to code anything extra because from DOE, it will automatically call GetDetail BAPI wrapper. All that you need to do extra is to perform Backend Read operation from the device and rest is taken care by DOE.
Hope you understood. Else please post your exact requirement and then I can help you.