on 08-23-2007 10:19 AM
(New to dynpro)
How should I make a calculated field?
What I have currently is:
Opening Balance ________
Received ________
Paid ________
Closing Balance ________
All four fields are input fields, Closing Balance is marked read-only.
Currently, to calculate the closing balance I have implemented event onEnter in the first 3 input fields so now if the user hits <Enter> after putting in opening balance/received/payed the closing balance is calculated.
What I want of course is something more 'automatic' - no need to hit the enter key - any time a change is detected - for example during navigation between the fields w/ a <TAB>. How can I do this?
Thanks,
Michal
Hi Michal!
You need at least some sort of event to check out if new values have been entered.
Also, in case of an input field, the context is updated only when you press enter.
You can try having a button say CALCULATE on your screen. In the event handler of this button, you can calculate the closing balance.
Hope this helps.
Regards,
Neha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use the ENABLE_CONTEXT_CHANGE_LOG method to enable the recording of the context changes to which your inputfields are bound. This method is in interface IF_WD_CONTEXT.
data ref_context type ref to IF_WD_CONTEXT
ref_context = wd_Context->get_context( ).
The GET_CONTEXT_CHANGE_LOG method of the same interface then gives the NODE , Old Val and New Val of the changed attributes in the context
Thanks
Anand
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michal,
In WEBDYNPRO, to perform an action you must have to trigger an event or perform an Action.
Now to solve your problem you have to trigger an event or you have to perform an action to check is there any change of value?
As you working in Input field, its not possible to trigger an event when you are entering any value in the input box, until you are pressing ENTER. Other-wise you have to go for an action Button and on perform of that action you can do your job.
I think it will help you for better understanding.
Regards
Satrajit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
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.