cancel
Showing results for 
Search instead for 
Did you mean: 

How to display the attached file of DMS in WEB Dynpro

Former Member
0 Kudos

Hello everybody! I have to work with DMS documents on the portal. Do You know, how display the attached files of DMS document in WEB Dynpro?

Pavel Truhlář

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Pavel,

By using the below F.M we can display DMS Document.

CALL FUNCTION 'CVAPI_DOC_VIEW'
  EXPORTING
    PF_DOKAR               = 'ZAP'
    PF_DOKNR               = LS_DMS_TABLE-DOKNR
    PF_DOKVR               = '00'
    PF_DOKTL               = '000'
   PF_HOSTNAME            = 'DEFAULT'
   PF_APPL_START          = ' '
   PF_GET_URL             = 'X'
IMPORTING
   PFX_URL                 = V_URL
EXCEPTIONS
   ERROR                  = 1
   NOT_FOUND              = 2
   NO_AUTH                = 3
   NO_ORIGINAL            = 4
   OTHERS                 = 5.

After getting the V_URL Create External Window.

  LO_API_COMPONENT  = WD_THIS->WD_GET_API( ).

  LO_WINDOW_MANAGER = LO_API_COMPONENT->GET_WINDOW_MANAGER( ).

  LO_WINDOW         = LO_WINDOW_MANAGER->CREATE_EXTERNAL_WINDOW(

                URL = LW_URL ).

BR,

Jack.



         

Former Member
0 Kudos

Dear Jack, thanks a lot. This is really the answer, how to display the DMS attachment. I have another similar question. Is it possible to change or create attachment of DMS by the web dynpro?

Best regards.

Pavel

Former Member
0 Kudos

Yes, We can create DMS from webdynpro And We can Change r Delete it.

Former Member
0 Kudos

Thanks for Your answer. The create, change and delete is also possible by the function 'CVAPI_DOC_VIEW'?

Pavel

 


Former Member
0 Kudos

No Pavel.

Creation,Display And Delete Functions different .

Creation: 'BAPI_DOCUMENT_CREATE2'

Delete:    'BAPI_DOCUMENT_DELETE'

Change: BAPI_DOCUMENT_CHANGE

By Using these Bapi's We can Create,Change And Delete.

Regards,

Jack.

Former Member
0 Kudos

Hello Jack, I do not want to delete all DMS document. I just want to delete one attachment ( let us say MS Word document ) . It is not possible by the function BAPI_DOCUMENT_DELETE . The function BAPI_DOCUMENT_DELETE deletes all DMS document. How to delete only one attachment please?

Pavel

Former Member
0 Kudos

Hi Pavel,

You need to pass that attachment document number,type and version.

   CALL FUNCTION 'BAPI_DOCUMENT_DELETE'

     EXPORTING

       DOCUMENTTYPE          = LW_DRAD-DOKAR

       DOCUMENTNUMBER        = LS_DMS_TABLE-DOKNR

       DOCUMENTPART          = LW_DRAD-DOKTL

       DOCUMENTVERSION       = LW_DRAD-DOKVR

    IMPORTING

      RETURN                 = LW_RETRN.

When u want to create one attachment that time u get one document number. That Number u need to save in ur Ztable. Next Time when u want to delete that document,simply pass that DOKNR(Doc Number) And Remaining Parameters like above.But before that u need todo some configuration for DMS in SPRO. Actually that Configuration my functional has done that's why i didn't touch that configuration. Then u know That parameters like TYPE,PART And Version. At time of creation,Display,Change And Delete this parameters with Document combination is mandatory then only updation will happend.

Regards,

Jack.

Answers (0)