How to Hide VPRS Condition Records in SAP

10
How to Hide VPRS Condition Record in SAP. Transactions Included VF01, VF02, and VF03. The same USER EXIT we can use for VA01, VA02, and VA03 also steps are same. 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.

Transcript of How to Hide VPRS Condition Records in SAP

How to Hide VPRS Condition Record in SAP.

Transactions Included VF01, VF02, and VF03.The same USER EXIT we can use for VA01, VA02, and VA03 also steps are same.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 FORMuserexit_field_modification These Subroutine is for HEADER Level hiding VPRS or Any Condition type

FORMuserexit_field_modific_kopf. These Subroutine is for ITEM Level hiding VPRS or Any Condition type

First Create Authorization objects as shown below.

FORMuserexit_field_modification. I Have included HEADER & Item Screen Fields to hide VPRS condition types

DATA:dummyTYPEc.IFsy-tcode=VF01ORsy-tcode='VF02'ORsy-tcode='VF03'.

AUTHORITY-CHECKOBJECT'Z_KONH_KLS'ID'ZKALSM'FIELDkomk-kalsmID'ZSTUNR'FIELDkomv-stunrID'ACTVT'FIELDdummy.

IFsy-subrcNE0.CASEscreen-name.WHEN'KOMV-KWERT'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.WHEN'KOMV-KBETR'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.WHEN'KOMV-KWERT'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.WHEN'KOMV-KWERT_K'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.

WHEN'KOMV-KSCHL'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.

WHEN'T685T-VTEXT'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.

WHEN'XKOMV_WAERK'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.

WHEN'RV61A-LED_KINAK'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.

WHEN'KOMV-KWAEH'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.WHEN'RV61A-KOEIN'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.

WHEN'KOMV-KPEIN'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.

WHEN'KOMV-KMEIN'. IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.

WHEN'KOMV-KUMZA'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.

WHEN'RV61A-MEINS'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.

WHEN'KOMV-KUMNE'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.

WHEN'RV61A-KMEI1'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.

ENDCASE.

ENDIF.

FORMuserexit_field_modific_kopf. I Have included HEADER & Item Screen Fields to hide VPRS condition types

DATA:dummyTYPEc.IFsy-tcode=VF01ORsy-tcode='VF02'ORsy-tcode='VF03'.

AUTHORITY-CHECKOBJECT'Z_KONH_KLS'ID'ZKALSM'FIELDkomk-kalsmID'ZSTUNR'FIELDkomv-stunrID'ACTVT'FIELDdummy.

IFsy-subrcNE0.CASEscreen-name.WHEN'KOMV-KWERT'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.WHEN'KOMV-KBETR'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.WHEN'KOMV-KWERT'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.WHEN'KOMV-KWERT_K'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.

WHEN'KOMV-KSCHL'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.

WHEN'T685T-VTEXT'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.

WHEN'XKOMV_WAERK'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.

WHEN'RV61A-LED_KINAK'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.

WHEN'KOMV-KWAEH'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.WHEN'RV61A-KOEIN'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.

WHEN'KOMV-KPEIN'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.

WHEN'KOMV-KMEIN'. IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.

WHEN'KOMV-KUMZA'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.

WHEN'RV61A-MEINS'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.

WHEN'KOMV-KUMNE'.IFxkomv-kschl='VPRS'.screen-active=0.ENDIF.

WHEN'RV61A-KMEI1'.IFxkomv-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