Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Doğukan2
Discoverer
0 Kudos
625

In this blog, I will show you how to create a custom form from cloud environment with some states and after that export it to test system.

The blog will be structured around the following key topics:

  1. Creation of Adobe Livecycle document
  2. Using Custom Fields & Custom Logic
  3. Creating CDS for Custom Logic
  4. Export to Test System Using With Collections

Creation of Adobe Livecycle document

First, in order to create a document in the cloud system, we need to download a suitable predelivered template according to the type of document we will create. Because of we will be taking our data from the data view of this template, this template must contain the data in the content of the document we will create. To do this, we first enter the dev system and open the maintain form templates application from the cockpit. Here, we need to select a template suitable for our document from the predelivered templates field. For example, if we are going to create a purchase order form, the document we will base it on can be MM_PUR_PURCHASE_ORDER.

Doukan2_1-1735803683991.png

After downloading the version of this template in the language we need, we will obtain an xsd and an xdp file. The xsd file contains the data we will use in the document we need. In the xdp file, we see a ready document that SAP has prepared for us.

However, if the document requested by the customers is different from the document here, we can create a document ourselves and use the xsd file as the data view. We can load this xsd file into the data view area of ​​our adobe livecycle document with the new data connection option. Then, we can use the connection properties option to make changes.

Doukan2_2-1735803827772.png

Adobe livecycle is almost exactly the same as the adobe form we created from sap gui. Therefore, after creating the data view, we can design our document and place our fields just like we did in adobe form.

After doing these operations, in order to upload our custom form to the cloud system, we need to go to the maintain form templates application again and this time create a new template from the custom templates field and after giving our form a name, we need to upload the template we created and fill in the other fields in accordance with the form we created.

Doukan2_3-1735803949086.png

Using Custom Fields & Custom Logic

In some special cases, our xsd document may not contain all the fields we need. In such cases, a custom field must be created to be able to use these fields. At this stage, our modular friends create a custom field and place it in the template we base it on. In order for us to add this custom field, we need to reload the xsd file we previously downloaded from the predelivered templates area in maintain form templates from the data view section of our form. Because this time, it will also contain a custom field.

The fields starting with yy1 that we see below are the custom fields we uploaded. After placing these fields in the relevant places, we need to reload our custom form to the custom templates area in maintain form templates.

Doukan2_4-1735804157163.png

However, to fill in these fields, we also need to create custom logic. To do this, we write custom logic to the cockpit and create a new custom logic from the relevant application. Then, in the first step, we enter the relevant extension point, business context and business objects that we will learn from our Modularist. In the second step, we name our custom logic.

Doukan2_5-1735804201134.png

Finally, we enter the code editor in our custom logic, select the relevant custom field from the parameters we have, and fill it with the data from the select we wrote as follows.

Doukan2_6-1735804238698.png

After we click Save and Publish, our data is updated.

Creating CDS for Custom Logic

If we want, we can use the cds views we created from eclipse in custom logic. To do this, after creating the cds view in the relevant package, we can make these cds accessible and use them in custom logic by making the arrangements you see in the Use System-Internally section of the API state in the properties section.

Doukan2_7-1735804491393.pngDoukan2_8-1735804504254.pngDoukan2_9-1735804521676.png

Export to Test System Using With Collections

After creating our form, I will finally talk about how we can export this form from the dev system to the test system. To do this, we first enter the export software collection application from the dev system. From here, we create a new collection. After creating our collection, we add our custom form and custom fields from the add items section. After that, we check and then export our collection.

Doukan2_10-1735804849983.png

Afterwards, we enter the test system and enter the import collections application. Here we will see the collection we exported from the dev system. Finally, we import this collection into the test system with the check and export button.

I hope it has been a useful blog.
Regards.

Labels in this area