Hide Vprs
Hide Vprs
Hide Vprs
Record in SAP
Dear Friends,
Client Requirement :
I came across a requirement once in my company . I thought I should share some points
which we need to consider achieving this requirement. Although some points have already
been discussed in many threads for different requirements . There is an SAP note 105621.
All process has been described step by step in this note.
Just I am sharing the piece of code that i have hided VPRS condition at header & Item
level .
Run Tcode SU21 and Click on this icon and select Authorization Object
Enter object name, text, class and field names. Field ACTVT is not necessary. I have added in screenshot but
you can create without this field too. It works fine without this field. Only add two fields ZKALSM and
ZSTUNR.
EXIT we can use for VA01, VA02, and VA03 also steps are
Go to SE38
Provide
I Have included HEADER & Item Screen Fields to hide VPRS condition types here.
IF sy-subrc NE 0.
CASE screen-name.
WHEN 'KOMV-KWERT'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'KOMV-KBETR'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'KOMV-KWERT'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'KOMV-KWERT_K'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'KOMV-KSCHL'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'T685T-VTEXT'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'XKOMV_WAERK'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'RV61A-LED_KINAK'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'KOMV-KWAEH'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'RV61A-KOEIN'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'KOMV-KPEIN'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'KOMV-KMEIN'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'KOMV-KUMZA'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'RV61A-MEINS'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'KOMV-KUMNE'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'RV61A-KMEI1'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
ENDCASE.
ENDIF.
ENDFORM.
FORM userexit_field_modification. These Subroutine is for Item Level hiding VPRS or Any
Condition type
*I Have included HEADER & Item Screen Fields to hide VPRS condition types
IF sy-subrc NE 0.
CASE screen-name.
WHEN 'KOMV-KWERT'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'KOMV-KBETR'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'KOMV-KWERT'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'KOMV-KWERT_K'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'KOMV-KSCHL'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'T685T-VTEXT'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'XKOMV_WAERK'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'RV61A-LED_KINAK'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'KOMV-KWAEH'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'RV61A-KOEIN'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'KOMV-KPEIN'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'KOMV-KMEIN'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'KOMV-KUMZA'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'RV61A-MEINS'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'KOMV-KUMNE'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
WHEN 'RV61A-KMEI1'.
IF xkomv-kschl = 'VPRS'.
screen-active = 0.
ENDIF.
ENDCASE.
ENDIF.