SD_REBATE_FINALIZE_EXTERN is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for You can use this function to carry out the
If you would like to execute this report or see the full code listing simply enter SD_REBATE_FINALIZE_EXTERN into the relevant SAP transactions such as SE38 or SE80
Below is a list of transaction codes which are relevant to this SAP report
VBO_FINAL - Finalize Rebate Agreements
This report can be called from another progam/report simply by using the ABAP SUBMIT statement, see below for example ABAP code snipts of how to do this.
Selected Rebate Agreements
Selection Text: VTWEG = Distribution Channel
Selection Text: VKORG = Sales Organization
Selection Text: SPART = Division
Selection Text: SETTLE = Carry Out Finalization
Selection Text: KNUMA = Rebate Agreement
Selection Text: BOPRINT = Issue verification level
Selection Text: BONEM = Rebate Recipient
Selection Text: ABRDATE = Validity end date before
Title: Finalize Rebate Agreements
Text Symbol: H01 = Name, loc
Text Symbol: H02 = Condition Key
Text Symbol: S01 = Rebate Agreemts
Text Symbol: S02 = Organizat. Data
Text Symbol: S03 = Rebate Settlement Status
Text Symbol: S04 = Actions
Text Symbol: S05 = Periodic partial settlemnt
Text Symbol: V01 = Per ;;
Text Symbol: V03 = Payment;;
Text Symbol: V04 = Accrual ;;
Text Symbol: V05 = Scale Basis ;;
Text Symbol: V06 = Amount;;
Text Symbol: V07 = Reb. basis;;
Text Symbol: V10 = Valid from;;
Text Symbol: V11 = Valid to ;;
Text Symbol: V12 = Condition Deleted
Text Symbol: B12 = Test Control Run
Text Symbol: 001 = Rebate Agreements with Validity End to &1 (Created on &2)
Text Symbol: 003 = Condition Type ;;
Text Symbol: 006 = Rebate Recipient ;;
Text Symbol: 007 = Rebate Agreement ;;
Text Symbol: 008 = Validity ;;
Text Symbol: 009 = To
Text Symbol: 010 = Status
Text Symbol: 011 = New Validity ;;
Text Symbol: 012 = Texts exist
Text Symbol: 015 = Req.rebate cred.memo;;
Text Symbol: 016 = There are messages
INCLUDE RV15CI03.
No SAP DATABASE tables are accessed within this REPORT code!
AGR_MNT_BADI_INSTANCE_GET CALL FUNCTION 'AGR_MNT_BADI_INSTANCE_GET' IMPORTING e_badi_instance = badi_instance e_badi_active = badi_active.
SD_BONUS_READ CALL FUNCTION 'SD_BONUS_READ' EXPORTING bonus_agreement_in = xkona condition_read = yes TABLES condition = xkonp condition_header = xkonh condition_scale = staffel variable_key = xvake.
SD_BONUS_DRILL_DOWN_DISPLAY CALL FUNCTION 'SD_BONUS_DRILL_DOWN_DISPLAY' STARTING NEW TASK 'BONUS_UMSATZ' EXPORTING dd_kona = xkona dd_kurgv = kurgv dd_abspz = temp_abspz dd_list = 'X' TABLES zvake_tab = xvake zkonp_tab = xkonp.
SD_REBATES_SETTLE_GENERAL CALL FUNCTION 'SD_REBATES_SETTLE_GENERAL' EXPORTING irt_knuma = lrt_knuma credit_note_type = lv_credit_note_type iv_no_enqueue = 'X' IMPORTING et_bonusvalue = lt_bonusvalue et_konp = hlp_konp et_vake = hlp_vake et_error = lt_error.
SD_REBATE_CREDIT_NOTE_CREATE CALL FUNCTION 'SD_REBATE_CREDIT_NOTE_CREATE' EXPORTING bonus_agreement = xkona credit_note_type = '1' save_credit_note = ' ' no_initialization = ' ' i_posting = 'B' it_line_items = lt_line_item IMPORTING invoice_header = xvbrk error_tab = hlp_error_tab EXCEPTIONS error_message = 1 item_type = 2 no_invoice = 3 invalid_bonus_type = 4 no_order_type = 5 OTHERS = 6.
SD_BONUS_REPORT_NO_READ CALL FUNCTION 'SD_BONUS_REPORT_NO_READ' EXPORTING rr_abspz = xkona-abspz rr_kona = xkona rr_kurgv = kurgv rr_leave_to_list_processing = no rr_list = list_number TABLES zvake_tab = xvake zkonp_tab = xkonp.
VIEW_KURGV CALL FUNCTION 'VIEW_KURGV' EXPORTING comwa = vtcom IMPORTING rgwa = kurgv EXCEPTIONS OTHERS = 1.
MESSAGE_TEXT_BUILD CALL FUNCTION 'MESSAGE_TEXT_BUILD' EXPORTING msgid = sy-msgid msgnr = sy-msgno msgv1 = sy-msgv1 msgv2 = sy-msgv2 msgv3 = sy-msgv3 msgv4 = sy-msgv4 IMPORTING message_text_output = help130 EXCEPTIONS OTHERS = 1.
SD_AGREEMENT_CHANGE_DOCS_WRITE CALL FUNCTION 'SD_AGREEMENT_CHANGE_DOCS_WRITE' EXPORTING p_xkona = l_xkona p_ykona = l_ykona update_sign = 'U'.
SD_KONP_CHANGE_DOCS_WRITE CALL FUNCTION 'SD_KONP_CHANGE_DOCS_WRITE' TABLES p_xkonp = tl_xkonp p_ykonp = tl_ykonp.
OPEN_FI_PERFORM_00503301_BOSTA
CALL FUNCTION 'OPEN_FI_PERFORM_00503301_BOSTA' EXPORTING i_xkonp_complete = 'X' i_new_bosta = 'C' TABLES t_xkonp = tl_xkonp t_ykonp = tl_ykonp t_xvake = xvake.
OPEN_FI_PERFORM_00503310_BOSTA CALL FUNCTION 'OPEN_FI_PERFORM_00503310_BOSTA' EXPORTING i_new_bosta = 'C' TABLES t_xkona = tl_xkona t_ykona = tl_ykona.
SD_AGREEMENT_CHANGE_DOCS_WRITE CALL FUNCTION 'SD_AGREEMENT_CHANGE_DOCS_WRITE' EXPORTING p_xkona = l_xkona p_ykona = l_ykona update_sign = 'U'.
DEQUEUE_EVKONAE CALL FUNCTION 'DEQUEUE_EVKONAE' EXPORTING knuma = ska_knuma mandt = sy-mandt.
ENQUEUE_EVKONAE CALL FUNCTION 'ENQUEUE_EVKONAE' EXPORTING mandt = sy-mandt knuma = sk_knuma EXCEPTIONS foreign_lock = 2 system_failure = 3.
RV_DOMAIN_VALUE_TEXTS CALL FUNCTION 'RV_DOMAIN_VALUE_TEXTS' EXPORTING domname = dd07v-domname domvalue = dd07v-domvalue_l IMPORTING ddtext = bo-text.
KOMG_TO_2LINES_OFFSET CALL FUNCTION 'KOMG_TO_2LINES_OFFSET' EXPORTING comm_fields = komg condition_structure = t681-kotab IMPORTING fields_string = rv13a-vakey2 text_string = rv13a-vakey1 TABLES offset_tab = offset_tab EXCEPTIONS OTHERS = 1.
REUSE_ALV_FIELDCATALOG_MERGE CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' EXPORTING i_program_name = b_repid i_internal_tabname = 'BO_ALV_HEADER' i_inclname = 'RV15CI03' CHANGING ct_fieldcat = bo_fieldcat.
REUSE_ALV_FIELDCATALOG_MERGE CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' EXPORTING i_program_name = 'RV15CI03' i_internal_tabname = 'REPORT_TAB' i_inclname = 'RV15CI03' CHANGING ct_fieldcat = bo_fieldcat.
REUSE_ALV_FIELDCATALOG_MERGE CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' EXPORTING i_program_name = b_repid i_internal_tabname = 'BO_ALV_HEADER' i_inclname = 'RV15CI03' CHANGING ct_fieldcat = bo_fieldcat.
REUSE_ALV_FIELDCATALOG_MERGE CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' EXPORTING i_program_name = 'RV15CI03' i_internal_tabname = 'REPORT_TAB' i_inclname = 'RV15CI03' CHANGING ct_fieldcat = bo_fieldcat.
REUSE_ALV_FIELDCATALOG_MERGE CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' EXPORTING i_program_name = b_repid i_internal_tabname = 'BO_ALV_HEADER' i_inclname = 'RV15CI03' CHANGING ct_fieldcat = bo_fieldcat.
REUSE_ALV_FIELDCATALOG_MERGE CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' EXPORTING i_program_name = 'RV15CI03' i_internal_tabname = 'REPORT_TAB' i_inclname = 'RV15CI03' CHANGING ct_fieldcat = bo_fieldcat.
REUSE_ALV_FIELDCATALOG_MERGE CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' EXPORTING i_program_name = b_repid i_internal_tabname = 'BO_ALV_HEADER' i_inclname = 'RV15CI03' CHANGING ct_fieldcat = bo_fieldcat.
REUSE_ALV_FIELDCATALOG_MERGE CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' EXPORTING i_program_name = 'RV15CI03' i_internal_tabname = 'REPORT_TAB' i_inclname = 'RV15CI03' CHANGING ct_fieldcat = bo_fieldcat.
ICON_CREATE CALL FUNCTION 'ICON_CREATE' EXPORTING name = 'ICON_WARNING' IMPORTING result = icon.
REUSE_ALV_COMMENTARY_WRITE CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE' EXPORTING it_list_commentary = gt_list_top_of_page.
REUSE_ALV_HIERSEQ_LIST_DISPLAY CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY' EXPORTING i_callback_program = b_repid i_callback_pf_status_set = 'PROT_UMSATZ' i_callback_user_command = 'USER_COMMAND' is_layout = bo_layout it_fieldcat = bo_fieldcat[] * IT_EXCLUDING = * IT_SPECIAL_GROUPS = BO_SP_GROUP[] it_sort = it_sort_001 * IT_FILTER = * IS_SEL_HIDE = * I_SCREEN_START_COLUMN = 0 * I_SCREEN_START_LINE = 0 * I_SCREEN_END_COLUMN = 0 * I_SCREEN_END_LINE = 0 * i_default = g_default i_save = b_save * IS_VARIANT = B_VARIANT it_events = bo_events[] * IT_EVENT_EXIT = i_tabname_header = b_tabname_header i_tabname_item = b_tabname_item is_keyinfo = bo_keyinfo is_print = bo_print * IMPORTING * E_EXIT_CAUSED_BY_CALLER = TABLES t_outtab_header = bo_alv_header t_outtab_item = report_tab.
SD_BONUS_AGREEMENT_CHDISP CALL FUNCTION 'SD_BONUS_AGREEMENT_CHDISP' STARTING NEW TASK 'BONUS_UMSATZ' EXPORTING i_knuma = agreement i_action = 'DIS'.
SD_BONUS_AGREEMENT_CHDISP CALL FUNCTION 'SD_BONUS_AGREEMENT_CHDISP' STARTING NEW TASK 'BONUS_UMSATZ' EXPORTING i_knuma = agreement i_action = 'CHA'.
SD_BONUS_BONEM_DISPLAY CALL FUNCTION 'SD_BONUS_BONEM_DISPLAY' STARTING NEW TASK 'BONUS_UMSATZ' EXPORTING i_bonem = xkona-bonem i_vkorg = xkona-vkorg i_vtweg = xkona-vtweg i_spart = xkona-spart i_ankreuz = kund_ankreuz.
SD_BONUS_SETTLEMENT_SET CALL FUNCTION 'SD_BONUS_SETTLEMENT_SET' STARTING NEW TASK 'BONUS_UMSATZ' EXPORTING i_vbeln = document.
REUSE_ALV_VARIANT_DEFAULT_GET CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET' EXPORTING i_save = b_save CHANGING cs_variant = bo_variant EXCEPTIONS not_found = 2.
SD_BONUS_DRILL_DOWN_DISPLAY CALL FUNCTION 'SD_BONUS_DRILL_DOWN_DISPLAY' STARTING NEW TASK 'BONUS_UMSATZ' EXPORTING dd_kurgv = kurgv dd_list = list_number dd_kona = xkona TABLES zvake_tab = xvake zkonp_tab = xkonp.
VBFS_TREE_LIST_DISPLAY CALL FUNCTION 'VBFS_TREE_LIST_DISPLAY' EXPORTING i_tree_title = da_tree_title i_vbtyp = 'Y' TABLES i_vbfs = error_tab.
CONVERT_TO_LOCAL_CURRENCY CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY' EXPORTING date = cc_date foreign_amount = cc_target_value foreign_currency = cc_curr_from local_currency = cc_curr_local IMPORTING local_amount = cc_target_value EXCEPTIONS no_rate_found = 4.
CONVERT_TO_FOREIGN_CURRENCY CALL FUNCTION 'CONVERT_TO_FOREIGN_CURRENCY' EXPORTING date = cc_date local_amount = cc_target_value foreign_currency = cc_curr_to local_currency = cc_curr_local IMPORTING foreign_amount = cc_target_value EXCEPTIONS no_rate_found = 4.
Although this basic information may have limited use it does provide an easy to find location to store any knowledge about this program/report.
The contribute/comments section below therefore offer's an opportunity for anyone to add additional information. This can be anything from useful hints, tips and screen shots to relevant SAP notes or anything else you feel is relevant to this report.
This will then be available for everyone to easily find by simply searching on the report name SD_REBATE_FINALIZE_EXTERN or its description.
SD_REBATE_FINALIZE_EXTERN - Finalize Rebate Agreements SD_REBATE_FINALIZE_EXTERN - Finalize Rebate Agreements SD_PLANVALUE_UPDATE - Repair Incorrect Planned Revenues from SD Documents SD_PLANVALUE_UPDATE - Repair Incorrect Planned Revenues from SD Documents SD_PARTNER_READ===============FT - SDPARTNERREAD===============FT SD_PARTNER_DISPLAY============FT - SDPARTNERDISPLAY============FT