
A form instance is the runtime representation of a composite form object and is generated from a form template.
According to the data that you want to display in the form, you can create a form instance with different input parameters:
You can also define whether the form should be interactive (the user can enter data and submit the form), or static (used to display data only).
packagecom.sap.caf.eu.gp.api.test; importcom.sap.caf.eu.gp.forms.api.IFormProcessor; importcom.sap.caf.eu.gp.forms.api.InteractiveFormsFacade; publicclass APITest {IFormProcessor formProcessor = InteractiveFormsFacade.getFormsProcessor(); ... } |
This method creates a form for offline processing that optionally can be sent to a user by e-mail. If you want to create an impersonalized form (it can be submitted to the system multiple times), you do not need to provide a user.
To find out what structures you need to put in the enumeration input parameter, you must call the getPrefillingServicesStructureInfo method of the IFormTemplateInfo interface.
createImpersonalizedFormInstance(String templateID,intglobalVersion, int localVersion, Date expireDate, String formName, int maxAllowedReturnCount)
This method creates an impersonalized form for offline processing. The form can be submitted to the system multiple times. You can define the number of allowed submissions by the last parameter in the list.
With this method, you can choose not to execute the prefilling services when creating the form. Instead, you can provide form context values.
To get the information for the form context structure, you must call the getFormContextStructure method of the IFormTemplateInfo interface.
If you create a form instance using this method, it is filled with data from a business object. The relevant data is identified by the business object instance ID.