Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

problem in table control

Former Member
0 Kudos
105

hi experts,

i have a issue regarding table control.

i have created a table control which have fields ,po quantity and quantity sent to vendor, when user enters some quantity in sent to vendor field , bal quant is calculated n displayed , but when after entering the sent quant user press enter or save the proogram triggers from line 1 and agin the bal quant is calculated this resets my earlier calculated bal qaunt, but i do not want this to happen , i want that i my prooram bal qaunt should be calculated once only , how to do thsi can anyone help

thanks in advance

regards sandeep

1 ACCEPTED SOLUTION

Former Member
0 Kudos
70

Hi,

One way to restrict would be to calculate only for those lines where the value for calculated field is blank , the value for the calculated field would only be blank for new fields, another way would be to keep a flag that you are looping on to get the table control do not show this flag on the table control so when you fetch enteries to show on the sceen populate this flag for all the values initially fetched from table and then only do calculations for entries where the flag is not set and after doing calculation set the flag for that entry also.

Regards,

Himanshu

4 REPLIES 4

Former Member
0 Kudos
71

Hi,

One way to restrict would be to calculate only for those lines where the value for calculated field is blank , the value for the calculated field would only be blank for new fields, another way would be to keep a flag that you are looping on to get the table control do not show this flag on the table control so when you fetch enteries to show on the sceen populate this flag for all the values initially fetched from table and then only do calculations for entries where the flag is not set and after doing calculation set the flag for that entry also.

Regards,

Himanshu

0 Kudos
70

thanks himanshu.

i have also set a flag ent_flg = ' X ' and when bal quant is calculated it resets to 'Y'. but i m calculating bal quant in loop , so when i nedd to calculate bal quant for next po item it does not calculates coz of the flag value 'Y'., i want this flag to be resets to y only when it comes out of loop , so that bal quant is calculated for all item taht user has selected in table control so where to mention thsi is am not able to understand .

plz help.

thanks

sandeep

0 Kudos
70

thanks himanshu.

my problem is resolved

regards

sandeep

Former Member
0 Kudos
70

Hi,

in the PAi.

Before modifying the Table control work area with new calculated values..

Check the bal quant is according to is there according to previous PO and item ,else that means Bal qty is calucalted .

the do not update the bal qty field.

Regards,

Prabhudas