Skip to Content
0
Former Member
Jul 27, 2006 at 10:42 AM

EasyDMS : Function module to define allowed document types

127 Views

Hello together,

I am working on EasyDMS 6.00 and have implemented the function module "Z_EASYDMS_GETDOCTYPES" to have a filtered list of allowed document types for creating folders and documents in EasyDMS.

But this FM does not seem to work, the list still contains all document types that are customized in R3.

Here is my implementation:

FUNCTION z_easydms_getdoctypes.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"  IMPORTING
*"     VALUE(FOLDERDOCUMENT) TYPE  BAPI_DOC_KEYS OPTIONAL
*"     VALUE(ISFOLDER) LIKE  BAPI_DOC_DRAW2-CADINDICATOR OPTIONAL
*"  EXPORTING
*"     VALUE(RETURN) TYPE  BAPIRET2
*"  TABLES
*"      DOCUMENTTYPES STRUCTURE  TDWAI OPTIONAL
*"----------------------------------------------------------------------

* default implementation: define some document types
* for documents and folders

  DATA: ls_tdwai TYPE tdwai.
  REFRESH: documenttypes.

  IF isfolder IS INITIAL.
    ls_tdwai-dokar = 'IMP'.APPEND ls_tdwai TO documenttypes.
    ls_tdwai-dokar = 'TST'.APPEND ls_tdwai TO documenttypes.
    ls_tdwai-dokar = 'DMO'.APPEND ls_tdwai TO documenttypes.
    ls_tdwai-dokar = 'DRW'.APPEND ls_tdwai TO documenttypes.
  ELSE.
    ls_tdwai-dokar = 'IMP'.APPEND ls_tdwai TO documenttypes.
    ls_tdwai-dokar = 'DMO'.APPEND ls_tdwai TO documenttypes.
  ENDIF.


ENDFUNCTION.

Any help would be great!

Thanks in advice,

Andreas