0% found this document useful (0 votes)
2K views10 pages

How To Hide VPRS Condition Records in SAP

This document provides instructions for hiding VPRS condition records in SAP using ABAP code and user exits. It describes using the LV69AFZZ user exit to conditionally deactivate fields related to the VPRS condition type when editing condition records in transactions VF01, VF02, and VF03. Code examples are provided to modify both header-level and item-level condition records. Before and after screenshots demonstrate the technique.

Uploaded by

Kabil Rocky
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views10 pages

How To Hide VPRS Condition Records in SAP

This document provides instructions for hiding VPRS condition records in SAP using ABAP code and user exits. It describes using the LV69AFZZ user exit to conditionally deactivate fields related to the VPRS condition type when editing condition records in transactions VF01, VF02, and VF03. Code examples are provided to modify both header-level and item-level condition records. Before and after screenshots demonstrate the technique.

Uploaded by

Kabil Rocky
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

How to Hide VPRS Condition Record in SAP.

Transactions Included VF01, VF02, and VF03.


The same
same.

USER EXIT we can use for VA01, VA02, and VA03 also steps are

Using ABAP Code we can achieve this functionality.

USER EXIT: LV69AFZZ.


Go to SE38 Provide program name LV69AFZZ & Click on change.

Now you can find here


FORM userexit_field_modification These Subroutine is for HEADER Level hiding
VPRS or Any Condition type

FORM userexit_field_modific_kopf. These Subroutine is for ITEM Level hiding


VPRS or Any Condition type

First Create Authorization objects as shown below.

FORM userexit_field_modification. I Have included HEADER & Item Screen Fields


to hide VPRS condition types

DATA : dummy TYPE c.


IF sy-tcode = VF01 OR sy-tcode = 'VF02' OR sy-tcode = 'VF03'.

AUTHORITY-CHECK OBJECT 'Z_KONH_KLS'


ID 'ZKALSM' FIELD komk-kalsm
ID 'ZSTUNR' FIELD komv-stunr
ID 'ACTVT' FIELD dummy.

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.

FORM userexit_field_modific_kopf. I Have included HEADER & Item Screen


Fields to hide VPRS condition types

DATA : dummy TYPE c.


IF sy-tcode = VF01 OR sy-tcode = 'VF02' OR sy-tcode = 'VF03'.

AUTHORITY-CHECK OBJECT 'Z_KONH_KLS'


ID 'ZKALSM' FIELD komk-kalsm
ID 'ZSTUNR' FIELD komv-stunr
ID 'ACTVT' FIELD dummy.

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

Before Implementing User Exit for Header


level:
I have been created Billing Document and
showing the cost is included for HEADER
Level

After Implementing User Exit for Header


level:

Before Implementing User Exit for ITEM


level:
I have been created Billing Document and
showing the cost is included for ITEM
Level.

After Implementing User Exit for ITEM


level:
Output

You might also like