Create Attachments to Generic Object Services from Webdynpro appliccation

Hi,
I have requirement to Create Attachments  to Generic Object Services(GOS) in equipment master (IE03)  from webdynpro when a user clicks on upload button and also allow the user to delete the attachments .
Can anyone advice me of any Function Modules or logic to use from Web GUI.
I used below logic from R/3 to create attachments, but from webdynpro this method doesn't work.
DATA lo_attachment TYPE REF TO cl_gos_document_service.
  CREATE OBJECT lo_attachment.
  CALL METHOD   lo_attachment->create_attachment
       EXPORTING  is_object = ls_object
       IMPORTING  ep_attachment = lp_attachment
Your inputs are appreciated.
Thanks
Rajesh Yalda

Hi,
try using the Class CL_GOS_SRV_ATTACHMENT_CREATE with Method EXECUTE_ITS.
best regards,
Michael

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

    Hi
    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

  • 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

  • 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,
    Umberto

    Hi 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

  • Create Attachment through Generic Object Services (BC-SRV-GBT)

    Hello experts,
    I have one question about a storing of document in this functionality. As you know there are several ways of storing a document to some object.
    1. Using the menu: "Create - Create Attachment"
    2. Using the menu: "Create - Store  Business Document"
    In the first case the document will be saved in SAP Database (Please correct me if I mistake). In the second case an optical archive must be connected to the SAP System.  Can I use an optical archive in the first case?
    PS. When I use the second way I don't see the name of document in the Attachment List. If use  "Create - Create Attachment" - it is OK.
    Thanks advance for any help.
    Your faithfully,
    Alekseev Aleksandr
    Edited by: Aleksandr Alekseev on May 5, 2008 6:05 AM

    Hi Friend,
      You have posted your query in wrong forum.
      Pls post your query in BPM and Workflow Forum.

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

    You 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

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

  • How to create a Generic Object Services for a standard tcode.

    Hi,
    We have a requirement where we are depreciating the assets (standard transaction ABAA) using a custom BDC program. We need to maintain a history (called audit trail) for the particular asset that has been depreciated using this program. For this audit train we have been asked to use "Generic Object Services" in transaction code ABAA.
    Unfortunately, Generic object services are not available in this transaction code. Can you please suggest me how to create "Generic Object Services" for a particular standard transaction code. Also, we have show the details of custom workflow that follows the approval process in order to depreciate the asset. how to show this workflow details using Generic Services. This is a very critical issue, any help will be very help ful.
    Please let me know should you require more information on this topic.
    Thanks,
    Ashish

    Instead of copyg the std fm to z, do the following,
    1. Go to se37 open FM VIEW_KURGV in display mode.
    2. Click on the spiral icon on the top.
    3. Then in menu go edit->enhancment options -> show implicit enhancement
    4. """""""""""""""""""""" kind of lines will appear in the cde, just rt click on the line at the place u want to insert the code and select
         enhancement implementation create.
    5. Give apropriate name for thi , it will inset a n place to write your code.
    This is an std sap methodology and is supported in upgradde also.

  • Adding Generic Object Services attachments to PRA trans O3U_DO3

    I would like to add the generic object services attachment menu that is found in vf02 - invoice create to the production and revenue accounting module transaction O3U_DO2/O3U_DO3 Maintain/Display DOI Owners.  I need the ability to attach external documents through archive link to this transaction.  If not possible with generic object services, any other suggestions on how to attach the documents is greatly appreciated.

    Hi,
    Welcome to the SDN Forums!!!
    You need to supply the PC file extension in the container element 'DOCUMENTTYPE'.
    swc_set_element lt_message_container 'DOCUMENTTYPE' p_msgtyp.
    In your case change the above statement as below:
    swc_set_element lt_message_container 'DOCUMENTTYPE' 'pdf'.
    <b>OR</b> change the default value of p_msgtyp to 'PDF'.
    Cheers,
    Ramki Maley.
    Please reward points if the answer is helpful.
    For info on awarding points click on this link: https://www.sdn.sap.com/sdn/index.sdn?page=crp_help.htm
    Message was edited by: Ramki Maley

  • Generic Object Services ; create attachment function grey out in Tcode KA03

    Hi all,
    I would like to know how can I enable create attachment function in GOS toolbar in Tcode KA03.
    Currently it was grey out.
    However, was tried to use the same function in KS03 and it works.Please help. Thanks!

    I just found the solution...
    SAP note : 961572
    Symptom</u>
    In the transactions for displaying cost elements (KA03) and changing cost elements (KA02), the 'Services for Object' function does not work correctly, as most Generic Object Services are unavailable.
    Other terms
    KA03, KA02, SWO1, K_OBJECT_SERVICES_INITIALIZE, BUS1059, BUS1030
    Reason and Prerequisites
    The problem is caused by a program error.
    Solution
    Implement the attached program corrections
    Then go to Transaction SW01 (Business Object Builder), enter BUS1059 as the object type, click Change, and make the following changes:
    Navigate to Methods -> RevenueType.Display, press F2 to select it, and go to the 'ABAP' tab page: Select the 'Transaction' radio button, enter the name as KA03, and click 'Save'
    Navigate to Attributes -> Attribute properties, select the 'Mandatory' checkbox, and click 'Save'
    Then change the release status by navigating as follows:
    Edit -> Change Release Status -> Object Type -> To implemented
    Edit -> Change Release Status -> Object Type -> To released
    Then double-click BUS1059 (or select using F2) in SWO1 to reach the 'General' tab page, which should appear as follows:
    ObjectType      BUS1059         Revenue element
    Object Name      RevenueType
    Program          RBUS1059
    Objtype status   generated       Saved      released

  • Starting Workflow from Generic Object Services in IQS1 Transaction

    Hi All,
    My requirement is users will create the notification through IQS1 and they will attach the Adobe document through Generic Object service. In the notification Task, they will assign the repsonsible person for that form. Once they released the notification, i need to send a mail to the responsible person. I got the BO (BUS7051) . I created the custom WF and acitivated the BO & WF link. When i selected the Workflow Overview in the Generic Object Serivce, it is saying 'There are no workflows that have already worked with this object'. But when i checked the is worklow log in SWIA, my workflow got triggered.
    I would like to know why it was not showing when i selected the same in Generic Object Serivce. How to trigger Workflow throuhg Generic Object Service.
    Any info relevant to this, please share with me..
    regards,
    sasi

    Hi,
    For generic object services to find the workflow, the object must be attached to the workitem/workflow or used in the container.
    If the object is correctly used in the workflow, it will be visible via GOS.
    How did you use the object in the workflow?
    Jeroen.

  • Starting Workflow from Generic Object Services

    Hi All.
    We are on ECC6. In transaction MM02 when I excute 'Start Workflow' from Generic Object Services, no workflows are found. Can anyone help me with the following issues;
    1. What is the underlying object in transaction MM02 (I believe it is BUS1001006)
    2. How can i ensure that the proper workflows in this transcation are started through some  
        customisation, enhencement or user-exit.
    Regards.

    I think you have to maintain the Workflow Template as General Task and then only it will appear in the GOS.
    Thanks
    Arghadip

  • 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

  • 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,
    Nik

    Try 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.

Maybe you are looking for

  • Help!!! Itunes and Pc can't detect my Ipod Touch 4g

    I tried everything that Apple Support told me to do and still can't detect my ipod touch 4g. Still stuck at apple boot logo, tried DFU mode and Recovery, still can't be detected by PC or Itunes. What to do? I need Help Badly. When i connect my ipod,

  • Problem syncing photos with Photoshop Elements 5.0

    I have a problem with syncing my photos using Photoshop Elements 5.0 to my AppleTV. After marking I want to use elements it shows my catalogs. But after syncing no photos are transferred to my AppleTV. I do get a circle with an explanation mark behin

  • How do I get my macbook to sleep?

    I have a macbook pro 13" (late 2009) model with OSX Lion. I set the energy save preferences to go to sleep after 10 minutes when on battery power. But it doesn't go to sleep. The screen will go off, but the machine keeps running until the battery is

  • Numbers and pages are not working.. need help

    hello i been chatting with Genius Bar team today earlier on, we heve got to the stage when we created Test User profile and figured that Numbers andPages are running in it, it suppose to mean that the is a way to fix those applications settings in or

  • Kernal Panic at Green Acres

    I just bought a PowerMac G4 450MHz/512K RAM/20GB AGP Graphics (1999) for $140. With the addition of a 70GB internal drive, I achieved terabyte status but part of that real estate is turning out to be Green Acres. In reality, the machine is loud, larg