SAP SURVEY_VALUES_PREPARE Function Module for CRM Surveys - Get Survey Values (XML)
SURVEY_VALUES_PREPARE is a standard survey values prepare SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for CRM Surveys - Get Survey Values (XML) 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 survey values prepare FM, simply by entering the name SURVEY_VALUES_PREPARE into the relevant SAP transaction such as SE37 or SE38.
Function Group: SURVEY_TOOL
Program Name: SAPLSURVEY_TOOL
Main Program: SAPLSURVEY_TOOL
Appliation area:
Release date: 09-Aug-2001
Mode(Normal, Remote etc): Normal Function Module
Update:

Function SURVEY_VALUES_PREPARE 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 'SURVEY_VALUES_PREPARE'"CRM Surveys - Get Survey Values (XML).
EXPORTING
APPLICATION = "Application
SERVICE = "Service
VALUES_GUID = "Survey Values GUID
VALUES_VERSION = "Version of Survey Values (to be) read
CREATION_TEMPLATE_GUID = "GUID of Survey Template used for creation
CREATION_TEMPLATE_VERSION = "Version of Survey Template used for creation
CHANGING
VALUES = "Survey Values' content
EXCEPTIONS
PARAMETER_ERROR = 1 NO_SUCH_SERVICE = 2 INTERNAL_ERROR = 3
IMPORTING Parameters details for SURVEY_VALUES_PREPARE
APPLICATION - Application
Data type: SVY_APPLICATIONOptional: No
Call by Reference: No ( called with pass by value option)
SERVICE - Service
Data type: SVY_SERVICEOptional: No
Call by Reference: No ( called with pass by value option)
VALUES_GUID - Survey Values GUID
Data type: SVY_GUIDOptional: No
Call by Reference: No ( called with pass by value option)
VALUES_VERSION - Version of Survey Values (to be) read
Data type: SVY_VERSIONOptional: No
Call by Reference: No ( called with pass by value option)
CREATION_TEMPLATE_GUID - GUID of Survey Template used for creation
Data type: SVY_GUIDOptional: No
Call by Reference: No ( called with pass by value option)
CREATION_TEMPLATE_VERSION - Version of Survey Template used for creation
Data type: SVY_VERSIONOptional: No
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for SURVEY_VALUES_PREPARE
VALUES - Survey Values' content
Data type: SVY_CONTENTOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
PARAMETER_ERROR - Error in parameters supplied
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_SUCH_SERVICE - Could not find SERVICE for APPLICATION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INTERNAL_ERROR - Error during survey processing
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for SURVEY_VALUES_PREPARE 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_values | TYPE SVY_CONTENT, " | |||
| lv_application | TYPE SVY_APPLICATION, " | |||
| lv_parameter_error | TYPE SVY_APPLICATION, " | |||
| lv_service | TYPE SVY_SERVICE, " | |||
| lv_no_such_service | TYPE SVY_SERVICE, " | |||
| lv_values_guid | TYPE SVY_GUID, " | |||
| lv_internal_error | TYPE SVY_GUID, " | |||
| lv_values_version | TYPE SVY_VERSION, " | |||
| lv_creation_template_guid | TYPE SVY_GUID, " | |||
| lv_creation_template_version | TYPE SVY_VERSION. " |
|   CALL FUNCTION 'SURVEY_VALUES_PREPARE' "CRM Surveys - Get Survey Values (XML) |
| EXPORTING | ||
| APPLICATION | = lv_application | |
| SERVICE | = lv_service | |
| VALUES_GUID | = lv_values_guid | |
| VALUES_VERSION | = lv_values_version | |
| CREATION_TEMPLATE_GUID | = lv_creation_template_guid | |
| CREATION_TEMPLATE_VERSION | = lv_creation_template_version | |
| CHANGING | ||
| VALUES | = lv_values | |
| EXCEPTIONS | ||
| PARAMETER_ERROR = 1 | ||
| NO_SUCH_SERVICE = 2 | ||
| INTERNAL_ERROR = 3 | ||
| . " SURVEY_VALUES_PREPARE | ||
ABAP code using 7.40 inline data declarations to call FM SURVEY_VALUES_PREPARE
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.Search for further information about these or an SAP related objects