12-26-2018 6:04 AM
Hi Experts,
I am very new to BOPF. I want to call another BOPF for creating entry into a custom table from action of one BOPF. Suppose there is BOPF for item display and there is a button in it "Add Cart". Now clicking on the button selected items will be added to cart table in the backend. Now the button click will be having an action. On that action, the Cart BOPF will be called and data will be inserted to the corresponding cart table.
12-26-2018 11:51 AM
There are few blogs and questions available on this very topic,one such link below:
https://blogs.sap.com/2013/01/29/navigating-the-bopf-part-4-advanced-bopf-api-features/
BR,
Mahesh
02-05-2019 7:35 AM
Hi Surya
A BOPF action can be called using the interface /BOBF/IF_TRA_SERVICE_MANAGER method DO_ACTION.
Code Snippet:
DATA : mo_bobf_srv_mgr TYPE REF TO /bobf/if_tra_service_manager.
mo_bobf_srv_mgr = /bobf/cl_tra_serv_mgr_factory=>get_service_manager( "Mention the BO Key" ).
mo_bobf_srv_mgr->do_action(
EXPORTING
iv_act_key = BO Interface Name=>sc_action-root-Action
it_key = lt_key
IMPORTING
eo_message = lo_message
et_failed_key = lt_failed_key
).
Regards
Sambit