P4210 get ALL rows into workfile/cache

Frosty the Coder

Legendary Poster
List,

The client wants _all_ SO Dtl rows, from F4211,
to be displayed in Order Acceptance (P42232),
which populates its grid from the SO workfile/cache.

Currently, only added/modified rows are written to the workfile/cache.

Is there any way, w/in P4210 to force all the detail rows into the workfile/cache?

(I have not started digging yet. Being resourceful (ok, lazy), I decided to ask first, dig later.)

TIA

Gene
 
Hi Gene,

I'm not sure if there is a way to get all of the records into cache without updating/adding. However, in the past I've created my own custom workfile (F55UI11) which was a copy of the JDE work file F42UI11. I'd write every record into this workfile in P4210 and, would end up having multiple uses for this custom workfile (i.e., comparing data, displaying data not currently in cache, etc.) If you created a custom workfile you could write every detail record to it and, in the display before accept screen (P42232) you could fetch the contents of the entire workfile in the Display Order hidden push button (where the current logic resides that displays the detail lines on the grid in P42232). Don't forget to clear the workfile upon exiting P42232 (and/or upon adding/updating an order at the beginning of P4210).

I'm sure this wasn't the info you were after but, at least it's a thought provided you don't end up finding the answer to your original question.
 
Pon,

Thanks, very much. I will consider this solution as I dig.

Gene
 
For what it's worth, it _seems_ as though the combination of:

Disabling Page-at-a-time-processing

AND

copying a "F4211 Edit Line" from row exit & changed asynch,
to the bottom of "Write Grid Line After" does the trick.

Gene
 
Hi Gene,
We have been asked to do the same modification here, but we are in the design phases of our project and have not figured out how we would do it yet. Our first thought was to create a save copy of the SO Cache prior to calling P42232, and then loading the real cache from the file and the save cache. Then upon returning from P42232 we would restore the SO cache back to its original state.

We haven't researched this so I'm not sure if it is the best way to go, but I would be very interested in hearing how you finally accomplished this.

Good Luck and let me know.
Jeff
AS/400, XE, Update 6, SP21
 
Jeff,

I tried the following which works for this clients request:

P4210A/W4210A - Disable Page At a Time Processing

Copy a F4211 Edit Document from P4210A/W4210A
Row Exit & Changed Asynch to the Bottom of Write Grid Line After.

These two force all rows to be read, and written to cache.

Drawbacks are:
Lots of IO (read them ALL, write them ALL, ....)
Coming off of ANY grid row gets "Row Exit & Changed" code to execute.

Is this the BEST way?
I don't know, but it was the 1st solution I came across.

Gene
 
Gene,

I'm glad you found a solution to your problem. However, you must be careful when executing F4211 Edit Line (or any of the SOE MBFs) arbitrarily. I tried a change similar to the one you described above and I got blanks and default values in certain grid columns that were added as enhancments to the SOE program. I wish I could be more specific but, this was one of at least 100 changes that this client had me do to thier SOE app last year. Unfortunately, I can't remember all the details of the changes nor, the exact problems I had when executing the SOE MBFs in different events. I'm 90 percent sure that the problems I was having was due to the various "enhancements" the client requested. This is how I settled on my aforementioned solution of creating my own workfile. The impact on I/O was minimal and, I was able to use the workfile for various other "enhancements" while never having to worry about what JDE was doing with Cache.

I'm sure your solution will probably be fine and, it sounds like a really good idea. Just remember to test the heck out of it.
 
Pon,

I realize that my solution was a very lucky guess.
I feel safe in it ONLY because the F4211 Edit Line that I copied,
and the spot that I needed to place it both happened to
use the same values for the parms going in.

Dumb luck has worked for a long time now, and it worked here.

My luck ran out as soon as I tried to ADD a line to the grid,
and to cache via F4211 Edit Line.

And yes, I can test as a coder, but the _real_ testing has
to happen at the users' hands.

Gene
 
Yeah, that SOE app can be mighty tricky. I usually use the same trial & error method as well.

Good luck and, I hope all goes well.
 
Back
Top