SAP SD_SALES_ITEM_MAINTAIN Function Module for Maintain a sales document item with schedule lines
SD_SALES_ITEM_MAINTAIN is a standard sd sales item maintain SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Maintain a sales document item with schedule lines 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 sales item maintain FM, simply by entering the name SD_SALES_ITEM_MAINTAIN into the relevant SAP transaction such as SE37 or SE38.
Function Group: V45A
Program Name: SAPLV45A
Main Program: SAPLV45A
Appliation area: V
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function SD_SALES_ITEM_MAINTAIN 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_SALES_ITEM_MAINTAIN'"Maintain a sales document item with schedule lines.
EXPORTING
FVBAPKOM = "Communication fields of document item
* FVBEPKOM = "Communication fields of schedule line l
* FVBEPKOMX = "
* I_NEW_PRICING = ' ' "B = New pricing
* CALL_ACTIVE = ' ' "
* FVBAPKOMX = "
* I_POSNR = ' ' "
* I_SIMULATION = ' ' "
* LOGIC_SWITCH = "SD Checkbox for the Logic Switch
IMPORTING
EMAAPV = "Material data
EMAEPV = "Material data
EVBAP = "Sales Document Item
EVBAPKOM = "Communication fields of document item
EVBKD = "Business data of document item
TABLES
* FXVBPAKOM = "Communication fields of item partner
* FXKONVKOM = "
* IT_MDVU = "
* FXBAPIADDR1 = "BAPI Reference Structure for Addresses (Org./Company)
* FXVBEPKOM = "Communication Fields for Maintaining SD Doc. Schedule Lines
* FXVBEPKOMX = "Checkbox List for Maintaining a Sales Document Schedule Line
* FXVBPA3KOM = "
IMPORTING Parameters details for SD_SALES_ITEM_MAINTAIN
FVBAPKOM - Communication fields of document item
Data type: VBAPKOMOptional: No
Call by Reference: No ( called with pass by value option)
FVBEPKOM - Communication fields of schedule line l
Data type: VBEPKOMOptional: Yes
Call by Reference: No ( called with pass by value option)
FVBEPKOMX -
Data type: VBEPKOMXOptional: Yes
Call by Reference: No ( called with pass by value option)
I_NEW_PRICING - B = New pricing
Data type: KOMV-KSTEUDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CALL_ACTIVE -
Data type: T185F-FCODEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FVBAPKOMX -
Data type: VBAPKOMXOptional: Yes
Call by Reference: No ( called with pass by value option)
I_POSNR -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_SIMULATION -
Data type: SY-INPUTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
LOGIC_SWITCH - SD Checkbox for the Logic Switch
Data type: BAPISDLSOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for SD_SALES_ITEM_MAINTAIN
EMAAPV - Material data
Data type: MAAPVOptional: No
Call by Reference: No ( called with pass by value option)
EMAEPV - Material data
Data type: MAEPVOptional: No
Call by Reference: No ( called with pass by value option)
EVBAP - Sales Document Item
Data type: VBAPOptional: No
Call by Reference: No ( called with pass by value option)
EVBAPKOM - Communication fields of document item
Data type: VBAPKOMOptional: No
Call by Reference: No ( called with pass by value option)
EVBKD - Business data of document item
Data type: VBKDOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for SD_SALES_ITEM_MAINTAIN
FXVBPAKOM - Communication fields of item partner
Data type: VBPAKOMOptional: Yes
Call by Reference: No ( called with pass by value option)
FXKONVKOM -
Data type: KONVKOMOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_MDVU -
Data type: MDVUOptional: Yes
Call by Reference: No ( called with pass by value option)
FXBAPIADDR1 - BAPI Reference Structure for Addresses (Org./Company)
Data type: BAPIADDR1Optional: Yes
Call by Reference: Yes
FXVBEPKOM - Communication Fields for Maintaining SD Doc. Schedule Lines
Data type: VBEPKOMOptional: Yes
Call by Reference: Yes
FXVBEPKOMX - Checkbox List for Maintaining a Sales Document Schedule Line
Data type: VBEPKOMXOptional: Yes
Call by Reference: Yes
FXVBPA3KOM -
Data type: VBPA3KOMOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for SD_SALES_ITEM_MAINTAIN 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_emaapv | TYPE MAAPV, " | |||
| lv_fvbapkom | TYPE VBAPKOM, " | |||
| lt_fxvbpakom | TYPE STANDARD TABLE OF VBPAKOM, " | |||
| lv_emaepv | TYPE MAEPV, " | |||
| lv_fvbepkom | TYPE VBEPKOM, " | |||
| lt_fxkonvkom | TYPE STANDARD TABLE OF KONVKOM, " | |||
| lv_evbap | TYPE VBAP, " | |||
| lt_it_mdvu | TYPE STANDARD TABLE OF MDVU, " | |||
| lv_fvbepkomx | TYPE VBEPKOMX, " | |||
| lv_evbapkom | TYPE VBAPKOM, " | |||
| lt_fxbapiaddr1 | TYPE STANDARD TABLE OF BAPIADDR1, " | |||
| lv_i_new_pricing | TYPE KOMV-KSTEU, " SPACE | |||
| lv_evbkd | TYPE VBKD, " | |||
| lt_fxvbepkom | TYPE STANDARD TABLE OF VBEPKOM, " | |||
| lv_call_active | TYPE T185F-FCODE, " SPACE | |||
| lv_fvbapkomx | TYPE VBAPKOMX, " | |||
| lt_fxvbepkomx | TYPE STANDARD TABLE OF VBEPKOMX, " | |||
| lv_i_posnr | TYPE VBEPKOMX, " SPACE | |||
| lt_fxvbpa3kom | TYPE STANDARD TABLE OF VBPA3KOM, " | |||
| lv_i_simulation | TYPE SY-INPUT, " SPACE | |||
| lv_logic_switch | TYPE BAPISDLS. " |
|   CALL FUNCTION 'SD_SALES_ITEM_MAINTAIN' "Maintain a sales document item with schedule lines |
| EXPORTING | ||
| FVBAPKOM | = lv_fvbapkom | |
| FVBEPKOM | = lv_fvbepkom | |
| FVBEPKOMX | = lv_fvbepkomx | |
| I_NEW_PRICING | = lv_i_new_pricing | |
| CALL_ACTIVE | = lv_call_active | |
| FVBAPKOMX | = lv_fvbapkomx | |
| I_POSNR | = lv_i_posnr | |
| I_SIMULATION | = lv_i_simulation | |
| LOGIC_SWITCH | = lv_logic_switch | |
| IMPORTING | ||
| EMAAPV | = lv_emaapv | |
| EMAEPV | = lv_emaepv | |
| EVBAP | = lv_evbap | |
| EVBAPKOM | = lv_evbapkom | |
| EVBKD | = lv_evbkd | |
| TABLES | ||
| FXVBPAKOM | = lt_fxvbpakom | |
| FXKONVKOM | = lt_fxkonvkom | |
| IT_MDVU | = lt_it_mdvu | |
| FXBAPIADDR1 | = lt_fxbapiaddr1 | |
| FXVBEPKOM | = lt_fxvbepkom | |
| FXVBEPKOMX | = lt_fxvbepkomx | |
| FXVBPA3KOM | = lt_fxvbpa3kom | |
| . " SD_SALES_ITEM_MAINTAIN | ||
ABAP code using 7.40 inline data declarations to call FM SD_SALES_ITEM_MAINTAIN
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.| "SELECT single KSTEU FROM KOMV INTO @DATA(ld_i_new_pricing). | ||||
| DATA(ld_i_new_pricing) | = ' '. | |||
| "SELECT single FCODE FROM T185F INTO @DATA(ld_call_active). | ||||
| DATA(ld_call_active) | = ' '. | |||
| DATA(ld_i_posnr) | = ' '. | |||
| "SELECT single INPUT FROM SY INTO @DATA(ld_i_simulation). | ||||
| DATA(ld_i_simulation) | = ' '. | |||
Search for further information about these or an SAP related objects