cancel
Showing results for 
Search instead for 
Did you mean: 

Document Status for different business requirements

Former Member
0 Kudos

Hi,

I have a requirement where

-Unless a document is not having a particular status the originals cannot be chechked-in and

-Another status without which the document cannot be linked to any object.

Please let me know how to achieve this.

Thanks and Regards

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member188883
Active Contributor
0 Kudos

Hi ,

You may try these controls with help of authorization objects in SAP DMS.

Authorization Object C_DRAW_TCS (Status Dependent Authorization)

The following table shows authorization object C_DRAW_TCS. This object controls which users can process which document info records, based on a combination of activity, document type, and status.

Fields Possible Values Description

ACTVT (Activity) 01 02 03 06 Choose: Create Change Display Delete

DOKAR (Document type) The activities can be executed for the document type.

STATUS (Document status)

Authorization Object C_DRAW_STA (Document Status)

The following table shows authorization object C_DRAW_STA. This object controls which status(es) can be set for which document type.

Fields Description

DOKAR (Document type)

DOKST (Document status) The statuses are allowed for this document type.

For other Authorization objects refer link

http://wiki.sdn.sap.com/wiki/display/PLM/AuthorizationObjectsin+DMS

Regards,

Deepak Kori

Former Member
0 Kudos

Hi Deepak,

Thanks for your prompt response.

One query- from the authorization perspective how do we differentiate between the two different activity types- check in and linking the document to some SAP object like WBS element,PR,PO etc.

Thanks and Regards

former_member188883
Active Contributor
0 Kudos

Hi ,

For checkin , you may control it based on status . For eg

You may define a status REL for released. In Define status you need to ensure that for performing check-in your document should have status REL else check-in may not happen. This is purely configuration of status netwok which can be done in Define status for a document type.

Similar approach can be managed using some program exits for allowing objects links only after document has been approved.

For eg. You may enable object link tab only when document status if Approved.

Authorization shall play role on restriction with respect to particular document type and status .

Regards,

Deepak Kori

Former Member
0 Kudos

Thanks a lot Deepak. In fact i am stuck up at that point only.In the configuration of the document status i see that there is a check box called 'Check-in Required'. But that check box implies that a particular status can only be set when all the files have been checked-in.But what i need is the other way round-that is if the status is say XY then check-in should not be allowed.

I do not know how to achieve this.

Thanks and Regards

former_member188883
Active Contributor
0 Kudos

Hi,

You need to implement BADI DOCUMENT_STATUS01. Using this you check upon particular status and control the action.

You shall need an abaper to perform those changes.

Regards,

Deepak Kori

MangeshP
Active Contributor
0 Kudos

Dear B.P.Singh,

You can use Authorization Object C_DRAW_TCS for this.

Suppose User1 and User2 are reponsible for Status "CR-Create" & "CK-Check" for a DIR.

User1 will be able to change DIR in CR status.

ACTVT:- 01, 02, 03 , 06

DOKAR:- DWG

STatus:- CR

User 2 will not be able change the DIR in CK status.

ACTVT:- 03

DOKAR:- DWG

STatus:- CK.

So User2 will be able to only diplay file or attach file or make any changes.

The only thing which I see is that if you want restrict someone who has change right but not checkin the file then you will have to think of enhancement.

With Warm Regards

Mangesh Pande

MangeshP
Active Contributor
0 Kudos

Dear B.P.Singh,

Use the BADI "DOCUMENT_AUTH01" for this will not allow user to checkin the file in change state. We implemented this BADI for not allowing user to delete the file even in chane mode.

With Regards

Mangesh Pande

MangeshP
Active Contributor
0 Kudos

Dear B.P.Singh,

Use BADI_DOCUMENT_MAIN02 and not AUTH01.

Please check the code..

Method implemented : D101_BEFORE_PAI

Code:

method IF_EX_DOCUMENT_MAIN02~D101_BEFORE_PAI.

if okcode = 'F_DELETE' or okcode = 'CF_DELETE' .

message e000(8i) with 'You can not delete file'.

endif.

if okcode = 'CF_CHANGE' or okcode = 'F_CHANGE'.

message e000(8i) with 'You can not edit file'.

endif.

endmethod.

With Warm Regards

Mangesh Pande

Edited by: MANGESH PANDE on Mar 7, 2012 10:00 AM