SAP OSS Notes

379269 SAP OSS Note - Preference in SD doc: User exit: Set pref. indicator PREFE




SAP OSS Note 379269 version 0025 contains details of a know issue related to Preference in SD doc: User exit: Set pref. indicator PREFE. This includes any associated symptoms and instructions on how to fix it, see below for full details. Also check out the comments section to view/add related contributions, questions or screen shots, based on real life experience of this oss note and problem.

...For more information about the SAP support system known as OSS please check out the SAP OSS Notes section, which includes how to download and implement them onto your SAP system using transaction code SNOTE.

Note 379269 Details:



When does this problem occur

As part of the preference processing in the SD document (order, billing
document), the preference indicator (VBAP-PREFE, VBRP-PREFE) is set in
the preference determination.
This takes place within pricing in the above SD documents by comparing
the ex works price (VBAP-NETWR, WBRP-NETWR) with the preference
threshold price, which is set in the condition type PREF as part of
preference determination.
So that the preference indicator is set, the ex works price must be
higher than or equal to the preference threshold price.
For certain business transactions (for free-of-charge deliveries, for
example), the ex works price may not be filled, or this condition may
not be not fulfilled or may have to be replaced by other conditions or
logic.
After you implement this note, you can also fill the preference
indicator (VBAP-PREFE, VBRP-PREFE) in the SD document by means of a user
exit or, as of Basis Release 7.0, by means of a BAdI, in which you can
then implement your own conditions.
For this, all of the information from the communication work areas of
pricing is available to you:
  • KOMK - Pricing Communication Header
  • KOMP - Pricing Communication Item

In addition, the information from the billing item VBRP is available to
you in the billing document.

Description of problem

Preference processing
Customs tariff preferences
Comparison: Ex works price <(><<)>> preference threshold price
(preference price)
Preference determination in the SD document
VA01, VA02
VF01, VF02
VBAP-PREFE, VBRP-PREFE
SAPLPREF
Function module PREFERENCE_DETERMINE_SD

Cause of the problem and Pre-requisites

This is an advance function. The function was previously not provided.

Solution instructions

Implement the source code corrections as described in the correction
instructions. Save your changes and regenerate the programs SAPFV45P,
SAPMV45A, SAPLV60A und SAPLPREF (transaction SE38). Before this,
you must carry out the following steps. Make sure that you choose the
correct Basis Release.
  • All releases

  • You must add four import parameters to the interface of the function
    module PREFERENCE_DETERMINE_SD.
    Transaction: SE37
    Function module: PREFERENCE_DETERMINE_SD
    Choose "Change" and go to the IMPORT parameters:
    Situation BEFORE the change:
    Parameter name Type spec Assoc Type Default Value Opt Value
    ----------------------------------------------------------------------
    I_DEPARTURE_COUNTRY LIKE KOMK-ALAND ' ' x x
    ... ... ... ... ... ...
    I_NET_VALUE LIKE KOMP-NETWR '0.00' x x
    Situation AFTER the change:
    Parameter name Type spec Assoc Type Default Value Opt Value
    ----------------------------------------------------------------------
    I_DEPARTURE_COUNTRY LIKE KOMK-ALAND ' ' x x
    ... ... ... ... ... ...
    I_NET_VALUE LIKE KOMP-NETWR '0.00' x x I_S
    _XVBRP LIKE VBRPVB x x I_S_VBRP
    LIKE VBRP x x I_S_KOMK
    LIKE KOMK x x I_S_KOMP
    LIKE KOMP x x
    Save
    your changes and generate the function group SAPLPREF (transaction
    SE38).
    Make sure that the source code is adjusted accordingly for all
    callpoints of the function module PREFERENCE_DETERMINE_SD and that the
    new parameters mentioned above are provided with data in the context.
    The callpoints are traceable via the where-used list.

  • Basis Release earlier than 620

You must include the new function module exit EXIT_SAPLPREF_003 in the
SAP enhancement project MVEIPREF.
Call transaction SMOD and enter MVEIPREF as the enhancement.
Select "Components" and choose "Change".
On the next screen, enter the function module EXIT_SAPLPREF_003 under
"Function module exits". Position the cursor on the entry EXIT
_SAPLPREF_003 and choose "Edit --> Choose".
In the following dialog box, enter the following: Function module:
EXIT_SAPLPREF_003
Function group: XMF1
Short text: Customer enhancement: Set preference indicator in
SD document
Confirm and save your entries.
Call transaction SE37 and add three IMPORT parameters and one CHANGING
parameter to the new function module EXIT_SAPLPREF_003.
Choose "Change" and go to the
IMPORT parameters:
Situation
after the change: ============================
Parameter name Type spec Assoc Type
Default Value Opt
---------------------------------------------------------- I_S_VBRP
LIKE VBRP SPACE x I_S_KOMK
LIKE KOMK ' ' I_S_KOMP
LIKE KOMP ' '
Caut
ion:
The "Associated Type" column in Releases 4.0 and 4.5 is the same as
"Reference field/structure".
Go to the
CHANGING parameters:
Situation
after the change: ============================
Parameter name Type spec Assoc Type
Default Value Opt --------------------
----------------------------------------- C_PREFERENCE_INDICATOR LIKE
VBAP-PREFE ' '
Ca
ution:
The "Associated Type" column in Releases 4.0 and 4.5 is the same as
"Reference field/structure".
Save your changes and generate the function group SAPLXMF1 (transaction
SE38).

  • Basis Release 6.20 or 6.40
    For
    this, you must implement a BAdI instead of a user exit.

  • Call transaction SE18 to start the "BAdI Builder: Initial Screen for
    Definitions".
    Enter PREFERENCE as the BadI description and choose "Create".
    Enter "Preference" as the short text for the definition. Transfer and
    save your entry. Assign the object to the package VEI.
    Switch to the "Interface" tab page and double-click the interface name
    IF_EX_PREFERENCE.
    You should now be in the function "Class Builder: Change Interface" on
    the "Methods" tab page.
    Enter the new method PREFERENCE_DETERMINE with the description
    "Determine preference indicator". Select the new entry. Choose
    "Parameters"' to switch to parameter maintenance for the method.
    Maintain the following parameters for the method PREFERENCE_DETERMINE:

Parameter,,,,,,,,Type,,,,,,P.,,Op. Typ. ,,Ass. Type
----------------------------------------------------------------
I_S_VBRP,,,,,,,,,,Importing,,' ' 'X',,Type,,,,VBRP,,,,
I_S_KOMK,,,,,,,,,,Importing,,' ' ' ' Type,,,,KOMK
I_S_KOMP,,,,,,,,,,Importing,,' ' ' ' Type,,,,KOMP
C_PREFERENCE_INDICATOR,,Changing ,,' ' ' ' Type VBAP-PREFE,, ,,

Save your entries and activate the objects.

Refer to the documentation for further information about creating,
editing, and deleting enhancement implementations.
  • Basis Release higher than 640 or Release 7.0 of the SAP NetWeaver
    Application Server ABAP (SAP NetWeaver 2004s). For this, you must
    implement a BAdI using an enhancement spot. To do this, proceed as
    follows:

  • Call transaction SE18 to start the "BAdI Builder: Initial Screen for
    Definitions".
    Select "Enhancement Spot", enter ES_PREFERENCE as the description, and
    choose "Create".
    As the short text, maintain "Enhancement Spot: Preference". The field
    "Composite Enhancement Spot" remains empty. Transfer the entry and
    assign the object to the package VEI. Save your entries.
    You should now be in the function "Change Enhancement Spot".
    On the "Enhancement Spot Element Definitions" tab page, choose "Create
    BAdI". Enter PREFERENCE_DETERMINE_SD as the name and enter "Determine
    preference indicator" as the short text. Transfer your entries.
    In the BAdI definition on the left, expand the tree and call the data
    view for the interface.
    Maintain the value IF_PREFERENCE_DETERMINE_SD for the interface.
    Transfer the entry and assign the object to the package VEI.
    You should now be in the function "Class Builder: Change Interface" on
    the "Methods" tab page.
    Enter the new method PREFERENCE_DETERMINE with the description
    "Determine preference indicator".
    Select the new entry. Choose "Parameters"' to switch to parameter
    maintenance for the method.
    Maintain the following parameters for the method METHODE_1:
Parameter,,,,,,,,Type,,,,,,P.,,Op. Typ. ,,Ass. Type
----------------------------------------------------------------
I_S_VBRP,,,,,,,,,,Importing,,' ' 'X',,Type,,VBRP,,
I_S_KOMK,,,,,,,,,,Importing,,' ' ' ' Type,,KOMK
I_S_KOMP,,,,,,,,,,Importing,,' ' ' ' Type,,KOMP
C_PREFERENCE_INDICATOR,,Changing,,' ' ' ' Type,,VBAP-PREFE

Save your entries and activate the objects.

Refer to the documentation for further information about creating,
editing, and deleting enhancement implementations.




NOTE: Only source text changes are displayed here

*$*$----------------------------------------------------------------$*$*
*$ CORRECTION INSTRUCTIONS 0120031469 0000427716 $*
*$--------------------------------------------------------------------$*
*$ VALID FOR : $*
*$ Software Component SAP_APPL SAP Application $*
*$ Release 600 From SAPKH60001 $*
*$ Release 602 All Support Package Levels $*
*$ Release 603 All Support Package Levels $*
*$ Release 604 From SAPKH60401 $*
*$ Release 605 All Support Package Levels $*
*$ Release 606 From SAPKH60601 $*
*$ Release 616 All Support Package Levels $*
*$ Release 617 All Support Package Levels $*
*$*$----------------------------------------------------------------$*$*
*&---------------------------------------------------------------------*
*& Object FUNC PREFERENCE_DETERMINE_SD
*& Object header FUGR PREF
*&---------------------------------------------------------------------*
*& FUNCTION PREFERENCE_DETERMINE_SD
*&---------------------------------------------------------------------*
...
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(I_DEPARTURE_COUNTRY) LIKE KOMK-ALAND
*" DEFAULT ' '
*" VALUE(I_DESTINATION_COUNTRY) LIKE KOMK-LAND1
*" DEFAULT ' '
*" VALUE(I_PREFERENCE_ZONE) LIKE KOMK-GZOLX
*" DEFAULT ' '
*" VALUE(I_MATERIAL_NUMBER) LIKE KOMP-MATNR
*" VALUE(I_PLANT) LIKE KOMP-WERKS
*" VALUE(I_PREFERENCE_VALUE) LIKE KOMP-PREVA
*" DEFAULT '0.00'
*" VALUE(I_NET_VALUE) LIKE KOMP-NETWR DEFAULT '0.00'
*" CHANGING
*" VALUE(C_PREFERENCE_INDICATOR) LIKE VBAP-PREFE
*"----------------------------------------------------------------------
*>>>> START OF DELETION <<<<<

*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
DATA: li_badi TYPE REF TO PREFERENCE_DETERMINE_SD.
DATA: gs_vbrp like vbrp.
DATA: gs_komk like komk.

gs_vbrp = I_S_VBRP.
gs_komk = I_S_KOMK.

*>>>> END OF INSERTION <<<<<<
...
ENDIF.
WHEN OTHERS.
CLEAR: C_PREFERENCE_INDICATOR.

ENDCASE.

ENDIF.
*>>>> START OF DELETION <<<<<

*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<

*------- Versorgen bestimmter Felder
if ( GS_VBRP-VBELN is initial ) .
GS_VBRP = I_S_XVBRP.
endif.
if ( GS_KOMK-gzolx is initial ).
GS_KOMK-gzolx = I_PREFERENCE_ZONE.
endif.

GET BADI li_badi.

CALL BADI li_badi->preference_determine
EXPORTING
i_s_vbrp = gs_vbrp
i_s_komk = gs_komk
i_s_komp = i_s_komp
CHANGING
c_preference_indicator = c_preference_indicator.

*>>>> END OF INSERTION <<<<<<
...
*&---------------------------------------------------------------------*

NOTE: Only source text changes are displayed here

*$*$----------------------------------------------------------------$*$*
*$ CORRECTION INSTRUCTIONS 0120031469 0000427716 $*
*$--------------------------------------------------------------------$*
*$ VALID FOR : $*
*$ Software Component SAP_APPL SAP Application $*
*$ Release 600 From SAPKH60001 $*
*$ Release 602 All Support Package Levels $*
*$ Release 603 All Support Package Levels $*
*$ Release 604 From SAPKH60401 $*
*$ Release 605 All Support Package Levels $*
*$ Release 606 From SAPKH60601 $*
*$ Release 616 All Support Package Levels $*
*$ Release 617 All Support Package Levels $*
*$*$----------------------------------------------------------------$*$*
*&---------------------------------------------------------------------*
*& Object FUNC PREFERENCE_DETERMINE_SD
*& Object header FUGR PREF
*&---------------------------------------------------------------------*
*& FUNCTION PREFERENCE_DETERMINE_SD
*&---------------------------------------------------------------------*
...
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(I_DEPARTURE_COUNTRY) LIKE KOMK-ALAND
*" DEFAULT ' '
*" VALUE(I_DESTINATION_COUNTRY) LIKE KOMK-LAND1
*" DEFAULT ' '
*" VALUE(I_PREFERENCE_ZONE) LIKE KOMK-GZOLX
*" DEFAULT ' '
*" VALUE(I_MATERIAL_NUMBER) LIKE KOMP-MATNR
*" VALUE(I_PLANT) LIKE KOMP-WERKS
*" VALUE(I_PREFERENCE_VALUE) LIKE KOMP-PREVA
*" DEFAULT '0.00'
*" VALUE(I_NET_VALUE) LIKE KOMP-NETWR DEFAULT '0.00'
*" CHANGING
*" VALUE(C_PREFERENCE_INDICATOR) LIKE VBAP-PREFE
*"----------------------------------------------------------------------
*>>>> START OF DELETION <<<<<

*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
DATA: li_badi TYPE REF TO PREFERENCE_DETERMINE_SD.
DATA: gs_vbrp like vbrp.
DATA: gs_komk like komk.

gs_vbrp = I_S_VBRP.
gs_komk = I_S_KOMK.

*>>>> END OF INSERTION <<<<<<
...
ENDIF.
WHEN OTHERS.
CLEAR: C_PREFERENCE_INDICATOR.

ENDCASE.

ENDIF.
*>>>> START OF DELETION <<<<<

*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<

*------- Versorgen bestimmter Felder
if ( GS_VBRP-VBELN is initial ) .
GS_VBRP = I_S_XVBRP.
endif.
if ( GS_KOMK-gzolx is initial ).
GS_KOMK-gzolx = I_PREFERENCE_ZONE.
endif.

GET BADI li_badi.

CALL BADI li_badi->preference_determine
EXPORTING
i_s_vbrp = gs_vbrp
i_s_komk = gs_komk
i_s_komp = i_s_komp
CHANGING
c_preference_indicator = c_preference_indicator.

*>>>> END OF INSERTION <<<<<<
...
*&---------------------------------------------------------------------*

NOTE: Only source text changes are displayed here

*$*$----------------------------------------------------------------$*$*
*$ CORRECTION INSTRUCTIONS 0120031469 0000428336 $*
*$ Prerequisite corr. inst. 0120061532 0000368997 Note 0000497116 $*
*$--------------------------------------------------------------------$*
*$ VALID FOR : $*
*$ Software Component SAP_APPL SAP Application $*
*$ Release 470 All Support Package Levels $*
*$ Release 500 All Support Package Levels $*
*$*$----------------------------------------------------------------$*$*
*&---------------------------------------------------------------------*
*& Object FUNC PREFERENCE_DETERMINE_SD
*& Object header FUGR PREF
*&---------------------------------------------------------------------*
*& FUNCTION PREFERENCE_DETERMINE_SD
*&---------------------------------------------------------------------*
...
FUNCTION PREFERENCE_DETERMINE_SD.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(I_DEPARTURE_COUNTRY) LIKE KOMK-ALAND DEFAULT ' '
*" VALUE(I_DESTINATION_COUNTRY) LIKE KOMK-LAND1 DEFAULT ' '
*" VALUE(I_PREFERENCE_ZONE) LIKE KOMK-GZOLX DEFAULT ' '
*" VALUE(I_MATERIAL_NUMBER) LIKE KOMP-MATNR
*" VALUE(I_PLANT) LIKE KOMP-WERKS
*" VALUE(I_PREFERENCE_VALUE) LIKE KOMP-PREVA DEFAULT '0.00'
*" VALUE(I_NET_VALUE) LIKE KOMP-NETWR DEFAULT '0.00'
*" REFERENCE(I_S_XVBRP) LIKE VBRPVB STRUCTURE VBRPVB OPTIONAL
*" REFERENCE(I_S_VBRP) LIKE VBRP STRUCTURE VBRP OPTIONAL
*" REFERENCE(I_S_KOMK) LIKE KOMK STRUCTURE KOMK OPTIONAL
*" REFERENCE(I_S_KOMP) LIKE KOMP STRUCTURE KOMP OPTIONAL
*" CHANGING
*" VALUE(C_PREFERENCE_INDICATOR) LIKE VBAP-PREFE
*"----------------------------------------------------------------------
*>>>> START OF DELETION <<<<<

*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
DATA: LV_BADI_ACTIVE_IMPL TYPE C.
DATA: LI_BADI TYPE REF TO IF_EX_PREFERENCE.
DATA: gs_vbrp like vbrp.
DATA: gs_komk like komk.

gs_vbrp = I_S_VBRP.
gs_komk = I_S_KOMK.

*>>>> END OF INSERTION <<<<<<
...
WHEN OTHERS.
CLEAR: C_PREFERENCE_INDICATOR.

ENDCASE.

ENDIF.
*>>>> START OF DELETION <<<<<

*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
* Versorgen bestimmter Felder
if ( GS_VBRP-VBELN is initial ) .
GS_VBRP = I_S_XVBRP.
endif.
if ( GS_KOMK-gzolx is initial ).
GS_KOMK-gzolx = I_PREFERENCE_ZONE.
endif.

* Status BADI bestimmen
CALL METHOD CL_EXITHANDLER=>GET_INSTANCE
EXPORTING
EXIT_NAME = 'PREFERENCE'
NULL_INSTANCE_ACCEPTED = 'X'
IMPORTING
ACT_IMP_EXISTING = LV_BADI_ACTIVE_IMPL
CHANGING
INSTANCE = LI_BADI.

* BADI aktiv
IF ( NOT ( LV_BADI_ACTIVE_IMPL IS INITIAL ) ).
CALL METHOD LI_BADI->PREFERENCE_DETERMINE
EXPORTING
I_S_VBRP = GS_VBRP
I_S_KOMK = GS_KOMK
I_S_KOMP = I_S_KOMP
CHANGING
C_PREFERENCE_INDICATOR = C_PREFERENCE_INDICATOR.
ENDIF.

*>>>> END OF INSERTION <<<<<<
...
*&---------------------------------------------------------------------*

NOTE: Only source text changes are displayed here

*$*$----------------------------------------------------------------$*$*
*$ CORRECTION INSTRUCTIONS 0120031469 0000427716 $*
*$--------------------------------------------------------------------$*
*$ VALID FOR : $*
*$ Software Component SAP_APPL SAP Application $*
*$ Release 600 From SAPKH60001 $*
*$ Release 602 All Support Package Levels $*
*$ Release 603 All Support Package Levels $*
*$ Release 604 From SAPKH60401 $*
*$ Release 605 All Support Package Levels $*
*$ Release 606 From SAPKH60601 $*
*$ Release 616 All Support Package Levels $*
*$ Release 617 All Support Package Levels $*
*$*$----------------------------------------------------------------$*$*
*&---------------------------------------------------------------------*
*& Object FUNC PREFERENCE_DETERMINE_SD
*& Object header FUGR PREF
*&---------------------------------------------------------------------*
*& FUNCTION PREFERENCE_DETERMINE_SD
*&---------------------------------------------------------------------*
...
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(I_DEPARTURE_COUNTRY) LIKE KOMK-ALAND
*" DEFAULT ' '
*" VALUE(I_DESTINATION_COUNTRY) LIKE KOMK-LAND1
*" DEFAULT ' '
*" VALUE(I_PREFERENCE_ZONE) LIKE KOMK-GZOLX
*" DEFAULT ' '
*" VALUE(I_MATERIAL_NUMBER) LIKE KOMP-MATNR
*" VALUE(I_PLANT) LIKE KOMP-WERKS
*" VALUE(I_PREFERENCE_VALUE) LIKE KOMP-PREVA
*" DEFAULT '0.00'
*" VALUE(I_NET_VALUE) LIKE KOMP-NETWR DEFAULT '0.00'
*" CHANGING
*" VALUE(C_PREFERENCE_INDICATOR) LIKE VBAP-PREFE
*"----------------------------------------------------------------------
*>>>> START OF DELETION <<<<<

*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
DATA: li_badi TYPE REF TO PREFERENCE_DETERMINE_SD.
DATA: gs_vbrp like vbrp.
DATA: gs_komk like komk.

gs_vbrp = I_S_VBRP.
gs_komk = I_S_KOMK.

*>>>> END OF INSERTION <<<<<<
...
ENDIF.
WHEN OTHERS.
CLEAR: C_PREFERENCE_INDICATOR.

ENDCASE.

ENDIF.
*>>>> START OF DELETION <<<<<

*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<

*------- Versorgen bestimmter Felder
if ( GS_VBRP-VBELN is initial ) .
GS_VBRP = I_S_XVBRP.
endif.
if ( GS_KOMK-gzolx is initial ).
GS_KOMK-gzolx = I_PREFERENCE_ZONE.
endif.

GET BADI li_badi.

CALL BADI li_badi->preference_determine
EXPORTING
i_s_vbrp = gs_vbrp
i_s_komk = gs_komk
i_s_komp = i_s_komp
CHANGING
c_preference_indicator = c_preference_indicator.

*>>>> END OF INSERTION <<<<<<
...
*&---------------------------------------------------------------------*

NOTE: Only source text changes are displayed here

*$*$----------------------------------------------------------------$*$*
*$ CORRECTION INSTRUCTIONS 0120031469 0000428336 $*
*$ Prerequisite corr. inst. 0120061532 0000368997 Note 0000497116 $*
*$--------------------------------------------------------------------$*
*$ VALID FOR : $*
*$ Software Component SAP_APPL SAP Application $*
*$ Release 470 All Support Package Levels $*
*$ Release 500 All Support Package Levels $*
*$*$----------------------------------------------------------------$*$*
*&---------------------------------------------------------------------*
*& Object FUNC PREFERENCE_DETERMINE_SD
*& Object header FUGR PREF
*&---------------------------------------------------------------------*
*& FUNCTION PREFERENCE_DETERMINE_SD
*&---------------------------------------------------------------------*
...
FUNCTION PREFERENCE_DETERMINE_SD.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(I_DEPARTURE_COUNTRY) LIKE KOMK-ALAND DEFAULT ' '
*" VALUE(I_DESTINATION_COUNTRY) LIKE KOMK-LAND1 DEFAULT ' '
*" VALUE(I_PREFERENCE_ZONE) LIKE KOMK-GZOLX DEFAULT ' '
*" VALUE(I_MATERIAL_NUMBER) LIKE KOMP-MATNR
*" VALUE(I_PLANT) LIKE KOMP-WERKS
*" VALUE(I_PREFERENCE_VALUE) LIKE KOMP-PREVA DEFAULT '0.00'
*" VALUE(I_NET_VALUE) LIKE KOMP-NETWR DEFAULT '0.00'
*" REFERENCE(I_S_XVBRP) LIKE VBRPVB STRUCTURE VBRPVB OPTIONAL
*" REFERENCE(I_S_VBRP) LIKE VBRP STRUCTURE VBRP OPTIONAL
*" REFERENCE(I_S_KOMK) LIKE KOMK STRUCTURE KOMK OPTIONAL
*" REFERENCE(I_S_KOMP) LIKE KOMP STRUCTURE KOMP OPTIONAL
*" CHANGING
*" VALUE(C_PREFERENCE_INDICATOR) LIKE VBAP-PREFE
*"----------------------------------------------------------------------
*>>>> START OF DELETION <<<<<

*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
DATA: LV_BADI_ACTIVE_IMPL TYPE C.
DATA: LI_BADI TYPE REF TO IF_EX_PREFERENCE.
DATA: gs_vbrp like vbrp.
DATA: gs_komk like komk.

gs_vbrp = I_S_VBRP.
gs_komk = I_S_KOMK.

*>>>> END OF INSERTION <<<<<<
...
WHEN OTHERS.
CLEAR: C_PREFERENCE_INDICATOR.

ENDCASE.

ENDIF.
*>>>> START OF DELETION <<<<<

*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
* Versorgen bestimmter Felder
if ( GS_VBRP-VBELN is initial ) .
GS_VBRP = I_S_XVBRP.
endif.
if ( GS_KOMK-gzolx is initial ).
GS_KOMK-gzolx = I_PREFERENCE_ZONE.
endif.

* Status BADI bestimmen
CALL METHOD CL_EXITHANDLER=>GET_INSTANCE
EXPORTING
EXIT_NAME = 'PREFERENCE'
NULL_INSTANCE_ACCEPTED = 'X'
IMPORTING
ACT_IMP_EXISTING = LV_BADI_ACTIVE_IMPL
CHANGING
INSTANCE = LI_BADI.

* BADI aktiv
IF ( NOT ( LV_BADI_ACTIVE_IMPL IS INITIAL ) ).
CALL METHOD LI_BADI->PREFERENCE_DETERMINE
EXPORTING
I_S_VBRP = GS_VBRP
I_S_KOMK = GS_KOMK
I_S_KOMP = I_S_KOMP
CHANGING
C_PREFERENCE_INDICATOR = C_PREFERENCE_INDICATOR.
ENDIF.

*>>>> END OF INSERTION <<<<<<
...
*&---------------------------------------------------------------------*

NOTE: Only source text changes are displayed here

*$*$----------------------------------------------------------------$*$*
*$ CORRECTION INSTRUCTIONS 0120061532 0000247511 $*
*$--------------------------------------------------------------------$*
*$ VALID FOR : $*
*$ Software Component SAP_APPL SAP Application $*
*$ Release 40A To SAPKH40A25 $*
*$ Release 40B To SAPKH40B59 $*
*$ Release 45A To SAPKH45A29 $*
*$ Release 45B To SAPKH45B38 $*
*$ Release 46A To SAPKH46A34 $*
*$ Release 46B To SAPKH46B26 $*
*$ Release 46C All Support Package Levels $*
*$ Release 470 All Support Package Levels $*
*$ Release 500 From SAPKH50001 $*
*$ Release 600 From SAPKH60001 $*
*$ Release 602 All Support Package Levels $*
*$ Release 603 All Support Package Levels $*
*$ Release 604 From SAPKH60401 $*
*$ Release 605 All Support Package Levels $*
*$ Release 606 From SAPKH60601 $*
*$ Release 616 All Support Package Levels $*
*$ Release 617 All Support Package Levels $*
*$*$----------------------------------------------------------------$*$*
*&---------------------------------------------------------------------*
*& Object FUNC RV_INVOICE_PRICE
*& Object header FUGR V60A
*&---------------------------------------------------------------------*
*& FUNCTION RV_INVOICE_PRICE
*&---------------------------------------------------------------------*
...
...
* Praeferenzkennzeichen setzen
call function 'PREFERENCE_DETERMINE_SD'
exporting
i_departure_country = tkomk-aland
i_destination_country = tkomk-land1
i_preference_zone = tkomk-gzolx
i_material_number = tkomp-matnr
i_plant = tkomp-werks
i_preference_value = tkomp-preva
i_net_value = tkomp-netwr
*>>>> START OF INSERTION <<<<
i_s_vbrp = vbrp
i_s_komk = tkomk
i_s_komp = tkomp
*>>>> END OF INSERTION <<<<<<
...
changing
c_preference_indicator = vbrp-prefe
exceptions
others = 1.
...
...
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Object FUNC RV_INVOICE_PRICE_PAI
*& Object header FUGR V60A
*&---------------------------------------------------------------------*
*& FUNCTION RV_INVOICE_PRICE_PAI
*&---------------------------------------------------------------------*
...
...
* Praeferenzkennzeichen setzen
call function 'PREFERENCE_DETERMINE_SD'
exporting
i_departure_country = tkomk-aland
i_destination_country = tkomk-land1
i_preference_zone = tkomk-gzolx
i_material_number = tkomp-matnr
i_plant = tkomp-werks
i_preference_value = tkomp-preva
*>>>> START OF DELETION <<<<<
i_net_value = tkomp-netwr
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
i_net_value = tkomp-netwr
i_s_vbrp = vbrp
i_s_komk = tkomk
i_s_komp = tkomp
*>>>> END OF INSERTION <<<<<<
...
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Object REPS FV45PF0P_PREISFINDUNG
*& Object header PROG FV45PF0P_PREISFINDUNG
*&---------------------------------------------------------------------*
*& PROGRAM FV45PF0P_PREISFINDUNG
*&---------------------------------------------------------------------*
...
...
* Praeferenzkennzeichen setzen
call function 'PREFERENCE_DETERMINE_SD'
exporting
i_departure_country = tkomk-aland
i_destination_country = tkomk-land1
i_preference_zone = tkomk-gzolx
i_material_number = tkomp-matnr
i_plant = tkomp-werks
i_preference_value = tkomp-preva
i_net_value = tkomp-netwr
*>>>> START OF INSERTION <<<<
i_s_komk = tkomk
i_s_komp = tkomp
*>>>> END OF INSERTION <<<<<<
...
changing
c_preference_indicator = vbap-prefe
exceptions
others = 1.
...
...
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Object REPS LV60AA59
*& Object header FUGR V60A
*&---------------------------------------------------------------------*
*& PROGRAM LV60AA59
*&---------------------------------------------------------------------*
...
...
* Präferenzkennzeichen setzen
call function 'PREFERENCE_DETERMINE_SD'
exporting
i_departure_country = tkomk-aland
i_destination_country = tkomk-land1
i_preference_zone = tkomk-gzolx
i_material_number = tkomp-matnr
i_plant = tkomp-werks
i_preference_value = tkomp-preva
i_net_value = tkomp-netwr
*>>>> START OF INSERTION <<<<
i_s_xvbrp = xvbrp
i_s_komk = tkomk
i_s_komp = tkomp
*>>>> END OF INSERTION <<<<<<
...
changing
c_preference_indicator = xvbrp-prefe
exceptions
others = 1.
...
...
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Object REPS LV60AA60
*& Object header FUGR V60A
*&---------------------------------------------------------------------*
*& PROGRAM LV60AA60
*&---------------------------------------------------------------------*
...
...
* Praeferenzkennzeichen setzen
call function 'PREFERENCE_DETERMINE_SD'
exporting
i_departure_country = tkomk-aland
i_destination_country = tkomk-land1
i_preference_zone = tkomk-gzolx
i_material_number = tkomp-matnr
i_plant = tkomp-werks
i_preference_value = tkomp-preva
i_net_value = tkomp-netwr
*>>>> START OF INSERTION <<<<
i_s_xvbrp = xvbrp
i_s_komk = tkomk
i_s_komp = tkomp
*>>>> END OF INSERTION <<<<<<
...
changing
c_preference_indicator = xvbrp-prefe
exceptions
others = 1.
...
...
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Object REPS MV45AF0P_PREISFINDUNG_GESAMT
*& Object header PROG MV45AF0P_PREISFINDUNG_GESAMT
*&---------------------------------------------------------------------*
*& PROGRAM MV45AF0P_PREISFINDUNG_GESAMT
*&---------------------------------------------------------------------*
...
* Praeferenzkennzeichen setzen
CALL FUNCTION 'PREFERENCE_DETERMINE_SD'
EXPORTING
i_departure_country = tkomk-aland
i_destination_country = tkomk-land1
i_preference_zone = tkomk-gzolx
i_material_number = tkomp-matnr
i_plant = tkomp-werks
i_preference_value = tkomp-preva
i_net_value = tkomp-netwr
*>>>> START OF DELETION <<<<<
CHANGING
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
i_s_komk = tkomk
i_s_komp = tkomp
CHANGING
*>>>> END OF INSERTION <<<<<<
...
*&---------------------------------------------------------------------*

NOTE: Only source text changes are displayed here

*$*$----------------------------------------------------------------$*$*
*$ CORRECTION INSTRUCTIONS 0120031469 0000427716 $*
*$--------------------------------------------------------------------$*
*$ VALID FOR : $*
*$ Software Component SAP_APPL SAP Application $*
*$ Release 600 From SAPKH60001 $*
*$ Release 602 All Support Package Levels $*
*$ Release 603 All Support Package Levels $*
*$ Release 604 From SAPKH60401 $*
*$ Release 605 All Support Package Levels $*
*$ Release 606 From SAPKH60601 $*
*$ Release 616 All Support Package Levels $*
*$ Release 617 All Support Package Levels $*
*$*$----------------------------------------------------------------$*$*
*&---------------------------------------------------------------------*
*& Object FUNC PREFERENCE_DETERMINE_SD
*& Object header FUGR PREF
*&---------------------------------------------------------------------*
*& FUNCTION PREFERENCE_DETERMINE_SD
*&---------------------------------------------------------------------*
...
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(I_DEPARTURE_COUNTRY) LIKE KOMK-ALAND
*" DEFAULT ' '
*" VALUE(I_DESTINATION_COUNTRY) LIKE KOMK-LAND1
*" DEFAULT ' '
*" VALUE(I_PREFERENCE_ZONE) LIKE KOMK-GZOLX
*" DEFAULT ' '
*" VALUE(I_MATERIAL_NUMBER) LIKE KOMP-MATNR
*" VALUE(I_PLANT) LIKE KOMP-WERKS
*" VALUE(I_PREFERENCE_VALUE) LIKE KOMP-PREVA
*" DEFAULT '0.00'
*" VALUE(I_NET_VALUE) LIKE KOMP-NETWR DEFAULT '0.00'
*" CHANGING
*" VALUE(C_PREFERENCE_INDICATOR) LIKE VBAP-PREFE
*"----------------------------------------------------------------------
*>>>> START OF DELETION <<<<<

*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
DATA: li_badi TYPE REF TO PREFERENCE_DETERMINE_SD.
DATA: gs_vbrp like vbrp.
DATA: gs_komk like komk.

gs_vbrp = I_S_VBRP.
gs_komk = I_S_KOMK.

*>>>> END OF INSERTION <<<<<<
...
ENDIF.
WHEN OTHERS.
CLEAR: C_PREFERENCE_INDICATOR.

ENDCASE.

ENDIF.
*>>>> START OF DELETION <<<<<

*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<

*------- Versorgen bestimmter Felder
if ( GS_VBRP-VBELN is initial ) .
GS_VBRP = I_S_XVBRP.
endif.
if ( GS_KOMK-gzolx is initial ).
GS_KOMK-gzolx = I_PREFERENCE_ZONE.
endif.

GET BADI li_badi.

CALL BADI li_badi->preference_determine
EXPORTING
i_s_vbrp = gs_vbrp
i_s_komk = gs_komk
i_s_komp = i_s_komp
CHANGING
c_preference_indicator = c_preference_indicator.

*>>>> END OF INSERTION <<<<<<
...
*&---------------------------------------------------------------------*

NOTE: Only source text changes are displayed here

*$*$----------------------------------------------------------------$*$*
*$ CORRECTION INSTRUCTIONS 0120031469 0000428336 $*
*$ Prerequisite corr. inst. 0120061532 0000368997 Note 0000497116 $*
*$--------------------------------------------------------------------$*
*$ VALID FOR : $*
*$ Software Component SAP_APPL SAP Application $*
*$ Release 470 All Support Package Levels $*
*$ Release 500 All Support Package Levels $*
*$*$----------------------------------------------------------------$*$*
*&---------------------------------------------------------------------*
*& Object FUNC PREFERENCE_DETERMINE_SD
*& Object header FUGR PREF
*&---------------------------------------------------------------------*
*& FUNCTION PREFERENCE_DETERMINE_SD
*&---------------------------------------------------------------------*
...
FUNCTION PREFERENCE_DETERMINE_SD.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(I_DEPARTURE_COUNTRY) LIKE KOMK-ALAND DEFAULT ' '
*" VALUE(I_DESTINATION_COUNTRY) LIKE KOMK-LAND1 DEFAULT ' '
*" VALUE(I_PREFERENCE_ZONE) LIKE KOMK-GZOLX DEFAULT ' '
*" VALUE(I_MATERIAL_NUMBER) LIKE KOMP-MATNR
*" VALUE(I_PLANT) LIKE KOMP-WERKS
*" VALUE(I_PREFERENCE_VALUE) LIKE KOMP-PREVA DEFAULT '0.00'
*" VALUE(I_NET_VALUE) LIKE KOMP-NETWR DEFAULT '0.00'
*" REFERENCE(I_S_XVBRP) LIKE VBRPVB STRUCTURE VBRPVB OPTIONAL
*" REFERENCE(I_S_VBRP) LIKE VBRP STRUCTURE VBRP OPTIONAL
*" REFERENCE(I_S_KOMK) LIKE KOMK STRUCTURE KOMK OPTIONAL
*" REFERENCE(I_S_KOMP) LIKE KOMP STRUCTURE KOMP OPTIONAL
*" CHANGING
*" VALUE(C_PREFERENCE_INDICATOR) LIKE VBAP-PREFE
*"----------------------------------------------------------------------
*>>>> START OF DELETION <<<<<

*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
DATA: LV_BADI_ACTIVE_IMPL TYPE C.
DATA: LI_BADI TYPE REF TO IF_EX_PREFERENCE.
DATA: gs_vbrp like vbrp.
DATA: gs_komk like komk.

gs_vbrp = I_S_VBRP.
gs_komk = I_S_KOMK.

*>>>> END OF INSERTION <<<<<<
...
WHEN OTHERS.
CLEAR: C_PREFERENCE_INDICATOR.

ENDCASE.

ENDIF.
*>>>> START OF DELETION <<<<<

*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
* Versorgen bestimmter Felder
if ( GS_VBRP-VBELN is initial ) .
GS_VBRP = I_S_XVBRP.
endif.
if ( GS_KOMK-gzolx is initial ).
GS_KOMK-gzolx = I_PREFERENCE_ZONE.
endif.

* Status BADI bestimmen
CALL METHOD CL_EXITHANDLER=>GET_INSTANCE
EXPORTING
EXIT_NAME = 'PREFERENCE'
NULL_INSTANCE_ACCEPTED = 'X'
IMPORTING
ACT_IMP_EXISTING = LV_BADI_ACTIVE_IMPL
CHANGING
INSTANCE = LI_BADI.

* BADI aktiv
IF ( NOT ( LV_BADI_ACTIVE_IMPL IS INITIAL ) ).
CALL METHOD LI_BADI->PREFERENCE_DETERMINE
EXPORTING
I_S_VBRP = GS_VBRP
I_S_KOMK = GS_KOMK
I_S_KOMP = I_S_KOMP
CHANGING
C_PREFERENCE_INDICATOR = C_PREFERENCE_INDICATOR.
ENDIF.

*>>>> END OF INSERTION <<<<<<
...
*&---------------------------------------------------------------------*

NOTE: Only source text changes are displayed here

*$*$----------------------------------------------------------------$*$*
*$ CORRECTION INSTRUCTIONS 0120061532 0000247511 $*
*$--------------------------------------------------------------------$*
*$ VALID FOR : $*
*$ Software Component SAP_APPL SAP Application $*
*$ Release 40A To SAPKH40A25 $*
*$ Release 40B To SAPKH40B59 $*
*$ Release 45A To SAPKH45A29 $*
*$ Release 45B To SAPKH45B38 $*
*$ Release 46A To SAPKH46A34 $*
*$ Release 46B To SAPKH46B26 $*
*$ Release 46C All Support Package Levels $*
*$ Release 470 All Support Package Levels $*
*$ Release 500 From SAPKH50001 $*
*$ Release 600 From SAPKH60001 $*
*$ Release 602 All Support Package Levels $*
*$ Release 603 All Support Package Levels $*
*$ Release 604 From SAPKH60401 $*
*$ Release 605 All Support Package Levels $*
*$ Release 606 From SAPKH60601 $*
*$ Release 616 All Support Package Levels $*
*$ Release 617 All Support Package Levels $*
*$*$----------------------------------------------------------------$*$*
*&---------------------------------------------------------------------*
*& Object FUNC RV_INVOICE_PRICE
*& Object header FUGR V60A
*&---------------------------------------------------------------------*
*& FUNCTION RV_INVOICE_PRICE
*&---------------------------------------------------------------------*
...
...
* Praeferenzkennzeichen setzen
call function 'PREFERENCE_DETERMINE_SD'
exporting
i_departure_country = tkomk-aland
i_destination_country = tkomk-land1
i_preference_zone = tkomk-gzolx
i_material_number = tkomp-matnr
i_plant = tkomp-werks
i_preference_value = tkomp-preva
i_net_value = tkomp-netwr
*>>>> START OF INSERTION <<<<
i_s_vbrp = vbrp
i_s_komk = tkomk
i_s_komp = tkomp
*>>>> END OF INSERTION <<<<<<
...
changing
c_preference_indicator = vbrp-prefe
exceptions
others = 1.
...
...
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Object FUNC RV_INVOICE_PRICE_PAI
*& Object header FUGR V60A
*&---------------------------------------------------------------------*
*& FUNCTION RV_INVOICE_PRICE_PAI
*&---------------------------------------------------------------------*
...
...
* Praeferenzkennzeichen setzen
call function 'PREFERENCE_DETERMINE_SD'
exporting
i_departure_country = tkomk-aland
i_destination_country = tkomk-land1
i_preference_zone = tkomk-gzolx
i_material_number = tkomp-matnr
i_plant = tkomp-werks
i_preference_value = tkomp-preva
*>>>> START OF DELETION <<<<<
i_net_value = tkomp-netwr
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
i_net_value = tkomp-netwr
i_s_vbrp = vbrp
i_s_komk = tkomk
i_s_komp = tkomp
*>>>> END OF INSERTION <<<<<<
...
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Object REPS FV45PF0P_PREISFINDUNG
*& Object header PROG FV45PF0P_PREISFINDUNG
*&---------------------------------------------------------------------*
*& PROGRAM FV45PF0P_PREISFINDUNG
*&---------------------------------------------------------------------*
...
...
* Praeferenzkennzeichen setzen
call function 'PREFERENCE_DETERMINE_SD'
exporting
i_departure_country = tkomk-aland
i_destination_country = tkomk-land1
i_preference_zone = tkomk-gzolx
i_material_number = tkomp-matnr
i_plant = tkomp-werks
i_preference_value = tkomp-preva
i_net_value = tkomp-netwr
*>>>> START OF INSERTION <<<<
i_s_komk = tkomk
i_s_komp = tkomp
*>>>> END OF INSERTION <<<<<<
...
changing
c_preference_indicator = vbap-prefe
exceptions
others = 1.
...
...
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Object REPS LV60AA59
*& Object header FUGR V60A
*&---------------------------------------------------------------------*
*& PROGRAM LV60AA59
*&---------------------------------------------------------------------*
...
...
* Präferenzkennzeichen setzen
call function 'PREFERENCE_DETERMINE_SD'
exporting
i_departure_country = tkomk-aland
i_destination_country = tkomk-land1
i_preference_zone = tkomk-gzolx
i_material_number = tkomp-matnr
i_plant = tkomp-werks
i_preference_value = tkomp-preva
i_net_value = tkomp-netwr
*>>>> START OF INSERTION <<<<
i_s_xvbrp = xvbrp
i_s_komk = tkomk
i_s_komp = tkomp
*>>>> END OF INSERTION <<<<<<
...
changing
c_preference_indicator = xvbrp-prefe
exceptions
others = 1.
...
...
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Object REPS LV60AA60
*& Object header FUGR V60A
*&---------------------------------------------------------------------*
*& PROGRAM LV60AA60
*&---------------------------------------------------------------------*
...
...
* Praeferenzkennzeichen setzen
call function 'PREFERENCE_DETERMINE_SD'
exporting
i_departure_country = tkomk-aland
i_destination_country = tkomk-land1
i_preference_zone = tkomk-gzolx
i_material_number = tkomp-matnr
i_plant = tkomp-werks
i_preference_value = tkomp-preva
i_net_value = tkomp-netwr
*>>>> START OF INSERTION <<<<
i_s_xvbrp = xvbrp
i_s_komk = tkomk
i_s_komp = tkomp
*>>>> END OF INSERTION <<<<<<
...
changing
c_preference_indicator = xvbrp-prefe
exceptions
others = 1.
...
...
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Object REPS MV45AF0P_PREISFINDUNG_GESAMT
*& Object header PROG MV45AF0P_PREISFINDUNG_GESAMT
*&---------------------------------------------------------------------*
*& PROGRAM MV45AF0P_PREISFINDUNG_GESAMT
*&---------------------------------------------------------------------*
...
* Praeferenzkennzeichen setzen
CALL FUNCTION 'PREFERENCE_DETERMINE_SD'
EXPORTING
i_departure_country = tkomk-aland
i_destination_country = tkomk-land1
i_preference_zone = tkomk-gzolx
i_material_number = tkomp-matnr
i_plant = tkomp-werks
i_preference_value = tkomp-preva
i_net_value = tkomp-netwr
*>>>> START OF DELETION <<<<<
CHANGING
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
i_s_komk = tkomk
i_s_komp = tkomp
CHANGING
*>>>> END OF INSERTION <<<<<<
...
*&---------------------------------------------------------------------*

NOTE: Only source text changes are displayed here

*$*$----------------------------------------------------------------$*$*
*$ CORRECTION INSTRUCTIONS 0120061532 0000247512 $*
*$--------------------------------------------------------------------$*
*$ VALID FOR : $*
*$ Software Component SAP_APPL SAP Application $*
*$ Release 46A To SAPKH46A34 $*
*$ Release 46B To SAPKH46B26 $*
*$ Release 46C All Support Package Levels $*
*$*$----------------------------------------------------------------$*$*
*&---------------------------------------------------------------------*
*& Object FUNC PREFERENCE_DETERMINE_SD
*& Object header FUGR PREF
*&---------------------------------------------------------------------*
*& FUNCTION PREFERENCE_DETERMINE_SD
*&---------------------------------------------------------------------*
...
FUNCTION PREFERENCE_DETERMINE_SD.
...
* PERFORMANCE
* Praeferenz nur moeglich, wenn Abgangsland <> Bestimmungsland
IF I_DEPARTURE_COUNTRY NE I_DESTINATION_COUNTRY.
...
ENDIF.

*>>>> START OF INSERTION <<<<
* Versorgen bestimmter Felder
if ( I_S_VBRP-VBELN is initial ) .
I_S_VBRP = I_S_XVBRP.
endif.
if ( I_S_KOMK-gzolx is initial ).
I_S_KOMK-gzolx = I_PREFERENCE_ZONE.
endif.

CALL CUSTOMER-FUNCTION '003'
EXPORTING
I_S_VBRP = I_S_VBRP
I_S_KOMK = I_S_KOMK
I_S_KOMP = I_S_KOMP
CHANGING
C_PREFERENCE_INDICATOR = C_PREFERENCE_INDICATOR
EXCEPTIONS
OTHERS = 2.

*>>>> END OF INSERTION <<<<<<
...

ENDFUNCTION.

...
*&---------------------------------------------------------------------*

You can also view the full details of this OSS note and download it to your SAP systemeady for implementation using transaction code SNOTE. Once it has been downloaded you can read the full details, check out any installation instructions including manual changes and see if there are any pre-requisites.

You can also check if a new version of note 379269 has been released as well as see if the note is valid for your current SAP system landscape.

Check if SAP OSS note 379269 has already been downloaded and is valid
To check if this note has already been download, what status it has and if it is valid for your system first execute t-code SNOTE and click on the SAP Note Browser icon
Icon used to execute SAP Note Browser report within SNOTE

From here you can just enter the note number 379269 and press execute. If the note already exists it's details will be displayed. See here for full step by step instructions on how to check if an SAP note has been downloaded and is valid for your system.

If note 379269 does not exist on your system you will receive the message "Unable to find SAP Note that meets specified criteria"
Icon used to execute SAP Note Browser report within SNOTE

If this is the case you will need to download the note to you SAP system also using transaction SNOTE. For further details see Download note using SNOTE. Even if it does exist you may still want to check if you have downloaded the latest version of the note.

Alternatively you can find full details of this note on the SAP service market place(SNumber / Service market place login will be required)

Effected Objects:


(FUNC) - PREFERENCE_DETERMINE_SD

(FUNC) - PREFERENCE_DETERMINE_SD

(FUNC) - RV_INVOICE_PRICE
(FUNC) - RV_INVOICE_PRICE_PAI
(REPS) - FV45PF0P_PREISFINDUNG
(REPS) - LV60AA59
(REPS) - LV60AA60
(REPS) - MV45AF0P_PREISFINDUNG_GESAMT

(FUNC) - PREFERENCE_DETERMINE_SD