cancel
Showing results for 
Search instead for 
Did you mean: 

Display and Manage Attachments of Generic Object Services in Webdynpro

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

vishalc_kava
Explorer
0 Kudos

Hi,

You can use this bapi 'BAPI_DOCUMENT_GETLIST' to get the list of documents. This bapi returns data in table form and the list of documents can be displayed in a Table in Web Dynpro.

Vishal

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Vishal,

Do you know of any function module to delete a attachment from a Business Object?

Thanks

vishalc_kava
Explorer
0 Kudos

Hi,

You can use this bapi 'BAPI_DOCUMENT_DELETE_DIRECT' to delete the document from the data base.

Vishal.

Former Member
0 Kudos

Hi,

I need to delete from a Business Object.. so for the importing parameters of the FM "BAPI_DOCUMENT_DELETE_DIRECT" what do i need to pass in for Document Number and the rest of the Parameters?

Thanks and Regards,

WeiLong

vishalc_kava
Explorer
0 Kudos

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

Former Member
0 Kudos

Hi,

I tried using FM "BDS_DOCUMENT_DELETE" to delete an attachment but i get an error "Nothing Found".

I use the BDN_CON-LOIO_ID from the FM "BDS_GOS_CONNECTIONS_GET" to pass in the FM "BDS_DOCUMENT_DELETE" exporting parameter 'DOC_ID'.

Former Member
0 Kudos

Thank you very much...

Former Member
0 Kudos

Try the following link. The link explain the process for BSP.

[GOS using BSP|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/2519] [original link is broken] [original link is broken] [original link is broken];

May be you can use a class from the list of CL_GOS* classes to meet the requirement or function module BDS_GOS_CONNECTIONS_GET to get the list of documents attached with the object.

Regards

Rohit Chowdhary

Edited by: Rohit Chowdhary on Nov 25, 2008 11:01 AM