Question Why is code_mstr-record no longer found

Edward Visser

New Member
First : I'm not a schooled and skilled developer. I'm a beginner but can manage quite som things now. After a hint of Raymond I come up here to search for help, because I can't find out what I'm missing.
We (still) work with MFG/PRO v9.1E.
I have a customized program that generates DESADV messages (EDI shipping messages) but appears not to take into account a certain setting. In this setting it is said that in the envelop line of an EDI DESADV message there should not be placed the GLN code of the ship-to party or the connected customer, but to a third party GLN-code.
This problem in fact is fixed, however in another part of the code the program behaves differently now and I can't figure out why. Result is that the file that is created misses data in one column.
Details to the .p-file I added :
- Lines 216 - 235 are the lines I added.
- In line 462 there is a line with a find first code_mstr.
- In line 464 there is a line with an if available code_mstr.
I already added messages to get my finger behind this, but I just don't get it.
The bizar thing is that when I slash out the code in lines 216-235, the "if available" in line 464 returns a TRUE (and so message "95" appears), but when I run the full code including the code in lines 216-235, the "if available" in line 464 returns a FALSE (and so message "95" does not appear). I already checked it : in both situations the value in pt_ship_wt_um is exactly the same : "KG". For some reason the code_mstr table is searched differently or something else happens, I just don't know.
Is there anyone having fun with looking into this?

In the "export ok.txt" you find the export that is correct, but not generated with the modified code.
In the "export NOT ok.txt" you find the export that is not correct and generated with the modified code. You see the column with the "kgm's" missing.
"zzeanexvz1 MOD.p" is the file that's givin' me a headache.....

If you have any other questions to get my problem more clear, please let me know.

Many thanks in advance!


Edward Visser

New Member
Unnecessary use of a buffer for code_mstr.