F00165 Fetch

F_Papineau

Active Member
Hello to all
I've read almost eveything on Media Object in this Forum and even after doing many tests on my own, I couldn't find a way to retrieve data from F00165 in the Business Data Source from an UBE. We don't want to modify the OCM for this table and the F00165.FetchSingle always points in Object Librarian Data Source. What can I do to make it point to the Business Data Source within the code and without changing the OCM?
Thanks !
 
F,

1. Please include your configuration information anytime you make a post to the forum.

2. You should NOT have a OCM mapping for F00165 normally. Instead a normal app/uBE should open it from Business Data (try opening F00165 and see what the default Data Source is).

3. Why are you trying to use Opens and Fetches on F00165? You can't retrieve the Blob information that way. Are you aware of the Media Objects System Functions that handle all that stuff for you?

Regards,
 
Hi,
wich Information do you want to get? - A standart ER TableIO Fetch/Delete/Update won't work on this table. You can write a C-BSFN using API GetGenericText (Example: F00165RetrieveMediaObjectText) or by Fetch (Example: B89600_DeltaLoadAlphaGlossary or insertIntoMediaObject)
Regards,
Carsten
 
Sorry, I didn't explained well the context :
I don't have to work with Blob and I don't have access to media objects system function in a NER Business Function.
And I've check many times, F00165.FetchSingle takes its records from Object Librarian, not Business Data.
 
I just want to check if a specfic record in the F00165 table exists.
Example :

VA evt_szMediaObjLanguagPref_LNGP = " "
VA evt_szGT58012D_OBJNM = "GT58012D"
VA evt_szMediaObjectsKey_TXKY = concat([BF szObjectName],concat("|",[BF szVersion]))
F00165.Fetch Single
VA evt_szGT58012P_OBJNM = TK Object Name
VA evt_szMediaObjectsKey_TXKY = TK Generic Text Key
VA evt_szMediaObjLanguagPref_LNGP = TK Language
If SV File_IO_Status is equal to CO SUCCESS
BF cPDFAttachment = "Y"
Else
BF cPDFAttachment = "N"
End If
 
Hi,
F00165.Fetch Single will not work. There is a problem with the Generic Text Key, it is an VARCHAR and part of the Primary Key. OW doesn't like that, I guess the only way is to write a C-BSFN.
Regards,
Carsten
 
Is there a BSFN that I can base my code on, because I am not comfortable with C BSFN.
 
Hi F_Papineau,

I really do not understand clearly your problem.

Q1.) How do you detect that "F00165.FetchSingle always points in Object Librarian Data Source"?
Q2.) What do you mean "We don't want to modify the OCM for this table"? Do you have dedicated OCM entry for F00165? If yes, where do it point to?
Q3.) In which Data Source opens UTB this table by default?
Q4.) Where do you want to issue the Fetch (APPL, UBE, BSFN, etc.)?
Q5.) What is the purpose to check attachment existance?

Last but not least, what is your system configuration, what Larry requested you to attach this info to your post?

Regards,

Zoltán
P.S.: would be great and usefull to read the sticky post somewhere on the top of Forums, "JDELIST DISCUSSION GROUPS (FORUMS) NETIQUETTE" posted by christian_audet.
 
Hello Zoltan,

R1. I made a F00165.Select, F00165.FetchNext in a UBE an checked from wich datasource the records where coming from. And they were coming from Object Librarian and not Business Data, even if (R2.) OCM points to Business Data. That I am 100% sure.
R3. UTB opens default in Business Data
R4. I want to issue it the Fetch in a NER BSFN.
R5. For an APPL that use 3 attachments buttons for the same grid, so that I can't use the automatic Media Objects functionnality.

Thanks
 
Hi F_Papineau,

Well, you check F00165 in an UBE, you want to issue the Fetch in a NER BSFN and you can not use the automatic Media Objects functionnality in APPLs dealing with 3 attachments buttons.

Q6.) What is the reason to check F00165 in an UBE when you problems rise in APPL?
Q7.) Where did your report run? Locally or on the server?
Q8.) If Q7 = Yes, then what is the OCM server map for F00165 if it exists at all?
Q10.) You wrote "OCM points to Business Data"? Does it mean that you have a DEDICATED entry for this table F00165 (explicitily named in the Object Name coulumn)?
Q11.) If Q10 = Yes, then is it in Active status and is it *PUBLIC or is it dedicated for special user or group (role)?

At last, what about to use MediaObjectStructures system function with Action <Exist>?

Regards,

Zoltán
 
Hello Zoltan,

R6. This BSFN is part of a project, wich is an Inventory of all reports we use here. It will be long to explain why I need to use it in a BSFN.
R7. I ran the report locally.
R8. to R11. I asked the CNC here and told me that there is no dedicated OCM for this table.

Thanks
 
Here's an example of how to check if a media object exists:

FC Generic Text - wf = " "
Media Object Structures(GT4101, <Exist>, FC Generic Text - wf, BC Item Number - Short (F4101))
If FC Generic Text - wf is equal to "1"
Set Grid Text Indicator(FC Grid, <Current Row>, <Yes>, )
Else
Set Grid Text Indicator(FC Grid, <Current Row>, <No>, )
End If
 
Hi Larry,

Yes, this is the way to use it.
Unfortunately this method is not available in NER BSFN and as far as I know, F_Papineau would like to check attachment exitance from a NER BSFN.

Regards,

Zoltán
 
Hi François,

I suppose, the alias is TXT0.
I have used this too.

Zoltán
 
Finnaly I found a way to retrieve datas from F00165 in the Business Data Source. I cannot garantee that it will work for everyone but it worked form.
Luckily, it is VERY simple to do it.
As I said in my first post, the F00165.Fetch Single instruction retrieve records from Object Librarian Data Source. So what can I do to retrieve records from Business Data ?
All I have to do is to fetch from the Business View V00165A.
It worked well for me. Here's an example

evt_szLanguagePreference_LNGP
evt_szRecordUpdateByUser_MUSE
evt_szABGT_OBJNM
evt_szGenericTextKey_TXKY
0001 // Fetch from Business Data - F00165.
0002 // For example, fetch for the Address Book attachments of AN8 = 3292.
0003 //
0004 // Key of F00165 is OBJNM, TXKY and LNGP
0005 VA evt_szLanguagePreference_LNGP = " "
0006 VA evt_szABGT_OBJNM = "ABGT "
0007 VA evt_szGenericTextKey_TXKY = "3292"
0008 //
0009 // Return value from F00165 using Business View V00165A.
0010 // For example return the last User that has updated the attachments.
0011 V00165A.Fetch Single
VA evt_szABGT_OBJNM = TK Object Name
VA evt_szGenericTextKey_TXKY = TK Generic Text Key
VA evt_szLanguagePreference_LNGP = TK Language
VA evt_szRecordUpdateByUser_MUSE <- TK User ID
0012 //

I have no explanation why it works with the Business View ...
 
Back
Top