SAP ISU_O_DISCOUNT_PREPARE_CLOSE Function Module for INTERNAL: Prepare Object Closing
ISU_O_DISCOUNT_PREPARE_CLOSE is a standard isu o discount prepare close SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for INTERNAL: Prepare Object Closing 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 isu o discount prepare close FM, simply by entering the name ISU_O_DISCOUNT_PREPARE_CLOSE into the relevant SAP transaction such as SE37 or SE38.
Function Group: EA47
Program Name: SAPLEA47
Main Program: SAPLEA47
Appliation area: E
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function ISU_O_DISCOUNT_PREPARE_CLOSE 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 'ISU_O_DISCOUNT_PREPARE_CLOSE'"INTERNAL: Prepare Object Closing.
EXPORTING
* X_EXIT_TYPE = 'BACK' "BACK=Back(F3), EXIT=Ende(F15), CANC=Cancel(F12)
* X_NO_DIALOG = "Indicator: Do Not Display Prompt
* X_CHANGED_FORCE = "Indicator: Save Dependent Object
IMPORTING
Y_DECISION = "User Decision from Save Prompt
Y_CHANGED = "Indicator: Save Object
CHANGING
XY_OBJ = "Object Data
EXCEPTIONS
DONT_EXIT = 1
IMPORTING Parameters details for ISU_O_DISCOUNT_PREPARE_CLOSE
X_EXIT_TYPE - BACK=Back(F3), EXIT=Ende(F15), CANC=Cancel(F12)
Data type: REGEN-EXIT_TYPEDefault: 'BACK'
Optional: Yes
Call by Reference: No ( called with pass by value option)
X_NO_DIALOG - Indicator: Do Not Display Prompt
Data type: REGEN-NO_DIALOGOptional: Yes
Call by Reference: No ( called with pass by value option)
X_CHANGED_FORCE - Indicator: Save Dependent Object
Data type: REGEN-CHANGEDOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for ISU_O_DISCOUNT_PREPARE_CLOSE
Y_DECISION - User Decision from Save Prompt
Data type: REGEN-DECISIONOptional: No
Call by Reference: No ( called with pass by value option)
Y_CHANGED - Indicator: Save Object
Data type: REGEN-CHANGEDOptional: No
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for ISU_O_DISCOUNT_PREPARE_CLOSE
XY_OBJ - Object Data
Data type: ISU20_DISCOUNTOptional: No
Call by Reference: Yes
EXCEPTIONS details
DONT_EXIT - Do Not Exit Screen
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for ISU_O_DISCOUNT_PREPARE_CLOSE 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_xy_obj | TYPE ISU20_DISCOUNT, " | |||
| lv_dont_exit | TYPE ISU20_DISCOUNT, " | |||
| lv_y_decision | TYPE REGEN-DECISION, " | |||
| lv_x_exit_type | TYPE REGEN-EXIT_TYPE, " 'BACK' | |||
| lv_y_changed | TYPE REGEN-CHANGED, " | |||
| lv_x_no_dialog | TYPE REGEN-NO_DIALOG, " | |||
| lv_x_changed_force | TYPE REGEN-CHANGED. " |
|   CALL FUNCTION 'ISU_O_DISCOUNT_PREPARE_CLOSE' "INTERNAL: Prepare Object Closing |
| EXPORTING | ||
| X_EXIT_TYPE | = lv_x_exit_type | |
| X_NO_DIALOG | = lv_x_no_dialog | |
| X_CHANGED_FORCE | = lv_x_changed_force | |
| IMPORTING | ||
| Y_DECISION | = lv_y_decision | |
| Y_CHANGED | = lv_y_changed | |
| CHANGING | ||
| XY_OBJ | = lv_xy_obj | |
| EXCEPTIONS | ||
| DONT_EXIT = 1 | ||
| . " ISU_O_DISCOUNT_PREPARE_CLOSE | ||
ABAP code using 7.40 inline data declarations to call FM ISU_O_DISCOUNT_PREPARE_CLOSE
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 DECISION FROM REGEN INTO @DATA(ld_y_decision). | ||||
| "SELECT single EXIT_TYPE FROM REGEN INTO @DATA(ld_x_exit_type). | ||||
| DATA(ld_x_exit_type) | = 'BACK'. | |||
| "SELECT single CHANGED FROM REGEN INTO @DATA(ld_y_changed). | ||||
| "SELECT single NO_DIALOG FROM REGEN INTO @DATA(ld_x_no_dialog). | ||||
| "SELECT single CHANGED FROM REGEN INTO @DATA(ld_x_changed_force). | ||||
Search for further information about these or an SAP related objects