cancel
Showing results for 
Search instead for 
Did you mean: 

web dynpro submit button's question

Former Member
0 Kudos

Hi all,

There is a question about web dynpro's submit button.

I create a Web dynpro activex submit button,And it executes the action which i created in view's.That's ok.

But I also want to do such like adobe's regular submit action,for example,check the required textfield.......execute the preSubmit action and so on......

I change the control type from regular to submit,but it clears the click event. I guess it will remove the Web dynpro action execute.

So what should I do?

Best Regards

delma

Accepted Solutions (1)

Accepted Solutions (1)

vaibhav_tiwari
Contributor
0 Kudos

Hi Delma Ma,

When you create a Web Dynpro ActiveX submit button then there is the following code written by default at its action event:

app.eval("event.target.SAPSubmit();");

Just write the code you want to execute along with this regular submit code before or after this code in order you want to execute it. That will also be executed with this code.

Hope it will solve your problem.

Regards,

Vaibhav Tiwari.

Former Member
0 Kudos

Hi,Vaibhav

Thank you for your reply.

So my problem is : how to write code to do the regular submit action(the adobe "submit" button does).

That's all.

Best Regards

delma

vaibhav_tiwari
Contributor
0 Kudos

Hi Delma,

Suppose the scenario like you have to show a message "Hi" when your textfield is containing '0' as its value and after that you want to submit to webdynpro view to follow the action defined there and if the textfield is containing any other value then you want to show message "Hello". Then write the code as follwos:

if(TextField1.rawValue == 0)
{
	xfa.host.messageBox("Hi");
	app.eval("event.target.SAPSubmit();"); //default code written  to submit to sap
}
else
{
	xfa.host.messageBox("Hello");
}

Hope to solve the problem.

Regards,

Vaibhav Tiwari.

Former Member
0 Kudos

HI

Ok.Maybe I didn't explain my question clearly.

Firstly, what I want to do is just like send-email button does.But you know,after I click the sendemail button, an automatic check will be done to check which required text field is null,if is null, a red border will be added and the submit is not allowed.(and also execute presubmit event)

Ok, I just add a web dynpro submit button,but I find it doesn't check whether the required text field is null.

I thought I could add the SAPSUBMIT script to submit button,but when i change the button to regular submit button, the click event disappeared.

I know we can add some more scripts to archive this.

But because of the form is so large, I just want to find an easy way.to do so.

Thank you.

Best Regards

delma

Edited by: delma ma on Aug 13, 2008 11:51 AM

vaibhav_tiwari
Contributor
0 Kudos

Hi Delma,

Just write the code(

app.eval("event.target.SAPSubmit();");

)in the mouse up event of the same submit button i hope it will work.

Regards,

Vaibhav Tiwari.

Former Member
0 Kudos

Hi,Vaibhav

Thank you. I got that. problem is solved.

Best Regards

delma

sankar_narayana
Active Participant
0 Kudos

Hey,

I too have the same problem. I need to check the date, if the user didnot enter any date then it should stop submitting. And i need Date validation also

Can anyone solve my problem

Iam using Webdynpro-Native Submit button.

Answers (0)