Skip to Content
avatar image
Former Member

How to set ZMIN-Document read-only

Hello

i would like to set a ZMIN-document to read-only after it is saved with a specific user-Status.  (e.g. E0019 --> external processing)

Only a programm using crm_order_maintain should be able to change the status back to E0002

Any help on how to achieve this would be greatly apreciated.

Kind Regards

Rolf

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Mar 02, 2015 at 02:50 PM

    Hi Rolf,

    just an idea... create a action definition which is executed when the document is saved. Within the conditions you check if a specific status is set. If so, set the X flag for the correspondig status in CRM_JEST within a badi implementation. Doing so, the document cannot be processed further.

    Later, you can delete the X flag again and continue processing.

    Regards, RP

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 03, 2015 at 09:00 AM

    Hi Rolf,

    as already proposed by Suhel, you can do it via the Statusprofile of the Incident.Please be Aware that you define the Action within a specific Status as "Forbidden" AND "No Action".

    My recommendation is to copy the confirmed Status and rename it. In this way you make sure that really all functions in the Background of the Status are copied correctly.

    Regards,

    Robert

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 03, 2015 at 03:34 PM

    Hi Rolf,

    you can implement BADI CRM_ORDER_AUTH_CHECK , method CRM_ORDER_ADD_AUTH_CHECK.

    If the ticket is in status E0019, raise exception NO_AUTHORITY.

    To allow your program to change the ticket, create an Z authorization object and check it there. If the authorization is OK, do not raise the exception. Assign the authorization to the user which executes the program.

    Hope this helps,

    Christoph

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Christoph

      Thanks for your comment.

      The following Code :

      ...

      p_st_neu  = 'E0002' .

      CALL FUNCTION 'CRM_STATUS_CHANGE_EXTERN'
               EXPORTING
                 objnr               = i_header-guid   " CRM-Doc-Guid goes here
                 user_status         = p_st_neu
                 no_check            = 'X' .

      ...

      changes the Userstatus back even when statusschema (see Suhels Post)  forbids changes to the document.


      So my scenario is now working fine.


      The Badi you mention is helpful for implementing additional Auth-Checks though.


      Regards

      Rolf