cancel
Showing results for 
Search instead for 
Did you mean: 

Message (Save & delete)

Former Member
0 Kudos

Hi Friends,

In BSP Application, when I wrote onInputProcessing Eventhandler for Save Button as follows.


when'save'
itab_wa-field1 = 'student'.
Append ITAB_WA TO ITAB.
MODIFY STD1 FROM  TABLE ITAB.
   
If sy-subrc = 0.
    
    MESSAGE I000(ZMSG1).
    
    Endif.

But I am not getting any popup message.

Even for delete button , I would like to write a confirm delete message before deleting actual record. I am not getting this one as well.

PLS Mail me in this regard.

regards

CSM Reddy

Accepted Solutions (1)

Accepted Solutions (1)

athavanraja
Active Contributor
0 Kudos

you cannot do that. You have to remember that you are working for web frontend.

in your case declare a variable called saved type string in page attribute.

when'save'

<b>clear saved .</b>

itab_wa-field1 = 'student'.

Append ITAB_WA TO ITAB.

MODIFY STD1 FROM TABLE ITAB.

If sy-subrc = 0.

<b> saved = 'X' .</b>

Endif.

now in your layout

<%

if saved eq 'X' . %>

<script>

alert('Changes are Saved');

</script>

<%endif .

%>

Hope this is clear.

Regards

Raja

Former Member
0 Kudos

Hi Raja,

Thanks for reply, as save button is fine now.I want to confirmation message when I press delete button for a particular record .

Regards

CSM Reddy

Former Member
0 Kudos

Hi,

Solution is in my next post.

Regards,

Narinder

Message was edited by: Narinder Singh Hartala

Former Member
0 Kudos

Hi,

I want confirmation message before delete not after delete,as Even I could change the raja's code for delete message.

Regards

CSM Reddy

Former Member
0 Kudos

Hi CSM,

Are you using htmlb button?

htmlb button has a property called onClientClick

put this code there.

onClientClick = "htmlbevent.cancelSubmit = !window.confirm('Are you sure');" />

Hope it helps.

Cheers!!

Narinder

Answers (0)