cancel
Showing results for 
Search instead for 
Did you mean: 

Interactive Form with Three Buttons

Former Member
0 Kudos

Hi,

I have a requirement to provide three buttons in an interactive form (Adobe form WebDynpro Java).

For form there are two events onCheck and onSubmit. But there are three buttons in an interactive form Approve, Reject, Discard.

For all these three buttons there needs to be some action on triggring this action it has to perform some action.

How can do this, do we need to script if so where exactly.

If you can provide steps are a working sample example will help.

Thanks,

Murali

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos
Former Member
0 Kudos

Hi

One way you can do this is by creating a context attribute "buttonId" type integer. Pass this to the adobe form and bind it to a field and make that field invisible. All 3 buttons can be submit buttons but in each of them on their onClick event you can use java script to specify different values for this field (e.g. 1 - Approve ,

2 - reject, 3 - discard). Then in the onSubmit event of the form in webdynpro just read this conext attribute value and after just have an If..then clause to do different processing.

Regards

Thashin

Edited by: Thoshin Naicker on Jan 23, 2009 9:00 AM

Former Member
0 Kudos

Hi Thoshin...

I have a similar requirement but in WebDynpro ABAP, if you could help me out.

This thing is working just 1st time.

i.e. 1st time I click on add row and the indicator 'AR' is set and available in method.

2nd time when I click on any other button, I am not getting the indicator in the method. It shows the previous value....

Is there any workaround for this ??

Thanx in advance.

Former Member
0 Kudos

Hi

Can you please tell me what code you placed in each of the buttons onClick event?

Regards

Thashin

Former Member
0 Kudos

Hii,

Thnx for the prompt reply.

I have a TextField

On delete button, which is of SAP Submit ActiveX type, I write

******

txtbuttonind.rawValue = 'D';

and following is system given default code.

// DO NOT MODIFY THE CODE BEYOND THIS POINT - 705.20051114114126.253659.250577 - SubmitToSAP.xfo

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

// END OF DO NOT MODIFY

******

Similarly for Add Row and Submit buttons, of same type, I set indicators as 'AR' and 'S', respectively.

Is there anything wrong with this ???

Former Member
0 Kudos

Hi Shwetha,

if your txtbuttonind field is in different subform from other buttons, try use full path of the field instead of

writing only field name txtbuttonind in your script. Like xxx.xxx. txtbuttonind.

Regards,

Ravi

Former Member
0 Kudos

Hiii Ravi...

Tried that also. But now it creates another issue.

For the 1st time, its working fine, i mean when i click on any of the button, either Add or Delete or Save, it executes the code perfectly, but when I click again, after the page is reloaded, I don't get the values of indicator in the context, Again when I click for the 3rd time, it works fine. Any idea why it happens so ??

And what could be the solution to this ??