Using a generic object

I would like to be able to create an instance of an ABAP object without knowing the object type first. for example, if a specific type of message hits a queue, create a handler object specific to that message. I need to be able to declare the object variable as something not strongly typed, and do the create object for whatever actual object i want to use. I have checked the docs, but found nothing.

Hi David,
I think this feature can be achieved only in WAS 6.40. ( Someone correct me here, if I am wrong ).
This syntax is available, perhaps only in 6.40 WAS, and didn't work in 4.6C.
CREATE DATA dref TYPE HANDLE <class_name>.
Since, I do not have 6.40 WAS, I will give a shot-in-the-dark solution:
data: lv_variable(25) type c value 'CL_GUI_ALV_GRID'.
data: myref type ref to data.
field-symbols: <FS> type any.
assign lv_variable to <fs>.
if sy-subrc = 0.
  create data myref type handle <fs>.
endif.
I do not guarantee this will work, but with the document link, which Shehryar Khan has given in the previous post, I am guessing this should work.
If it works, then you can create an object at runtime, of any classname.
Regards,
Subramanian V.

Similar Messages

  • Selection Criterion of Contents Server's Storage Types : Used by Generic Object Services

    Hi experts.
    I'm considering Contents Server Storage Types of attached files uploaded by Generic Object Services.
    I want to adapt Storage Type that can be housekeeped by specifying retention period.
    Please give me how to housekeep and how to use the benefits of each Contents Server Types.
    Regards,
    Taiki Shoji

    Hi Deepak,
    I don't use Open Text.
    When I attache file, I do following steps.
    Select "Service for Object"
         ->Create
              ->Create Attachement
                   ->Select attachement file and Open
    Regards,
    Taiki Shoji

  • Urgent!!!  Issue in using GOS(Generic Object Services)

    Hello Friends,
    I have created a GOS Business object and i am using this to attach documents at the selection screen of my programs.
    The implementation is successfull and working fine. When i execute my program, i can see the GOS Toolbar, i am able to upload document from my PC and view in the attachment list too.
    But the issue is, when i end my session, and try to see attachment list by executing the program again, it comes blank with no documents. This means, once i end the session, i am not able to see the attachments that i have created earlier.
    Any helpful input will be appreciated and rewarded.
    Thanks and Regards,
    Vikas Bittera.

    Hello Vikas
    The document has to be uploaded to the <b>BDS </b>(Business Document Service).
    I will give you an example how I did this:
    1. Create business object 'ZREPORT'.  " for attaching documents to reports
    2. Call transaction <b>OAER </b>(Business Document Service) with the following parameters:
        - Class name = 'ZREPORT' (my business object)
        - Class type  = 'BO' (business object)
        - Objekt key  = leave empty or enter name of report (if empty, a popup appears)
        - Storage system = 'BDS_DB' (seemed a good choice to me)
    3. Execute
    4. In the BDS choose tabstrip "<b>Create</b>" (lower left part of screen). Right-click on the <i>Word document icon </i>and choose<i> Import File</i> from the context menu.
    As soon as you have uploaded your Word document it is visible in your business object (attachment list). When you display the attachment list and right-click on the document you can directly open it in the BDS.
    Regards
      Uwe

  • Generic Object Services in massive transfers.

    Hi there,
    I need to massive assign pictures as attachments to fixed assets... the way to assign the pictures is using the Generic Object Services but when I try to use recordings to automatically assign the attachments this option is disabled, can anyone help..
    Thanks in advance.
    J. Valencia

    Hi,  I actually have a function module which you can use to upload attachments to the GOS.  In accepts  the object type and key as well as the file path where the image is to upload.  If you are interested, please email me at the address on my business card and I can help you further.  I can not post the code here.
    Regards
    Rich Heilman

  • 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
    Nilanjan

    Hi,
    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

  • Indicator for Generic Object Services

    We are planning to use the Generic Object Services functionality to
    attach Word, Excel or PDF files to existing documents in SAP. Our plan
    is to use this in Accounts Receivable. The issue we have is when we
    are looking at the open items for a customer using transaction FBL5N
    there is no way to know which open item has attachments.  Once you've selected an open item, you can view any attachments but this does not help.  I posted an OSS notes and they replied "We regret to inform you that the function you require is not included inthe SAP standard system."  Does anyone know how I pursue this to have SAP develop this functionality?
    Thank You,
    Sue Rademacher

    While this is probably answered best in the ABAP forum, by doing a search on Generic Object Services in all forum categories, I found a number of answers about enhancements with this functionality. Re: How to link proces modeling to execution of services are found in this forum thread.
    Marilyn

  • Missing Function within VC01N Generic Object Services (simple note)

    We want to use the generic object services (GOS) within transaction VC01N. But we are missing the function to enter only a simple note. Behind the GOS Icon within VC01N menu step: Create -> Create note  is not available.
    This is different to other transactions with GOS functionality like VA02. There the menu step: Create -> Create note   is available.
    And idea why it is designed in this way and how we can make the simple note function available in CV01N.
    Many Thanks in advance for your help,.
    Klaus
    Edited by: Klaus Reitz on Sep 10, 2008 7:56 PM

    We want to use the generic object services (GOS) within transaction VC01N. But we are missing the function to enter only a simple note. Behind the GOS Icon within VC01N menu step: Create -> Create note  is not available.
    This is different to other transactions with GOS functionality like VA02. There the menu step: Create -> Create note   is available.
    And idea why it is designed in this way and how we can make the simple note function available in CV01N.
    Many Thanks in advance for your help,.
    Klaus
    Edited by: Klaus Reitz on Sep 10, 2008 7:56 PM

  • How to use Generic Object Services(GOS) for each table control record.

    Dear Expert,
                       I am using generic object services for document attachment but i am facing a problem while attaching document to a table control row. my requirement is to attach separate document for each and every row of table control but  i am unable to attach document row wise of the table control.for each row GOS should display corresponding attached document not all the attached document.
    Thanks in Advanced
    Bhuwan Tiwari
    Edited by: BHUWAN TIWARI on Feb 8, 2011 4:16 PM
    Edited by: BHUWAN TIWARI on Feb 8, 2011 4:16 PM

    You haven't explained what object and object key you're using, nor have you provided any indication of how you implemented the GOS attachment functionality.  You need to provide more information to resolve an issue like this.

  • 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

  • Attach doc from external content server- using Generic Object Service (GOS)

    Dear All,
    i have intergrated an external content server to SAP using SAP archive link. All the scanned document are there in Content server and corresponding entries are done in SAP.I can search and view document using tcode : OAAD
    Please tell me steps for "how to attach a document from external content server using Generic Object Service "
    Scenario is :  For example when we change any Master records or create a new PO, or do some financial transaction then i need to attach the supporting document which is there in my content server connected  to SAP.how do we manual attach a Document in SAP using GOS.
    Do we need to do some special configuration to use GOS .please give the steps from initial.
    Thanks
    sandeep

    Hello,
    Check your configuration of document type assignement to required business document - object type, Archivelink table, content repository in OAC3 transaction.
    Goto respective business document > Click on GOS > Create > Store business document - Here you can see defined document type with desctiption. Double click on this the assign your document to this business document. Save it.
    This will help in attaching the document to your required business document.
    To verify you can check the archivelink table or by transaction OAAD.
    Hope this will help you.
    -Thanks,
    Ajay

  • Generic Object Services using Web Dynpro

    I am using Web Dynpro for ABAP and would like to access Generic Object Services (GOS) to view attachments to an SAP Business Object.  Using the cl_gos* classes does not work when running WebDynpro as it uses the controls framework. 
    How can I access the functionality of GOS from a Web Dynpro application?
    Regards,
    Bob

    Hi,
    I assume that you wantted to have the attachements in a mail.
    Please check out the Adobe Forms(ie PDF attachements) and Office Control UI elements in WDA.
    Regards
    Lekha

  • How to attach document using Generic Object Service

    Hi all,
    How can i create attachment to the parked invoice using Generic Object services? i want function modules which are used to do it.
    Actually I want to do this from the business object method. I am having word document as one of the workitem step. once i get this document I need to attach this document to the parked invoice so that users can see that document by view object list.
    Its urgent.
    thanks.

    Hello,
    Check your configuration of document type assignement to required business document - object type, Archivelink table, content repository in OAC3 transaction.
    Goto respective business document > Click on GOS > Create > Store business document - Here you can see defined document type with desctiption. Double click on this the assign your document to this business document. Save it.
    This will help in attaching the document to your required business document.
    To verify you can check the archivelink table or by transaction OAAD.
    Hope this will help you.
    -Thanks,
    Ajay

  • 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

  • Generic Object Services using WebDynpro ABAP

    I am using Web Dynpro for ABAP and would like to access Generic Object Services (GOS) to view attachments or similar functionality for attachments in web dynpro ABAP. How can I access the functionality of attachments from a Web Dynpro application?
    Any help is appreciated.
    Thanks

    Hi,
    I assume that you wantted to have the attachements in a mail.
    Please check out the Adobe Forms(ie PDF attachements) and Office Control UI elements in WDA.
    Regards
    Lekha

  • How to trigger a workflow using generic object services?

    Hi Experts,
    Let me know on how to trigger a workflow using generic object services.
    My requirement is to trigger the FI document reversal document using Object services.
    Any info or docs relevant to this, please share with me..
    Thanks,
    Dinesh.

    Dinesh,
    First of you need to check if the transaction has a BO (in released status) published to use the GOS.
    These are the pre-requisites for GOS
    http://help.sap.com/saphelp_46c/helpdata/en/94/aa532cddd511d289860000e8216438/content.htm
    Once done.. check that you have valid workflow linkages active for this BO.
    Now when you click on the 'start workflow' the system will show all relevant workflows for the BO to choose from and to start.

Maybe you are looking for

  • Office 2008 and Acrobat Pro v9.1

    I have recently installed Acrobat Pro 9.1. On my Mac using 10.5.6 I have also installed Microsoft Office 2008. Office was installed before Acrobat What I cannot do is make an office document into a pdf unless I print from the application. This is a p

  • Tables for entries in cheque

    Hi all i want to display entries in cheque using script. can any one tell me the tables used and the sequence of tables and how they are corelated ? Please gsuggest link from whee i can get info regarding that . i have posted many questions regarding

  • Adding A 2nd Monitor?

    Hi all, I have two old G4 towers (see data below). I'm considering consolidating them. I'm wondering if I can take the graphics card out of one G4, and install it in the 2nd G4, and then run two monitors at the same time. Does the graphics card do al

  • How can I get current Number file name in a cell ?

    I want to write current Number (3.5) file name in a cell. It was working in previous version of Number but not with latest one. Thanks.

  • Infosource--"0sd_c04"

    hai friends, I am new bw, plz clarify my doubt. In the cube 0SD_C04 there key figures loading date (0loaddatek) and actual goods issue (0act_gi_dtk). But I don't find these kefigures in any infosources (2lis_12_*) then how these fields get updated in