F4311 Edit Line minimum parms required

  • Thread starter Frosty the Coder
  • Start date

Frosty the Coder

Legendary Poster
I'm tyring to use F4311 Edit Line in a ube,
the goal being able to update DRQJ, UORG, and/or NXTR,
and have the EDIT LINE do all of it's other "nifty" stuff.

My F4311 Begin Doc works, and the same job/peid/tcid are passed to Edit Line,
but the edit line itself fails (w/out hints in jdedebug).

I'm about to begin filling in ALL of the parms that Edit Line uses w/in P4310,
as based on jdedebug, but doubt they are ALL needed.

Would one of you C persons please glance at the Edit Line BSFN (XT4311Z1)
to see which are required and which can be left blank?

TYVM.

Gene

PS - I'm passing jobs;, mkey; lnid; C; 0; 2; VERS;
the po key fields, itm, "EP4310"; and some other values
at this point.
 
as i know, you first have to use begin doc and End Doc before call edit line. The first one fill cache record wich it's use by the edit line, and the second update, or fetch the record into the base.
I don't really know the XT4311 logic but if it's respect the F4211 Master and other master logic, the best you have to do it's to send all paramater from the record and the bf will only update theym which are different.
 
Please find attached a list of all parameters for the F4311 Edit Line BSFN.
 

Attachments

  • 111146-F4311 Edit Line.txt
    6.1 KB · Views: 735
just glancing at the edit line bsfn won’t tell you which parameters are required
smile.gif
how do you know the edit line fails? if an error is set anywehere in the bsfn, or a table i/o fails, then u should be able to see in the the debug.log.
 
Gene,

I recently worked on the PO MBF's. Can u tell me what are you passing to the field "cUpdateOrWriteToWorkFile" in F4311 Begin Doc and F4311 Edit Line. and to the field "cUseWorkFiles" in F4311 End Document. try passing 1 or 2 to all of these MBF's. if you are passing 1, pass 1 to all the functions.

You have to call them in order First Begin Doc, Edit Line and End Doc.

Regards,
Kiran
 
Serge, Shad, Kiran, and Remo -
Thanks all for the replies.
Here are a bunch of answers:

I know it's failing as it doesn't apply my changes to F4311,
and it logs a "return value is 2" at the end of the bsfn.

Looking at the jdedebug.log, this it the ONLY "rv is 2" logged
during execution of the bsfn.

I'm passing a "2" to "use workfile" in begin doc, edit line, and enddoc.
Begin doc IS working (per jdedebug.log)

I think that Shad's listing of the parms MAY provide the answer.
There are some parms that I'm NOT passing, as I wasn't changing the values,
that might be the culprits.

I will post the results here.

Thanks AGAIN!
Gene
 
Attached are an ER Listing and jdedebugs.

When comparing the logs, I noted that the bsfn CacheProcessPOHeaderCache is working differently between vanilla and my code.

In vanilla, it states "found existing cache" and returns w/the order key and other data.
In custom, it states "add new cache" and doesn't bring back the needed data.

So something about the cache created by my BEGIN DOC is causing grief for EDIT DOC.

It might be something silly that I'm overlooking.
I've been known to do that....

Thanks again

Gene
 
custom code's debug
 

Attachments

  • 111168-JDEDEBUG.r55pwba.editline.txt
    139.1 KB · Views: 301
ER Listing
 

Attachments

  • 111169-_F4311.BSFNs.txt
    3.3 KB · Views: 312
Hi,

Can you try passing 1 to Process Edits in Begin Doc and Edit Line. I used it in my program. But no idea of its purpose. Do you know why we use it..Try wit 1.
The best thing you can do is, write the same code in an application and execute it. It will display the errors on the screen. then it will be very easy to figure it out.

Regards,
Kiran
 
[ QUOTE ]
Hi,
The best thing you can do is, write the same code in an application and execute it. It will display the errors on the screen. then it will be very easy to figure it out.

Regards,
Kiran

[/ QUOTE ]

no need for that, cos -as i expected- the error can be found in the debuglog:

Error= 078M - \\TLDEPLOY\E810\DV810\package\DV082106F\source\B4302180.c, Line= 3487

(so much for the "w/out hints in jdedebug", gene
tongue.gif
)

hmm...078m... those are not the easiest ones to solve:

078m - Open Cursor for cache &1 failed

CAUSE . . . . A cursor was not able to be opened because the Cache Init was not successful or cache &1 was empty.
RESOLUTION. . Verify that the Cache Init was successful and that records exist in your cache prior to the Open Cursor. Check the JDE.LOG and JDEDEBUG.LOG for additional information.

you could take a look at the code near line 3487 to see what's going on there... but probably it's just some action on the cache (delete, fetch, ...) that fails. looks like the cause lies somewhere earlier in your logic...in initializing or filling the cache... i suspect begin doc (which by the way is not included in this debug log as far as i can tell). (edit:)as you yourself already figured(/edit).
 
Back
Top Bottom