Skip to Content
Author's profile photo Michael Vollmer

Editability/Visibility of UI objects dependent from the user status

Are you aware that starting SAP Solution Manager 7.10, SP5 you can control some specific ChaRM UI objects dependent ?

This area has been completely reworked and additionally the ability to implement your own UI control class has been implemented.

Customers already familiar with ChaRM on CRM 5.0 SAP GUI might know dialog view ‘TSOCM_CON_ACT_V’ which did control the so called right-click actions on the context tab.

Context Tab - PopUp - assign documents - inserted.jpg

Now these functionalites have been moved on assignement blocks in the CRM Web UI. A new enhanced customizing was created because we wanted not to interfere with the old stuff of the SAP GUI for customers using the transition phase to go from the old to the new UI. And we wanted to have it enhanceable.

This is the IMG activity to do it (renamed to SP7, name in SP5 and 6 is still ‘Adjust Project Field and Scope in Change Request by Status’ as we started with these fields and the name was not updated):

UI control img.jpg

What can be done there? You have a set of UI objects which are supported. See our list (updated)

UI objects table.jpg

The dialog view allows you to select for proxy class relevant transaction types and customize it then for the user status.

Be aware that the Incident Management area is not supported as visible in the table!

These are the entries for the standard RfC (transaction type SMCR). As you can see there is a true/false flag for ‘Editable’, ‘Visible’ and if the entry is active.

UI control IMG 2.jpg

<<<< So, when you have an issue that it is not possible to have an UI object editable, a button pushable in ChaRM, etc. please first check this customizing >>>>

Further on there is a column ‘Class Name’ where you can enter your own control class which is then called dynamically for this UI object during runtime. It’s always the same method ‘CONTROL_EDIT_ABILITY’.

How to implement your own UI Control class (Optional scenario)

In case you have some requirements calling for special logic in your process to set a UI object to (not) editable/ (not) visible, it’s possible to create your own UI control class. To do that…

  • Implement a class which inherits from the higher-level class CL_AIC_UI_CONTROL_BASE. If there is already a standard UI control class assigned, inherit from this class
  • Reimplement the method IF_AIC_AREA_CONTROL~CONTROL_EDIT_VISIBILITY
  • Code your customer-specific control in ABAP. The method provides the following interface and data:
    • IV_GUID: Document GUID
    • IO_BOL_HEADER: Business Object Layer (BOL) class of document, as used in WebClient UI.
    • IO_COMPONENT: Class of BSP UI component
    • IS_UI_CONTROL: Customizing settings structure for the user status-specific field control
    • IV_FIELDNAME: ID of field from Customizing
    • ES_UI_CONTROL: Structure with which Customizing is output
  • Assign the Customizing entry to the class names.

Okt 2012:

Newest addition:

Control UI Objects via Authority Objects:

Check out this thread:

http://scn.sap.com/community/it-management/alm/solution-manager/blog/2012/10/02/charm-functionality-control-ui-objects-via-authority-objects

Hope that helps you a bit,

going on vacation ;-),

Michael

PS: For customers which have already old transaction types copied and now want to fast maintain the customizing by copying it from a standard transaction type (like SMHF to ZMHF) you can use this code to create a Z report in SE38 (name it ZI_CRM_UPDATE_AIC_PROC_EDIT) and copy the UI control customizing fast from the source transaction type (proc) to the target transaction type (targ)

*&———————————————————————*
*& Report  ZI_CRM_UPDATE_AIC_PROC_EDIT
*&
*&———————————————————————*
*&
*&
*&———————————————————————*
REPORT  ZI_CRM_UPDATE_AIC_PROC_EDIT.

parameter: proc type CRMT_PROCESS_TYPE,

          targ type CRMT_PROCESS_TYPE.

DATA: lt_edit type table of aic_proc_edit,

     ls_edit like line of lt_Edit.

Field-symbols: <line> like line of lt_edit.
SELECT        * FROM  aic_proc_edit into corresponding fields of table lt_edit

       WHERE  process_type  = proc.

  loop at lt_edit assigning <line>.

    <line>-process_type = targ.

    <line>-stsma+0(4) = targ.

    endloop.

modify aic_proc_edit from table lt_edit.

Assigned Tags

      20 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hello Michael,

      and how is it done for field in SMIN? I am now on SP7 and the status field of SMIN is now editable but in my old SP (SP2) it was not editable because status cahnegs was made via actions.

      Where do I set the status field to not editable for SMIN?

      BR

      Tanja

      Author's profile photo Michael Vollmer
      Michael Vollmer
      Blog Post Author

      Hello Tanja,

      SMIN is Incident Management, they don't have it implemented. I think it's not possible to control it via customizing. Maybe they have a BadI or you have to do an CRM enhancemnt implementation.

      Best regards,

      Michael

      Author's profile photo Former Member
      Former Member

      Hi Micheal,

      My requirements is to disable Attachments block's buttons depend on User status of ZMCR.

      Trying to play with "Adjust Project Field and Scope in Change Request by Status"

      ID of UI object = ADDDOCU or DELETEDOC but this has no effect ... i still can enter in ZMCR delete or insert any attachments in any User status.

      Can you explain is ADDDOCU and DELETEDOC are related to Attahcments assignment block ?

      Already found the way by ABAP, in IMPL class of UI component GS_CM

      f.e. this place CL_GS_CM_DOCLIST_IMPL-FILL_BUTTONS

      Regards Dan

      Author's profile photo Former Member
      Former Member

      Hi Daniyar,

      We are upgrading our system to 7.1 SP10 and we have a similar requirement as yours where the attachment assignment block needs to be controlled and the users should not be allowed to add any new attachment for a particular user status for change document. I wanted to check what solution did you apply to achieve the same. Thanks in advance.!

      Regards,

      Rashi

      Author's profile photo Former Member
      Former Member

      Hi Michael,

      First:

      I found some strange things, i have SP08 and in table AIC_PROC_EDIT  i have values

      ' - ' in the column Mandatory

      or in SPRO Adjust UI objects by User Status Editable/Executable .

      So if i add some rows here they not be triggered before i delete values with ' - '.

      I have checked this on several Solman 7.1 SP08 everywhere it was with ' - ' and these values has only Z- transaction types i thing the problem is in Copy Transaction type report.

      Second:

      Same SPRO there is UI element called ADDSOLNOBJ for solutions. I have spend 1 day to customize there and thought what im doing wrong !!!

      And finally i find the issue, that the actual UI element is SOLN not ADDSOLNOBJ.

      is it Old value or what ?

      p.s. cant attach sreenshots in reply ...

      Regards Dan

      Author's profile photo Michael Vollmer
      Michael Vollmer
      Blog Post Author

      Hi Daniyar, thanks for notifying me. Could you maybe create a prio 3 message, so I can access the system and check this out? Thanks, Michael

      Author's profile photo Former Member
      Former Member

      Hi Michael,

      We solved this without support message,

      Fist point " - " values, this is a bug and it occurs if you have copied transaction type before SP06 or 07 as far as I remember, in my case it was SP05 to SP08

      A copy problem, this fixes by report AIC_DELETE_EMPTY_STSMA_PROC_ED report will clean both table AICVC_PROC_EDIT and view cluster AICVC_PROC_EDIT3. SAP note 1872238, its an KBA about this

      I hundred procent sure that many people have same situation, they just dont use this feature yet.

      Second its my miss understanding 🙂 soz me.

      SOLN - its a field in Details block of f.e. Change Request.

      ADDSOLNOBJ - its a button in the Solution assigment block.

      But if you need to work with solution you need both of them in SM_FIELD.

      p.s. one strange things about SM_FIELD

      Even if you have SAP_ALL you need SM_FIELD 😯 to work with UI Objects.

      SM_FIELD does not exist in any SAP STANDARD role, f.e. if you want to see Template for this.

      But your another link helped me http://scn.sap.com/community/it-management/alm/solution-manager/blog/2012/10/02/charm-functionality-control-ui-objects-via-authority-objects

      Thank you Michael keep updating this 😉

      Author's profile photo Michael Vollmer
      Michael Vollmer
      Blog Post Author

      Hi Daniyar,

      you are correct SM_FIELD is per default not in our roles we just have the functionality available for customers if they need it because it is a lot of customizing to do (and a concept to plan before) and it works only if you as well customize the relevant dynamically called methods in the user status dependent UI customizing.

      Author's profile photo Boris Milosevic
      Boris Milosevic

      Hi Daniyar,

      during my execution of the report AIC_DELETE_EMPTY_STSMA_PROC_ED I got system message Maximum number 09 of internal sessions reached?!!

      Have you had same problem during your execution of the above report? SCN says that code of the affected report  needs to be readjusted to decrease number of internal session or SAP parameter change.

      No significant help from SCN:

      http://scn.sap.com/thread/709358

      what will be SAP parameter to increase  max number of internal session??

      thank you for your answer

      BM

      NB

      SP10 Solman 7.1 is working environment!


      Author's profile photo Former Member
      Former Member

      Hi Boris,

      No hadn't any error messages when executed AIC_DELETE_EMPTY_STSMA_PROC_ED

      About iternal sessions i think its a basis, so better ask them.

      Also try to find some SAP note, this error isn't seems to be normal.

      Will let you know if find something

      rg Dan 

      Author's profile photo Former Member
      Former Member

      Hi Michael,

      I'm facing the same situation as Daniyar, we are on 7.1 SPS08 and need to customize the buttons of the attachement assignment block. I did not find any clue about these UI elements. Is it possible to customize the buttons there?

      I.e. we like to disable the "Attachment"-button as the customer only needs to have "URL". And it's very annoying that every user has the right to delete any attachment even in display mode without any entry in the log. Do you know a way to handle this?

      Thanks in advance

      Christian

      Author's profile photo Former Member
      Former Member

      Hi Daniyar,

      We are upgrading our system to 7.1 SP10 and we have a similar requirement as yours where the attachment assignment block needs to be controlled and the users should not be allowed to add any new attachment for a particular user status for change document. I wanted to check what solution did you apply to achieve the same. Thanks in advance.!

      Regards,

      Rashi

      Author's profile photo Former Member
      Former Member

      Hello Rashi,

      I have the similar requirement. I want to add attachment specific to status.

      Did you manage to sort this out.

      Any help will be highly appriciated.

      Thanks,

      Greg

      Author's profile photo Guy Pengelly
      Guy Pengelly

      Hi Michael,

      This is very useful functionality in general;  I have a question about the action RELEASE_REQU that can be enabled in the Transport mgmnt block though. 

      This action appears to allow the user to release the transport REQUEST (not the task), but of course fails if the task is not first released.

      1) This goes against the philosophy of releasing only the task manually when passing to test (and allowing the system to create the transport of copies)

      2) What's the point if you still have to access the gui se09 to release the task?

      3) I would have thought that the more useful functionality would be a RELEASE_TASK action.

      Am I missing something ?

      Regards,

      Guy

      Author's profile photo Michael Vollmer
      Michael Vollmer
      Blog Post Author

      Hi Guy,

      thanks for the valid feedback. I see it the same and have reported this to our product owner so he thinks on requsting that for a future release,

      best regards,

      Michael

      Author's profile photo Riccardo Escher
      Riccardo Escher

      Hi Guy,

      I think that the missing RELEASE_TASK is a consequence of the philosophy behind. In ancient days when R/3 was new there were two functions in a mini workflow:

      1. the project leader begins creating a transport request and then he assignes development/customizing tasks to single users.

      2. these users see their task in their organizer, do their job and when finished signal it to the project leader by releasing the task; they are not authorized to create/release the request and not to add a task.

      3. when all tasks are released the project leader releases the request

      Obviously nobody worked that way and usually every developer had both authorizations.

      With the ChaRM (released as add-on TMWFLOW about 2004/2005, part of SolMan 3.2) the project part went into the solution manager; but the local development part was always a task on the satellite system, so this mini workflow (communicate I have done by releasing the transport task) is still there.

      I can live with it because the check if all task objects are ready for consolidation can only be done loclly, but sure, a release unconditionally in the solman charm might be sometimes helpful. But it can also be dangerous, because the relevant information is far away.

      Author's profile photo Riccardo Escher
      Riccardo Escher

      Hi Michael,

      I was wondering how to insert a customer field (created with AET) into this nice functionality. Do you think I will have a chance?

      Best Regards

      Riccardo

      Author's profile photo Artem Zhegalin
      Artem Zhegalin

      Hello, Ricardo.

      Yes, it is possible. We are using this feature for our Z* fields.

      BR,

      Artem

      Author's profile photo Michael Vollmer
      Michael Vollmer
      Blog Post Author

      Hi Riccardo,

      in general it is possible if not simple or lets say elegant. You could use inofficial method

      CALL METHOD cl_wdcm_extchreq_scoping_asst=>editability_depending_on_field

           EXPORTING

             iv_header_guid    = lv_guid

             iv_field_name     = cl_wdcm_extchreq_scoping_asst=>c_change_cycle

             io_bol_header     = lo_header_bol

             io_component      = ao_view_controller

           IMPORTING

             ev_editable       = lv_status

           EXCEPTIONS

             parameter_missing = 1

             no_document       = 2

             OTHERS            = 3.

         IF sy-subrc <> 0.

           rv_disabled = 'TRUE'.

           RETURN.

         ENDIF.


      which is used in standard as well. You would have to enhance the getter methods of your UI field, like GET_I_PROJECT_TITLE of class CL_AIC_CMCR_AICCMCRHEADER_CN00 (The context class of the UI component).

      You would need to fill some tables, like AIC_UI_ID and AIC_UI_IDT(which defines the field to the area), so you get the values in the check tables of the view cluster which is used to fill in the values.

      Table AIC_SCEN_FIELDS which needs an entry of the field key itself. These are tables with client field. Table AIC_UI_OBJECTS which is without client and is used for the F4 help when maintaining the roles (I am not quite sure if the is a must-hard-check or just a proposal). I believe that's it,

      best regards,

      Michael

      Author's profile photo John Sullivan
      John Sullivan

      I realize you posted this many years ago but I am looking to do the same thing. I did figure out how to control standard fields in the Details AB and put together a blog for it. If you have any insight for how to generate the GET_I* method for custom fields, I would really appreciate any help you can provide.

      Custom Editability of UI objects dependent on User Status