2009 Sep 11 12:38 PM
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
2009 Sep 11 12:49 PM
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
2009 Sep 11 12:49 PM
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
2009 Sep 12 5:31 AM
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
2009 Sep 12 10:28 AM
2009 Sep 11 12:56 PM
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