SAP SD_REBATE_CREDIT_NOTE_CREATE Function Module for NOTRANSL: Direkte Erzeugung einer Gutschrift zur Finalisierung









SD_REBATE_CREDIT_NOTE_CREATE is a standard sd rebate credit note create 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: Direkte Erzeugung einer Gutschrift zur Finalisierung 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 sd rebate credit note create FM, simply by entering the name SD_REBATE_CREDIT_NOTE_CREATE into the relevant SAP transaction such as SE37 or SE38.

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



Function SD_REBATE_CREDIT_NOTE_CREATE 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 'SD_REBATE_CREDIT_NOTE_CREATE'"NOTRANSL: Direkte Erzeugung einer Gutschrift zur Finalisierung
EXPORTING
BONUS_AGREEMENT = "Agreements
* BONUS_AGREEMENT_TYPE = "Rebate : Rebate Agreement Types
* CREDIT_NOTE_TYPE = '1' "
* SAVE_CREDIT_NOTE = 'X' "
* BONUS_FBUDA = "Date on which services rendered
* NO_INITIALIZATION = ' ' "
* I_POSTING = 'B' "
IT_LINE_ITEMS = "Table Type for Structure BONUSKOM

IMPORTING
INVOICE_HEADER = "Table for Structure VBRKVB
ERROR_TAB = "Error Log for Collective Processing

EXCEPTIONS
ERROR_MESSAGE = 1 ITEM_TYPE = 2 NO_INVOICE = 3 INVALID_BONUS_TYPE = 4 NO_ORDER_TYPE = 5
.



IMPORTING Parameters details for SD_REBATE_CREDIT_NOTE_CREATE

BONUS_AGREEMENT - Agreements

Data type: KONA
Optional: No
Call by Reference: Yes

BONUS_AGREEMENT_TYPE - Rebate : Rebate Agreement Types

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

CREDIT_NOTE_TYPE -

Data type:
Default: '1'
Optional: Yes
Call by Reference: Yes

SAVE_CREDIT_NOTE -

Data type:
Default: 'X'
Optional: Yes
Call by Reference: Yes

BONUS_FBUDA - Date on which services rendered

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

NO_INITIALIZATION -

Data type:
Default: ' '
Optional: Yes
Call by Reference: Yes

I_POSTING -

Data type:
Default: 'B'
Optional: Yes
Call by Reference: Yes

IT_LINE_ITEMS - Table Type for Structure BONUSKOM

Data type: BONUSKOM_T
Optional: No
Call by Reference: Yes

EXPORTING Parameters details for SD_REBATE_CREDIT_NOTE_CREATE

INVOICE_HEADER - Table for Structure VBRKVB

Data type: VBRKVB_T
Optional: No
Call by Reference: Yes

ERROR_TAB - Error Log for Collective Processing

Data type: VBFS_T
Optional: No
Call by Reference: Yes

EXCEPTIONS details

ERROR_MESSAGE -

Data type:
Optional: No
Call by Reference: Yes

ITEM_TYPE -

Data type:
Optional: No
Call by Reference: Yes

NO_INVOICE -

Data type:
Optional: No
Call by Reference: Yes

INVALID_BONUS_TYPE -

Data type:
Optional: No
Call by Reference: Yes

NO_ORDER_TYPE -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for SD_REBATE_CREDIT_NOTE_CREATE 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:
lv_error_message  TYPE STRING, "   
lv_invoice_header  TYPE VBRKVB_T, "   
lv_bonus_agreement  TYPE KONA, "   
lv_error_tab  TYPE VBFS_T, "   
lv_item_type  TYPE VBFS_T, "   
lv_bonus_agreement_type  TYPE T6B1, "   
lv_no_invoice  TYPE T6B1, "   
lv_credit_note_type  TYPE T6B1, "   '1'
lv_save_credit_note  TYPE T6B1, "   'X'
lv_invalid_bonus_type  TYPE T6B1, "   
lv_bonus_fbuda  TYPE FBUDA, "   
lv_no_order_type  TYPE FBUDA, "   
lv_no_initialization  TYPE FBUDA, "   ' '
lv_i_posting  TYPE FBUDA, "   'B'
lv_it_line_items  TYPE BONUSKOM_T. "   

  CALL FUNCTION 'SD_REBATE_CREDIT_NOTE_CREATE'  "NOTRANSL: Direkte Erzeugung einer Gutschrift zur Finalisierung
    EXPORTING
         BONUS_AGREEMENT = lv_bonus_agreement
         BONUS_AGREEMENT_TYPE = lv_bonus_agreement_type
         CREDIT_NOTE_TYPE = lv_credit_note_type
         SAVE_CREDIT_NOTE = lv_save_credit_note
         BONUS_FBUDA = lv_bonus_fbuda
         NO_INITIALIZATION = lv_no_initialization
         I_POSTING = lv_i_posting
         IT_LINE_ITEMS = lv_it_line_items
    IMPORTING
         INVOICE_HEADER = lv_invoice_header
         ERROR_TAB = lv_error_tab
    EXCEPTIONS
        ERROR_MESSAGE = 1
        ITEM_TYPE = 2
        NO_INVOICE = 3
        INVALID_BONUS_TYPE = 4
        NO_ORDER_TYPE = 5
. " SD_REBATE_CREDIT_NOTE_CREATE




ABAP code using 7.40 inline data declarations to call FM SD_REBATE_CREDIT_NOTE_CREATE

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_credit_note_type) = '1'.
 
DATA(ld_save_credit_note) = 'X'.
 
 
 
 
DATA(ld_no_initialization) = ' '.
 
DATA(ld_i_posting) = 'B'.
 
 


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!