include program
ZSD_PROFIT_MARGIN_HIDE
********************************** Hide Profit Margin in Sale Order and Invoice **************************************
DATA: auth_subrc LIKE sy-subrc,
ls_pcauth TYPE zsd_promar.
IF screen-name = 'FCODE'.
auth_subrc = 4.
ENDIF.
SELECT SINGLE * FROM zsd_promar
INTO ls_pcauth
WHERE kalsm EQ komk-kalsm
AND stunr EQ komv-stunr.
IF sy-subrc = 0.
AUTHORITY-CHECK OBJECT 'Z_KONH_KLS'
ID 'ZKALSM' FIELD komk-kalsm
ID 'ZSTUNR' FIELD komv-stunr
ID 'ACTVT' DUMMY.
auth_subrc = sy-subrc.
IF auth_subrc NE 0 AND ( screen-name = 'RV61A-SELKZ'
OR screen-name = 'KOMV-KAWRT'
OR screen-name = 'RV61A-AWEIN'
OR screen-name = 'KOMV-KBETR'
OR screen-name = 'RV61A-KOEIN'
OR screen-name = 'KOMV-KPEIN'
OR screen-name = 'KOMV-KMEIN'
OR screen-name = 'KOMV-KWERT'
OR screen-name = 'KOMV-KWERT_K'
OR screen-name = 'KOMV-KUMZA'
OR screen-name = 'RV61A-MEINS'
OR screen-name = 'KOMV-KUMNE'
OR screen-name = 'RV61A-KMEI1').
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDIF.
***************************** End of Profit Margin **********************************************
----------------------------------------------------------------------*
INCLUDE LV69AFZZ .
*----------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Form USEREXIT_FIELD_MODIFIC_LEER
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form userexit_field_modific_leer.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Form USEREXIT_FIELD_MODIFIC_LEER, Start A
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 1 ZSD_PROFIT_MARGIN. "active version
INCLUDE ZSD_PROFIT_MARGIN_HIDE.
ENDENHANCEMENT.
*$*$-End: (1)---------------------------------------------------------------------------------$*$*
endform. " USEREXIT_FIELD_MODIFIC_LEER
*&---------------------------------------------------------------------*
*& Form USEREXIT_FIELD_MODIFIC_KZWI
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form userexit_field_modific_kzwi.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(2) Form USEREXIT_FIELD_MODIFIC_KZWI, Start A
*$*$-Start: (2)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 2 ZSD_PROFIT_MARGIN. "active version
INCLUDE ZSD_PROFIT_MARGIN_HIDE.
ENDENHANCEMENT.
*$*$-End: (2)---------------------------------------------------------------------------------$*$*
endform. " USEREXIT_FIELD_MODIFIC_KZWI
*&---------------------------------------------------------------------*
*& Form USEREXIT_FIELD_MODIFIC_KOPF
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form userexit_field_modific_kopf.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(3) Form USEREXIT_FIELD_MODIFIC_KOPF, Start A
*$*$-Start: (3)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 3 ZSD_PROFIT_MARGIN. "active version
INCLUDE ZSD_PROFIT_MARGIN_HIDE.
ENDENHANCEMENT.
*$*$-End: (3)---------------------------------------------------------------------------------$*$*
endform. " USEREXIT_FIELD_MODIFIC_KOPF
*&---------------------------------------------------------------------*
*& Form USEREXIT_FIELD_MODIFICATION
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form userexit_field_modification.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(4) Form USEREXIT_FIELD_MODIFICATION, Start A
*$*$-Start: (4)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 4 ZSD_PROFIT_MARGIN. "active version
INCLUDE ZSD_PROFIT_MARGIN_HIDE.
ENDENHANCEMENT.
*$*$-End: (4)---------------------------------------------------------------------------------$*$*
endform. " USEREXIT_FIELD_MODIFICATION
*
No comments:
Post a Comment