‎2010 May 19 7:52 AM
Hi all,
When typed co02, we can change the process order.
What i need is that everyuser should not be able to change the values in this transaction.
For some users we want to disable to change the data.
Is there any way to control this fields to seem as display mode? Any exit etc?
Note: after provided process order and entered, you can use F6 to forward for components.
Thanks.
‎2010 May 19 9:49 AM
But I checked in my system (ECC 6.0). It is triggering for CO02 while I gave the order number and press enter (and also in the subsequent screen flow like BOM or routing).
Please check the exit (as well as the include in function module ) is activated properly or not
Regards
Shiba Prasad Dutta
‎2010 May 19 8:23 AM
I have done this sort of requirement in STATTEXT (In SMOD) . (Though the purpose is different for this exit but I was not able to find out any other).
I disabled the BOM and Routing screen based on the user name. You have to modify the code according to your requirement and user names.
SYSTEM_STATUS_LINE_EXP = SYSTEM_STATUS_LINE.
USER_STATUS_LINE_EXP = USER_STATUS_LINE.
IF ( SY-DYNNR = '0100' OR SY-DYNNR = '0120' ) AND ( SY-UNAME = 'PRD01' OR SY-UNAME = 'PRD02' OR SY-UNAME = 'ABAP' )
AND ( SY-TCODE = 'CO02' OR SY-TCODE = 'CO01' ).
*BREAK-POINT.
IF ( SY-UCOMM EQ 'VGUE' OR SY-UCOMM = 'KPU2' ).
FIELD-SYMBOLS : <FT> TYPE ANY,
<FT1> TYPE ANY.
DATA : FIELD(50).
DATA : ITAB1 TYPE RC27S.
DATA : AUFNR TYPE AUFNR,
AUART TYPE AUFART.
UNASSIGN : <FT>,<FT1>.
CLEAR FIELD.
IF SY-UCOMM = 'VGUE'.
MOVE '(SAPLCOVG)RC27S' TO FIELD.
ASSIGN (FIELD) TO <FT>.
IF SY-SUBRC NE 0.
MOVE '(SAPLCOMK)RC27S' TO FIELD.
ASSIGN (FIELD) TO <FT>.
ENDIF.
ELSEIF SY-UCOMM = 'KPU2'.
MOVE '(SAPLCOMK)RC27S' TO FIELD.
ASSIGN (FIELD) TO <FT>.
IF SY-SUBRC NE 0.
MOVE '(SAPLCOVG)RC27S' TO FIELD.
ASSIGN (FIELD) TO <FT>.
ENDIF.
ENDIF.
IF SY-SUBRC = 0.
ITAB1 = <FT>.
CLEAR FIELD.
ITAB1-AKTYP_PIC = 'A'.
ITAB1-AKTYP = 'A'.
ASSIGN ITAB1 TO <FT1>.
<FT> = <FT1>.
ENDIF.
UNASSIGN : <FT1>.
CLEAR : ITAB1.
ENDIF.
ENDIF.
*ENDIF.Regards
Shiba Prasad Dutta
‎2010 May 19 9:15 AM
Thanks Shiba.
When i typed co02, even if i put a breakpoint at the very beginning of exit,
STATTEXT(smod) > EXIT_SAPLBSVA_001 and break point in this f module,
it was not possible to debug this exit.
I have a process order number and tried to see what is happening with code.
I have activeted the exit.
Thanks for replies.
‎2010 May 19 9:49 AM
But I checked in my system (ECC 6.0). It is triggering for CO02 while I gave the order number and press enter (and also in the subsequent screen flow like BOM or routing).
Please check the exit (as well as the include in function module ) is activated properly or not
Regards
Shiba Prasad Dutta
‎2010 May 19 11:15 AM
Shiba, thanks for your helps.
But i forgot to ask important part of this problem, how can i disable input property of screen 0120 when sy-ucomm KPU2?
Is that possible in this exit?
Thanks again.