2006 Jun 27 12:19 PM
Hi,
I am a business analyst with few ABAP experience(...) and kinda stuck with following SD (sales & distribution) issue :
Users with a certain user-role must only be able to change the field "FPLT-FAKSP" (billing block) in the billing plan. All the changes in other fields are prohibited.
I thought on using following user-exits and codes
<u>in include MV45AFZZ</u>
<b>form userexit_move_field_to_vbap.</b>
IF NOT YVBAP[]IS INITIAL.
Errormessage
ENDIF.
<b>endform.</b> <i>"From the moment YVBAP has a value you know something has changed.</i>
<b>form userexit_move_field_to_vbep.</b>
IF NOT YVBEP[]IS INITIAL.
Errormessage
ENDIF.
<b>endform.</b>
<b>form userexit_move_field_to_vbkd.</b>
IF NOT YVBKD[]IS INITIAL.
Errormessage
ENDIF.
<b>endform.</b>
<b>form userexit_move_field_to_vbak.</b>
<i>Here i am stuck :Should there be a loop that compares xvbak with yvbak, and if yes how should the code look like ?</i><b>endform.</b>
<u>in include RV60FUS1</u>
FORM USEREXIT_MOVE_FIELD_TO_FPLA.
IF NOT YFPLA[] IS INITIAL
Errormessage
ENDIF.
ENDFORM.
FORM USEREXIT_MOVE_FIELD_TO_FPLA.
stuck here to, i could say :
IF YFPLT-FAKSP is INITIAL
Errormessage
ENDIF
--> But if the user changes second time he can change whatever he wants.
ENDFORM.
Any remarks, ideas on this ?
with regards
2006 Jun 28 1:39 AM
You can try something like this
Program MV45AFZZ
FORM userexit_field_modification.
IF screen-name = 'VBAK-FAKSK'.
if sy-tcode = 'VA02' or
sy-tcode = 'VA01'.
IF vbak-faksk = 'Z1' OR
vbak-faksk = 'Y1' OR
vbak-faksk = 'Y2'.
screen-input = 0.
ENDIF.
Endif.
endif.
ENDFORM.
Hi,
I am a business analyst with few ABAP experience(...) and kinda stuck with following SD (sales & distribution) issue :
Users with a certain user-role must only be able to change the field "FPLT-FAKSP" (billing block) in the billing plan. All the changes in other fields are prohibited.
I thought on using following user-exits and codes
<u>in include MV45AFZZ</u>
<b>form userexit_move_field_to_vbap.</b>
IF NOT YVBAP[]IS INITIAL.
Errormessage
ENDIF.
<b>endform.</b> <i>"From the moment YVBAP has a value you know something has changed.</i>
<b>form userexit_move_field_to_vbep.</b>
IF NOT YVBEP[]IS INITIAL.
Errormessage
ENDIF.
<b>endform.</b>
<b>form userexit_move_field_to_vbkd.</b>
IF NOT YVBKD[]IS INITIAL.
Errormessage
ENDIF.
<b>endform.</b>
<b>form userexit_move_field_to_vbak.</b>
<i>Here i am stuck :Should there be a loop that compares xvbak with yvbak, and if yes how should the code look like ?</i><b>endform.</b>
<u>in include RV60FUS1</u>
FORM USEREXIT_MOVE_FIELD_TO_FPLA.
IF NOT YFPLA[] IS INITIAL
Errormessage
ENDIF.
ENDFORM.
FORM USEREXIT_MOVE_FIELD_TO_FPLA.
stuck here to, i could say :
IF YFPLT-FAKSP is INITIAL
Errormessage
ENDIF
--> But if the user changes second time he can change whatever he wants.
ENDFORM.
Any remarks, ideas on this ?
with regards
2006 Jun 28 1:39 AM
You can try something like this
Program MV45AFZZ
FORM userexit_field_modification.
IF screen-name = 'VBAK-FAKSK'.
if sy-tcode = 'VA02' or
sy-tcode = 'VA01'.
IF vbak-faksk = 'Z1' OR
vbak-faksk = 'Y1' OR
vbak-faksk = 'Y2'.
screen-input = 0.
ENDIF.
Endif.
endif.
ENDFORM.