‎2018 Jun 26 9:09 PM
I have created a Business Object and I am trying to change the standard way of how it saves the data. I have implemented the BOPF for salesorder generation and it works properly but when the save button is pressed , I would like to call a different API for saving that particular salesorder. Currently it saves directly in the database table.
‎2018 Jun 29 10:16 AM
You can implement a data access class for each node. You can use the super class /BOBF/CL_DAC_IMPLEMENTATION. I guess the default class is /BOBF/CL_DAC_TABLE.
‎2018 Jul 31 3:27 PM
Thanks Christian .Can you please help me with somewhat detailed explanation. I am sort of new to BOPF development.
‎2018 Aug 01 7:00 AM
You create your own data access class inheriting from /BOBF/CL_DAC_IMPLEMENTATION or maybe the class which is used by your BOPF. Then you have to redefine the write method for saving the data.
You have to set this new class in the BOPF (tcode BOBX) for the node or for the whole BOPF. Maybe the data acess class is only visible in the extend view of BOBX.
‎2018 Aug 22 10:35 AM
What is the reason to change the standard way? Maybe there is a better way to solve your requirement.
Cheers,
Martin
‎2018 Aug 28 3:09 PM
Hi Martin,
We are trying to invoke our own API so on clicking save I want to call a different API. If you could provide some of your insights on this , it would be really helpful.
Regards
Pratik Solanki
‎2018 Aug 28 4:11 PM
You didn't answer Martin's question: Why? You're potentially losing a lot of the benefits of BOPF, so this should be done carefully and with good reason.
‎2018 Aug 29 8:44 PM
Hi Mike,
Since the standard Save method directly updates the Database Table which is not ideal in our scenario. Instead we want to use our own BAPI for saving it to the database. There are certain operations that need to perform before we save the record in the database.
Pratik
‎2018 Aug 29 9:02 PM
Hi Pratik,
on which release are you? On 7.51 or higher the draft concept might be able to solve your requirement.
Otherwise, maybe it's possible to add different status to your data model and implement the requirement that way. It's a lot of effort to implement your own DAC. To use the standard DAC is for free...
Cheers,
Martin
‎2018 Aug 29 11:10 PM
You have an extremely versatile framework, so why not use it to do whatever you want your BAPI to do? Or maybe the question should be the other way around, if the BAPI is so important, why use BOPF?
‎2019 Mar 26 7:50 AM
Hi Pratik,
Instead of use the standard 'Save', you can create custom action and call API inside it. After successful execution of API, call standard save action.
Regards,
Dhivya
‎2019 Mar 26 7:50 AM
Hi Pratik,
Instead of use the standard 'Save', you can create custom action and call API inside it. After successful execution of API, call standard save action.
Regards,
Dhivya