Constant Values enable you to specify which fields in the data source should be marked as constants in the mapping.
When creating or changing the mapping, you can manually set constant values for changing parameters.
Select the Property and choose Set Constant Value from the Map Operation screen. The Set Constant Value popup displays, with the Property in the Entity Name field.
Where Initial is set for the constant value, at runtime, the Data Model ignores the field, as though you did not select the field.
If BOR or RFC is your data source, you must enclose string values in apostrophes, for example,'Value'.
In case of RFC, using the data source entity BAPI_USER_GETLIST, its key parameter is USERNAME. After selecting the Properties you want to map, select the Property WITH_USERNAME and set a constant value for it by entering the character 'X'.
Do not use apostrophes for numeric values or the following ABAP statements, as these statements will be converted accordingly at runtime:
ABAP_TRUE
ABAP_FALSE
SPACE
Initial
SY-... (for example, SY-LANGU)
You can add constants for flat structures and for only one table row. You can assign constant values to components of structures or for tables as well, but in the latter case, one table row instance will always be populated with constant values and passed to the data source.
To delete a constant value, choose Reset Constant Value in the Map Operation screen.
Overview of the Map Operation Dialog
In addition, you can use the SAP Gateway Generators Cookbook to quickly create a Data Model and test the generated SAP Gateway service using the Data Model Generator tool.