F06116 Edit Line doubts

Sebastian Sajaroff

Sebastian Sajaroff

Legendary Poster
Hi everyone,

I have some doubts regarding BSFN F06116 Edit Line, I'd
be grateful to receive some hints from you guys!

There is a custom grid where users type a bunch of
TimeEntry records, this is done via F06116 Begin Doc,
F06116 EditLine and finally F06116 EndDoc.

After users click OK, code invokes F06116 Begin Doc,
then it calls F06116 EditLine as many times as rows in the
grid with JobNumber=nnnn (comes from BeginDoc), Action=A,
mnLineNumber=0 and mnLastLineNumber=0.
It always returns FlagError=0 or blank, so I assume
that everything is OK. There's no error on JDE.LOG neither.
After closing with F06116 EndDoc, I run an SQL query and
realize that only the last record was saved.
The other ones were lost in the JDE Bermuda Triangle.
No error message at all. Quite mysterious (to me).

I've got some feeling that it's sending the wrong
parameter to mnLineNumber or mnLastLineNumber.

Given that it just has to append records, my doubts are :

What value should passed as mnLastLineNumber? Always Zero?
Or should be passed the number of records? Does it start
counting from 0 or from 1?

What about mnLineNumber? Should pass 0? Or should pass
the Grid row Number? Does it start counting from 0 or
from 1?

Platform : AS/400 V5R3, OneWorld Xe SP23J1, Fat Clients.

Thanks a lot,
 
Hey Sebastian,

I haven't looked at that particular bsfn, but if it follows the same logic as other MBF's, I see a definite issue with your parms:

1. Definitely increment the mnLineNumber parm for each call to EditLine. It doesn't matter what number you start with (1 seems the most logical to me), but it will be a part of the key to cache/workfile (not sure which this bsfn uses). Because you kept sending 0, it just kept updating the same cache/workfile record which is why you just see the last record.

2. Not sure about the mnLastLineNumber parm. It may be a return parm. It may not be crucial to the logic. Try sending 0 and also receive it back and see if it changes (ie return parm). You could also send the same value as mnLineNumber. My guess is that it is not going to affect the outcome of the function.

Good luck.
 
Back
Top