Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
shreenathB
Advisor
Advisor
This blog is relevant to a scenario wherein underlying Data structure is not provided in the component configuration.

Problem Statement Example

Create a custom field in the External Data tab of maintenance order app.


Maintenance order app - External Data tab


 

Right click and go to technical help.


Technical help


Click on component Configurations.


Web Dynpro Component and Application Data


 

Click on general settings and Feeder class with parameters.


Component Configuration


Here the Node/Data structure to enhance External Data tab is not provided.

You have ABBID, Node Name and Feeder class.


Feeder class with parameters


How to find the underlying structure to enhance the UI?

A developer could probably debug the feeder class to get the underlying structure, but the below solution gives detailed insights on the backend architecture.

Solution

Go to T-code SPI_TOOLS.

Click on Metadata Browser.


Overview of SPI tools


Enter the ABB ID (mentioned in the feeder class parameters) you want to enhance and execute.


SPI Metadata Browser


Look for the Node Name -EAMS_OPER (mentioned in the feeder class parameters) under EAMS_ORD.


Click on EAMS_OPER and click on Details.


Node Name - Details


You will find the Data structure, Metadata Provider Class, and Service Provider class.


ABBID Attributes and Node Attributes


Extend Data structure EAMS_S_SP_ORD_OPER using append structure to create a custom field in the External Data tab of maintenance order app.

Now to Go to component configuration of the tab you want to enhance.

Click on Other functions and click on Enhance. Create enhancement implementation to add your custom field to the form UIBB schema.

(There are many blogs on how to enhance the standard UIBB form hence I am not explaining in detail.)


Enhance UI


 

Supporting Enhancement

To enhance the backend application modification free, we also have a central enhancement spot - /PLMB/ES_SPI which can be used by customers or partners.

Example - Implement BADI- /PLMB/EX_SPI_APPL_ACCESS which can used to adapt custom data in the service provider access method.

Similarly, we have many such useful BADI definitions in the enhancement spot - /PLMB/ES_SPI.

Conclusion

This will help you identify the underlying data structure of the Application Building Block Id as well as enhancement spot for the backend development.

References

The below article sheds light on what is Service Provider Infrastructure (SPI), Application Building Block ID (ABBID), Metadata Provider, Service Provider, Node etc. and how to make use of them to enhance and adapt standard Web Dynpro Apps.

Overview - Service Provider Infrastructure (SPI) - Support Wiki (sap.com)
4 Comments
manojkumar_kott
Discoverer
0 Kudos
Hi Shreenath,

Thanks for sharing the details and its very helpful.

Can you please share details on how you have enhanced the feeder class to save the data to tables. 

Thank you,

Manoj
shreenathB
Advisor
Advisor
0 Kudos
Hello Manoj,

In some cases, there will be enhancements available to update the DB tables but in my case there wasn't. Hence, we had to append structures, use post exit enhancements and also BAPI extension to update the relevant DB table (in my case Table- AFVC).

1) Append a structure to the DB table and add your custom field.

2) Put breakpoint at a relevant method in service provider class and check which BAPI is getting called to save the data in the DB table.

3) Append structure to relevant structures to map values.

4) If necessary, use pre-exit and post exit in relevant classes to map values.

5) Use BAPI-extension to save the data.
csayak
Explorer
0 Kudos
Hi shreenath.bhaskar.bangera

I have followed your blog to add a new field in the External tab using the SPI_TOOLS. As per my requirement, it should be a checkbox, so I have created a customizing and added it to the screen as a checkbox and assigned a FPM Event ID as well which I have added by enhancing the feeder class.

Now, the problem is the checkbox is getting unchecked with every action (even if I press enter). Also, I cannot read its value from the feeder class. Am I missing something? Do, I need to add it to some other structures as well?
shreenathB
Advisor
Advisor
0 Kudos
Hello Sayak,

You will have to handle the checkbox value in the feeder class methods- get_data and after_get_data by redefining it (if redefinition is not possible then use post-exit enhancement).