
With SAP S/4HANA Cloud, a new way to develop and maintain Adobe form templates was necessary. SAP S/4HANA Cloud customers cannot access the backend, use transaction SFP, or use the ABAP workbench as they could for SAP Interactive Forms by Adobe. Hence, the use of gateway models has been established as a new data source for Adobe form templates. The gateway modelling tool SEGW can be used to model the data interface of the form.

To offer a dynamic data interface for forms, an alternative method of data retrieval was implemented using CDS (Core Data Services) and gateway services. The data interfaces are now dynamically created from the gateway service and, therefore, extensibility can be easily integrated into the development.
Dynamic Data Interface for Forms
For SAP Forms service by Adobe, it is not necessary (nor intended) for the customer to create an application program that retrieves the application data. When the creation of a document for a form template is triggered, a system service calls the form data provider. The data structure of the form data provider is also the form's interface (data connection). The form data provider may also be enhanced, which means that the form's interface is implicitly enhanceable now too.

The creation of a form data provider is only done by SAP. The customer cannot create a form data provider.
First, SAP creates a gateway service with the SAP GUI transaction SEGW (SAP can still access the backend, even in SAP S/4HANA Cloud). This gateway service is built upon CDS views. Upon activating the gateway service, the data model provider will be created. This means that the data model is persisted. The data model provider allows for ABAP break outs (functional additions or redefinitions), as it is possible to enhance this class by redefinitions in predefined subclasses.
When a form template is created for SAP Forms service by Adobe, it is necessary to name the form data provider that will be used. When the form template is downloaded, you receive an .xsd file with the interface (data connection/data view) and an .xdp file with the form template layout.
Creation of Form Data Providers
The creation of a form data provider by SAP can be summarized as follows:
In SAP S/4HANA Cloud, the creation of a gateway service via SEGW is only possible by SAP.
The concept is intended to be "cloud-ready" under all circumstances.
It is not intended for the customer to create a form data provider, neither from on-premise nor from cloud.
Only SAP creates a form data provider.
If the customer still uses on-premise, but later switches to cloud, there is no effort required to adapt.
The customer can create their own forms, but have to use a form data provider from SAP.
Typically, they will download a predelivered SAP template and create an adapted copy of it.
The customer’s form uses the same form data provider as the SAP template.
The customer's part in the creation of a form data provider can be summarized as follows:
The customer downloads the SAP form definition (.xdp file and .xsd file) from the SAP Fiori Maintain Form Templates app.
The customer edits the form definition with Adobe LiveCycle Designer and saves the .xdp file locally.
- The customer declares a customer template in the SAP Fiori Maintain Form Templates app.
- The customer uploads the .xdp file to the backend (SAP S/4HANA) using the SAP Fiori Maintain Form Templates app.
The customer customizes SAP S/4HANA output management so that the customer’s form is used instead of SAP’s form.

SAP creates CDS views as the data source of the form data provider with ABAP Development Tools (ADT).
SAP creates the gateway service using the SAP GUI transaction SEGW, and uses one or several CDS views as a data source (hierarchical data model). The form data provider has some peculiarities. For example, it needs to start with a QueryNode and it must not be registered as an Odata service.
When the gateway service project is activated, the data model provider will be generated. This is actually an ABAP class. This class comes with a subclass that allows for easy redefinitions of the original generated coding. This optional extension would only be done by SAP, as the customer cannot access any of these classes.

The hierarchical data structure of the form data provider is also the structure of the interface (data connection) of the form template. The service is called by the system when data for a document is needed. This hierarchical data structure is also the data view (data connection) when editing a form template with Adobe LiveCycle Designer.