Problem with adding a field in P4310/W4310A grid

fauberte

fauberte

Well Known Member
Hi List,

I'm a long time worker on One World and find myself like a beginner with my question. I'm simply trying to add F4311.PDRCD into the grid of P4310/W4310A as the users want to have this field in the grid for display & addind. I did change BSVW V4311B which is attach to this grid to add RCD in my view. When I add this field in W4310A, the RCD is there but whenever value that I entered is totally ignore at the click of OK button and no results is addes/updated in F4311. This is normally an easy and stupid change but looks like something else is controlling the grid (Possible bsfn F4311 Edit Line). I've tried to play around in the code but P4310 as a level of difficulties that won't make this change easy. Any reason why my new business view fields is totally ignore while updating/inserting????

Thanks!

One World XE B7333
 
Well fauberte,

To answer the specific question, you can look in the form properties, Options tab, and there is a property "update on grid business view". If this is unchecked then the engine will not try to update the values. BEFORE you go and check this box.......checking the box will probably not fix the problem you are having, because the edit line is probably providing the update. Whether or not that is the case, you will probably get lots of suggestions on how to update the fields

Ben again,
 
Hi Ben,

Thanks for the tips. I honestly forgot to take a look at this 'Update on grid business view' options. This is working but causing some others problem as F4311EditLine control everything. Thanks anyway for your help as the users are reviewing the needs.

Regards!
 
Fauberte,

Just to give you an idea for updating fields (in general) and stay away from the MBFs would be to go to the code after End Doc and process through the grid saving your grid values directly to the table. I think there are specifics for doing the same thing if you feel like searching under P4210 (Sales Order) Master Business functions.

Ben again,
 
Hi Eric and Ben,

Eric, have you checked, that is your additional field part of the data structure of EditLine BSFN?

Ben is right, but if you follow Ben's suggestion, then you have to take care of some conditions:

a.) EndDoc BSFN call generally invoked from the OK Post Button Clicked event. Check all BSFN call in this event and clear all Asynchronous execution option.

b.) I suppose, EndDoc is called with Include Transaction option. If yes, then you have open the table before the update and mark the Include Transaction option on the Advanced tab of the Open statement. Of course, you have to Close the table after the updates.

Good luck,

Zoltán
 
Hi, All!
If adding a new field to a grid form that uses mbf DO NOT TRY TO INVOKE AUTOMATIC WRITEBACK!!!!
If added to the grid, the field will display correctly.
After that you can check wether the data structure of the Edit Line BSFN uses that field. If yes, map the field and test the application thoroughly.
If no, you have to use a kind of solution Zoltán proposed. There are more ways to do this - my general solution is to use a work table and write back the data using a new BSFN which I call after the original End Doc. Take care to use the "Include in Transaction" and "Asynch" flags the same way as End Doc uses them. This way the function will work and you do not have to interfere with the original Synch/Asynch processing.
Regards:
Gergely Pongrácz
e-Best, Hungary
 
Hi,

I dont know why u have tried to change the BSVW V4311B for insert/update. I've come accross many modification like this, and i have managed to insert/update records on P4310 and P4210.

I just use an Insert statement while adding a new record, or an Update statement while updating an existing record. If insert or Update statements are not applicable for my requirement, I add some ER in "OK Button clicked" event. Here u will have to use some logic for checking the records to be inserted or update existing. Do the check by counting the total grid records, and checking them gridline by gridline.

If you think about it hard, it will surely work for all cases. If u need more help, I'll tell u exactly what ERs to put in OK button clicked event.

Best of luck!
 
Back
Top