Media Object Text

newjdedev1

Active Member
Hi, I inserted few records in F00165 using SQL. Text came from a CLOB column in a legacy table. All worked fine until I opened the text attachment in Web Client. The text shows in Chinese characters. When I go to UTB, the text shows correctly in detail pane. I checked GDLNGP and it's set to default which is English. I am not able to figure out what I'm missing and any advice is highly appreciated. We are on E1 9.1.5.
 

Attachments

  • Attachment MO.doc
    33.7 KB · Views: 24
Last edited:

BOster

Legendary Poster
I know some may be able to successfully do direct SQL to the media object table, but IMO that is not the way to do it. This is NOT a straight up text field. There are a myriad JDE APIs to insert into the media object table and there is a third party solution as well. Using the APIs (or third party solution) is the correct way to insert to the table.
 

newjdedev1

Active Member
Thank you Brian!! We are kind of living in two worlds for some time now and the text can change in Legacy system that we are required to bring to E1 every night. So, we have a PL/SQL program to sync this table and I was hoping to get this to work as both are BLOB fields. I grew even more hopeful when UTB showed me the text in detail pane nearly same as the one I manually created in E1. But like you said, I probably need to use the "Correct Way".
 

newjdedev1

Active Member
Ok. I just dumped key fields and text to a txt file. Then wrote a quick function using API and UBE that will read from txt file and upload to F00165. I'm using ParseTextString (B0500690) to get individual values in UBE which seems to be cutting my long field in the middle. I'm using MOTEXT to get the string from txt file. MOTEXT I'm sure is bigger than the string in my text file. Does anyone have experience with this function before? Is there any string length limitation? There is a record length parameter that I'm setting correctly. I'm using | as delimiter and there is no pipe in my long string. I know it's close to end of day and I'm not functioning well enough. Any help is appreciated.
 

BOster

Legendary Poster
Not sure how comfortable you are with C BSFNs but there are several different "sets" or "suites" of C APIs to work with media objects. One that I have used in the past to insert plain text attachments is AddGenericTextEx. There are probably several different ways to get the data from the other system. Since you all ready have something that dumps to a file you could just read the contents of the file from a C BSFN and insert into the media objects.
 

newjdedev1

Active Member
Thank you Brian!! I was able to get this to work.
1. Extract key fields and long text from legacy table to a txt file
2. Read the text file in a UBE and call a custom function to create F00165
3. Used B79A2000 to parse string instead of B0500690
4. Used API jdeGTAddUpdate_TextKeyStr to create/update F00165 in custom function
So, it all works when done in correct way. It's just that mind tends to try short cuts sometimes. Thanks again!
 
Last edited:
Top