cancel
Showing results for 
Search instead for 
Did you mean: 

How to set ZMIN-Document read-only

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

richard_pietsch
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hello Richard

unfortunately this does not work. I just experimented with the entries in crm_jest.

The Doc was saved with Userstatus = E0019

Setting the INACT-Field to X for my new Userstatus E0019 and then opening the doc in Web-ui leads to a changed status = "Finished" in the UI.

What i want is, that the document stays unchanged (Read-only) in the Web-UI. So that pressing any of the "Change"-Buttons leads to error-message "Doc. is read-only" same as when the doc is finished or revoked.

I also tried to set the inact-field for the technical "I10..." Status, but this didn't lead to the desired behaviour as well.

But thanks anyhow for the info about the table. Another puzzle-piece for my list.

Kind regards

Rolf

former_member118647
Active Participant
0 Kudos

Hello Rolf,

CRMBS02 --> ZMIN0001 Status --> Double click on your  status for which you want read only.

here I am showing you the eg on confirmed status


Then you have to set the Edit Option


Former Member
0 Kudos

Hello Suhel

Thank you. That does what i wanted. Always missed on this functionality in the statusschema.

Regards

Rolf

Answers (2)

Answers (2)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Hello Robert

Thanks for your input. Just for clarification: Does "No Action" avoid processing in PPF?

Regards

Rolf

Checked it. The Flag has nothing to do with the PPF.

Message was edited by: Rolf Keplinger KWH

Former Member
0 Kudos

Thanks for testing and let us know!