F4211EditLine Tricks

batoha

Active Member
Hello everybody!
I'm trying to make the thing working for the last three days. The thing is:
I have POs with related SOs (RORN, RLLN, RKCO, RCTO filled).
I have the temporary table to hold the list of PO lines that have to be splitted.
I wrote business function where I go thru those lines and make F4311EditLine calls to split the each line into two line.
After line is splitted I check if there is a related SO line and if so make a calls to F4211EditLine to split it also.
Here comes the problem. It looks like lpDS structure for F4211EditLine is not properly cleaned by the system. I figured out that on a second loop (after successfuly splitted first pair of PO and SO lines) some fields of that structure filled with data from previous call!!! What a wreck!
Did anyone met that kind of behaviour and if so what was the solution?
BTW: I decided to call EndDocument after each loop. But it still doesn't matter for EditLine.

Sergey.
 
I am not sure if this will help but maybe you should use the business function F4211 Delete Work File to get rid of the previous values after the End doc.
F4211 Delete Work File
VA rpt_Jobnumber_OriginalOrder -> mnJobNo
VA rpt_Machine -> szComputerID
UNDEFINED X mnFromLineNo
UNDEFINED X mnThruLineNo
"1" -> cClearHeaderWF
"1" -> cClearDetailWF
SL ReportName -> szProgramID
UNDEFINED X mnWKRelatedOrderProcess
SL VersionName -> szCMVersion
UNDEFINED X cGenericChar1_EV01
UNDEFINED X cGenericChar2_EV02
UNDEFINED X szGenericString1_DL01
UNDEFINED X mnSODRelatedJobNumber
VA rpt_OldProcessID -> mnProcessID
VA rpt_OldTransactionID -> mnTransactionID




Matt
 
I assume you are calling F4211EditLine inside a NER loop.
The way the NER is generated, is to clear the DSTR at the start of the =
program, and then ONLY set up the fields that are passed in (or both =
ways) to the calling app.
This means, that any field that is a return value only, is NEVER CLEARED =
on the second call.=20
The LNIX (Cache Line) value is normally returned telling you what the =
Cache line number is. If you have this as a return value only, then on =
the second call, the value being passed to Editline is a 1 (the value =
from the FIRST call). What you need to do, is to set this parameter to a =
BOTH, and to manually zero the value before the call.
=20
=20
Hope that helps.
 
Hi!
I perfectly agree with Peter's answer with similar experiences. If you check a jdedebug.log of B7334 where you see the bsfn parameters you can see that the output parameters of a previous call appear as input parameters. If working in C you should free the DS pointer and reallocate if you want to be sure of empty parameters.
Regards:
Gergely Pongrácz
e-Best, Hungary
 
Back
Top