cancel
Showing results for 
Search instead for 
Did you mean: 

Message confirm in BSP like in Javascript

Former Member
0 Kudos
359

Hi there,

I would like to know if there is a confirm dialog box défined in BSP/ABAP like in javascript in order to confirm or not the action in a onInputProcessing?

I tried to put a javacscript function with the confirm dialog box in a onclick but the problem, the onInputProcessing is always executed in spite of the answer of the user to the confirm dialog box.

Does anyone have any idea or any advices?

thanks.

Accepted Solutions (1)

Accepted Solutions (1)

athavanraja
Active Contributor
0 Kudos

you can use a confirm js dialog box check this button code sample,

clicking cancel wont trigger server event

 <htmlb:button id            = "myb1"
                    onClick       = "myonClick"
                    onClientClick = "var Check = false; Check = confirm('Do you want to Continue?');if(Check == false){ htmlbevent.cancelSubmit = true; }"
                    text          = "Test button" />

Former Member
0 Kudos

Hi,

I like your solution by using a confirm box chek button. But, it is possible to put a onInputProcessing into this button?

Thanks.

athavanraja
Active Contributor
0 Kudos

i thought you were looking for an answer for a BSP related issue, however jaideep sriniva... has given you a answer for ABAP dialog and you had said that its a very helpful answer.

regarding my code using htmlb:button , give it a try first. it has got both onclick and onclient click.

if you click OK in the confirm dialog it will proceed to oninputprocessing and if you cancel it wont go to oninputprocessing (server)

Former Member
0 Kudos

That's right, I was looking for a ABAP solution but I tried to implement sriniva solution in my program but it isn't really adapted to my program conception. I thought it was good but unfortunatly not. So, I'm looking for another way.

In my BSP program, I've a button when you click on it, I store all data into a file. My button declaration is like that :

<input class="butClass" type=image name="onInputProcessing(valider)"
              src="<%=rep %>Server.gif" width="23" height="23"
              alt="Publish"
              id="valid" onClick="WaitCursor();"
              onMouseOver="selOn(this)" onMouseOut="selOff(this)" onMouseDown="selDown(this)"
              onMouseUp="selUp(this)"/>

Problem, can I integrate your solution into my program conception?

Thanks.

Answers (2)

Answers (2)

Former Member
0 Kudos

I must stress that Durairaj Athavan Raja's answer/solutions is really nice if you want a pop up . This is a good way to send a pop-up asking for a confirmation which you always want if you create a delete-button. I don't understand it fully since I'm new to BSP and ABAP OO. Just copy the code (OnClientClick..) to the button you are working with.

/Regards Mikael lindskoug

jaideeps
Advisor
Advisor
0 Kudos

hi,

this link will be useful for you..

https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/webcontent/uuid/f1cfe990-0201-0010-22ac-dbe4cbdef5... [original link is broken]

thanks

jaideep

if helpful{reward points}

Former Member
0 Kudos

Hello,

Thanks for your answer. I would like to know if it's possible to do it in ABAP instruction instead of coding in Web Dynpro ?

Thanks a lot for your help

jaideeps
Advisor
Advisor
0 Kudos

Please refer the below link for screen dialog

http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba4e635c111d1829f0000e829fbfe/frameset.htm

For List check out this example

START-OF-SELECTION.

SET PF-STATUS 'BASIC'.

WRITE 'Select line for a demonstration of windows'.

AT USER-COMMAND.

CASE sy-ucomm.

WHEN 'button1'.

IF sy-lsind = 1.

WINDOW STARTING AT 5 3 ENDING AT 40 10.

WRITE 'dailog 1'.

ELSEIF sy-lsind = 2.

WINDOW STARTING AT 45 10 ENDING AT 60 12.

WRITE 'Last window'.

ENDIF.

ENDCASE.

Former Member
0 Kudos

Ok thanks, that's I'm looking for. I'll try to put 2 buttons OK and Cancel. I gonna see if it's possible with this process.

Thx.