R40211Z violates my computer's memory!

Adrian_Chimirel

Legendary Poster
R40211Z violates my computer\'s memory!

Hi,

Allow me to share some B7321 development, please. Any idea on what might be done is appreciated.
Some History:
H0 - I want to convert Sales Orders with Detail Attachments.
The process populates the Z files (F4001Z Header & F4011Z Detail & F0041Z1 Transaction), and
then run the R40211Z Batch Editor to create the ... hum, REAL Sales Orders.
H1 - In order to pass some text to be translated into Sale Orders Detail attachment,
I added a NOTE DDItem (a String of size 50) to F4011Z Batch receiver File - Order Details, at the bottom of its field list!
H2 - In a UBE I am Using the GT4211A sf. with the SET action, and F4011Z's Note as OutputText, and, of course, the Order#, Type, Company & Line# as key.

Some (bad) Results:
R1 - the GT4211A doesn't do the trick; the F00165 doesn't get populated (with the proper record). It seems I am missing something ... another sys. fctn.?
R2 - Worse now, I have a problem with R40211Z! It is violating my computer's memory!
"Business Function F4211FSEditLine at line 79 for Event 13 in Section Sales Order Detail F4011Z has caused a memory violation."
Needless to say that line 79 is just a comment/separator line in ER; the real F4211 EditLine is in line 77 :)
Am I right in saying that modifying F4011Z was a bad idea?
Converting the attachment_to_be into a separate table is the answer?
Thank you,
Adrian


LIVE: B732.1 SP12.2, Oracle 806, FormScape 2.1
SANDBOX: Xe SP15 & Update2, Oracle 8i
RS/6000, Citrix
 

Carl_Fisher

Well Known Member
RE: R40211Z violates my computer\'s memory!

You are sure running history there!

Yes I think you problem is with modifying the F4011Z. It does make
everything a lot more complicated.

Did the basic process work before you modified it? We used a number of the
Z1 processes in B732.1 (but not this one), and found they took a lot of work
to get them going, it seems to be easier in Xe.

Yes I would suggest a custom table, and possibly a custom UBE to populate
the F000165.

I think the line reference is to the line in the BSFN.



OW733.3 Xe SP 14.2
Enterprise Server - Intel NT + Oracle 8.0.6
Client - Citrix TSE + 4 NT PC's for development
 

Adrian_Chimirel

Legendary Poster
Re: RE: R40211Z violates my computer\'s memory!

Boy, this List is Really something!

Hello Carl, nice to have your lightningFast reply :)
YES, the basic process worked nice & easy, before modifying the F4011Z (of course, some SARs were applied, in order to fix both P4004Z & R40211Z). And I'm really happy to hear Xe will make my life easier.

Now, populating the F00165, creating that BLOB, where do I find some documentation? Can't I use an existing BSFN (which one)?
I'll look into this List's archives ...

Thank you again,
Adrian

LIVE: B732.1 SP12.2, Oracle 806, FormScape 2.1
SANDBOX: Xe SP15 & Update2, Oracle 8i
RS/6000, Citrix
 

Christian Audet

Moderator
Staff member
Re: RE: R40211Z violates my computer\'s memory!

Adrian,

To load data to F000165, look at one of my post in archive

Post Name : "Re: PO text"
Date 06/07/2001 (Month/Day/Year)

I think that can help.

Christian Audet

Implementing B7333 (Xe) SP14.1, SQL
(Support B732, B7331 and B7332)
 

Adrian_Chimirel

Legendary Poster
Re: RE: R40211Z violates my computer\'s memory!

Salut Christian,
Thank you for the hints, BUT:
- In B7321 there's no B0500047 Convert NarrativeText - therefore I HAVE to use the F00165.Insert
- There's no way to convince the Table I/O to see/recognize the ISTDATA2 for the TXVC
- The worst thing keeping me from playing with F00165 is the Key! I'm using a TXKY variable to build (by simple concatenation) the key, and no success; If I try to print this key, it is EMPTY!
- Finally, assuming that I'll be able to pass in the proper Key construction, should I build the generic text as a blob/memo?
Thank you,
Adrian

LIVE: B732.1 SP12.2, Oracle 806, FormScape 2.1
SANDBOX: Xe SP15 & Update2, Oracle 8i
RS/6000, Citrix
 

Christian Audet

Moderator
Staff member
Re: RE: R40211Z violates my computer\'s memory!

Salut Adrian,

When I go to the code of B0500047 it's only basic 'C' API so I think that you can copy this function from B733 or Xe. If you need the code I can send it to you.

With my current implementation, we were trying to update the F000165 directly and it was only succesful for very small text, otherwise our INSERT in F000165 was also giving us a memory violation. That's why I don't sugest to use the F000165 INSERT.

If your are still not successful with this, take a look at this 'C' function that I made to update GT4311, it's working fine but it's only for one structure type (GT4311).

------------Begin Code-----------
JDEBFRTN (ID) JDEBFWINAPI PWCWriteF4311MediaObject (LPBHVRCOM lpBhvrCom, LPVOID lpVoid, LPDSD58001D lpDS)
{
/************************************************************************
* Variable declarations
************************************************************************/

/************************************************************************
* Declare structures
************************************************************************/

DSGT4311 StructureGT4311;

/************************************************************************
* Declare pointers
************************************************************************/

/************************************************************************
* Check for NULL pointers
************************************************************************/
if ((lpBhvrCom == (LPBHVRCOM) NULL) ||
(lpVoid == (LPVOID) NULL) ||
(lpDS == (LPDSD58001D) NULL))
{
jdeErrorSet (lpBhvrCom, lpVoid, (ID) 0, "4363", (LPVOID) NULL);
return ER_ERROR;
}

/************************************************************************
* Set pointers
************************************************************************/

/************************************************************************
* Main Processing
************************************************************************/


MathCopy(&StructureGT4311.mnDocumentorderinvoicee,&lpDS->mnDocumentOrderInvoiceE);
strcpy(StructureGT4311.szOrdertype, (const char *)(lpDS->szOrderType));
strcpy(StructureGT4311.szCompanykeyorderno, (const char *)(lpDS->szCompanyKeyOrderNo));
strcpy(StructureGT4311.szOrdersuffix, (const char *)(lpDS->szOrderSuffix));
MathCopy(&StructureGT4311.mnLinenumber,&lpDS->mnLineNumber);

ModifyGenericText("GT4311",(ID)0, (LPVOID)&StructureGT4311, lpDS->szMediaObjectText );


/************************************************************************
* Function Clean Up
************************************************************************/

return (ER_SUCCESS);
}


------------End Code-----------

Give me some news about it.

Christian Audet


Implementing B7333 (Xe) SP14.1, SQL
(Support B732, B7331 and B7332)
 

Adrian_Chimirel

Legendary Poster
Re: RE: R40211Z violates my computer\'s memory!

Christian, the funny thing is I am to include only one Street address line (no more than 30 characters :) therefore it would be easier for me to be able to insert just that into F00165 (for GT4311A), should the key be so nice to accept my inputs.
I do have to recreate this B7321 project in Xe, anyway, and time is really limited here.
Merci beaucoup,
Adrian

LIVE: B732.1 SP12.2, Oracle 806, FormScape 2.1
SANDBOX: Xe SP15 & Update2, Oracle 8i
RS/6000, Citrix
 
Top