ADS On HCP
ADS On HCP
ADS On HCP
1.2 Architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6
Upload Fonts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Configure Fonts and Print Information using XDC and XCI Files. . . . . . . . . . . . . . . . . . . . . . . . . 28
Data Migration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Connection Setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
SAP Forms by Adobe is a cloud service based on the ADS (Adobe Document Services) component by Adobe. It
is hosted on the SAP Cloud Platform (Neo environment). Since SAP Forms by Adobe provides virtually the
same features, you can use it as an alternative to ADS based on SAP NetWeaver and call it from an application
running on an ABAP or Java backend system.
Note
See also: Adobe Document Services for Form Processing (SAP NetWeaver).
Using SAP Forms by Adobe, SAP manages the complete service for you and is responsible for all patches and
updates.
After performing the configuration tasks to connect your ABAP system to SAP Forms by Adobe, you can start
using the service immediately without the need to manage any additional hardware resources.
As a system administrator, learn more in the following sections about the required configuration tasks on your
ABAP system, the Cloud Connector, your SAP Cloud Platform subaccount, and the ADS configuration tool.
Note
If you want to consume SAP Forms by Adobe from your own application developed and hosted on SAP Cloud
Platform, you can use the SAP Forms by Adobe REST API [page 36] to call the service.
Note
Using the SAP Forms by Adobe REST API for your Cloud application requires you to provide your own form
templates (using the Adobe LiveCycle Designer), as well as your own data files. See also: Using the Adobe
LiveCycle Designer [page 53].
For detailed information on the SAP Forms by Adobe scenarios, see: Use Cases [page 5].
Features
● Create interactive forms that look exactly like their paper counterparts
● Work with forms in online and offline scenarios
● Annotate PDF documents and collaborate on PDF document reviews
● Capture data using forms and import the data directly into the SAP system
● Allow users to digitally sign PDF documents
● Embed other file formats inside PDF documents as attachments
● You have a consumer subaccount on the SAP Cloud Platform, which is subscribed to SAP Forms by
Adobe.
Note
To get started with the SAP Forms by Adobe trial version, see this blog on SCN: SAP Forms by Adobe:
How to try out .
● On your own subaccount, you have a user ID that is registered with SAP ID service. See Assigning
Members in the Neo Environment.
● You have purchased the license for SAP Cloud Platform Forms by Adobe and received an e-mail
notification that SAP Forms by Adobe has been configured for your subaccount (productive use)
● You have enbaled the service for your productive subaccount, see Enabling SAP Forms by Adobe for Your
Subaccount [page 7].
● You operate an ABAP system based on version SAP NetWeaver 7.0 SP13 or higher.
Restrictions
Not supported:
● Parallelization
● HSM (Hardware Security Module) / MS-CAPI (Microsoft CryptoAPI) credentials for digital signatures
(including USB hardware token)
● Custom Identity Provider (supported instead: SAP ID service, see Prerequisites).
● ABAP test report FP_PDF_TEST_28
● Direct access to graphic URLs on customer internal server networks is not supported.
Note
Find a workaround for accessing internal graphic URLs using the Cloud Connector in SAP Note
2171542 .
● NW 7.0, NW 7.01: in ABAP report RSPO0022, add the prefix XDC/Customer/ to the xdc file name you want
to assign to a SAP device.
Note
For more details and the current list of known restrictions, see also SAP Note 2171547 .
Enhancements
Related Information
SAP applications can call the SAP Forms by Adobe REST API of SAP Cloud Platform Forms by Adobe to
generate print or interactive PDF forms.
There are currently two use cases for calling SAP Forms by Adobe:
1. SAP Forms by Adobe is called directly by an application running on a NetWeaver-based ABAP or Java
backend.
The application running on the ABAP backend uses the ABAP PDF Object, also known as the Forms
Processing Runtime. Java applications make use of the Java PDF Object. The ABAP backend can be an on-
premise system or a cloud-based system.
Example: Applications on Business Suite, S/4HANA on-premise edition, S/4HANA cloud edition.
2. The second use case is following the RESTful service principle. SAP Forms by Adobe is not called directly.
Instead, the application calls the SAP Forms by Adobe REST API via HTTP.
The first edition provides a subset of the already known ABAP PDF Object features. They are addressed by
different URIs (Uniform Resource Identifiers) where each URI supports data and document exchange in a
JSON format. The SAP Forms by Adobe REST API delivers a comprehensive description and is easy to test.
Similar to the first use case, the application calls the REST API via an SAP Cloud Platform subaccount that
must be subscribed to SAP Forms by Adobe.
Example: Services/applications running on SAP Cloud Platform.
Architecture [page 6]
Initial Steps in Your SAP Cloud Platform Subacccount [page 7]
Connecting Your ABAP System [page 10]
SAP Forms by Adobe REST API [page 36]
1.2 Architecture
You can use the service SAP Forms by Adobe in two different scenarios:
1. Calling SAP Forms by Adobe from an application running on an ABAP or Java backend.
In this use case, there are three sections where you connect your ABAP system to SAP Forms by Adobe:
○ Configuration UI: You use the configuration UI to manage your own fonts, XDC files, credentials, and so
on.
○ Web Service: Your ABAP system calls SAP Forms by Adobe in a web service using an SSL connection.
○ Destination Service: SAP Forms by Adobe calls back to the ABAP system to retrieve the form template,
using a secure connection in the cloud connector.
2. Calling SAP Forms by Adobe from an application through the SAP Forms by Adobe REST API via HTTP.
The diagram below shows examples (scenarios 1 and 2) for these use cases:
Enable SAP Forms by Adobe for your subaccount and perform basic role assignment.
Before you can configure SAP Forms by Adobe, you must enable the service for your subaccount from the
cockpit.
Prerequisites
You must have a valid license for SAP Forms by Adobe, see Pricing Information .
Procedure
Once you are logged on to the SAP Cloud Platform cockpit, you can use a self-service to enable SAP Forms by
Adobe from your subaccount.
Note
If you use SAP Forms by Adobe from more than one subaccount, the following steps apply to each of these
subaccounts.
1. From your subaccount, choose Services from the navigation panel to access the list of available services.
SAP Forms by Adobe is still in status Not enabled.
3. After a short processing time, the service and the configuration links are enabled.
4. Proceed with the next configuration step: Assigning Roles to Users [page 8].
How to assign roles to users for SAP Forms by Adobe in your SAP Cloud Platform subaccount.
Your subaccount user needs a basic role assignment to be able to work with SAP Forms by Adobe:
● The role ADSAdmin is required for calling the configuration tool of SAP Forms by Adobe.
● The role ADSCaller is required for calling the web service of SAP Forms by Adobe.
SAP Forms by Adobe must be enabled for your subaccount, see Enabling SAP Forms by Adobe for Your
Subaccount [page 7].
Procedure
To enable access to the web service of SAP Forms by Adobe, do the following:
1. Open the SAP Cloud Platform cockpit for your subaccount that is subscribed to SAP Forms by Adobe.
2. Choose Services.
3. Select SAP Forms by Adobe and in section Service Configuration of the detail view choose the link SAP
Forms by Adobe (Roles & Destinations).
4. Choose Roles in the navigation pane on the left-hand side. On the Roles screen, the roles ADSAdmin and
ADSCaller are displayed.
5. Select ADSAdmin to see the users assigned to this role in the frame below.
Note
This could be either your user for the Service Marketplace (s user) or your user for the SAP Community
Network (SCN user).
Result
Configure AS ABAP, the SAP Cloud Platform cloud connector, and your SAP Cloud Platform subaccount to
enable communication with SAP Forms by Adobe.
To establish the connection between SAP Forms by Adobe and your ABAP system, you need to perform several
configuration steps on AS ABAP, the SAP Cloud Platform cloud connector (formerly known as SAP HANA
Cloud connector), and your SAP Cloud Platform subaccount.
The key task is to specify and map the required destinations for RFC/HTTP communication.
Learn more about the configuration details for each component in this section.
Setting up the SSL connection, RFC destination, and HTTP communication in AS ABAP.
You have to perform several configuration steps in your ABAP system to use it with SAP Forms by Adobe.
Prerequisites
The communication between the ABAP system and SAP Cloud Platform must use SSL.
Note
For more information, see Configuring SAP NetWeaver AS for ABAP to Support SSL.
Related Information
Configure your SSL connection to SAP Cloud Platform in the ABAP Trust Manager.
To set up an SSL connection between the ABAP system andSAP Cloud Platform, you have to import the
required security certificates into AS ABAP.
We recommend you to create and use your individual SSL Client PSE for importing the required Root CA
certificates. For more information, refer to the Help Portal documentation Creating Individual SSL Client
PSEs.
Procedure
Perform the following steps to set up the SSL connection to the SAP Cloud Platform:
Note
For more information about managing certificates in AS ABAP, see also: Configuring SAP NetWeaver AS for
ABAP to Support SSL.
Note
Due to a switch of root certificates on SAP Cloud Platform, certificates on all new SAP Cloud Platform
data centers and certificate renewals on the existing data centers use the new root CA issuer DigiCert.
For up-to-date information on the domain-specific validity of certificates on SAP Cloud Platform,
please follow this SCN blog: Certificate Authority Change .
Result
After importing the certificate, the certificate list and details in ABAP Trust Manager look like this:
Create and configure an RFC destination for SAP Forms by Adobe in AS ABAP.
To access the web service of SAP Forms by Adobe, you need to create and configure an RFC destination.
Note
Procedure
Technical Settings
Note
You can find your tenant subaccount name (ID) in the SAP Cloud Platform cockpit of your
subaccount:
Note
The complete domain name for the target host hana.ondemand.com depends on your location.
For more information on available landscapes (data centers) see: Regions and Hosts.
○ <Service No.>
Enter 443, which is the default SSL port of the SAP Cloud Platform service.
○ <Path Prefix>
Enter the string /ads.web/AdobeDocumentServicesSec/Config?style=rpc
Note
Note
○ Specify also the HTTP proxy parameters if an HTTP proxy is required for your ABAP system to access
the internet.
Note
This user must be assigned to the role ADSCaller. Enter the same password you defined on the SAP
ID service for this user.
3. In Security Options , select Active to enable SSL and specify the name of the SSL certificate store where
you imported the SAP Cloud Platform root certificate.
4. Save your entries.
Note
If you perform the connection test in SM59, you get an HTTP 500 error. You can ignore this error message.
To test the connection, use the ABAP test report FP_PDF_TEST_00 instead.
Note
If the connection test (using ABAP report FP_PDF_TEST_00) is successful, you see the version information
from SAP Forms by Adobe:
Set up the ICF service in AS ABAP to enable HTTP communication with SAP Forms by Adobe.
In the ABAP system, an active ICF service is required to enable communication between AS ABAP and the SAP
Forms by Adobe destination service through the cloud connector.
Procedure
Note
These steps might not be required if you have already configured the destination and ICF service on your
ABAP system for the ADS running on SAP NetWeaver AS Java.
Download, install, and configure the SAP Cloud Platform cloud connector for secure communication between
SAP Forms by Adobe and the ABAP system.
The SAP Cloud Platform cloud connector (Cloud Connector) provides a secure connection between the
services running on SAP Cloud Platform and the on-premise system. The Forms scenario uses this connection
for callbacks of SAP Forms by Adobe to the ABAP system. Some use cases transfer template and runtime data
using this channel.
Form templates are stored in the ABAP system and also cached on ADS. ADS loads the template from the
ABAP system when the form is rendered the first time and also when the template was updated. An ICF service
of the ABAP system performs this process using path /sap/bc/fp. If you use bundling of forms, the runtime
data is transferred using the path /sap/bc/fpads.
Note
For more information about bundling, see Bundling Form Templates in a Call.
The Cloud Connector is available for Linux and Windows. You can install it on the application server of your
ABAP system or on separate hardware. The prerequisite is that it is in the same network as your ABAP system.
● For more information about installing the Cloud Connector, refer to: Installing the Cloud Connector.
● For more information about initial configuration of the Cloud Connector, see: Initial Configuration
Note
Depending on the Cloud Connector version you use, the procedures may vary slightly. To find the suitable
Cloud Connector documentation version, see SAP Cloud Platform Cloud Connector.
Related Information
In the SAP Cloud Platform subaccount, the "real" (internal) host information of the ABAP system is not visible.
A virtual host name is used instead. In theCloud Connector, you perform the mapping between the virtual and
internal host name.
Prerequisite
Procedure
Note
The <Internal Host> corresponds to the ABAP system you want to connect to the Cloud
Connector.
Note
To display the host name of your AS ABAP, log on to AS ABAP and call transaction SICF. In the main
menu, choose Goto Port Information . The information is displayed on a screen, where the
HTTP port is specified under Services.
Choose Next.
5. Specify the <Virtual Host>: <virtual hostname>:<virtual port>. Any entry for <Virtual
Host> and for <Virtual Port> is OK.
Note
You should remember your entries for <virtual hostname>:<virtual port>, because you
need them later when configuring the destination in your SAP Cloud Platform subaccount.
6. Select a <Principal Type> (Kerberos or X.509 Certificate) if you are using principal
propagation, otherwise leave the default value None. Choose Next.
7. Optionally, you can enter a <Description> for your system mapping. Choose Next.
8. Check the summary of your entries and select Check Internal Host, if you want to verify the internal
host name you entered before.
3. Choose Finish.
Now you can see your mapping in section Mapping Virtual to Internal System in the list of mapped systems. To
add accessible resources for your mapping, do the following:
1. Highlight the row with the Virtual and Internal hosts you just added .
Note
After adding resources, the resources accessible on the internal host will be displayed in section
Resources Accessible On... below the list of mapped systems.
Result
The screenshot below shows the mapping of a virtual host to an internal host (this is the ABAP system) and the
resources used on the ABAP system.
Defined resources:
Enter ABAP destination data for SAP Forms by Adobe in yourSAP Cloud Platform subaccount.
The destination information you specified for the ABAP system on the Cloud Connector also needs to be stored
in your SAP Cloud Platform subaccount.
Procedure
Proceed as follows to configure the destination in your SAP Cloud Platform subaccount:
Note
The location ID must be specified in the Cloud Connector, see Set up Connection Parameters and
HTTPS Proxy.
10. Under <URL>, specify the Virtual host name you specified in the Cloud Connector for your ABAP system
before.
Note
The URL string looks like this: http://<virtual host name>:<virtual port>. Enter the values
for <virtual host name>, and <virtual port> as specified when you configured the destination
in the Cloud Connector.
Per default, destination FP_ICF_DATA_<SID> calls the default ABAP client (specified by the profile
parameter login/system_client).In order to use a non-default ABAP client, perform the following steps
in the ABAP system:
Result
Related Information
After finishing all configuration steps, you can use several ABAP reports to test whether the connection is
working fine.
● FP_PDF_TEST_00
● FP_CHECK_DESTINATION_SERVICE
● FP_TEST_03
● FP_TEST_IA_01
● FP_CHECK_HTTP_DATA_TRANSFER
Note
For more information, see also: Checking ADS Configuration in an ABAP Environment.
Result
In case of problems, see SAP Note 944221 (currently only for configuration on the ABAP back end, for
example ICF service settings).
If you already have specific configuration settings or files on your NetWeaver ADS, you can migrate them to
SAP Forms by Adobe.
● Fonts: /usr/sap/<SID>/SYS/global/AdobeDocumentServices/FontManagerService/fonts/customer
● XDC files: /usr/sap/<SID>/SYS/global/AdobeDocumentServices/lib
● Custom_xfa.XCI file: /usr/sap/<SID>/SYS/global/AdobeDocumentServices/lib
● Credentials: /usr/sap/<SID>/SYS/global/AdobeDocumentServices/TrustManagerService/trust/
credentials
● Job Profiles: /usr/sap/<SID>/SYS/global/AdobeDocumentServices/JobProfiles/Adobe/Print
Procedure
Note
These files and settings are stored on SAP Cloud Platform in an area that is reserved exclusively for your
tenant and can only be accessed by members of your subaccount.
Related Information
In the Fonts section, you can upload and download fonts required for PDF rendering.
● OpenType® (.otf)
● TrueType® (.ttf)
● PostScript® Type 1 (.pfb, .pfm)
Note
In the XDC, XCI Administration section, you can manage various XDC and XCI files.
● XDC files contain print information, such as printer details and page layout information required to render
documents in various print formats, including PDF.
○ Under Customer XDC File, you can upload, download, display, and configure your own XDC files.
○ Under Adobe XDC File, you can view and download the XDC files that Adobe provides.
Note
Find more information in the Help Portal documentation about Mapping Fonts and Changing the Default
PDF Version.
Note
For details about setting printer options in your ABAP system (without modifying XDC files), see also:
Settings Using Additional Print Options in the Help Portal documentation.
● Credentials: Upload signatures used to sign PDF documents to the server and configure the signatures
with an alias name. You can also create new credentials here.
Note
The ReaderRights credential is preconfigured for your subaccount. You cannot install or delete
ReaderRights.
Note
For more information, refer to Installing and Configuring Credentials in the Help Portal documentation..
● Trusted Anchors: Upload certificates required for verifying PDF signatures to the server and configure the
certificates with an alias name. You can also create new certificates here.
● Certificate Revocation Lists (CRL):
○ Manage a list of revoked signatures.
○ Upload a new list to the server from your local machine and define URLs for these CRL files.
○ You can configure the CRL Invalidation Period to customize how CRL files are fetched from URLs.
For example, if you set its value to 0, the CRL file is fetched from the URL for every request. If you set
the value to -1, the CRL is not fetched from the URL.
● Passwords: Configure passwords required to protect rendered PDF files with their alias names.
Note
A password must be at least 6 characters long. The maximum length is 255 char.
You can add job profiles for different jobs that the application can use. Choose Job Profiles in the left pane and
expand a node in the Details pane to view job profiles in the system.
Some predefined Job Profiles are available in the Adobe folder. In addition, you can upload XML files containing
custom job profiles.
● To view the contents of a job profile, select the profile and choose Show Job Profile Content.
○ To view job profile templates provided by Adobe, expand the Adobe node and double-click a template.
● First, select the row JobProfiles. Then, choose Create Folder to create a folder to upload a custom profile.
○ To upload a custom job profile, choose Upload and browse to the folder containing the XML file that
specifies the custom profile.
You can use the Configuration UI to download PDF files containing system error logs.
Note
Important:
Support files will only be created and available, if the folder size is larger than 0 MB. The default size of the
folder is 0 MB.
Note
Important:
Be aware that support files may contain your business data. For more information on data security, see:
Data Storage Security.
For security reasons, you should delete stored Error.PDF files on a regular basis.
● Choose Support Files in the left pane to view the PDF files containing error logs.
● To download a PDF file, select it in the Details section and choose Download.
You can also configure the size of the folder that contains the error files.
● Choose Configure Folder Size and drag the slider to configure the folder size.
You can configure the size to a maximum of 10 MB. If the combined size of the error files exceeds the set
size, the oldest files are replaced by the most recent error files that are stored in the folder. If you reduce the
folder size, older error files will be deleted until the folder size is reached.
You can also configure the cache for the destination folder using the Configuration UI.
Note
● Choose Clear Cache to delete the cache for PDF Forms or the destination cache.
You can use the configuration UI to download or upload your configuration data.
Choose Data Migration in the left navigation pane of the configuration UI to access the Download and Upload
functions:
Note
You cannot download the alias names. After uploading downloaded files you have to re-enter the
corresponding alias names manually.
Note
Note
You can only download the files that you uploaded previously. Predefined data are not downloaded.
If you choose Upload Data, you can browse for the files to be uploaded. When uploading files, keep in mind the
following upload behavior:
● If you upload a file that already exists in the target tenant, the file will be overwritten.
Note
Uploading Support File settings overwrites the size configuration only. Existing error.pdf files are not
changed.
Note
Uploading Caching information only overwrites the cache size setting, not the cached content.
● When uploading files that don't exist in the target tenant, other existing files won't be touched.
● After uploading downloaded files from Document Security, you have to re-enter the corresponding alias
names manually.
Import a certificate and configure the required templates to connect your WebDynpro Java application to SAP
Forms by Adobe.
The following procedure describes the required steps for connecting a WebDynpro Java application to SAP
Forms by Adobe.
Note
4. In Details of view ‘WebServiceSecurity’ at the bottom of the screen, choose Import Entry:
5. In the popup, select entry type X.509 Certificate and import baltimoreroot.crt:
Note
Due to a planned switch of root certificates on SAP Cloud Platform from Baltimore/Verizon to
VeriSign/Symantec, for some domains (regions) the Baltimore/Verizon certificate can no longer be
used after the current validity period has ended. To make sure that you have a valid certificate in the
future, you should also download and import the following Symantec certificate . The procedure is
the same as for baltimoreroot.crt (step 1 may require to save the public key content as local file
using Copy & Paste in case there is no automatic Save As option provided by your browser).
For up-to-date information on the domain-specific validity of certificates on SAP Cloud Platform,
please follow this SCN blog: Certificate Authority Change .
4. Choose the Security tab and select HTTP Authentication from the Authentication dropdown list.
5. Select the option User ID/Password (Basic).
6. In the Details section, enter a user/password combination that is assigned to the role ADSCaller.
7. In section SSL Server Certificates, select Accept Certificates in Keystore View.
8. Select WebServiceSecurity from the dropdown list.
9. Choose Finish to save your entries:
10. Create or adjust a second destination template SecureConfigPort_Document performing the same
steps as described in 3.-9. As URL string, enter https://adsformsprocessing-<tenant
id>.<landscape>/ads.web/AdobeDocumentServicesSec/Config?
wsdl&mode=ws_policy&style=document.
11. Check your configuration as described in SAP Note 1443819
The following sections show you how to get started with the SAP Forms by Adobe REST API and how to
implement a simple REST client in Java. Also, you can find information on supportability and troubleshooting.
Related Information
The SAP Forms by Adobe REST API uses a preconfigured destination to connect to the Adobe Document
Services (ADS) of SAP Forms by Adobe.
To call SAP Forms by Adobe you need a user who is assigned to the role ADSCaller.
1. Go to the main screen of your subaccount in the SAP Cloud Platform cockpit and choose Services from the
main menu.
2. Select the tile SAP Forms by Adobe and choose the link SAP Forms by Adobe (Roles and Destinations).
Note
By default, the user who enabled the service is assigned to the ADSCaller role.
The SAP Forms by Adobe destination ADS is partly preconfigured for your subaccount. To use it, you must
finalize it by defining the authentication.
1. Go to the main screen of your subaccount in the SAP Cloud Platform cockpit and choose Services from the
main menu.
2. Select the tile SAP Forms by Adobe and choose the link Destination for SAP Forms by Adobe REST API.
3. The Destinations screen opens. Press the Edit button of the SAP Forms by Adobe destination ADS.
Note
The user must be the same user that you assigned to the ADSCaller role.
Note
The system performs a network ping. It does not check any authentication.
The SAP Forms by Adobe REST API requires OAuth for authentication.
● using Java
● using the Postman OAuth client
If you use a different client, refer to the corresponding product-specific documentation and apply the
settings accordingly.
Related Information
Note
Depending on your specific implementation, retrieving the OAuth credentials may be different.
We use the Java Apache HttpComponents to generate an OAuth token from the SAP Cloud Platform OAuth
service.
Related Information
This section shows you how to register an OAuth client in the SAP Cloud Platform cockpit.
1. Go to the main page of your subaccount in the SAP Cloud Platform cockpit and choose Security → OAuth.
2. Go to the Clients tab. Here you can register new clients that are authorized to use the SAP Forms by Adobe
REST API.
3. Press the button Register New Client.
Apache HTTPClient java object is used to establish the communication between client/OAuth server and SAP
Cloud Platform. This client helps to send and consume the information that you need to retrieve the access
token.
By sending an HTTP Post request to this URL a valid token will be returned as a response. You can use this
token for further requests sent to the REST API.
The Token Endpoint is protected by Basic Authentication. The <client ID> serves as user name and
<client secret> as password.
Note
The credentials must be encoded with BASE 64 and added to the header of HTTP Post object.
It is required that you define the grant type parameter and the scope within the request. Add the parameters to
the HTTP body of the request as content-type: “application/x-www-form-urlencoded”.
The HTTP response message from the server can be interpreted by the HttpResponse object after executing
the POST request.
HttpResponse includes the message entity which has been returned by the REST API. Therefore, we should
unwrap this response object to process the JSON entity accordingly.
{
"access_token":"abcabcabcabcabcabcabcabcabc00",
"token_type":"Bearer",
"expires_in":5184000,
"scope":"generate-ads-output"
}
In case your requests are sent through a proxy, add the following code lines to your HTTP Post object before
sending the actual request:
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.Base64;
import org.apache.commons.io.IOUtils;
import org.apache.http.HttpHost;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.HttpClientBuilder;
public class OAuthClient {
private String tokenEndpoint = "https://oauthasservices-
<subaccountuser>.[xxx.]hana.ondemand.com/
oauth2/api/v1/token";
private String client_id = "myclient_id";
private String client_secret = "mysecret";
private String grant_type = "client_credentials";
private String scope = "generate-ads-output";
public String callService() {
/* HTTPCLIENT AND HTTPPOST OOBJECT */
HttpClient httpClient = HttpClientBuilder.create().build();
HttpPost httpPost = new HttpPost(tokenEndpoint);
/* AUTHENTICATION CREDENTIALS ENCODING */
String base64Credentials =
Base64.getEncoder().encodeToString((client_id + ":"
+ client_secret).getBytes());
/* HEADER INFO */
httpPost.addHeader("Authorization", "Basic " + base64Credentials);
httpPost.addHeader("Content-Type", "application/x-www-form-
urlencoded");
/* PROXY CONFIG */
HttpHost target = new HttpHost("proxy", 8080, "http");
RequestConfig config =
RequestConfig.custom().setProxy(target).build();
httpPost.setConfig(config);
/* OAUTH PARAMETERS ADDED TO BODY */
StringEntity input = null;
try {
input = new StringEntity("grant_type=" + grant_type + "&scope=" +
scope);
httpPost.setEntity(input);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
/* SEND AND RETRIEVE RESPONSE */
HttpResponse response = null;
try {
response = httpClient.execute(httpPost);
} catch (IOException e) {
e.printStackTrace();
}
/* RESPONSE AS STRING */
String result = null;
try {
result = IOUtils.toString(response.getEntity().getContent(),
"UTF-8");
} catch (IOException e) {
e.printStackTrace();
}
return result;
}
public static void main(String[] args) {
OAuthClient oauthClient = new OAuthClient();
The following tutorial describes how to configure OAuth with the Postman client.
Related Information
This section shows you how to register an OAuth client in the SAP Cloud Platform cockpit. The following
procedure uses the Postman client as example.
Note
If you use a different OAuth client, enter the product-specific data accordingly.
1. Go to the main page of your subaccount in the SAP Cloud Platform cockpit and choose Security → OAuth.
2. Go to the Clients tab. Here you can register new clients that are authorized to use the SAP Forms by Adobe
REST API.
3. Press the button Register New Client.
The following screenshot of the SAP Cloud Platform cockpit shows the usage of Postman as client:
10. Make a copy of the URLs for <Authorization Endpoint> and <Token Endpoint>.
You will need to enter these URLs later in your OAuth client:
The following example procedure describes how to get an access token using the Postman client.
Note
For other OAuth clients, please refer to the corresponding product documentation.
Note
The newly created Token is visible in the Token Management. You can open the management via the SAP Cloud
Platform cockpit.
1. Go to the main page of your subaccount in the SAP Cloud Platform cockpit and choose Security → OAuth.
2. Go to the tab Branding.
3. Choose the End User UI URL. The following screen appears (example):
● https://adsrestapiformsprocessing-<yoursubaccount>.<yourregionhost:
[xxx.]hana.ondemand.com>/ads.restapi/v1/
Note
To find out the available features, read the documentation of the ADS REST API Specification available under:
● https://adsrestapiformsprocessing-<yoursubaccount>.<yourregionhost:
[xxx.]hana.ondemand.com>/ads.restapi/
Go to Your subaccount on SAP Cloud Platform cockpit and choose Services → Forms by Adobe → ADS REST API
Specification.
Related Information
This tutorial shows how to create a simple REST client being able to call the SAP Forms by Adobe REST API in
Java and to process the JSON response entity. We will send an ADS Render Request to the REST API and
process the REST response accordingly.
There are numerous possibilities and libraries which can help to create a simple REST client in Java. In this
example, we are using the Apache HttpComponents. This library provides a wide toolset for the creation and
maintenance of low-level Java components focused on HTTP and associated protocols. Following packages are
required:
import org.apache.http.HttpHost;
Example Code
As the communication between client and server is done via HTTP we create an Apache HTTPClient. This client
side HTTP transport library can transmit and receive HTTP messages.
In the next step, we create an HttpPost Object. This object enables an HTTP Post request. Thus, a target URL
and head information should be added as well as the actual JSON input.
The API is protected by OAuth2. For configuration details, see Configuring OAuth 2.0.
The OAuth token must be added to the header of every request send to the service.
Data input and output is always wrapped in JSON envelope. For this reason, content-type should be always
application/json.
request.addHeader("content-type", "application/json");
The JSON input string can be mapped to a StringEntity object which is added as an entity to the POST request.
The HTTP response message from the server can be interpreted by the HttpResponse object after executing
the post request.
HttpResponse includes the message entity which has been returned by the REST API. Therefore, we should
unwrap this response object to process the JSON entity accordingly.
The resulting String now includes the JSON returned from the REST Service. This is just one possibility to
convert the HTTP response. Of course, any other method can be applied in to fit best to your implementation.
In case requests being sent behind a proxy please add following configuration to your HttpPost object.
Sample Code
package com.sap.formsprocessing.rest;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import org.apache.commons.io.IOUtils;
import org.apache.http.HttpHost;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.HttpClientBuilder;
public class RestClient {
public String callService() {
/* TARGET URL AND JSON */
String url = "<<base url>>/ads.restapi/v1/adsRender/pdf";
String json = "<<your json (please find the Example JSON in the
content section)>>";
/* HTTPCLIENT AND HTTPPOST OOBJECT */
HttpClient httpClient = HttpClientBuilder.create().build();
HttpPost request = new HttpPost(url);
/* ADD HEADER INFO */
request.addHeader("authorization", "Bearer <<token>>");
Using the SAP Forms by Adobe REST API for your Cloud application requires you to provide your own form
templates using the Adobe LiveCycle Designer.
Adobe LiveCycle Designer supports you in creating templates for interactive and print forms by providing a
wide set of design functions.
Find more information in this section on how to install and use the Adobe LiveCycle Designer.
Note
For a complete documentation of the tool, refer to the Adobe product documentation .
To download and install or update the Adobe LiveCycle Designer, follow the instructions given in SAP Note
2187332 (download and installation of version 11.0).
Related Information
Tutorial: Create a Simple Template with Generated Sample Data [page 54]
In this short and simplified example, we will demonstrate how to create a template and a sample data file
binding using the Adobe LiveCycle Designer.
Note
This example does not include all capabilities of the LiveCycle Designer. It can be used as a starting point
for later development.
4. On the next page choose Finish, the template overview will open.
5. Add objects from the object library to the design view via drag and drop.
1. Several text fields
2. Date/time field
3. Time field
We will use these objects to demonstrate the sample data generation and data binding.
8. In the next view select an appropriate file path and file name and generate the data xml-file.
In the next steps, this file will be integrated into LiveCycle Designer’s Data View:
9. Close the Form Properties window and select the Data View tab next to the Design View. Right-Click below
the Data View tab and choose New Data Connection….
(Confirm the prompt about the clearance of Use Name data bindings).
12. On the Data View you should now find the data nodes from the data xml file. These nodes can be bound to
the fields on the template’s Design View.
14. Confirm the binding and select Update all related properties. Press Ok.
15. Repeat the data binding for all remaining fields accordingly.
16. For every data node bound to a field you will find a new tag/symbol in the Data View.
Note
It is the responsibility of the application implementing the REST Service to maintain and provide the XML
data structure that fits the preferred PDF template. External data that you may want to include in a
resulting PDF must be transferred in this XML structure accordingly. Otherwise, it is not possible to render
a PDF based on template and data file.
This document provides information related to SAP Cloud Platform Forms by Adobe. It is directed to SAP
developers and support teams who work with applications for generating print or interactive PDF forms by
using the Adobe Document Services. Read the below prerequisites and guidelines for the usage of SAP Forms
by Adobe.
● As a developer, implement the supportability functions into your application to ensure that your
application can be supported. If you need to analyze problems, follow the instructions given in section
Analyze Issues.
● As a supporter, check the supportability functions of the application and follow the same instructions
mentioned in Analyze Issues.
If you want to analyze and troubleshoot errors occurring in your application that are related to the SAP Forms
by Adobe REST API, perform the initial steps described below:
The SAP Forms by Adobe REST API provides supportability functions that help to analyze connectivity issues
or render problems. Error messages and Error.PDF in the response streams inform about the reason of issues.
The possibility of setting traces helps to better understand the root causes.
To call the SAP Forms by Adobe REST API in your application you must implement a handling of error
messages and response streams that are provided by the REST API.
In detail you need to:
In case of HTTP 200 response code, a TraceString node will be added to the resulting JSON, showing additional
runtime information.
The following sections provide more details and examples explaining the JSON structure.
The JSON response contains responses and error messages from SAP Forms by Adobe. Depending on the
feature called by the user the JSON output will vary. See the documentation of the REST API for each feature
under:
https://adsrestapiformsprocessing-<yoursubaccount>.<yourregionhost:
[xxx.].hana.ondemand.com>/ads.restapi/
Besides rendering request errors, the general Error JSON will always have the same structure.
HTTP 500
{ "message": "Internal API or ADS Error",
"results": "Short description of error",
"traceString": "Detailed description about what exactly went wrong",
"errorLevel": "ADS or API Error Level" }
When SAP Forms by Adobe fails to generate an output, it returns an Error.pdf file. The REST API provides this
Error.pdf as part of the JSON response (HTTP 500). This is restricted to the rendering feature of the service.
The Error.PDF contains information that is useful to analyze and to reproduce the issue if needed. Parts are, for
example, the template file, the runtime xml data and trace information.
HTTP 500
{ "message": "Internal ADS Rendering Error",
"results": "Error during rendering of PDF file",
"traceString": "Detailed description about what exactly went wrong",
"errorLevel": "ADS Error Level",
"errorPDF": "V2hvIGluIHRoZSB3b3JsZCB3aWxsIGRlY29kZSB0aGlzIFN0cmluZz8=" }
If the output of the returned PDF is not as expected, for example if there are problems with pagination or
layout, or if the trace information contained in the Error.pdf is not detailed enough, set a higher trace level.
The recommendation is to set a trace level value of 2. The REST API will return a JSON response that contains a
PDF with additional information or if no PDF can be created at all, a detailed trace.
POST
https://adsrestapiformsprocessing-<yoursubaccount>.[xxx.]hana.ondemand.com/
ads.restapi/v1/adsRender/pdf?TraceLevel=2
Content-Type: application/json
{ "template" : "VGhpcyBjb3VsZCBiZSB5b3VyIHRlbXBsYXRl",
"data" : "VGhpcyBjb3VsZCBiZSB5b3VyIGRhdGEgZmlsZQ=="}
The following section provides an overview of different issue types related to the SAP Forms by Adobe REST
API that may occur in your application. Basically, you can distinguish between internal API errors and internal
ADS errors (i.e. errors related directly to the ADS component of SAP Forms by Adobe).
Issue Types
The primary piece of information helping to understand and correct the problem is usually included in the
response error JSON. Within the JSON, detailed information about the corresponding processing issue is
shown.
To analyze, check the response strings in JSON from the API. The message in the response JSON tells you, if
it’s an ADS error or an API error. This could be Internal API Errors or Internal ADS Errors.
Internal API Errors are usually assigned a specific HTTP Error Code. Besides the information included in the
JSON, this code may help to interpret the error cause:
415 Unsupported Media Type The Media Type send to the API is not
application/json.
Internal ADS Errors are always assigned to an HTTP 500 status code.
The following information describes the recommended action for each error type.
Related Information
1. Follow the instructions stated in the JSON Error response to detect missing mandatory fields or formatting
issues.
2. Check your application:
1. Is a JSON envelope send as Content-Type: application/json within the request?
2. Is the JSON envelope formatted correctly?
3. Are all mandatory fields included in the JSON?
3. Correct your application by adding missing fields to the JSON input of your request or correcting the JSON
format.
1. Identify and fix all wrong BASE64 strings based on the information given in the JSON error response.
2. Check your application:
1. Does the BASE64 string contain the expected BASE64 string set?
2. Is the BASE64 string length valid?
3. Is the BASE64 encoding technique correctly applied?
3. Correct your application.
If you receive an error, do the following checks in the SAP Cloud Platform cockpit of the consumer subaccount.
The required check may depend on the error message.
Note
See also Tutorial: OAuth Setup using the Postman Client [page 45]
Note
The Base URL for the calling features of the SAP Forms by Adobe REST API is: https://
adsrestapiformsprocessing-<yoursubaccount>.<yourregionhost:
[xxx.]hana.ondemand.com>/ads.restapi/v1/ (see also: Regions and Hosts).
Internal API Error - SAP Forms by Adobe REST API connection issues
1. Is the URL pointing to the API valid? Check, if the name of the consumer subaccount <yoursubaccount> is
correct. See step 4.
2. Correct the URL according to the available REST resources in the documentation.
3. Check if the SAP Forms by Adobe REST API works by opening the API documentation in your browser.
Example: https://adsrestapiformsprocessing-<yoursubaccount>.
[xxx.]hana.ondemand.com/ads.restapi/
4. You will receive a response, if you enter the correct URL and the SAP Forms by Adobe REST API is up and
running.
1. Did you include the OAuth Token to the Authorization part of the http header?
2. If the token is not available yet, follow the instructions in Tutorial: OAuth Setup using the Postman Client
[page 45].
The JSON response contains am Error.PDF, when SAP Forms by Adobe detected a render problem.
1. Call the SAP Forms by Adobe REST API by sending the application request again, but set trace level to 2.
This will request the generation of a PDF with additional information. Extend the URL as follows (example):
POST
https://adsrestapiformsprocessing-<yoursubaccount>.[xxx.]hana.ondemand.com/
ads.restapi/v1/adsRender/pdf?TraceLevel=2
Content-Type: application/json
{ "template" : "RXJyb3I=",
"data" : "RXJyb3I=" }
The SAP Forms by Adobe REST API returns the JSON including the PDF with additional information and
the response of the ADS. The SAP Forms by Adobe REST API adds a TraceString to the PDFOut.PDF with
detailed Information about the response from ADS.
{ "name" : "PDFOut.PDF",
"file" : "VGhpcyBpcyByYW5kb20gb3V0cHV0IGZpbGU=",
"traceString" : "Example Trace String" }
2. If the application displays the PDF in Adobe Reader, you can also download the PDF from there.
3. Open the PDF and check, if following files are attached to it.
○ Form layout file (.xdp file)
○ XML data file
○ Trace file
4. Extract the layout file and the XML data file from the PDF for checking. Open the layout file in the
standalone Adobe LiveCycle Designer and try to fix. You can also preview the layout with the XML file.
5. If you cannot fix by changing the layout or data, open a message under BC-SRV-FP and attach the
Error.PDF or PDF with additional information. Here is the complete list of information we need to help you:
○ Form layout file (.xdp file)
○ XML data file
○ Trace file
○ ERROR.PDF or the PDF with additional information
6. Don’t forget to describe the problem in detail, for example if an output in the PDF is not as expected, mark
this in a screenshot.
HTTP 200 - OK
If the responded PDF does not look like as expected, you request a PDF with additional information. This helps
you analyzing.
1. Call the SAP Forms by Adobe REST API by sending the application request again, but set trace level to 2.
This will request the generation of a PDF with additional information.
2. Follow the same procedures as described in Internal ADS errors - PDF Rendering issues above.
Always have a look at the JSON traceString tag of the SAP Forms by Adobe REST API response, if you receive
an internal ADS Error. It contains a description of the problem. Try to identify and fix the root cause of the error.
Make sure that you comply with applicable data protection and privacy laws if you are processing any personal
or sensitive data through SAP Forms by Adobe.
Note
SAP does not provide legal advice in any form. SAP software supports data protection compliance by
providing security features and data protection-relevant functions, such as blocking and deletion of
personal data. In many cases, compliance with applicable data protection and privacy laws is not covered
by a product feature. Furthermore, this information should not be taken as advice or a recommendation
regarding additional features that would be required in specific IT environments. Decisions related to data
protection must be made on a case-by-case basis, taking into consideration the given system landscape
and the applicable legal requirements. Definitions and other terms used in this documentation are not
taken from a specific legal source.
General Information
Initial Setup
API Documentation
Other Documentation
● Use Cases
● Architecture
● Connecting Your ABAP System
● Configuration Tool
● Migration from On-Premise ADS
Onboarding Documentation
Onboarding Tutorial
Tutorial
Learning Content
Community Content
Support Content
Media
Images
●
SAP Cloud Platform Forms by
Adobe: Architecture
Hyperlinks
Some links are classified by an icon and/or a mouseover text. These links provide additional information.
About the icons:
● Links with the icon : You are entering a Web site that is not hosted by SAP. By using such links, you agree (unless expressly stated otherwise in your
agreements with SAP) to this:
● The content of the linked-to site is not SAP documentation. You may not infer any product claims against SAP based on this information.
● SAP does not agree or disagree with the content on the linked-to site, nor does SAP warrant the availability and correctness. SAP shall not be liable for any
damages caused by the use of such content unless damages have been caused by SAP's gross negligence or willful misconduct.
● Links with the icon : You are leaving the documentation for that particular SAP product or service and are entering a SAP-hosted Web site. By using such
links, you agree that (unless expressly stated otherwise in your agreements with SAP) you may not infer any product claims against SAP based on this
information.
Example Code
Any software coding and/or code snippets are examples. They are not for productive use. The example code is only intended to better explain and visualize the syntax
and phrasing rules. SAP does not warrant the correctness and completeness of the example code. SAP shall not be liable for errors or damages caused by the use of
example code unless damages have been caused by SAP's gross negligence or willful misconduct.
Gender-Related Language
We try not to use gender-specific word forms and formulations. As appropriate for context and readability, SAP may use masculine word forms to refer to all genders.
SAP and other SAP products and services mentioned herein as well as
their respective logos are trademarks or registered trademarks of SAP
SE (or an SAP affiliate company) in Germany and other countries. All
other product and service names mentioned are the trademarks of their
respective companies.