Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to call another BOPF from action of one BOPF ?

suryasarathi_basu
Participant
0 Kudos

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.

2 REPLIES 2

maheshpalavalli
Active Contributor
0 Kudos

Hi Surya Sarathi Basu,

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

sambit_de
Discoverer
0 Kudos

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