on 01-07-2009 6:34 AM
Hi,
I need 2 submit buttons in onlineform(WDA). But in Interactiveform UI element there is only one event "onsubmit".
For example I have submit and posting buttons in my form. As of now when i click submit button it is calling onactionsubmit and trigerring workflow. But how to call another event in webdynpro from Posting Button (Submit button from webdynpro Native)of form so that it can execute the BAPI?
Regards,
Ravi
Ravi,
Well for this you can play with some hidden fields and achieve the results.
Create two buttons on form of SubmitToSAP type and create two hidden TextFields (TextField1, TextField2) bound to Web Dynpro context (Field1,Field2)
When first Submit Button clicked, in the click event of button set the TextField1 value to 1 through JavaScript as follows:-
TextField1.rawValue = 1;
Similarly repeat it for Button2 by setting TextField2 value to 2
TextField2.rawValue = 2;
Now in the onSubmit event on Web Dynpro side write an if else loop based on above condition.
if(wdContext.currentContextElement().getField1().equals("1"))
{
// write the coding 1st event
}
else (wdContext.currentContextElement().getField2().equals("2"))
{
// write the coding 2nd event
}
Chintan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ravi,
you could add a button in the form, and attach some java script code to the onClick event:
var cURL = enter the WSDL url generated in the first step;
var service = SOAP.connect(cURL);
xfa.connectionSet.name of your custom data connection.execute(0);
2nd way, on a button's propertiy, go to "Object" tab, "Field" tab, chose the button type as "submit", then in the "submit" tab, you can enter the URL of the web service.
also, have a look at this post: /people/lisha.peter/blog/2007/10/16/purely-offline-adobe-scenario-for-bapi-call
hope it helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.