Skip to Content

Problems to turn on Browser in DMS

Purpose

Sometimes you want to use the browser or ACL functionality in DMS  and you have already set the flags in transaction DCSWI but the browser is till not available. So you do not know why this is not working.

Reason

If the business function EA-PLM is also activated the remaining reason could be a wrong entry in the related database table TDWSWITCH. Because here only one entry for area 'CV' should exist. Sometimes it might happen that another entry with an empty area field is available.

Solution

To solve this issue you have to remove the 'wrong' entry in table TDWSWITCH. The easiest way to achieve this is to manually remove the entry in the table by using transaction SE16 or SE16N.

If you do not have the permission to change the database table you might need a small correction report. So I created the following sample report that should help to ensure that only one 'CV' entry exists in the table.

*&---------------------------------------------------------------------*

*& Report  Z_HOPFC_SWITCH

*&

*&---------------------------------------------------------------------*

*& Version 1.0

*& This is a special correction report if you have originals without workstation application.

*& Please note that this is not an official SAP report.

*&---------------------------------------------------------------------*

REPORT  z_hopfc_switch.

DATA: it_switch TYPE TABLE OF tdwswitch.

DATA: wa_switch TYPE tdwswitch.

DATA: it_switch_new TYPE TABLE OF tdwswitch.

DATA: it_switch_del TYPE TABLE OF  tdwswitch.

DATA: lf_lines TYPE p.

*Select the entries from table TDWSWITCH

SELECT * FROM  tdwswitch INTO CORRESPONDING FIELDS OF TABLE it_switch.

* If sy-subrc is '4' no entry exists and one standard CV entry should be created.

IF sy-subrc = 4.

   wa_switch-mandt = sy-mandt.

   wa_switch-area = 'CV'.

   INSERT tdwswitch FROM wa_switch.

ENDIF.

DESCRIBE TABLE it_switch LINES lf_lines.

IF lf_lines > '1'.

*LOOP at it_switch and remove all entries where AREA is not 'CV'

   LOOP AT it_switch INTO wa_switch.

     IF wa_switch-area <> 'CV'.

       DELETE tdwswitch FROM wa_switch.

*        wa_switch-mandt = sy-mandt.

*        wa_switch-area = 'CV'.

*        INSERT tdwswitch FROM wa_switch.

     ENDIF.

   ENDLOOP.

*Check table content

   SELECT * FROM tdwswitch INTO CORRESPONDING FIELDS OF TABLE it_switch.

   DESCRIBE TABLE it_switch LINES lf_lines.

   LOOP AT it_switch INTO wa_switch.

     IF wa_switch-area = 'CV' AND lf_lines = '1'.

       WRITE: 'Table updated successfully'.

     ENDIF.

   ENDLOOP.

ELSE.

*Only one entry - need to check if this entry has area 'CV'

     LOOP AT it_switch INTO wa_switch.

       IF wa_switch-area = 'CV'.

         WRITE: 'Nothing updated'.

         EXIT.

       ELSE.

         DELETE tdwswitch FROM wa_switch.

         wa_switch-mandt = sy-mandt.

         wa_switch-area = 'CV'.

         INSERT tdwswitch FROM wa_switch.

       ENDIF.

     ENDLOOP.

   ENDIF.

Please note that this is not an official standard report and so I would again ask you to test this report and provide feedback. Of course you can also feel free to improve its functionality.

Tags:

No comments