Create F00165 Media Object record from Optical Imaging System


Hello List!

This is my first post to this List.
I'm new to JDE, our Company is in the process of converting from BPCS 1.0
to JDE B7333 XE.

A little back ground information.
We are a Direct Store Delivery company, our invoices are generated and
printed at a store from a Hand Held device. Our route sales person will
send the Invoice electronically from the Hand Held device, he will also
mail the printed Invoices (sign by the store receiving department, this is
our main Document).
The hand held transmissions will create EDI transactions into the JDE EDI
batch "Z" files .

Once the mailed Invoices are received at our company, our billing
department will scan and index the invoices (using RVI Imaging System),
when the invoice is indexed I will need to create a F00165 record.
I'm trying to find out how the GDTXVC field is built.
I have searched the Knowledge Garden and found a couple of Articles and
have also searched the JdeList forum/Archives, but did not find anything
related to building the GDTXVC field.

Found good post about creating a "text media object" from Christian Audet
"Re: PO text" (I'll be referencing in another project),

I'm looking forward to working with JDE and learning from this list,
Hope I have the correct Software and Hardware information listed at the end
of this e-mail.
Thanks for your help, -walt

B7333 XE SP15, AS400 Deployment/Enterprise Server
Widnow NT, Citrix



VIP Member
Piece of cake. . .

I hope you're in the mood for some C, because that's what you get for asking questions like this!

By the way, I'm making a big assumption that you'll be writting software like this. . .with. . . .C


/* Retrieve the Signature media object and append it to the message */

MathCopy (&dsGT55005.mnAddressNumber, &lpDS->mnSalesPerson);
pGenericPointer = GetGenericText("GT55005",(ID)0, &dsGT55005, TRUE);

if(pGenericPointer != NULL)
strcat(szMediaObject,(const char *)pGenericPointer);

/* Write the constructed Media Object into the GT55005 structure */

memset ((void *)(&dsKey55005), (int)('\0'), sizeof(dsKey55005));
MathCopy (&dsKey55005.mnAddressNumber, &lpDS->mnSalesPerson);
MathCopy (&dsKey55005.mnEmailEvent, &lpDS->mnEmailEvent);
MathCopy (&dsKey55005.mnDocumentOrderInvoiceE, &lpDS->mnDocumentOrderInvoiceE);

strncpy (dsKey55005.szOrderType, lpDS->szOrderType,sizeof (dsKey55005.szOrderType) -1);
strncpy (dsKey55005.szCompanyKeyOrderNo, lpDS->szCompanyKeyOrderNo,
sizeof (dsKey55005.szCompanyKeyOrderNo) -1);

/* Update the 'Work' media object */
if ((MathCompare(&dsKey55005.mnDocumentOrderInvoiceE, &mnZero)))
idJDEDBReturn = ModifyGenericTextName ((LPSTR)"GT55005",(LPVOID)&dsKey55005,(LPSTR)szMediaObject);


Ok, so what's going on here?!

I'm fetching one media object (the GDTXVC part), appending it to a string and then writting that string to a new F00165 record.

The 'key' to the F00165 record is a media object and in this case is defined as AN8/MATH01/DOCO/DCTO/KCOO. For the uninitiated this means it's keyed by Sales Person, a numeric flag(pay this no mind), Sales Order Number, Sales Order Type, and Company Number.

So, lets start over. I fetch the first media object message (that GDTXVC you wanted so badly) with "GetGenericText" and paste it to the end of another string.

Then I build up the key of the new Media Object with the mathcopy and stringcopy stuff. . .ok? still with me?

Lastly, I place the new string into the new media object with "ModifyGenericTextName". This function will create a new record in F00165 if an existing one isn't found. If it does find one, it updates the text.

Piece of pie? Let us know if you have trouble following my logic here.


Darren Ricciardi - OneWorld Whipping Boy