cancel
Showing results for 
Search instead for 
Did you mean: 

Lock editing webdynpro component

former_member425121
Participant
0 Kudos

Hello experts

Is there a way to lock editing a wda component ?  I mean lock the web dynpro component for block to other users to edit/change the complete component (compcontroller, views, methods, wda application, etc. ).

I check there is a option in Menu Edit->ConfigurationData but i do not know if there is possible to lock the complete wda component.

Regards

Frank

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Frank,

There is no option for lock editing the wd component or its related components.

The Menu Edit->ConfigurationData lock is only for not allowing the configuration settings.

Locking in the TR would only allow the object to be locked but it can be edited by anyone as it would ask to create a new task under the TR itself.

*Reward points if the answer is satisfactory

Regards,

Nihar

Answers (2)

Answers (2)

singhmanishekhar
Explorer
0 Kudos

Dear Frank,

         That kind of service is not provided by SAP. But, If you are a developer then it not big deal for you to lock any sap object. But, it does not comes under standard way to do so. You can create your Lock and Unlock Report to lock sap object.

                                           For WD Comp. locking Code reply soon.

singhmanishekhar
Explorer
0 Kudos

Dear Frank,

            Try Following code.

*&---------------------------------------------------------------------*
*& Report  ZLOCK_WD_OBJ
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT  zlock_wd_obj.
TABLES sscrfields.
DATA: ls_wdy_component TYPE wdy_component,
       flag.
SELECTION-SCREEN: BEGIN OF BLOCK sel1 WITH FRAME TITLE title.
PARAMETERSp_wdname LIKE wdy_component-component_name OBLIGATORY.
SELECTION-SCREEN: END OF BLOCK sel1,
                   PUSHBUTTON 30(10) but_lock USER-COMMAND lock VISIBLE LENGTH 30.

AT SELECTION-SCREEN.
   CASE sscrfields.
     WHEN 'LOCK'.
       flag = '1'.
     WHEN OTHERS.
       flag = '0'.
   ENDCASE.

AT SELECTION-SCREEN OUTPUT.
   but_lock = 'Ulock/Lock'.
   title = 'Ulock/Lock Wd Component'.


   CASE flag.
     WHEN '1'.
       SELECT SINGLE * INTO ls_wdy_component FROM wdy_component WHERE component_name = p_wdname.
       IF sy-subrc = 0.
         IF ls_wdy_component-type >= 5.
           ls_wdy_component-type = ls_wdy_component-type - 5.
           UPDATE wdy_component SET type = ls_wdy_component-type WHERE component_name = p_wdname.
           MESSAGE 'Unlocked successfully' TYPE 'I'.
         ELSE.
           ls_wdy_component-type = ls_wdy_component-type + 5.
           UPDATE wdy_component SET type = ls_wdy_component-type WHERE component_name = p_wdname.
           MESSAGE 'Locked successfully' TYPE 'I'.
         ENDIF.
         "LEAVE TO SCREEN 0.
       ELSE.
         MESSAGE 'WD Component Does not exists' TYPE 'E'." DISPLAY LIKE 'E'.
       ENDIF.
     WHEN OTHERS.
   ENDCASE.

*  ROLLBACK WORK.

former_member184578
Active Contributor
0 Kudos

Hi,

As far I knew there is no provision to lock WDA component like we do for ABAP Reports. Instead you can lock the Objects in your TR( Transport) so that other will not be able to change your Objects.

Hope this helps u.,

Regards,

Kiran