OOP Generic Object Manager
Has any of the OOP programmers out there ever developed a generic object manager? What I mean by this is a an Object in LabVIEW that can hold references to all objects in an application that can be accessed generically through a name input and not via know each individual class type. I have been trying to create a class that essentially has as its attributes an array of LV Objects since all objects descend from this class. I am struggling with getting the specific class back from the generic class. If I probe the array it shows the class specific type.
So what I am trying to do is search an array of standard LabVIEW Objects for a specific LabVIEW type. Here I created an array of LabVIEW object by casting specific classes to the most generic class - LabVIEW Object. Then I want to search an array for a specific class by taking a specific class constant and casting it to a more generic class. It seems like it keeps the reference information (ID).
Any thoughts?
LV2009 added a function which is probably crucial to delivering a nice solution to this problem. The function is called Preserve Run-time Class. It allows you to propogate the strict type of an object through a subVI that is coded to operate on a more generic class type.
Here's an example written in LV2009 for a simple class that stores any other LV class object by name.
Jarrod S.
National Instruments
Attachments:
Temp.zip 33 KB
Similar Messages
-
Display and Manage Attachments of Generic Object Services in Webdynpro
Hi All,
I need to have a button in the webdynpro that when a user clicks it will pop up a table that display a list of files already attached to a Generic Object Services(GOS) and also allow the user to delete the attachments and upload new attachments.
Can anyone advice me of any Function Modules or Methods that i can use to achieve those functions (retrive and display attachments in the GOS, delete existing attachment from GOS, upload new attachment to GOS).
Thanks and Regards,
weilongHi
You need to pass parameters as per the code below
****Data Types
CONSTANTS:lc_dokob TYPE dokob VALUE 'KNA1',
lc_dokar TYPE dokar VALUE 'LEG',
lc_dappl TYPE dappl VALUE 'BVO',
lc_sign TYPE c VALUE 'I',
lc_option(2) TYPE c VALUE 'EQ',
lc_docpart(3) TYPE c VALUE '000',
lc_docversion TYPE dokvr VALUE '00',
lc_status TYPE dokst VALUE 'AL',
ls_attc-doknr TYPE doknr,
ls_return TYPE bapiret2,
*****Function Module
CALL FUNCTION 'BAPI_DOCUMENT_DELETE_DIRECT'
EXPORTING
documenttype = lc_dokar
documentnumber = ls_attc-doknr
documentpart = lc_docpart
documentversion = lc_docversion
IMPORTING
return = ls_return.
Thanks
Vishal -
Attach Documents to Custom Program Using Generic Object Services
Hi There,
I created Object type ZGOS and used in the custom program, when i try to attach documents it allows and then shows in attachment list.
But When I use that program next time that document attached is not available.
Is there any separate save Class or FM available for saving the document to the specified custom program.
I am using following code in the program,
CLEAR obj.
SET OBJECT TYPE TO 'ZGOS'
obj-objtype = objtype.
SET OBJECT KEY = REPORT NAME
SELECT SINGLE name
FROM trdir
INTO obj-objkey
WHERE name = sy-repid.
CALL GOS MANAGER WITHOUT CONTAINER (WILL BE DISPLAYED IN THE TOOLBAR)
CREATE OBJECT manager
EXPORTING
is_object = obj
EXCEPTIONS
OTHERS = 1.
Thanks in advance.Check the Naimesh Patel Blog he explain very well
http://help-abap.blogspot.com/2009/02/generic-object-services-gos-toolbar.html -
Generic Object Services - Create Attachment
Hi SDN experts
In the trip details page of the travel expense manager, may i know what Function Module does the "Create Attachment" functionality in the Generic Object Services trigger? Appreciate if anyone is able to provide me with an answer. Thank you
Regards
LVYou are in great trouble. Repeated posting of a single thread will really make you a Guest.
You have replicated this post in SEVEN forums.
Generic Object Services - Create Attachment in
Generic Object Services - Create Attachment in
Generic Object Services - Create Attachment in
Generic Object Services - Create Attachment in
Generic Object Services - Create Attachment in
Generic Object Services - Create Attachment in
Generic Object Services - Create Attachment in
As you are new to the forum please Read the [Forum Rules|http://wiki.sdn.sap.com/wiki/x/FgQ] before posting more.
Regards
Karthik D -
Attachment List in Generic Object Services disabled
I want to attach documents to a work centre (transaction CR02, business object BUS0011). This has been configured so that the document will reside in the content management server and will be accessed using Archivelink. I can successfully store the doc using trasnaction OAWD, and can then retrieve the doc using transaction OAOR. The links are correctly created in table TOA03.
However, when I try and view the docs from the Generic object services button for transaction CR02 the "Attachment List" link is greyed out.
I've just set this up for invoices (object BKPF) so can't understand why this hasn't worked for work centres.
I've implemented the interface IFARCH21 for BUS0011, and this hasn't resolved the issue.
Any ideas?
Thanks
RichardRichard,
Your using the wrong object, I don't have access to an SAP system right now, so I can't tell you what the correct object is, but when it's configured correctly in OAC3 it will not be grey out. Best thing to do it see what the object the program is publishing. This is what GOS is looking for. IFARCH21 is not the answer, unless your using workflow -
Attachments Activating Generic Object Services (GOS) in VA41/VA42 at item level
Hi to All,
I'm trying to manage attachments for sales document at item level.
I've already read this wonderfull post (Activating Generic Object Services Toolbar in SAP Objects) but I didn't understand how manage attachments at item level.
Please, if anyone has ideas of how to achieve it please share solutions.
Thanks & Best Regards,
UmbertoHi again,
Thanks for the answers, they were very helpful,
but the customer isn't happy with the "Store business Documents" and it's Drag n' drop interface.
I'm to develop a new GOS menu item, that will show
a normal Open File dialog, and a following popup
where the user can change the document title shown
in the Attachment list.
ARCHIVOBJECT_CREATE_FILE and ARCHIVOBJECT_GET_TABLE
along with ARCHIV_CONNECTION_INSERT should probably
cover the functionality I need.
I know both the BOR type ID and the object ID is
available to me in the Execute() method of the GOS menu handler I'm overriding, but for the ARCHIV_CONNECTION_INSERT, I'm supposed to supply an AR_OBJECT parameter (I know that this information is stored in the TOAOM table), but I have no clue where to get this information for the current object I'm trying to add an attachment for.
Regards,
Lars Wilhelmsen -
Attach Documents using Generic Object Services
With reference to Manual Bassani's SDN Contribution of code examples on how to attach documents using Generic Object Services - we have found that since implementing ECC 6 the following code no longer works (at the end of page 9):
CALL CREATE ATTACHMENT SERVICE FROM TOOLBAR
WHEN 'ATTACH'.
CALL METHOD MANAGER->START_SERVICE_DIRECT
EXPORTING
IP_SERVICE = 'CREATE_ATTA'
IS_OBJECT = OBJ
EXCEPTIONS
NO_OBJECT = 1
OBJECT_INVALID = 2
EXECUTION_FAILED = 3
OTHERS = 4.
It is necessary to use IP_SERVICE = 'PCATTA_CREA' to get this to function correctly.
The original document can be found at [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0e6b0d95-0a01-0010-4696-ca0a48de5fb3]Check the Naimesh Patel Blog he explain very well
http://help-abap.blogspot.com/2009/02/generic-object-services-gos-toolbar.html -
GOS: Generic Object Services (BC-SRV-GBT)
Hi All,
I have a requirement to implement GOS for our Netting document - object type OIA_BUS001, we need to link a url to our document. And I managed to get the toolbox to appear besides the gui title, using both the FM SWU_OBJECT_PUBLISH and the OO codes that was provided in the SAP help.
But the results is not quite right - in both cases, when I click on the toolbox -> create, all the functions listed, 'Create attachement, 'create note', etc, are greyed out.
Is there something that I'm missing here?
That's not the least of my problems. When (being optimistic here) this ok, I need to find a way on how to update the url in the background....
Appreciate if anybody have some pointers here.
Regards,
NikTry the following code.
/people/rammanohar.tiwari/blog/2005/10/10/generic-object-services-gos--in-background
Report Z_RMTIWARI_ATTACH_DOC_TO_BO
Written By : Ram Manohar Tiwari
Function : We need to maintain links between Business Object and
the attachment.Attachment document is basiclally a
business object of type 'MESSAGE'.In order to maintain
links, first the attachment will be crated as Business
Object of type 'MESSAGE' using Message.Create method.
Need to check if we can also use FM
'SO_DOC_INSERT_WITH_ORIG_API1' or SO_OBJECT_INSERT rather
than using Message.Create method.
REPORT Z_RMTIWARI_ATTACH_DOC_TO_BO .
Include for BO macros
INCLUDE : <CNTN01>.
Load class.
CLASS CL_BINARY_RELATION definition load.
CLASS CL_OBL_OBJECT definition load.
PARAMETERS:
Object_a
P_BOTYPE LIKE obl_s_pbor-typeid DEFAULT 'BUS2012', " e.g. 'BUS2012'
P_BO_ID LIKE OBL_S_PBOR-INSTID DEFAULT '4700000368', " Key PO No.
Object_b
P_DOCTY LIKE obl_s_pbor-typeid DEFAULT 'MESSAGE' NO-DISPLAY,
P_MSGTYP LIKE SOFM-DOCTP DEFAULT 'URL' NO-DISPLAY,
Relationship
P_RELTYP LIKE mdoblrel-reltype DEFAULT 'URL'.
types: BEGIN OF TY_MESSAGE_KEY,
FOLTP TYPE SO_FOL_TP,
FOLYR TYPE SO_FOL_YR,
FOLNO TYPE SO_FOL_NO,
DOCTP TYPE SO_DOC_TP,
DOCYR TYPE SO_DOC_YR,
DOCNO TYPE SO_DOC_NO,
FORTP TYPE SO_FOR_TP,
FORYR TYPE SO_FOR_YR,
FORNO TYPE SO_FOR_NO,
END OF TY_MESSAGE_KEY.
DATA : LV_MESSAGE_KEY type TY_MESSAGE_KEY.
DATA : LO_MESSAGE type SWC_OBJECT.
DATA : LT_DOC_CONTENT type standard table of SOLI-LINE with header
line.
First derive the Attachment's ( MESSAGE )document type.
P_DOCTY = 'MESSAGE'.
CASE P_RELTYP.
In case of URls
WHEN 'URL'.
P_MSGTYP = 'URL'.
In case of Notes / Private Notes
WHEN 'NOTE' OR 'PNOT'.
P_MSGTYP = 'RAW'.
WHEN 'ATTA'.
P_MSGTYP = 'EXT'.
Not implemented as yet...exit
EXIT.
WHEN OTHERS.
....exit
EXIT.
ENDCASE.
Create an initial instance of BO 'MESSAGE' - to call the
instance-independent method 'Create'.
swc_create_object LO_MESSAGE 'MESSAGE' LV_MESSAGE_KEY.
define container to pass the parameter values to the method call
in next step.
swc_container LT_MESSAGE_CONTAINER.
Populate container with parameters for method
swc_set_element LT_MESSAGE_CONTAINER 'DOCUMENTTITLE'
'Title, created programatically'.
swc_set_element LT_MESSAGE_CONTAINER 'DOCUMENTLANGU' 'E'.
swc_set_element LT_MESSAGE_CONTAINER 'NO_DIALOG' 'X'.
swc_set_element LT_MESSAGE_CONTAINER 'DOCUMENTNAME' P_DOCTY.
swc_set_element LT_MESSAGE_CONTAINER 'DOCUMENTTYPE' P_MSGTYP.
'DocumentContent' is a multi-line element ( itab ).
In case of URLs..it should be concatenated with &KEY& in the begining.
CASE P_MSGTYP.
WHEN 'URL'.
LT_DOC_CONTENT = '&KEY&http://www.gtservicing.com' .
append LT_DOC_CONTENT.
In case of Notes or Private Notes, get the data from files on appl
server or from wherever(? - remember background).
WHEN 'RAW'.
LT_DOC_CONTENT = 'Hi How r u?' .
append LT_DOC_CONTENT.
In case of File attachments
WHEN 'EXT'.
Upload the file contents using open dataset in lt_doc_content .
Some conversion ( Compress ) might be required.
Not sure at this point
ENDCASE.
swc_set_element LT_MESSAGE_CONTAINER 'DocumentContent' LT_DOC_CONTENT.
swc_call_method LO_MESSAGE 'CREATE' LT_MESSAGE_CONTAINER.
Refresh to get the reference of create 'MESSAGE' object for attachment
swc_refresh_object LO_MESSAGE.
Get Key of new object
swc_get_object_key LO_MESSAGE LV_MESSAGE_KEY.
Now we have attachment as a business object instance. We can now
attach it to our main business object instance.
Create main BO object_a
data: LO_IS_OBJECT_A type SIBFLPORB.
LO_IS_OBJECT_A-INSTID = P_BO_ID.
LO_IS_OBJECT_A-TYPEID = P_BOTYPE.
LO_IS_OBJECT_A-CATID = 'BO'.
Create attachment BO object_b
data: LO_IS_OBJECT_B type SIBFLPORB.
LO_IS_OBJECT_B-INSTID = LV_MESSAGE_KEY.
LO_IS_OBJECT_B-TYPEID = P_DOCTY.
LO_IS_OBJECT_B-CATID = 'BO'.
*TRY.
CALL METHOD CL_BINARY_RELATION=>CREATE_LINK
EXPORTING
IS_OBJECT_A = LO_IS_OBJECT_A
IP_LOGSYS_A =
IS_OBJECT_B = LO_IS_OBJECT_B
IP_LOGSYS_B =
IP_RELTYPE = P_RELTYP
IP_PROPNAM =
I_PROPERTY =
IMPORTING
EP_LINK_ID =
EO_PROPERTY =
*CATCH CX_OBL_PARAMETER_ERROR .
*CATCH CX_OBL_MODEL_ERROR .
*CATCH CX_OBL_INTERNAL_ERROR .
*ENDTRY.
Check if everything OK...who cares!!
commit work. -
Generic Object Services (HR Master Overview Screen)
Hi, i need to incorporate the Generic Object Services functionality to the HR Master Data linking it at three levels, namely,
Scenarios
1) GOS at Employee Level
2) GOS at Employee-Infotype Level
3) GOS at PD Object Level.
I've managed to find the solution to Scenario's 1 and 3 while i'm still trying to incorporate scenario 2.
Can someone let me know if there's any User-Exit that gets triggered at the Infotype Overview screen level from transaction PA30?
I couldnt locate an exit that'd get triggered upon calling the overview screen in the HR Master Data transaction (PA30). So is the trouble.
Helpful answers will be rewarded with points
Cheers,
VenkatHi Venkat,
Could you please share the steps on how you got the GOS at Employee Level to work?
Thank you for your help.
Aileen -
Generic Object Services(GOS)-Link to URL
Hi,
I have a requirement in Generic Object Services.I have to Create External Document(URL) [example:www.sap.com] in <b>background</b> for a FI document(which is viewed in Txn FB03).
Any idea to achieve it?
Thanks,
S.Banukumardid you manage to do this?
-
Generic Object Services - View Attachments disabled for non admin user
Hi,
I am using SAP 4.7 and the attachments created using table TOA01 - archive link are visible to an administrator user through Generic Object Services toolbox while same View Attachments option appears disabled for other non admin users.
Kindly help !Hi Neha,
I'm sorry I don't have answer to your question but I wonder if you could help me.
I'm looking at OSS note 530792 to configure GOS 'create attachment' option to copy the attachments to the archive server. currently, these are written to the SAP office tables SOC3, SOFFCONT1, etc and I want to use the archivelink and SAPHTTP and copy to the archive storage.
Have you successfully managed to configure your system since you mentioned TOA01?
In the same GOS menu I've activated the 'Business document' option and can copy these to the archive server by correctly configuring OAC2 and OAC3.
I'll really appreciate of you could please share your knowledge.
Thanks.
Soyab -
Configuring KPRO for generic object services
Hello,
I have a requirement where I have to configure KPRO as the storage for generic object services. We are using the generic object services for materials and hence using the Business object BUS1001. Please let me know of how to do the same or if we have any documents for configuring the Generic object services and KPRO please provide me the same.
Regards
NilanjanHi,
i reply to the question you posted in my thread:
I solved the request without using Kpro. Kpro ist just a more comfortable way in managing documents. But using ArchiveLink and GOS is all you need if you just want to upload documents and view them in a linked transaction. I would be able to give you a better help if you would give a short introdcution in what you plan to do in detail.
kind regards Matthew -
Connect a Word document instance to Generic Object Services/BDS
Hello all,
how can I manage to get a word document created via the Doc_template step to a certain Business Object (like Business Partner). I tried to trace that but I got lost in generations of codes like archivelink, sap office, knowledge provider etc.) I guess it should not be that difficult as I have the key of the word doc instance and the key of the business partner instance. What I want at last is to have that word document linked via attachments/linked objects or something similar....
Kindest regards from Germany,
MarkusMarkus,
Welcome to the forum!
I have done this sometime ago at a past client site and will see if I can find the code.
If I remember correctly, this involves converting the attachment to an SOFM object (using method CREATESOFM of BO WF_DOC) and then using function module BINARY_RELATION_CREATE to attach it to the BO. The links below will give you more info. Also Google for BINARY_RELATION_CREATE which should give you more links.
Re: Link Workflow Document to BKPF object
<a href="/people/rammanohar.tiwari/blog/2006/03/25/generic-object-services-gos--in-background--part-ii">Generic object services (GOS) - in Background - Part II</a>
http://mailman.mit.edu/pipermail/sap-wug/2005-September/019547.html
Cheers,
Ramki Maley -
Objects deletion through policy object manager
Hi,
I have a query, I need to remove list of objects which are not referred tro any rules through policy object manager of CSM. Now as per our deployment> first we need open an acitvity in CSM> Open Policy Object Manager> Delete object whichever require>approve the activity.
So now my question is that do we need any deployment job for this? If not, than it is gone live straight?
My implimentors says we do not need any deployment jobs as we do not made any policy changes of any firewall.LV2009 added a function which is probably crucial to delivering a nice solution to this problem. The function is called Preserve Run-time Class. It allows you to propogate the strict type of an object through a subVI that is coded to operate on a more generic class type.
Here's an example written in LV2009 for a simple class that stores any other LV class object by name.
Jarrod S.
National Instruments
Attachments:
Temp.zip 33 KB -
Show originally filename in attachment list (generic object services)
Hello everybody,
does anybody know, if it is possible to show the originally filename of a document in the attachment list of generic object services?
If I add more than one document for the same document type in generic object services, I'm not able to distinguish the documents.
When I want to save an attachment to local PC, SAP offers me the originally filename as default. Therefore, the filename has to be saved somewhere...
Thanks for any help or ideas in advance,
PeterRichard,
Your using the wrong object, I don't have access to an SAP system right now, so I can't tell you what the correct object is, but when it's configured correctly in OAC3 it will not be grey out. Best thing to do it see what the object the program is publishing. This is what GOS is looking for. IFARCH21 is not the answer, unless your using workflow
Maybe you are looking for
-
Report Generated from Discoverer Migrated BA into OBIEE
We have started to populate some of our OBI content with reports that were based on Discoverer Business Areas. But, when the reports are run from a Link, they do not include the options to Print to PDF or Download, similar to what is available for da
-
Hi Experts I am developing a BAPI to post the Vendor Invoice, I am not clear the parameters to be passed. Anyhow i have filled some parameters and am getting the following error, Can anyone suggest me about the error. Error : Enter a referen
-
Guest network and multiple VLANs
Hello all, I have installed a pair of 5508 controllers in our network. One controller sits inside the network and APs are configured to associate with that controller. The second controller sits on a DMZ interface off the ASA. I have a guest network
-
Transfer data from a Pop up to the main view
Dear expert, i want to transfer data from a popup to the main view, i created a TEXT_EDIT UI-Element on my main View and on a popup, and when writing a text on the TEXT_EDIT UI-element on the popup, i want get it (or display it) on the TEXT_EDIT UI-E
-
so i was just moving so apps around with itunes and all my bought games just disappear there not in purchased