• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

Update F4311 problem

OWXer

Active Member
Hi List,

I created a customed application using a custom business view which joins F4301 & F4311 together (I understand there is a BV out there but I just used only some of the user reserved fields on F4311 so I created my own); the application is used to update the F4311 after the user reserved fields have been filled. It's a very simple application but ....

After all fields are filled, I pressed OK to update the file. I found that some key fields (SDKCOO, SDDOCO, SDDCTO, SDSFXO) are blanked out on the F4311 for those records I updated. The values of these fields showed up on the grid. I checked the debug log and found that the SQL statement to update the file is UPDATE TESTDTA/F4311 SET SDKCOO=' ', SDDOCO=0,SDDCTO=' '.... I am not sure what caused this to issue a statement like this.

I did, however, turn on process all grid rows on the form properties. (I need that turned on since some of the fields in the rows are filled using some default values when the grid are displayed; so, even the user didn't update the row, it did get updated behind the screen so I required this feature to write back to the file)

Your help would be very much appreciated.

Thanks,

OWXe SP13, NT
AS/400 V4R5, Citrix
 

BBritain

VIP Member
Well I can't yet answere to XE but previous versions of OW had the
limitation of only updating the primary table within a joined business
view.

Ben again
 

OWXer

Active Member
Re: RE: Update F4311 problem

The form type is headerless and I use SDDOCO, SDDCTO, SDKCOO, SDURCD, SHHOLD in the form control to filter out those records I required to bring them in to my grid. Also, I use suppress grid rows to suppress those rows where SDUOPN = 0.

Thanks in advance!
 

tom_brown

Active Member
RE: RE: Update F4311 problem

And sometimes are some of the filter fields blank when you press ok?

I found the following in the documentation, it is the process flow for the
ok button of a headerless detail form. This suggests that any equal filter
fields will be copied into the file fields before updates, so are any of the
filter fields blank?

Try removing you filter fields and see if the update starts working again...


OK

OK is a standard item that is automatically placed on Headerless Detail
forms. It
validates the information on the form and updates or adds to the database
through
JDEKRNL function calls.

1. If there are any errors/warnings on the form, stop OK processing
2. Perform Event Rules: Button Clicked
3. For each control on the form
_ If the current control is a form control and it has not passed
validation
_ Perform Event Rules: Control is Exited
_ Perform Event Rules: Control is Exited and Changed _ Inline
_ Perform Event Rules: Control is Exited and Changed _ Asynch
_ Perform Data Dictionary validation
_ If the current control is a grid control
_ For each grid row
If the current grid row needs to have Leave Row processing run and
is updateable
_ Perform Event Rules: Row is Exited and Changed _ Inline for
current row
_ Perform Event Rules: Row is Exited and Changed _ Asynch for
current row

4. If there are any errors on the form, stop OK processing

5. Delete from the database any grid rows that are in the delete stack. See
Delete
for details. For each grid row in the delete stack:
_ Copy the grid row data into the Business View structures
_ Copy the grid data structures into the business view data structures
_ Perform Event Rules: Delete Grid Record from DB _ Before
_ If the database delete has not been suppressed
_ Delete the record in the Business View from the database
_ Delete the grid row from the grid control
Process Flow for Headerless Detail Form
_ Perform Event Rules: Delete Grid Record from DB _ After

6. Perform Event Rules: All Grid Recs Deleted from DB

7. If the form option flag 'No Update On Grid Business View' is unchecked
_ For each grid row that was changed or added
_ Clear the business view data structures
_ Reset the original key values for this row in the business view
data structures
_ Copy grid data structures to the business view data structures
_ Copy all non_filter database form controls to the business view
data structures
_ Copy all equal filters to the business view data structures
_ If form is in Add Mode
Perform Event Rules: Add Grid Rec to DB - Before
Add the record in the business view data structure to the database
Perform Event Rules: Add Grid Rec to DB - After
_ If form is in Update Mode
Perform Event Rules: Update Grid Rec to DB - Before
Update the record in the business view data structure to the database
Perform Event Rules: Update Grid Rec to DB - After
_ If form is in Add Mode
_ Perform Event Rules: All Grid Recs Added to DB
_ If form is in Update Mode
_ Perform Event Rules: All Grid Recs Updated to DB

8. Perform Event Rules: Post Button Clicked

9. If form is in Add Mode
_ If form was called in Copy Mode or the flag `End Form On Add' is
checked
_ Begin Closing Form
_ Else
_ Begin Clearing Dialog

10. If the form is in Update Mode
_ If there were no errors attempting to update/add to the database
_ Begin Closing Form
 

Zoltan_Gyimesi

Legendary Poster
Hi OWXer,

Check the "Headerless Detail" chapter under the "Understanding Form Types" section in the Development Tools documentation.

If I understand it correctly then this form types works properly only on BSVWs which are based on a single table but not on joined views.
Doesn't Header/Detail form type suit better to your situation?

At last but not least, try Tom's suggestion. His reply is great to point to the very strange behaviour of the filter fields on the headerless detail forms. We also noticed it previously and I was really surprised, why to update the table on the filter fields. It isn't self-evident (at least for me).

Regards,
Zoltán

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 

OWXer

Active Member
Re: RE: RE: Update F4311 problem

Yes, these filter fields caused the problem, I have to copy the values to these fields before updating the record.

Thanks so much for your detail explanation.

<P ID="edit"><FONT SIZE=-1>Edited by owxer on 8/22/01 11:40 AM.</FONT></P>
 

OWXer

Active Member
Re: RE: RE: Update F4311 problem

Yes, these filter fields caused the problem, I have to copy the values to these fields before updating the record.

Thanks so much for your detail explanation.
 
Top