Professional Documents
Culture Documents
PUBLIC
Warning
This document has been generated from the SAP Help Portal and is an incomplete version of the official SAP product
documentation. The information included in custom documentation may not re ect the arrangement of topics in the SAP Help
Portal, and may be missing important aspects and/or correlations to other topics. For this reason, it is not for productive use.
This is custom documentation. For more information, please visit the SAP Help Portal 1
3/4/2022
Use
SAP provides an API (application programming interface) that you can use to generate a form template. This API generates an
XFA (XML Forms Architecture) document that can be displayed in Adobe LiveCycle Designer. This enables you to implement the
program-driven generation of form templates, without using Adobe Designer.
The API is based on Adobe XFA Version 2.2. It offers only a selection of the XML tags and attributes from the XFA speci cation.
Adobe Designer itself offers a much wider range of functions. For this reason, we recommend that you restrict program-driven
generation to simple form templates only.
Integration
To fully understand how to use the API, you must read this description together with the XFA speci cation. See the Adobe XFA
speci cation at http://partners.adobe.com/public/developer/xml/index_arch.html
This speci cation contains explanations of all elements and attributes, as well as suggestions for the hierarchical structure of
the elements.
Activities
You can use all interfaces from the package SAXFT.
The following basic rules apply: Each interface corresponds to precisely one tag in the XFA speci cation.
You generate the root node by using CREATE_OBJECT to instantiate an object from the class CL_SXFT_TEMPLATE. For this
object, you can call the method GET_FACTORY( ) to create a factory object. You can generate all subsequent XFA elements by
using a create method of the factory method to instantiate the corresponding object. You create the structure of the XFA
document as follows:
You use set methods to set simple attributes and to send the attribute value to the VALUE parameter in quotation
marks.
You use set methods to set attributes that are themselves elements, and to send an object to the VALUE parameter
that represents the attribute (and the new element).
Note
Exception: Attributes that are themselves elements but only have a few of their own attributes, do not need to be
generated. The values can be set directly by using the corresponding set method (such as <margin> and <color>).
You use the method IF_SXFT_NODE~APPEND_CHILD( NEW_CHILD ) to set child elements. The interface IF_SXFT_NODE
is included in all interfaces that represent XFA elements.
Grouping interfaces are used for attributes that are used very frequently
The interface IF_SXFT_ALIGNMENT groups the set methods for the attributes VALIGN and HALIGN. This interface is
included in all interfaces that represent elements with these attributes.
The interface IF_SXFT_MEASUREMENT groups the set methods for the attributes X, Y, W, H, and Layout. This interface is
included in all interfaces that represent elements with these attributes.
Example
This is custom documentation. For more information, please visit the SAP Help Portal 2
3/4/2022
For an example implementation, see the program RSXFT_XFT_API_DEMOII.
This program generates a template that includes the following: header and footer, a static text, a selection list, option elds, a
text input eld, and a pushbutton. Since no context is generated, no data binding is created.
This is custom documentation. For more information, please visit the SAP Help Portal 3