SAP ENH_REBATE_SETTLEMENT Function Module for NOTRANSL: Abrechnung einer Bonusvereinbarung









ENH_REBATE_SETTLEMENT is a standard enh rebate settlement SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Abrechnung einer Bonusvereinbarung processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for enh rebate settlement FM, simply by entering the name ENH_REBATE_SETTLEMENT into the relevant SAP transaction such as SE37 or SE38.

Function Group: BON_ENH
Program Name: SAPLBON_ENH
Main Program: SAPLBON_ENH
Appliation area: V
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function ENH_REBATE_SETTLEMENT pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'ENH_REBATE_SETTLEMENT'"NOTRANSL: Abrechnung einer Bonusvereinbarung
EXPORTING
BONUS_AGREEMENT = "DE-EN-LANG-SWITCH-NO-TRANSLATION
* BONUS_CONTROL = ' ' "DE-EN-LANG-SWITCH-NO-TRANSLATION
* KRUEK_ONLY = ' ' "DE-EN-LANG-SWITCH-NO-TRANSLATION
* BONUS_AGREEMENT_TYPE = ' ' "DE-EN-LANG-SWITCH-NO-TRANSLATION
* BRING_DIALOG = 'X' "
* CREATE_CREDIT_NOTE = 'X' "DE-EN-LANG-SWITCH-NO-TRANSLATION
* SAVE_CREDIT_NOTE = 'X' "
* DO_PRE_SETTLEMENT_CHECKS = ' ' "
* PERIOD_DATAB = "
* PERIOD_DATBI = "
* NO_ERROR_IF_NEW_REBATE = ' ' "

TABLES
CONDITION = "DE-EN-LANG-SWITCH-NO-TRANSLATION
CONDITION_SCALE = "DE-EN-LANG-SWITCH-NO-TRANSLATION
SETTLEMENT_VALUES = "DE-EN-LANG-SWITCH-NO-TRANSLATION
VARIABLE_KEY = "DE-EN-LANG-SWITCH-NO-TRANSLATION
* ABR_DATES = "Beginning, End of Periods in Periodic Agreements
* SETTLEMENT_VALUES_ENH = "DE-EN-LANG-SWITCH-NO-TRANSLATION
* ERROR_TAB = "Error Log for Collective Processing

EXCEPTIONS
CURRENCY_CONVERSION = 1 VBOX_NOT_ACTUAL = 10 NO_TURNOVER = 11 NO_SALES = 12 DIFFERENT_UOM = 2 ERROR_IN_ORDER_CREATION = 3 ERROR_MESSAGE = 4 INVALID_BONUS_TYPE = 5 NOT_READY_FOR_SETTLEMENT = 6 NO_ORDER_TYPE = 7 OPEN_DOCUMENTS_EXIST = 8 UNIT_CONVERSION = 9
.



IMPORTING Parameters details for ENH_REBATE_SETTLEMENT

BONUS_AGREEMENT - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type: KONA
Optional: No
Call by Reference: No ( called with pass by value option)

BONUS_CONTROL - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type:
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

KRUEK_ONLY - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type:
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

BONUS_AGREEMENT_TYPE - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type: T6B1
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

BRING_DIALOG -

Data type:
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

CREATE_CREDIT_NOTE - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type:
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

SAVE_CREDIT_NOTE -

Data type:
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

DO_PRE_SETTLEMENT_CHECKS -

Data type:
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

PERIOD_DATAB -

Data type: KONA-DATAB
Optional: Yes
Call by Reference: No ( called with pass by value option)

PERIOD_DATBI -

Data type: KONA-DATBI
Optional: Yes
Call by Reference: No ( called with pass by value option)

NO_ERROR_IF_NEW_REBATE -

Data type:
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for ENH_REBATE_SETTLEMENT

CONDITION - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type: KONP
Optional: No
Call by Reference: No ( called with pass by value option)

CONDITION_SCALE - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type: CONDSCALE
Optional: No
Call by Reference: No ( called with pass by value option)

SETTLEMENT_VALUES - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type: BONUSVALUE
Optional: No
Call by Reference: No ( called with pass by value option)

VARIABLE_KEY - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type: VAKE
Optional: No
Call by Reference: No ( called with pass by value option)

ABR_DATES - Beginning, End of Periods in Periodic Agreements

Data type: BON_ENH_PERIOD
Optional: Yes
Call by Reference: Yes

SETTLEMENT_VALUES_ENH - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type: BONUSVALUE_ENH
Optional: Yes
Call by Reference: Yes

ERROR_TAB - Error Log for Collective Processing

Data type: VBFS
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

CURRENCY_CONVERSION - Error in currency translation

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

VBOX_NOT_ACTUAL - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_TURNOVER -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_SALES - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

DIFFERENT_UOM - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ERROR_IN_ORDER_CREATION - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type:
Optional: No
Call by Reference: Yes

ERROR_MESSAGE - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

INVALID_BONUS_TYPE - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NOT_READY_FOR_SETTLEMENT - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_ORDER_TYPE - DE-EN-LANG-SWITCH-NO-TRANSLATION

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

OPEN_DOCUMENTS_EXIST -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

UNIT_CONVERSION - Error During Quantity Conversion

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for ENH_REBATE_SETTLEMENT Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lt_condition  TYPE STANDARD TABLE OF KONP, "   
lv_bonus_agreement  TYPE KONA, "   
lv_currency_conversion  TYPE KONA, "   
lv_bonus_control  TYPE KONA, "   ' '
lv_vbox_not_actual  TYPE KONA, "   
lv_kruek_only  TYPE KONA, "   ' '
lv_no_turnover  TYPE KONA, "   
lv_no_sales  TYPE KONA, "   
lv_different_uom  TYPE KONA, "   
lt_condition_scale  TYPE STANDARD TABLE OF CONDSCALE, "   
lv_bonus_agreement_type  TYPE T6B1, "   ' '
lv_bring_dialog  TYPE T6B1, "   'X'
lt_settlement_values  TYPE STANDARD TABLE OF BONUSVALUE, "   
lv_error_in_order_creation  TYPE BONUSVALUE, "   
lt_variable_key  TYPE STANDARD TABLE OF VAKE, "   
lv_error_message  TYPE VAKE, "   
lv_create_credit_note  TYPE VAKE, "   'X'
lt_abr_dates  TYPE STANDARD TABLE OF BON_ENH_PERIOD, "   
lv_save_credit_note  TYPE BON_ENH_PERIOD, "   'X'
lv_invalid_bonus_type  TYPE BON_ENH_PERIOD, "   
lt_settlement_values_enh  TYPE STANDARD TABLE OF BONUSVALUE_ENH, "   
lv_do_pre_settlement_checks  TYPE BONUSVALUE_ENH, "   ' '
lv_not_ready_for_settlement  TYPE BONUSVALUE_ENH, "   
lt_error_tab  TYPE STANDARD TABLE OF VBFS, "   
lv_period_datab  TYPE KONA-DATAB, "   
lv_no_order_type  TYPE KONA, "   
lv_period_datbi  TYPE KONA-DATBI, "   
lv_open_documents_exist  TYPE KONA, "   
lv_unit_conversion  TYPE KONA, "   
lv_no_error_if_new_rebate  TYPE KONA. "   ' '

  CALL FUNCTION 'ENH_REBATE_SETTLEMENT'  "NOTRANSL: Abrechnung einer Bonusvereinbarung
    EXPORTING
         BONUS_AGREEMENT = lv_bonus_agreement
         BONUS_CONTROL = lv_bonus_control
         KRUEK_ONLY = lv_kruek_only
         BONUS_AGREEMENT_TYPE = lv_bonus_agreement_type
         BRING_DIALOG = lv_bring_dialog
         CREATE_CREDIT_NOTE = lv_create_credit_note
         SAVE_CREDIT_NOTE = lv_save_credit_note
         DO_PRE_SETTLEMENT_CHECKS = lv_do_pre_settlement_checks
         PERIOD_DATAB = lv_period_datab
         PERIOD_DATBI = lv_period_datbi
         NO_ERROR_IF_NEW_REBATE = lv_no_error_if_new_rebate
    TABLES
         CONDITION = lt_condition
         CONDITION_SCALE = lt_condition_scale
         SETTLEMENT_VALUES = lt_settlement_values
         VARIABLE_KEY = lt_variable_key
         ABR_DATES = lt_abr_dates
         SETTLEMENT_VALUES_ENH = lt_settlement_values_enh
         ERROR_TAB = lt_error_tab
    EXCEPTIONS
        CURRENCY_CONVERSION = 1
        VBOX_NOT_ACTUAL = 10
        NO_TURNOVER = 11
        NO_SALES = 12
        DIFFERENT_UOM = 2
        ERROR_IN_ORDER_CREATION = 3
        ERROR_MESSAGE = 4
        INVALID_BONUS_TYPE = 5
        NOT_READY_FOR_SETTLEMENT = 6
        NO_ORDER_TYPE = 7
        OPEN_DOCUMENTS_EXIST = 8
        UNIT_CONVERSION = 9
. " ENH_REBATE_SETTLEMENT




ABAP code using 7.40 inline data declarations to call FM ENH_REBATE_SETTLEMENT

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
 
 
DATA(ld_bonus_control) = ' '.
 
 
DATA(ld_kruek_only) = ' '.
 
 
 
 
 
DATA(ld_bonus_agreement_type) = ' '.
 
DATA(ld_bring_dialog) = 'X'.
 
 
 
 
 
DATA(ld_create_credit_note) = 'X'.
 
 
DATA(ld_save_credit_note) = 'X'.
 
 
 
DATA(ld_do_pre_settlement_checks) = ' '.
 
 
 
"SELECT single DATAB FROM KONA INTO @DATA(ld_period_datab).
 
 
"SELECT single DATBI FROM KONA INTO @DATA(ld_period_datbi).
 
 
 
DATA(ld_no_error_if_new_rebate) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!