s10confirmation( )
Function Displays a confirmation message and returns the response
Example myanswer =
s10confirmation( 'Text...' ).
Format data:
  mymsgid type sy-msgid,
  mymsgno type sy-msgno,
  mypar1 type string,
  mypar2 type string,
  mypar3 type string,
  mypar4 type string,
  mytext type string,
  myanswer type string.

myanswer =
  s10confirmation(
    exporting
      msgid = mymsgid
      msgno = mymsgno
      par1 = mypar1
      par2 = mypar2
      par3 = mypar3
      par4 = mypar4
      text = mytext ).
Parameters
Name Type Description
msgid sy-msgid
Message Id table T100
msgno sy-msgno
Message number table T100
par1 string
Message parameter 1
par2 string
Message parameter 2
par3 string
Message parameter 3
par4 string
Message parameter 4
text string
Message text
answer string
'X' = confirmed by user
Description By s10confirmation() the standard confirmation popup of the respective browser is displayed and the user's action is returned: 'X' if he clicked the OK button, an empty string otherwise.

The message text can either be provided directly or stored in the SAP message table T100 in a language-dependent way. For program-internal language-dependent texts you can also use the function s10localize(). The placeholders &1, &2, &3, &4 are replaced in the text by the specified variable values.

Example:

HTML
<
button type='button' class='button  onclick='S10Apply("delete_document")'>
     Delete document
</button>

ABAP
* delete document
method delete_document.
     if s10confirmation'Do you really want to delete the document?' ) = 'X'.

*      delete document ...

       s10infomessage
'The document has been deleted.' ).
     endif.
endmethod.  

Components S10 Framework