Skip to Content
avatar image
Former Member

Multiple submit buttons


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?



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jan 07, 2009 at 07:44 AM


    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.

       // write the coding 1st event
    else (wdContext.currentContextElement().getField2().equals("2"))
      // write the coding 2nd event


    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 07, 2009 at 06:59 AM

    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); 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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      is there a way to attach some java script to those two activx buttons?

      if so, you can set an invisible flag value, then in the web dynpro event handler, you can tell which button the event comes from.

      i never try this, only my guess.