cancel
Showing results for 
Search instead for 
Did you mean: 

Web Dynpro - how to calculate values on the fly

Former Member
0 Kudos

Hi everyone,

I'm working on an application where you input the number of hours spend on 5-10 different projects and at the bottom has a total of hours spent to submit for recording.

I'm trying to get the total hours to reflect immediatly upon change so if you have

Project1----


1

Project2----


1

Project3----


1

Total = 3

Upon changing any of those values the total changes immediatly...without having to press a recalculate button. I know this is possible with javascript but how do you complish this with web dynpro? I thought this might have to do with wdDoModifyView method but it doesn't seem to work.

Also I'm trying to see output by putting System.out.println("blah"); calls but can't seem to see them in the deploy output view or any other view. Having used eclipse before, there's a console which shows you this type of data but I haven't been able to find it on netweaver.

Greatly apprciate the input...thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member182372
Active Contributor
0 Kudos

Hi Lawrence,

WD doesn`t allow client side extension (javascript). So it is not possible without pressing Enter button on keyborad or clicking button on screen (server roudtrip).

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

Hi Maksim,

Thanks for the reply.

Then what exactly happens with the wdDoModifyView function? When I edited the value on the table and click on another input field, I see the screen refresh or reload, not sure but it does something so i figured this is where it runs the wdDoModifyView and I can take advantage of that.

Also does anyone know about the System.out.println(text) and where I can view this output.

Thanks

former_member182372
Active Contributor
0 Kudos

Reload of screen in your case is caused because lead selection property of table is changed (you are switching to another row in table, right?). Actually, you can insert calculation logic in action handler for this event.

Former Member
0 Kudos

I figured that'd be the only way to do it. Thanks for the quick replies. Wish there was a more fluid way.