cancel
Showing results for 
Search instead for 
Did you mean: 

Execution of BAPI

Former Member
0 Kudos

Hi All,

I am using dynpage technology to create a portal application.

My requirement is, I need to have a confirmation window with OK & CANCEL. button on it. I have created it using javascript.

If ok is clicked, the bapi should be executed. How to do this?

stringBuffer strBuf = new stringBuffer();

strBuf.append("winopen = confirm("\do you want to continue?"\));

The above code opens a confirm window, with message 'do you want to continue?'. If you click ok, this window will return true value and it is assigned to winopen variable in the above code. if this window returns true, we can execute the bapi.

Now how to call the bapi execution code inside java script or Is there any other way wherein we can use this winopen variable which holds true value outside the javascript, so that we can execute the bapi?

Please suggest. Hope I am clear.

Thanks in Advance.

Regards,

Subashini.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Subashini,

Please post you Question in WD4J forum so that you get some inputs there.

Thanks you,

Vijai

Former Member
0 Kudos

Hi,

This is basically a dynpage application. Can anyone pls suggest how to execute the BAPI by referring to java script variable?

Regards,

subashini.

Former Member
0 Kudos

Hi,

This is not a WD4J. This is a dynpage technology(PAR file). Pls suggest something.

Regards,

Subashini.

Former Member
0 Kudos

Hi,

Instead of calling BAPI from your dynpage, do one thing...

Call a Java class on the action performed on the dynpage and in that class you can execute the BAPI.

Regards,

Mahantesh

Former Member
0 Kudos

Hi Mahantesh,

I am using java script to create a confirmation window. How to call this class inside java script?

Because, if you click Ok , the variable assigned to this window will hold true value,. Based on this we need to execute the BAPI.

Hope I am clear.

Please Suggest.

Regards,

Subashini.

Former Member
0 Kudos

Hi,

Their are two ways to do it.

One once the user click ok or cancel post the rwquest either by get as a param to URL or using post to do post you need to have an hidden field as part of your form which will contain the selected value.

Regards

Ayyapparaj

Former Member
0 Kudos

Hi,

As Ayappa has suggested, u can read the hidden field value in the form bean and check this in your validate method of the form bean class and then call the required BAPI on TRUE/ FALSE.

Regards,

Mahantesh

Former Member
0 Kudos

Hi Ayyapparaj,

Can you explain in detail because I am not sure how to proceed further? can you send a sample code?

Thanks in Advance.

Regards,

Subashini.

Answers (0)