cancel
Showing results for 
Search instead for 
Did you mean: 

calling and displaying BAPI values when the initial view is displayed

Former Member
0 Kudos

hi Gurus,

I am creating an application where I am calling a BAPI.

Now my problem is that the values should be called and displayed when I am starting the application ie in the first view itself.

Is there any way to execute the BAPI so as to retrieve the values from back end and get the values displayed in the initial screen/view.

Or else is there any onPageLoad method which can be used in such cases.

please help me how to go ahead.

Thanks and regards,

kris

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

closing

Former Member
0 Kudos

Hi Gopi,

you can use the BAPI Execution in the DoInit method of the component controller.if it is not work, what the problem you have faced?

regards

karthik

Former Member
0 Kudos

Hi Gopi,

Do you get any message from BAPI while execute the BAPI is there any exception?

Kind Regards

Mukesh

Former Member
0 Kudos

Hi Gopi

As mentioned try calling the execute method of BAPI in init() method of view or controller.

Thanks

Srikant

former_member182372
Active Contributor
0 Kudos

Hi,

You can call your BAPI in wdDoInit method of your view controller.

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

hi Maksim,

I called the BAPI in the init method of the Controller,

but it is not working out.

Is there anything to perform or do some settings, as I am not getting the values.

Please suggest me how to go ahead.

Thanks and regards,

kris

Former Member
0 Kudos

Hi

Create a method in controller and insert the code,

wdContext.current<BAPI>Element().modelObject().execute();

And call the method in view, and check the size of BAPI's output node.If it is greater than 0, your BAPI is returning something. using any loop and get the Output

Saravanan K

Former Member
0 Kudos

Hi Krishna,

You can execute BAPI in the init() method of view or controller.

Thanks

shiva