cancel
Showing results for 
Search instead for 
Did you mean: 

Confirm-Popup in SEM-BPS-Web-Planning-Views

Mathias_24
Explorer
0 Kudos

Hi,

is there a possibility to throw a (javascript-)popup for confirming execution of a BPS-function in the web, like "Are you really sure deleting data? Yes / No"

Thanks for every hint!

Regards

Mathias

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member93896
Active Contributor
0 Kudos

Hello Mathias,

yes, of course. Here's an example. Set the original button for the planning function to "hidden". Then add a text component with type HTML and the following content (assuming the function button is call DeleteButton):

<script>

function SubmitWithPrompt(txtPrompt, txtStdButtonName) {

if( window.confirm( txtPrompt ) ) {

return( bspSubmit( txtStdButtonName ) );

}

}

</script>

<span><a href="#1" onclick="javascript:SubmitWithPrompt('Are you really sure deleting data?', 'DeleteButton'); return false;" class="sapBtnStd" OnMouseOver="javascript:window.status = 'Delete'; return true;" title=""><nobr>Delete</nobr></a></span>

When you execute the web interface and click the butten, the system will prompt you first.

Regards,

Marc

SAP NetWeaver RIG, US BI

Mathias_24
Explorer
0 Kudos

Hi Marc again,

thanks, this seems to be exactly what we need for this problem!

Best regards,

Mathias

Former Member
0 Kudos

Hi Marc,

In the solution you have offered for calling a confirm-popup box, is there a way to execute a second function if the user chooses CANCEL?

So if the popup promts for an OK or CANCEL, can you attach a function to the CANCEL option?

Or, can you upon selecting OK, execute a 2nd function(i.e. first execute the delete, then immediately execute a save function)?

Thanks,

Rael

athavanraja
Active Contributor
0 Kudos

Hi here it is,

<a href="#" onClick=confirm('Are you really sure deleting data?')> Delete</a>

Regards

Raja