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!
Showing results for 
Search instead for 
Did you mean: 


Advanced adobe uses OData services as data provider to fetch data from backend system. The OData service converts the data that it fetched from backend, converts the data into XML format, and returns it to the Adobe layout. Adobe layout uses that XML data to print the form using the concept of binding available at Adobe layer.



Below are the steps to create an OData based Adobe form.

OData Service Details -

Open the adobe form (which is consuming OData as backend) in t-code SFP. In the properties tab, you can see the OData service maintained as Gateway service. Below is the screenshot for the same. In this document – I am going to use the Purchase Order Form as example.The Standard Data based adobe form for Purchase Order is MM_PUR_PURCHASE_ORDER.I have copied the standard form to ZMM_PUR_PURCHASE_ORDER. 

In Order to use the gateway service of this project. We need to register the OData service in               t- code /IWFND/MAINT_SERVICE.

  • Click on Add Service button (As mentioned in below screenshot).

  • A new screen will open up. Enter the service name as FDP_EF_PURCHASE_ORDER_SRV.
    System Alias as LOCAL or the BACKEND SYSTEM ALIAS (if applicable).
    After entering the above mentioned details. Click on Get Services button.
    The corresponding service will be displayed in the final output. Simply select the SERVICE and click on Add Service button.
    *If in case the service is already registered, the system will throw an information message. Saying – Already registered.

  • After adding the service – Go to t-code /IWFND/MAINT_SERVICE again.
    Now filter the data with service name - ZFDP_EF_PURCHASE_ORDER_SRV.
    This step is just to check whether the service is registered successfully or not.Note - Sometimes the ICF node is deactivated. You need to activate it in t-code /IWFND/MAINT_SERVICE only. The screenshot is given below.

  • Now, once the service is registered successfully. We need to write our custom code in the OData project. Which is accessed via t-code SEGW. If in case you don’t know the project name. Below are the details of steps that you can use to get the project name.
    -   Open table /IWBEP/I_SBD_SV in t-code SE11.
    -   Simply pass the service name that you got from the adobe form and pass it as          /IWBEP/I_SBD_SV-TECHNICAL_NAME. You will get the project name.

  • Now, open the project, which you got from above table in t-code SEGW.

  • The project will open up.

  • The Entities created under data model contains the required data for Purchase Order.

  • Some important SAP notes.

  • As per the SAP note - 2292646 - SAP S/4HANA output control - form templates with fragments. It is recommended to enhance the standard gateway service rather than creating custom one.

    • Here is a small example to enhance the standard service by creating a custom entity set to print logo on the form.
      -   Create an entity type with only one field. Logo (say).
      -   Create required associations --- Association – PurchaseOrderNode is the primary node of PO based service. Hence adding association (Cardinality) will decide whether the GET_ENTITY will trigger or GET_ENTITYSET will trigger.Follow the below steps -
      -   A popup will come up.
      Enter the required details.
      In my case – I am creating an entity type of name mediaControl.

      -   After entering the details – Press OK.
      -   On pressing OK button – An entity type gets created under Data Model.
      -   If we expand the entity type. (in my case mediaControl). The properties are not available.
      -  Now, we need to create a property – LOGO.
      -  Double click on Properties Tab. A new view will open. On the right side.
      There we can add the fields that are required to be added in the entity set.
      In my case – I am creating a field name Logo of type Edm.String.
      -  -  Add the field LOGO in the properties tab.
      -  Now, the Entity set is added successfully. Save the project.
      -  Now in order to create the required data provider methods – we need to regenerate the project, in order to generate the runtime artifacts of mediaControl entity.
      -  Click on GENERATE (red) icon.

      Check if there are any errors… If any resolve the same and then again click on regenerate icon.
      -  Now, Next step is to create the associations. However, it is not mandatory step. But, it is one of the factor, which decides the method ENTITY or ENTITYSET needs to be triggered.
      Below is the screenshot of how to create associations.
      -  Select the Associations tab under Data Model folder. Right click on it. And select CREATE.

      -  A popup will open. Enter the Association Name.
      In this case, I am creating ENTITYSET to print logo. Hence, the dependency is 1:1 considering PurchaseOrder as primary entity.

      Now click NEXT.

      In new window.

      -  Select the dependent property. In this case. It is LOGO.
      -  Select the field LOGO and click NEXT.

      -  In next window – You can see, all the properties already created. Press FINISH.

      - After clicking the FINISH button, the Association and AssociationSet gets created.

      -  You will be able to see the log. If any error occurs, solve it and follow the same process again to create Association.

      -  If the operation is successful. You can see the created association under the node Associations.

      -  As the structure is now available in the form of ENTITYSET. Now the next step is to populate data into the ENTITYSET.
      For that, we need to extend the Data provider class.

      -  You can find the Data provider classes under the node Runtime Artifacts in t-code SEGW.
      For Purchase order, the class name is – CL_FDP_EF_PURCHASE_ORD_DPC_EXT.

      -  If we need to fill data in our custom ENTITYSET. Then we need to write code in DPC_EXT class. The method that we use to write code to populate data is similar to the name of ENTITYSET name.
      For read operation we use GET_ENTITY method. For Query operation, we use GET_ENTITYSET method.

      -  Now, In order to write code. Double click on the class DPC_EXT under runtime artifacts. An ALV will open up.

      -  Double click on object name highlighted in the above screenshot.

      -  On clicking the object, The class will open up. Now go to the method relevant to our custom entity type.


      You can directly right click on the DPC_EXT class. Click on the option Go to Workbench. The class will open up. Select relevant method (mentioned in above screenshot).

      Directly open the DPC_EXT class in SE24. And write the code in relevant method.

      -  Now, the cardinality is 1:1. Hence, there will always be one record for one purchase order. Hence, we will enhance the GET_ENTITY method.

      -  Now, as we are enhancing the standard gateway service, we need to use implicit enhancements to populate our custom data. These classes are non-modifiable.

      -  In order to write our custom code – We need to redefine the method.
      below are the steps.
      1.  Go to CHANGE mode.

      2.  Select the method, in which you are going to write our code. And click on Redefine button.

      3.  Please refer the below screenshot -

      4.  On clicking the redefine button – the window will open with some standard commented code. Which is non-modifiable.
      Use implicit enhancement option to write custom code.

      5.  In Advanced Adobe, There is no option to create GRAPHIC Node. Because there is no provision of Context in advanced adobe. As available in ABAP based adobe form.

      6.  Hence, the alternative way to achieve this is – call the method

      7.  As we normally do in ABAP based adobe form. This method converts the image in hexadecimal format.

      8.  The additional step is – Call function module ssfc_base64_encode And pass the output of cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp.

      9.  After execution of FM ssfc_base64_encode, The final output would be in a string format. This way, we can directly bind the string output to the IMAGE FIELD in our Adobe layout.
      And, we can achieve the logo (available in SE78) in our form output.
      Below is the code for the same.

      -> Below is the code for the same :
      DATA : lv_object    type tdobjectgr        value 'GRAPHICS',
      lv_name      type stxbitmaps-tdname value 'SAP_LOGO',
      lv_id        type tdidgr            value 'BMAP',
      lv_btype     type tdbtype           value 'BCOL',
      lv_field     type xstring,
      gv_logo      type string.

      *Calling class to populate the test print. which is available in SE78.
      call method cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
      p_object       = lv_object      " 'GRAPHICS'
      p_name         = lv_name        " Name of the SE78 logo inside Quotes
      p_id           = lv_id          " 'BMAP'
      p_btype        = lv_btype
      p_bmp          = lv_field        " v_field and g_logo must be typed xstring
      not_found      = 1
      internal_error = 2
      others         = 3.

      *Converting the hexadecimal value of image to string format (Base64 Encoding)
      bindata = lv_field
      b64data = gv_logo.

      IF sy-subrc = 0.
      er_entity-logo = gv_logo.

      -   After writing the code. Activate the enhancement and class.


      -   Important instructions regarding binding.
      When we are binding the data in adobe layout, we need to know the ENTITY, ENTITYSET and PROPERTIES.
      Sometimes, the ENTITYSET is different then what we use in adobe layout to bind the data. Hence, to get the exact name of the ENTITYSET. Open the MPC class and open the method DEFINE_ASSOCIATIONS.

      Method will open up. Scroll down and go to NAVIGATIONS.

      The highlighted property in above screenshot, is the updated entity type name, That we have to use to access the data in adobe.
      Regarding Binding - In case of GET_ENTITY, the data can be accessed by entity_type only. But in case of entity_set, we need to use the path as -> EntitySet.EntityType[*].

      -  Now based on the examples discussed above for Media fetch.
      The code is in place. Data is available in the respective ENTITYSETS.
      But the method doesn’t gets triggered. The Logo doesn’t appear on the form.
      In order to invoke those methods (Specially, in which the dependent property is not the primary key (like purchase order)).
      in order to invoke the custom methods without having dependent property as primary key. We need to enhance the MPC_EXT class. Which is available under node Runtime Artifacts.
      Because the model is now changed. After addition of one more entity.
      Below are the steps to redefine the model -

      1.  Open CL_FDP_EF_PURCHASE_ORD_MPC_EXT class (t-code SE24).

      2.  In order to redefine the model, We need to redefine the corresponding method of MPC_EXT class. The method name to achieve the same is – DEFINE.

      3.  Go to change mode and Select the DEFINE method and click on redefine button.

      4.  Enhance the define method to add the required code mentioned below.


      super->define( ).

      -  Same way – If we need to add any other field into the form, which standard is not providing. We need to create our custom entity set. Populate the data accordingly. Maintain the cardinality, redefine the required method. And bind it in the layout.

      -  Binding in the LAYOUT.
      As the data is getting passed at runtime. When OData gets executed. Hence, While binding the data at layout, We cannot see the hierarchy. Hence we need to type the binding manually.


      Email Templates -

      The email templates can be accessed via FIORI tiles only.
      The catalog for the FIORI tiles is - SAP_BASIS_TCR_T.
      This needs to be added to your user ID. Security team helps you to add the catalog to your user ID.
      When the catalog gets added successfully under the ID. You can see the tiles on your FIORI home page by executing the t-code - /UI2/FLP.
      You can add the required tiles to your home page by click on Pin to Home page button.

      When you execute the tile. You will get an error (Sometimes). Not able to fetch data.
      In the details of error, You can find the service name.
      In order to resolve the issue, You need to add the service in t-code - /IWFND/MAINT_SERVICE.
      Same as mentioned in step – 1.

      Regarding Email and print settings. Everything is maintained at BRF+ level.
      E.g. Template, email address etc.
      In order to use the email templates – Click on the FIORI application “Maintain Email templates”.

      Click on predelivered email templates link. You can use standard or you can copy the same and make the required changes.

      On clicking any of the email template – You can see the data sources i.e. the CDS view, that is going to provide data to the email body.
      In my case, I have copied the PO default standard email template to custom one.

      There are chances that you are not able to see all entries of Email templates in FIORI application.
      This can happen only, If you front-end and back-end system is different.
      The possible cause is – You have not maintained the destination system in /IWFND/MAINT_SERVICE t-code.

      Creating Custom OData Service -

      • If in case, there is a requirement to create a custom OData Service out of standard one then --
        For Purchase Order ->

      1. Copy the project FDP_EF_PURCHASE_ORDER to custom one. Redefine the classes that are already defined in standard project. Because, the redefinition doesn’t get copied to custom project.

      2. After redefining all the required methods. Register the Z service in /IWFND/MAINT_SERVICE as specified in step – 1.
        The service can be retrieved from the SEGW project only. Just expand the project. Goto Runtime Artifacts.

      3. The term ending with SRV is the technical service name.

      4. Now assign the service name that you got in above step and assign it to the Adobe form in change mode.

      5. Still, If you trigger the form, It will result into ERROR.

      6. The last step is  - Go to SPRO t-code -> SAP Reference IMG -> Cross Application Components -> Output Control.

      7. Execute – Define Output Types…..
        A new screen will open…..

      8. Search PURCHASE_ORDER in the list

      9. Double click on the PURCHASE_ORDER node. It will take you to the new screen… as available below.

      10. In the above screen – There is a callback class, which ultimately call the OData Service.
        If at all we are copying the standard gateway service to Z. Then we need to create a copy of callback class to Z.

      11. Now open the copied class in t-code SE24.

      12. Now access the method - GET_FDP_PARAMETER.

      13. Double clicking the method, will take you to the source code.

      14. At line number “12”, the standard service name is assigned. You need to change it to custom service in your custom class.

      15. After activation of your custom class. Assign the z class in SPRO on place of standard callback class.

      16. Now you can trigger your custom service.

        Creating Custom Adobe Form -

        The only process to create the adobe form is - Simply copy the standard form to Z.

        Copy Email templates or Form templates in FIORI application

        There are chances that you are not able to see all entries of Email templates in FIORI application. This can happen only, If you front-end and back-end system is different.
        The possible cause is – You have not maintained the destination system in /IWFND/MAINT_SERVICE t-code.

        Sometimes, while trying to copy the email template or form template, The copy button remains disabled.

        In Order to resolve this, you need to implement an SAP note – 2283716.

        This task is done from BASIS team.

        BRF+ configuration.

        The possible issue could be – Necessary KPRO settings that needs to be maintained in the system. This is Basis team’s task.
        The required SAP notes that needs to be used in the to setup KPRO is -Required BRF+ configuration needs to be maintained to use the Output channel.
        This is Functional person’s task.
        You can refer the SAP Blog on New Output Management in S4/HANA
        Sometimes, Even after doing the required BRF+ configuration – The output channel doesn’t work. The output do not gets executed.

        2279725 - Content repository for category SOMU.
        2462673 - Output remains with "To be output" status

Error while previewing the output of adobe form.

  1. If you are getting an error regarding adobe rendering issue or SOAP
    Execute the report FP_PDF_TEST_00. If it is throwing some error. Then the ADS server is not up and running.
    BASIS team will help you fixing the issue.
    If it is getting executed successfully. Then there is some issue with the layout.
    The possible issues could be –
    a.  You are passing character type data to a numeric field.
    b.  The JAVASCRIPT code, that you have written contains syntax error.
    c.  You are trying to print data from an ENTITYSET with minimum count “1“. And, data is not          available in the ENTITYSET. Because, the data is not maintained.

    If you have an idea, that this ENTITYSET may not contain data. Simply remove the Min            Count. (Uncheck the Min Count Checkbox).

Program Execution.

The above process to create OData based adobe form is for PURCHASE ORDER. Hence, we will be triggering the output from transaction ME23N.

  1. Go to transaction ME21N and create a new Purchase Order.

  2. As soon as you save the Purchase Order. The BRF+ settings gets triggered.
    And the form template gets assigned to the PO.
    If the output channels are properly configured, then the output gets triggered in the form of Email or spool.
    In this case, Email and Print channel, both are configured. Hence, output is getting generated for both channels.
    You can view the status in the messages screen of Purchase Order.
    A.) Open PO in ME22 / 23. Open the required purchase order.
    B.) Click on MESSAGES button, available in application toolbar.

    C.) For this particular PO, the output channels are successfully processed. As the output status is “COMPLETED”.

  3. Below is the screenshot of processed outputs.
    A.) Print -
    B.) Email -
    C.) Print Preview -
    In order to preview the PO output.
    Go to Message screen (mentioned above) and click on PDF icon.
    D.) The print preview will open up in PDF format.

0 Kudos
Nicely written blog!!!!

Very helpful for those working on S4HANA projects especially..
0 Kudos

In my case I have to add one field, logo in existing form. Shall I go with copying object in Z. As well as second question if do changes in standard service do I need to bind with standard form or z form?
0 Kudos

I'm trying to do everything according to the instructions above, but I do not have a field where I can set the service. Does it depend on the version of the sister or else?



0 Kudos

I think you are creating ABAP based adobe form.

You cannot assign any service to OData based adobe.

You need to copy it from standard ones.


Please use fiori tile "MAINTAIN FORM TEMPLATES" to get all the available forms in SAP.
The steps are available in the blog.
Let me know if you need any further information.


Rajat Sharma
0 Kudos
Yes Srinivasa,

Your understanding is correct

Rajat Sharma
Active Participant
0 Kudos
Hi rajat.sharma1 ,

Very well described blog..thanks for this.

I want to use ABAP Based Adobe form in new S/4 Hana BRF+ output management. Is this mandatory to use Odata based Adobe forms always?

When I used ABAP based custom Adobe form , I got error "Error while rendering output item". This error came when I tried to change the status from "In Preparation" to "To Be output". Could you please guide me where I am wrong in the process.

Thanks and regards,

Hello Prabhjot,

Thanks for your inputs.

To answer your query, It is not mandatory to use OData based adobe forms while using New Output Management (BRF+). You can still use ABAP based adobe form with BRF+.

For that, you need to define your print program and the processing routine while configuring the form.
The config is available in SPRO > Cross Application Components > Output Control > Assign Form Templates.

on the landing screen, you have to define your Program name (Print Program) and corresponding routine.

Hope this helps. If you need any further help. You can check the link :

Because from your error. It looks like the error is at the output management level.

Let me know if you need any help.

Rajat Sharma
Active Participant
0 Kudos
Hi Rajat,

I am facing the same issue. I have also created ABAP based form for Billing document (Invoice) and configured Form, Program name & Routine at "Assign form templates" in SPRO as you specified above.

Is there any other thing which I need to check or take care? Because I am able to get Print preview of custom form in VF01/02/03. But status is not turning into Completed if I execute it in VF31F. It is throwing below error.


Keyur Pawar
Hi Keyur,

It seems like the issue is related to the configuration of BRF+.
Either the configuration is not done properly or there is some SAP note that we need to apply in the system. Check with your BASIS team with this.

OR you can also go through the link provided in comments for configuration of BRF+.
If you still need any help. Please feel free to post a comment here.

Rajat Sharma
Active Participant
Hi Rajat,

Thanks for your reply. I was able to solve this issue and successfully implemented this in my company. If we are using ABAP based Adobe forms using program and routines, we have to pass Request ID of output request item to spool request title (RQTITLE).

Details are mentioned in SAPNOTE 2294198.

My next task would be to create a custom OData based Adobe form in S/4 HANA.

Thanks for your blogs and would request you to share more blogs on custom based adobe forms using OData service.

Thanks and regards,


0 Kudos
Hello Rajat,

I do not work in the MM module, but if I copy the standard form or create a new one, I still cannot select the layout type "XML based Interface" .

I think this is the reason why I can not set the name of the service?
Do you have any idea why so and how can I do it (if possible, step by step)?

Thanks in advance,
0 Kudos
I'm new to these concepts and my requirement is to add a logo ....i'm not clear on how do i add the logo without context and graphic options.
0 Kudos
Hello Mohd Kamil,

I have explained the same in my blog.
Please go through the blog.

Rajat Sharma
Active Participant
0 Kudos
I have followed all the steps in this blog, and I have copied the FDP_ED_PURCHASED_ORDER to a Z*, and followed all the instructions at the end of this blo for creating a custom oData service, however, when I want to print the form I got the following error:

(The entity ZFDP_EF_PURCHASE_ORDER~*Query was not found)


Can you help me with this? Where should I look?.


0 Kudos

Hello rajat.sharma1 , 

Nicely articulated about the oData based Adobe implementation. Do you know what is the best practice to design adobe forms i.e., using ABAP based traditional approach or oData Gateway service based ? When to each of them ? Currently am working on Netweaver 7.50 ERP Business suite running on Oracle DB.



0 Kudos

I am also facing the same error, while changing a single letter in Adobe form.

Does your issue short out.

I also need help, how to do changes in xml based Adobe form.



Ranjeet Srivastava
0 Kudos
Hi rajat.sharma1 ,

I have requirement to add some field in item level of Invoice and some text .

I have copied the standard form- SDBIL_CI_STANDARD_DE to Z********.

But while doing single change like Product to Product No. I am getting following error.

Is there any other steps also after doing changes in form we need to to anything??



Ranjeet Srivastava

0 Kudos
Hi ranjeet.kumar3
Even I am getting the same error, Were you able to fix it?

0 Kudos

Hi Ranjeet,


Please refer to note – 1555248 – Data mismatch with Integer, Decimal and Float.

I was also getting the same error. Check the data type in SAP ODATA and Form template. Both should match. I was able to resolve the issue by changing the Field type of the referenced field  Adobe form.

0 Kudos
Solved on Own
0 Kudos

Please i m looking for a tutorial how to create such form step by step from scratch. Or should i always copy existing one ?

Any link/pdf is welcome

Active Contributor
0 Kudos

Hi Rajat,

First very thanks for this blog. It definitely provides a proper heads up for getting into the new Output Management provision of S4 HANA.

I have got a very similar requirement and was following few other blogs as well. I have below 2 doubts, it would be very helpful if you could clarify on these :

  • I read in another blog that 2 Kind of FORMs are needed one is MASTER FORM and other APPLICATION FORM. MASTER FORM for Layout related settings of Pages and APPLICATION FORM for the real data or content. I believe ‘MM_PUR_PURCHASE_ORDER’ is APPLICATION FORM. Can you please tell we make use of this MASTER FORM as well. Am really not able to understand this. How we will check the overlap of Data for these FORMS when it will displayed.
  • For the Standard Callback class CL_MM_PUR_PO_OUTPUT_CALLBACK, in the Method GET_FDP_PARAMETER, you mentioned at Line number 12 to change it with ZService in case we are opting of ZOData. But at that line I could the code


    is commented. So does that mean Standard Callback only will work or we still need to copy the same ?



Active Contributor

I know its late to provide an answer on this but on seeing this unattended I would like to give solution for this.

The issue is with the copying of Standard Gateway to ZGateway Project.

The root ENTITY of Standard Purchase Order GW Service is QUERY it didn't get copied properly in your case.

Follow the "Now apart from this I would like to give some suggestions while tweaking the standard Odata for Form building purposes." section of below blog and you will get this on track for sure.


0 Kudos
Hi Rajat,

Can you please help how we can use SO10 in this approach.


Aman Kumar
0 Kudos
Hi Rajat,

How to translate these  kinds of form in different language as translation is disabled.


0 Kudos
Hi Rajat,
How did you  got create option for standard service?  for me Create option is itself Disabled.
0 Kudos
I tried the above steps to create a custom copy of form SRF_PH_WHT_FORM, with gateway service FDP_SRF_PH_WHT_SR

been able to add the service and activate the service in /IWFND/MAINT_SERVICE

then search in table /IWBEP/I_SBD_SV the corresponding project of FDP_SRF_PH_WHT_SRV which is FDP_SRF_PH_WHT, but when i tried to modify the project (FDP_SRF_PH_WHT) to add the an entity, it prompts the error:

Editing Prohibited

SAP delivered projects cannot be edited in your system

Do I need to create a custom project as well? using FDP_SRF_PH_WHT_SRV as the service ID?


0 Kudos
I have followed all the steps and added new entity set and generated, It is available in adobe life cycle to map. I have binded the image field to the entity property. But image is not displayed when the form is downloaded. I have executed the entity set in gateway client and able to see the xstring data. I have also converted the xstring to string and passed to the entity field
0 Kudos
I have followed all the above steps and created a new entity for logo. this new set is available in adobe life cycle to bind the image field. I am able to get the data in xstring when executed in the gateway client. But it is not coming when downloading the form. I have changed xstring to string and tried also
0 Kudos

I had to do very similar work to this recently,(XML interface forms being a new thing for me) and came across this post while researching the process; at first glance it looked helpful but other research and my own experience pointed to it being incomplete and misinforming. 

Some of the choices here were ill-advised, especially since the correct tools are seen in the post but never used!. The situation is not helped by SAP not putting blocks on certain functions (usually SAP GUI tools) that have been superseded by Fiori apps, so people (myself included) get off to a bad start wondering why some things don't work. 

1/ The PO template chosen is meant to work with a master page and a content, managed by the options in Maintain Form Templates (seen in one image above). The master page and its attendant service take care of selecting the logo via configuration and render it without any special code or hacks. The logo does not appear on the application content, that is the whole point of this design concept. 

2/ When extending from a pre-delivered form, do not copy the original service, you redefine it. This not always straightforward and even following the guidelines the redefinition generates errors. This is due to some weird design by the original service builders, who have added coded overrides on the definition of the model (the redefinition tool ignores/does not interpret this redefined layer).  

3/ You do not use SFP at all! The only exception seems to be that you cannot assign a custom service in Maintain Form Templates unless it has been assigned to a form once (which updates a catalogue of form services).  There is a functional gap here which may get fixed in later releases.

Active Contributor
0 Kudos

What happens if we do not change the callback class and, consequently, do not change the service name in GET_FDP_PARAMETERS? Testing on the S4H appliance seems to be ok, my custom MPC_EXT and DPC_EXT are called and work as expected, I can extend the model with coding and fill it.

@rpscgregarding your comment:

1) I already had a case where my form needed two different sets of master pages to control double-sided printing depending on the output device. It is not clear to me how such a result could be achieved, if at all, via this new fragment model.

2) how do you redefine the service? Especially given that...

3) ... there is no way with Fiori to assign a custom service to a form; can you do that in some undocumented way? (and I am not talking about bashing FPCONTEXT and friends directly)



I will work backwards from (3). 

I am working on HANA 105, some of this is different before or after that release. There is an oddity with the service assignment, in that it should be maintained with Maintain Form Templates. However, your service will not appear in the dropdown of available services until it is assigned as a service on a form template. This is a paradox, as it needs to be assigned before it can be assigned, but there is a workaround.  You can make this change in transaction SFP - in fact this is the only use of SFP that you should have.

The method GET_FDP_PARAMETERS reads the above configuration, hence no need for code changes. If you do not change this, the standard delivered & assigned service is called.

Regarding the redefinition, I followed this official guide: Redefining OData Service (GW) - SAP Documentation.

Note that there are three redefinition cases. It is not too complex if you are adding fields to a DDIC based entity. In my case the model was not DDIC based for the pertinent entity and that was really difficult, as the "designers" have not provided proper inheritance in the framework, and in some cases they mess with the model in the MPC define method. The latter proved to be a problem for a colleague of mine working on billing, I helped him to fix it. Be prepared to have to replicate some of the superclass base code, either to get some methods properly redefined or mending the broken model that billing redefinition produces.  

Master pages: the simplest option would be to have two form templates which have the same content form but different masters. However, this isn't always easy to configure with the options provided by OPD but that is the theory.  You may be able to implement the form as I mentioned at the end of this post: Solved: Issue while referring the Master Page from a Maste... - SAP Community

Active Contributor
0 Kudos

@rpscg take two of my answer (the editor replaced my draft with the complete blogpost... ah, the joys of the new forum!). Thanks for the tip regarding the master pages, I will come back to that once I am more familiar with the whole scenario.

You know, this kind of paradox makes me wonder if preventing developers from creating new custom datasources is indeed by design and not just an unfortunate omission.

I checked a few implementations of GET_FDP_PARAMETERS: it would seem that all it does is bringing input parameters from the outside world (APOC_RENDER_DOCUMENT test report or normal call), without actually changing either the form or the service name. That is why a cloned service will work normally even without changing the callback.

The big issue is that on S4H (S4CORE 107) the SEGW tx does not offer the redefinition options listed in the docs, all I can do is clone the whole service, right-clicking on the name:



After this, first let the system generate the artifacts, then carry over the redefinitions from the source artifacts (they are not duplicated), change the form to use the new service (only via SFP, as you noted) and it will run.

I discovered that adding new fields will produce a new "create_new_artifacts" method in the MPC_EXT class, so I tried extending the model with a custom "create_our_artifacts" method and it worked: you can use the DPC_EXT class to fill in this new part of the model just normally and the data is available in the form.


METHOD define.
super->define( ).
create_our_artifacts( ).


Prerequisite is that the underlying data structure must exist in the DDIC, of course, but in my case that would be a generic type used all over the form.

If I could do that without the whole clone-edit thing I'd be happy: what I am after is extending the model with any structure (the Fiori app only allows basic types) and filling the additional parts in our classes without duplicating the whole standard model and classes, just reuse them as is.

Additionally, anything which requires the GUI is a dead giveaway that it won't work in the cloud ("public cloud", in SAP-speak) but might work in somebody-elses-prem ("private cloud", in SAP speak).




Are you sure you followed the steps correctly for redefinition?

1/ You must be in change mode, using your empty 'Z' service.

2/ Right click on the data model node, not the service node. I often forget that even though I've done it several times. The redefinition has many options, so I cannot believe they would simply remove it. 😮

Active Contributor
0 Kudos

@rpscg actually no 😄 since the few pictures I saw in the docu were too small to be useful. Now I see what you meant, thanks. I'll have to check how this route differs from the other one.

EDIT: hmm, either I am still doing something wrong or redefinition does not really help: "include" only allows the reuse of a submodel and the other redefinition (marking all nodes before) will not carry over the service implementation. I'm still better off copying the whole project and manually carrying over whatever redefinition was there.

EDIT 2: I am definitely making some mistake here, I tried again and the service implementation was there.

Labels in this area