Go to the Bottom of P42101's Powerform?

DBohner-(db)

Legendary Poster
Go to the Bottom of P42101\'s Powerform?

Howdy,

Here's an interesting request: Client wants to 'automagically' go to the last line of the new P42101's Detail Powerform's Grid.

Issue: Client may have over 8K Lines, attached to a single Sales Order. Pressing the >> symbol above the Grid (to go to the last record) can take fifteen minutes to an hour, as it populates the grid and works its way to the last record.

Sub Form: P421002 / S421002C
Note: The Grid is Populated by Function, not by Traditional BSVW, so there is no QBE. The user cannot, simply, QBE the "Line Number >800.25"

That said - What is the functionality in the new P42101 to allow a user to QBE / Filter to a specific line and/or other items on the grid? This issue cannot be unique to one client - and I'd hope that bOrgacle did not simply overlook it?

Confession - not terribly familiar with the P42101, yet =D

Anyone???

(db)
 
Re: Go to the Bottom of P42101\'s Powerform?

having troubles envisioning what you're asking.. you wanna go to the last grid row that has data, yet without reading/loading all rows? i.e.: you wanna (if possible) only read/load the last row (the one with the highest line number)?

ps: not terribly familiar with P42101 yet either ;-)
 
Re: Go to the Bottom of P42101\'s Powerform?

Remo / All,

Yes, technically - User want to be able to hit the last row / grid-screen.

In Sales Order Detail, if you have 7K Rows attached to a Sales Order, it appears you have to cycle through All Rows to get to that 'New-Line' row. If you have a crazy number of lines attached to the order, the entire order (all 7K+ Rows) have to be written before you get to the end of the grid.

Since it is all controlled through Cache - I don't see anything that allows the user to search on a specific line or a Filter / QBE type processing to go to the bottom of the grid.

My users want an 'Easy' button =D

There's gotta be a better way?

(db)
 
Re: Go to the Bottom of P42101\'s Powerform?

Hi Daniel,

I think I appreciate your problem and unfortunately, I can't imagine a quick way sorry.

Could you use a customised version of W42101D Enter New Order, where 0 rows are retrieved to the grid, and this form is specifically for adding new lines to existing orders, thus presenting the new line at the top?

PS Like your site's Tips and Traps section, well done!

Regards,
Ash
 
Re: Go to the Bottom of P42101\'s Powerform?

I'm not familiar at all with this form, but I'd dare to say that what if you use a function to get the next line number of the sales order, for instance B4200320. Subtract 1 from the number returned and you should have the last line number, then filter the search with this line number. I'm assuming that once you have the exact last line number the query will bring up the data quickly.

Just a thought!

Jorge
 
Re: Go to the Bottom of P42101\'s Powerform?

In "Theory" we might be able to add a 'blank' line as the first line in the grid. As long as there isn't any functionality that crashes the BSFNs due to it 'not' being the last record on the grid - it might work (at least to allow one new entry at a time?)

Missing, still - what if the user wants to go to a specific line in the order. I can determine no functionality to allow that.

gophigure!

(db)
 
Re: Go to the Bottom of P42101\'s Powerform?

Daniel,

On most of the Find/Browse non-PowerForms screens there's usually 2 right buttons. One for the next xx records and one for all. Is that what you're looking for?

I believe there's a security setting to turn off "find all" for an application. Could it be the same on a PowerForm?

Please excuse the fact that I'm mainly functional, not a tech.
 
Re: Go to the Bottom of P42101\'s Powerform?

Hi Daniel,

It's not standard functionality but I hope you'll agree it's worth mentioning that by calling the S421002C_SOLineViewController function with the mnLineKey parameter set to the desired Line Number and the nSalesOrderAction parameter set to VA frm_nREFRESH_SALES_ORDER_LINE, you'll retrieve a specific line.

This could be used behind a custom DD control FC Line Number with a custom 'Go To Line' button? You'd have to clear the grid and refresh the cache beforehand.

Hope this helps.

Regards,
Ash
 
Re: Go to the Bottom of P42101\'s Powerform?

Steve,

The Issue with the >> (find all) is that the entire grid (all 7K lines) has to be processed before the last line is presented (the line where we add a 'new line'). On Large Orders - that could be a grid-building process of fifteen minutes to - who knows, the application times out before the last line is found =(

Ash,

Thanks for the reply - I was unaware. I will experiment!

Sincerely!

(db)
 
Re: Go to the Bottom of P42101\'s Powerform?

Just out of curiosity Daniel, how are all those lines initially loaded? via a 'Z' process?
 
Re: Go to the Bottom of P42101\'s Powerform?

Hi

what about changing the sequence in order to retrieve last lines n top?
 
Re: Go to the Bottom of P42101\'s Powerform?

Trying to reply to everyone at once:

- Larry, I have no idea how those lines get created (I was asked to resolve the problem, not figure out how it gets created
grin.gif
). I believe it might be EDI
- Mr. C, changing the sort order would give me the highest numbered line first - but I would still have to go all the way to the bottom of the grid to get to the 'empty' line where I could add a new line

Still trying to find time to test Ash's suggestion

(db)
 
Re: Go to the Bottom of P42101\'s Powerform?

Hmmmm thinking out loud again.

Put a check box or check box and value box that says return "X number of last pages" or "show x number of last pages" or what ever... something that tells the user that only the last X pages are going to be in the grid. This could be on by defualt for the initial grid load. You will need to store this in you own view controller type session in memory (prefereable jdeCache which can be looked up with the szSessionKey value) . Then mod the P421002's view controller (B4210620) to skip the first N number of records calculated as (total rec count - (recs per page * X)).

Your mod would most likely be to the sub-routine IB4210620_RefreshAllSOLines.

<font class="small">Code:</font><hr /><pre>
/*
* Fetch the first/next sales order line from the model. The function
* returns ER_ERROR when all lines have been returned.
*/
//========== mod psuedocode begin ==========
pMySession = GetMySession(szSessionKey)

while(idReturnValue == ER_SUCCESS) //====== mod code
{
idReturnValue = GetNextSalesOrderLineBusinessData(lpBhvrCom,
lpVoid,
(LPVOID)lpDS,
_J("D4210620A"),
lpDS->szSessionKey,
lpDS->cGetFirstLine,
&lpDS->mnLineKey,
&lpCallMap,
&iNumCallMap,
&pErrorList,
&lpLineData);



if(++pMySession->nGridRowsReadDuringRefreshAllAction >= pMySession->nCalculatedNumberOfRecsToSkip)
break;
}
//========== mod psuedocode end ==========

</pre><hr />
 
Back
Top