SAP SAPSCRIPT_YES_NO Function Module for
SAPSCRIPT_YES_NO is a standard sapscript yes no SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 sapscript yes no FM, simply by entering the name SAPSCRIPT_YES_NO into the relevant SAP transaction such as SE37 or SE38.
Function Group: STXU
Program Name: SAPLSTXU
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function SAPSCRIPT_YES_NO 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 'SAPSCRIPT_YES_NO'".
EXPORTING
* DEFAULTOPTION = 'Y' "Cursor positioning on answer Yes or No
* TEXT = ' ' "Text with max.of 4 variables (symbols &)
* TITLETEXT = ' ' "Text for title bar
* VAR1 = ' ' "Variable 1 in text TEXT
* VAR2 = ' ' "Variable 2 in text TEXT
* VAR3 = ' ' "Variable 3 in text TEXT
* VAR4 = ' ' "Variable 4 in text TEXT
IMPORTING
ANSWER = "
IMPORTING Parameters details for SAPSCRIPT_YES_NO
DEFAULTOPTION - Cursor positioning on answer Yes or No
Data type:Default: 'Y'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TEXT - Text with max.of 4 variables (symbols &)
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TITLETEXT - Text for title bar
Data type: RSTXU-TITLEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
VAR1 - Variable 1 in text TEXT
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
VAR2 - Variable 2 in text TEXT
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
VAR3 - Variable 3 in text TEXT
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
VAR4 - Variable 4 in text TEXT
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for SAPSCRIPT_YES_NO
ANSWER -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for SAPSCRIPT_YES_NO 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_answer | TYPE STRING, " | |||
| lv_defaultoption | TYPE STRING, " 'Y' | |||
| lv_text | TYPE STRING, " SPACE | |||
| lv_titletext | TYPE RSTXU-TITLE, " SPACE | |||
| lv_var1 | TYPE RSTXU, " SPACE | |||
| lv_var2 | TYPE RSTXU, " SPACE | |||
| lv_var3 | TYPE RSTXU, " SPACE | |||
| lv_var4 | TYPE RSTXU. " SPACE |
|   CALL FUNCTION 'SAPSCRIPT_YES_NO' " |
| EXPORTING | ||
| DEFAULTOPTION | = lv_defaultoption | |
| TEXT | = lv_text | |
| TITLETEXT | = lv_titletext | |
| VAR1 | = lv_var1 | |
| VAR2 | = lv_var2 | |
| VAR3 | = lv_var3 | |
| VAR4 | = lv_var4 | |
| IMPORTING | ||
| ANSWER | = lv_answer | |
| . " SAPSCRIPT_YES_NO | ||
ABAP code using 7.40 inline data declarations to call FM SAPSCRIPT_YES_NO
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_defaultoption) | = 'Y'. | |||
| DATA(ld_text) | = ' '. | |||
| "SELECT single TITLE FROM RSTXU INTO @DATA(ld_titletext). | ||||
| DATA(ld_titletext) | = ' '. | |||
| DATA(ld_var1) | = ' '. | |||
| DATA(ld_var2) | = ' '. | |||
| DATA(ld_var3) | = ' '. | |||
| DATA(ld_var4) | = ' '. | |||
Search for further information about these or an SAP related objects