Skip to Content
Technical Articles

Understanding Fragments based Adobe form building using LiveCycle version 10+ with OData as back-end.

Hello All,

Adobe has come up with new Fragments based approach for building Adobe Forms using LiveCycle designer from version 10 and above. And these Forms are part of New Output Management for S/4 HANA Systems. In this blog post I would like to explain briefly about Fragments based Forms and also would cover regular Forms (which is categorized as of type “Standalone Form”) with OData as backend. I would like to say that even though traditional Form building provisions precisely speaking SAP Scripts, SMARTFORMS and Adobe Forms with ABAP based Interfaces are still available as an alternative for this but still I would like to ask all of you to give this a try at least for learning purposes if your client is not insisting on this. If not now definitely going ahead, we might be bound to use this option (Adobe Form with OData backend) only.

To know more in detail about Adobe LiveCycle designer’s Fragments based form building you may go through the below reference from Adobe’s site: (It’s not mandatory to go through this as I would be covering the basics of that over this blog post. But for those who want to deep dive, go ahead)

https://help.adobe.com/en_US/livecycle/10.0/ProgramLC/WS624e3cba99b79e12e69a9941333732bac8-7e3d.html

Firstly, I would like to give the references of below very useful SAP Blogs regarding this.

And as highlighted in one of the blogs above I would like to give below SAP Notes references as well. Again, it’s not mandatory to go through them in order to continue ahead with this blog post, but for those who want to get into detail they can definitely go through them.

SAP Note 2228611 – Output Management in S/4 HANA

SAP Note 2292571 – SAP S/4 HANA output control -technical setup

SAP Note 2292539 – SAP S/4 HANA output control -configuration

SAP Note 2292646 – SAP S/4 HANA output control -form templates with fragments

SAP Note 2292681 – SAP S/4 HANA output control –master form templates

SAP Note 2294198 – SAP S/4 HANA output control -customized forms

SAP Note 2367080 – SAP S/4 HANA output control -customized master forms

 

Before going to start with Fragments based Form building I would like to go through basics of our traditional regular AdobeForms which is also referred or rather say categorized as “Standalone Forms” in S/4 HANA systems.

Basics of regular AdobeForms/Standalone Forms.

Those who have already worked on Adobe Forms before would be aware of how the initial page of Layout looks like when you open the Layout editor from SFP transaction’s Layout option.

You would see mainly there are two Objects by default:

  • A Page Set called (Master Pages)
  • A default Subform/Page. Let’s name it as “Content_Subform” considering below example case.

Now the concept of Master Pages is to define the Static contents/properties related to Form Layout. Such as Logo, Header/Footer, Page orientation etc. which would be common for all the pages where we would be displaying the Layout specific contents. Inside a Master Page there would be also a space reserved called Content Area ( in our case we have named it as “Content_area1”) and in this area of a Master Page only the contents of all other remaining Subform Objects(“Content_Subform” in our example case) would be displayed.

Above picture shows a Master Page named “Page1” and you can see in the Layout I have created a Subform inside “Page1” inside this Subform we can place static contents like Logo, a static Header text etc. Below that you can see a Content Area (colored with violet outline)  named “Content_area1”, now this is the area where content of all the remaining( non-Master Page) Subforms/Pages (e.g. Content_Subform in this case) would be displayed.

So, the Content of “Content_Subform” would be superimposed inside the Content Area of referred Master Page.

When you click on a non-Master Page say “Content_Subform” in our example it opens the Design View in the Layout editor, see below.

While designing inside Design View you can explicitly specify which Master Page to be used in case you have more than one Master Pages defined. Here we have only one i.e. “Page1”.

 

Summary: So now you got to understand that in an Adobe Form Layout there are mainly two things one is Master Pages and other is the Content Pages/Subforms.

Master Pages are used to define static contents of a Layout like Logo, fixed Texts, orientation etc. And it has got a Content Area where the Content Pages/Subforms would be superimposed.

Content Pages/Subforms are the places where we would be doing the designing of contents like EKKO, EKPO, EKET details say if we are designing a PO Output Layout.

What is Fragment based Adobe forms.

Now the concept of this new Fragment-based Form designing in Adobe LiveCycle Designer version 10 and above is nothing but the introduction of reusable Master Form Layouts which would be having a collection of Fragments and Fragments are indeed collection of many Master Pages. The same Master Pages which we discussed in previous section. And these reusable Master Form Adobe layouts could be referred inside a Content Form Layout. Such that inside these Content Form Layouts, Master Pages present inside a Master Form Layout could be utilized. This covers the concept of Master Form Layout Template.

Now Content Form Layouts are the Form Layouts where we would be actually displaying the Context or say Content for example PO Layout. And inside the Content Form Layout we can refer the above Master Form Layout for inheriting the Master Pages present in it to the Content Form Layout.

Now apart from this we have the Old regular Adobe Form also which is called Standalone Form as per S/4 HANA naming conventions. So, it’s very clear that Standalone Form is nothing but a Form layout which would be independent and hence there would be no reference of any Master Form Layout for inheriting Master Pages in fact we would be utilizing the Local Master Pages defined in the Master Page set. (This we already covered before this topic)

 

So, in the nutshell as part of new Output Management in S/4 HANA systems (OData backed), we have below three Form Types:

  • Master Form Layout. (Would be having Fragments.)
  • Content Form Layout. (Utilizes a Master Form to inherit Master Pages present inside the Fragments of a Master Form Layout)
  • Standalone Form Layout. (Would be having its own set of local Master Pages just as regular Adobe forms)

Creating a Master Form, Content Form and Standalone Form.

First let me show you how a Fragments based Form looks like in  SFP Transaction.

What I observed the above two options (Gateway Service and Fragment Usage) you won’t get while trying to create a fresh Form using SFP Transaction. Even though we have an option for providing XML based Interface option.

So the best option is search for a suitable Form template from the Standard ( “Maintain Form Template” Fiori app) which almost matches with our requirement and copy the same to a Zversion and make your changes.

So I copied Standard Form “MM_PUR_PURCHASE_ORDER” to a Zversion and Customized it. Please note Form “MM_PUR_PURCHASE_ORDER” is a Form of Form Type “Content” so it’s a Content Form inside which we would be having a Master Form Template referenced for inheriting Master Pages.( I hope you are getting the whole sequences. )

Now the value set in “Fragment Usage” field in SFP transaction determines whether a Form is a Master Form or a Content Form or a Standalone Form.

If you select “Form with fragment” then it’s a Content Form.

If you select “Fragment” then it’s a Master Form which would be having Fragments inside it.

If you select “Form without fragment” then it’s a Standalone Form.

As simple as that.

Examples:

Content Forms: MM_PUR_PURCHASE_ORDER, MM_PUR_RFQ_EXTERNAL, MM_PUR_SCHD_AGRMT etc.

Master Forms: APOC_DEMO_FORM_MASTER_AU, etc.

Standalone Forms: EDO_AR_PRINT

Master Form Explained with an example:

Let’s take example of “APOC_DEMO_FORM_MASTER_AU” only.

https://help.sap.com/viewer/8308e6d301d54584a33cd04a9861bc52/1709%20002/en-US/e598f71db6244b21b3d8d32964953083.html

If you go through the above link you would observe that SAP recommends to edit a Form Layout by opening the corresponding “.xdp” file in Adobe Live Cycle designer explicitly i.e. not from SFP and then edit and once the edit is done you can upload the changes done to the Layout by uploading this edited “.xdp” file to the corresponding Form using SFP transaction’s “Upload Layout” option.

So first copy this standard Master Form template “APOC_DEMO_FORM_MASTER_AU” into a Zversion using SFP Transaction and later download the “.xdp” file either using SFP tcode itself or using the “Form Template Maintenance” Fiori  app.

Now open this “.xdp” say ZDEMO_FORM_MASTER_AU.xdp using Adobe Live Cycle designer.

You can see the below components

You can see in the above Master Form we have five Fragments defined and each would be having its own sets of Mater Pages. You can make changes into these and these could be reused into many Content Forms by referring it there.

Content Form explained with an Example:

Let’s take example of “MM_PUR_PURCHASE_ORDER” only.

Just like we did before, copy this standard Content Form into a Zversion using SFP Transaction and later download the “.xdp” file either using SFP tcode itself or using the “Form Template Maintenance” Fiori  app. Here there is a difference, whenever you download a Content Form system will also prompt(even though it’s optional) you to download corresponding Master Form Layout.

Remember while downloading the Master Form Layout corresponding to a Content Form, always download the Master Form which you have attached to Content Form Layout in SPRO Configuration. This SPRO Configuration I would be explaining later in this section. NOTE, Master Form for a Content Form would be picked in runtime using this SPRO Configuration only so its very necessary you download the right one when you want to edit it using Adobe Live Cycle designer.

Now open the “.xdp” file of Content Form say ZMM_PUR_PURCHASE_ORDER.xdp using Adobe Live Cycle designer.

You can see the below components,

Now once you have selected (as shown above) which Fragment of the Master Form needs to be used in this Content Form you can use the Master Pages of Fragments in the Design View.

Hope this clears “How a Master Form is linked inside a Content Form”. This was the main reason for which I penned this blog.

Standalone Form explained:

Now Standalone Form is like a Content Form only except it would be using its own local sets of Master Pages only and hence it won’t be referring any Master Form inside it.

 

Note: Would like to highlight the below issue which I encountered while using Master Form Layout. SAP might come out with a proper solution for this going ahead.

https://answers.sap.com/questions/13029112/issue-while-referring-the-master-page-from-a-maste.html

SPRO Configuration:

Please Note this would be only the partial Output Configuration meant for defining the Master Form determination and Content Form/Standalone Form determination for a output type. BRF+ config for determining the rules for Output type picking is out of scope of this document.

SPRO> Cross-Application Components> Output Control

 

Now apart from this I would like to give some suggestions while tweaking the standard Odata for Form building purposes.

Let’s take the example of “FDP_EF_PURCHASE_ORDER_SRV” the one which is used in Standard Content Form MM_PUR_PURCHASE_ORDER.

 

  • I would recommend to copy a Standard Odata to Zodata Project because by doing this writing code(s) for Custom added Entities won’t need to enhance standard DPC_EXT classes, instead we could redefine ZDPC_EXT methods. Its just like we used to copy Standard Driver Program for PO Script MEDRUCK i.e. SAPFM06P into a ZCOPY.
  • While copying a Standard Odata Service Project to a ZProject use the redefining option only.

            And while Generating Runtime Objects, don’t forget to press the below checkbox.

  • Definitely go through the below SAP Help link for knowing how to add custom EntitySet operation, GET_ENTITY is not mentioned there but it’s like GET_ENTITYSET only.

https://help.sap.com/saphelp_gateway20sp12/helpdata/en/34/4e3d5269a2b610e10000000a44176d/frameset.htm

  • Suppose while binding the Internal Table you are facing issues, say for e.g. instead of showing multiple line items the output shows only 1 line then I would like to suggest drag the EntitySet which you want to Display from the “Data View” to the Form Layout. After that you can make necessary changes with the Cells.

 

So in the nutshell AdobeForms with Fragments would be very useful in scenarios where we have multiple Content Forms sharing similar Master Pages. You make changes in Master Pages of a Master Form Layout and it would reflect into all the Content Forms where and all its used. This reusability is what we can achieve using Fragments based AdobeForms.

By this I would like to conclude my blog post and would request all to give this new Form Output management a try. Do comment out your observations I would definitely like to help out if I could. I would definitely suggest referring the standard Content Forms like “MM_PUR_PURCHASE_ORDER” to understand the binding in case of Odata backend AdobeForm Layout.

Thanks,

Sijin

14 Comments
You must be Logged on to comment or reply to a post.
  • Very nice blog and glad to see the use of this latest technique in Adobe world. But I think we can use fragments based Adobe forms if we go with S/4 HANA BRF+ based output management. Please correct me if I am wrong.

    • Hi Prabhjot,

      Since Gateway backed AdobeForms are part of S/4 HANA’s New Output Management, I guess it won’t work with the other alternative of BRF+ for message determination which is NACE and Output Procedure based.

      Also other reason for this I believe is, OData based forms are triggered by Callback classes which we define while creating a Message Type, whereas in normal NACE based configuration there is no concept of Callback classes and methods instead its the Driver program which drives the output triggering.

      Master form or Content form both are Gateway backed.

      Thanks,

      Sijin

  • Hi Sijin,

    Very useful blog. Thank you for taking time to draft and publish this.

    Currently I’m facing one issue in my BRF+ forms .

    We are trying to generate multiple copies of the form with dynamic header label in each of the copies.

    The only solution we found is this blog.

    But we’re trying to achieve this without change in configuration. Could you suggest a better method for this?
    Thanks,
    Athira
    • Hi Athira,

      This is one of the challenge as per my experience with OData based forms.

      Unlike Driver program based AdobeForm or Smartform where we can pass Print Parameters for multiple copies, in case of Gateway based forms am not able to figure out how we can get this done. Checked for options in the Callback classes as well but no luck.

      And another challenge is you cannot trigger these forms from ABAP buy calling any Class~Methods, FMs or Programs. So I believe the workaround which is mentioned in the blog is the only solution as of now and after all it comes from an SAP personnel.

      Can you please raise an Incident with SAP as well and ask for a suggestion from them.

      Thanks,

      Sijin

  • Hi We have created a standard layout for Purchase Order with ABAP Dictionary based Interface.

    But when configured this using BRF+, Purchase Order Output is not added in PO Messages once the document is created.Is there any step missed in this?

    Can we use standard layout with ABAP dictionary based interface for Standard Transaction output messages?( ex.Purchase Order) or we need to use Fragments based form?

    if we use XML based interface, where to add custom structure and routines?

    We are using S4 HANA 1909 Version.

     

    • Hi,

      Please find my comments inline,

      We have created a standard layout for Purchase Order with ABAP Dictionary based Interface.

      But when configured this using BRF+, Purchase Order Output is not added in PO Messages once the document is created.Is there any step missed in this?

      I am not sure that whether we can configure a ABAP Dictionary based form using BRF+ or not. In one of my previous project on S4 HANA 1709 we were using ABAP Dictionary based forms but we got them configured using NACE.

      Can we use standard layout with ABAP dictionary based interface for Standard Transaction output messages?( ex.Purchase Order) or we need to use Fragments based form?

      This really depends upon which Output Technique you are opting for. Whether its SAP Script, Smartfomrs, Adobe Forms normal or Adobe Forms with Odata.

      I could see for Scripts MEDRUCK is there, so for MEDRUCK SAP has also provided Standard Driver program i.e. SAPFM06P. Likewise for Standard PO Adobeforms(with OData) we have Form MM_PUR_PURCHASE_ORDER and the corresponding Gateway service FDP_EF_PURCHASE_ORDER_SRV. Now this you cannot mix with each other i.e. Driver Program for MEDRUCK with AdobeForm MM_PUR_PURCHASE_ORDER, reason is quite simple they are not meant to be used together. 

      I would like to suggest you to get MM_PUR_PURCHASE_ORDER and the corresponding Gateway service FDP_EF_PURCHASE_ORDER_SRV configured as Output by Functional and give this new Output Technique a try. Else you want to stick with ABAP based Interface then please create it from Scratch.

      if we use XML based interface, where to add custom structure and routines?

      We are using S4 HANA 1909 Version.

      With XML based interface you mean’t Odata based Adobe forms then you need to Redefine the Standard Gateway services. I have explained the same in the end of blog. Please refer.

      Thanks,

      Sijin

       

      • Hi Sijin,

        Thanks for your detailed reply.Very Useful Info.

        We can not use NACE,as Purchase order BRF has already been activated in system and one other output already configured using BRF with Odata and XML based intf.

        I have the following scenarios so exploring on how to configure below combinations( or these combinations wrong?)

        1.Interface is ABAP Dictionary, Form is Standard layout with no-Framgments/No Odata–.> ??

        2.Interface is ABAP dictionary, Form is Standard layout with Fragments without Odata–>??( Removed Odata name ).But the problem here is the strcuture from interface is not showing in data view of layout event though its added in Context.

        form%20without%20odata

        form without odata

        3.Interface is ABAP dictionary , Form is Standard layout with Fragments with Odata–>This is ok when we followed standard config steps.

         

        Thank you so Much

        /
        form%20without%20odata
        • If you are going with BRF then I would suggest to go with ADOBEForms with OData as backend.

          For creating the same you have to copy Standard Form ‘MM_PUR_PURCHASE_ORDER’, we cannot create it directly using SFP.

          Please see the below portion of blog which explains this limitation:

           

          Thanks,

          Sijin

          /
          • And Copy the Standard Gateway Service using Redefine option and add custom Structures as per your requirement.

            And finally replace the Gateway Service in the SFP transaction with your Custom developed one.

          • Thank you Sijin Chandran for your detail explanation.It Really helps to understand the concept.

            I will try form with Odata .

             

          • Hi Sijin,

            I have create a Custom Odata ServiceProject in SEGW  and trying to Extend the DPC_EXT class: ZCL_ZFDP_PO_OP_DPC_EXT  to get the PO header Custom Fields(Z Fields),PO item Zfields into my new structures: EKKO & zekpo .

            1.My Entity Set name is EKKO,ZEKPO and selected the required Zfields into the Properties .But how to get the ekko-zfields values into EKKO during PO Creation in method ZCL_ZFDP_PO_OP_DPC_EXT~EKKO_GET_ENTITY?

            2.Do i need to assign this Custom Odata service project to services in /IWFND/MAINT_SERVICE ?

            Thank you

          • Hi,

             

            ZCL_ZFDP_PO_OP_DPC_EXT~EKKO_GET_ENTITY

             

            I suppose the above is a custom method created by you using which you want to get your custom Entity/EntitySet get filled.

            If yes then you need to code inside this method. And also you would need to redefine below Standard Methods,

            /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_ENTITY
            /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_ENTITYSET

            The first method in case you are coding for Entity ( i.e. single records fetch)

            The second method in case you are coding for EntitySet ( i.e. Multiple records fetch).

            Please go through below link for more details( I have already given the reference of this link in the blog as well).

            https://help.sap.com/saphelp_gateway20sp12/helpdata/en/34/4e3d5269a2b610e10000000a44176d/frameset.htm

            I would request you to go through the blog again.

            For Second point, yes you would need to maintain it using /IWFND/MAINT_SERVICE, in all systems.

            Thanks,

            Sijin