Enhancing an SAP Fiori App Gateway Service PO Tracking The Complete Tutorial
Posted on August 27, 2025 by Laeeq Siddique

To enhance SAP Fiori App Gateway Service businesses can extend the SAP Fiori PO Tracking Gateway Service. This middleware facilitates seamless data exchange, allowing businesses to extend and customize their SAP applications to better meet specific
In this guide, we’ll show you how to enhance SAP Fiori PO Tracking safely and effectively using BAdIs, append structures, and SAP’s SEGW tools, ensuring your enhancements remain upgrade-safe and easy to maintain.
Introduction
With its modern, role-based, and device-independent interface, SAP Fiori changes the way SAP users interact with the software. The SAP Fiori App Gateway Service, which connects the user interface to the backend data, is what really makes things work behind the scenes.
Improving this Gateway Service can add new features and make your business run more smoothly. You can add new data fields, change how the service works, or add more business logic to the Gateway Service without changing SAP standard code. This keeps the system stable and makes future upgrades easier.
What This Blog Covers:
- What is the SAP Fiori App Gateway Service, and why is it important?
- The steps to improve PO Tracking services
- Important ABAP technologies and techniques include BAdIs and the SEGW transaction.
- How to check and fix improvements
- Helpful advice on keeping an eye on service status
- Answers to frequently asked questions about SAP Fiori and Gateway improvements
Key Highlights at a Glance
Topic | Summary |
SAP Fiori App Gateway Service | Middleware enabling communication between Fiori UI and the backend ERP |
Enhancement Tools | BAdIs, Data Dictionary Appends, SEGW for OData service modeling |
Focus App | Track Purchase Order (PO) app — showing PO item details |
Enhancement Goal | Add the distribution channel field to PO item details |
Testing & Validation | Using SAP Gateway Client (/IWFND/GW_CLIENT) and cache cleanup |
Troubleshooting | Service activation checks and cache refresh techniques |
What is SAP Fiori App Gateway Service?
SAP Fiori PO Tracking Gateway Service makes backend business logic available as OData services that Fiori UI5 apps can use. The SAP Gateway acts as a middleman, processing OData requests and safely and quickly changing and sending data.
Key Components of the Service:
Component | Role |
OData Service | Standardized protocol for CRUD operations between client and server |
SAP Gateway | Middleware processing and routing OData calls |
BAdIs | Enhancement framework allowing custom logic injection |
SEGW (Service Gateway Builder) | SAP transaction to create and manage OData services |
Data Dictionary | Central SAP repository where data structures and types are defined |
By using these, developers can add new fields or unique business logic to basic Fiori apps like Track PO to make them work better for their purposes.
Why Enhance SAP Fiori PO Tracking Gateway Service for PO Tracking?
The standard Track Purchase Order app shows business users the important facts about their purchase orders. But businesses often need more information than what is given in the regular service. For example, they may need to know the distribution channel linked to the factory where things are delivered.
- You can add custom fields like the distribution channel (VTWEG) to the Gateway Service without modifying the core code of SAP.
- Add backend logic to fill in these fields automatically.
- Change how services respond to provide information that is particular to your business.
- Make the user experience better by giving them more data and letting them get to the information they need faster.
Using BAdIs and append structures in this way follows SAP best practices and makes sure that your changes are safe to upgrade and easy to maintain.
Steps to Enhance SAP Fiori PO Service
Here’s how to enhance SAP Fiori PO tracking using SEGW and BAdIs:
Step 1: Explore the Gateway Project in SEGW
- Run transaction SEGW in the backend ERP system
- Open project SRA020_PO_TRACKING related to the Track PO app
- Identify entity POItemDetailData, which feeds the item details screen
This entity is the target for enhancement.
Step 2: Extend Data Dictionary Structure
- The entity is based on the ABAP structure SRA020_S_PO_ITEM_DETAILED
- SAP provides an append include SRA020_S_PO_ITEM_DETAILED_INCL for extensions
- Create a custom append field for VTWEG (distribution channel)
This step ensures the data model can carry the new field.
Step 3: Implement BAdI for Service Metadata Enhancement
- Use transaction SE18 to access BAdI implementation
- Implement BAdI SRA020_PO_TRACKING_MPC (Metadata Provider Class)
- Add code in method ENHANCE_GW_SERVICE_ENTITY_MPC to add the field at runtime
METHOD if_sra020_po_tracking_mpc~enhance_gw_service_entity_mpc.
DATA: lo_property TYPE REF TO /iwbep/if_mgw_odata_property.
IF iv_entity_type_name = ‘POItemDetailData’.
lo_property = io_entity_type->create_property(
iv_property_name = ‘VTWEG’
iv_abap_fieldname = ‘VTWEG’ ).
lo_property->set_nullable( abap_true ).
ENDIF.
ENDMETHOD.
This code adds the new property to the entity dynamically.
Step 4: Implement BAdI for Runtime Data Population
- Implement BAdI SRA020_PO_TRACKING_DPC (Data Provider Class)
- Use method CHANGE_POITEMDETAILDATA_API to populate the new field from the database
METHOD if_sra020_po_tracking_dpc~change_poitemdetaildata_api.
TYPES: BEGIN OF ltyp_vtweg,
werks TYPE werks_d,
vtweg TYPE vtwiv,
END OF ltyp_vtweg.
DATA: lt_vtweg TYPE TABLE OF ltyp_vtweg,
ls_vtweg TYPE ltyp_vtweg,
lt_werks TYPE RANGE OF werks_d,
ls_werks LIKE LINE OF lt_werks.
FIELD-SYMBOLS: <ls_po_items_details> LIKE LINE OF ct_po_items_details.
LOOP AT ct_po_items_details ASSIGNING <ls_po_items_details>.
CLEAR ls_werks.
ls_werks-sign = ‘I’.
ls_werks-option = ‘EQ’.
ls_werks-low = <ls_po_items_details>-plant.
APPEND ls_werks TO lt_werks.
ENDLOOP.
CHECK lt_werks IS NOT INITIAL.
SELECT werks vtweg INTO CORRESPONDING FIELDS OF TABLE lt_vtweg
FROM t001w
WHERE werks IN lt_werks.
CHECK lt_vtweg IS NOT INITIAL.
SORT lt_vtweg BY werks.
LOOP AT ct_po_items_details ASSIGNING <ls_po_items_details>.
READ TABLE lt_vtweg INTO ls_vtweg WITH KEY werks = <ls_po_items_details>-plant BINARY SEARCH.
IF sy-subrc IS INITIAL.
<ls_po_items_details>-vtweg = ls_vtweg-vtweg.
ENDIF.
ENDLOOP.
ENDMETHOD.
This code fetches the distribution channel from table T001W for each PO item’s plant.
Step 5: Clean Cache and Test
- Run the cache cleanup transaction /IWBEP/CACHE_CLEANUP on both backend ECC and Gateway systems to refresh metadata and data caches.
- Use transaction /IWFND/GW_CLIENT to test your OData service
- Verify the new field VTWEG appears in the service response and is populated correctly
Checking Status and Troubleshooting SAP Fiori Services
When enhancements to SAP Fiori PO tracking aren’t reflected, ensure the OData service is active and metadata caches have been refreshed.
- Ensure the service is activated in /IWFND/MAINT_SERVICE
- Clear all relevant caches with /IWBEP/CACHE_CLEANUP
- Use /IWFND/GW_CLIENT for live testing of OData responses
- Check system logs and trace for errors related to Gateway processing
Benefits of Enhancing SAP Fiori PO Tracking Gateway Service
Enhancing SAP Fiori PO tracking delivers tailored insights and better UX.
Benefit | Explanation |
Upgrade-Safe Customization | Uses BAdIs and appends, avoiding core SAP modifications |
Tailored Data Presentation | Adds business-specific fields such as distribution channels |
Improved User Experience | More relevant information improves decision-making |
Reduced Development Time | Reuses existing SAP tools and enhancement points |
Simplified Maintenance | Clear separation of standard and custom code |
Resources & Further Reading
- SAP Fiori Apps Reference Library — Explore official SAP apps, details, and extensibility
- Mindset Consulting: SAP Fiori Gateway Enhancements — Detailed walkthrough and examples
- SAP Community — Official blogs and documents on SAP Gateway and Fiori
Conclusion
Enhancing the SAP Fiori PO Tracking Gateway Service, particularly for apps like Track Purchase Order—is a smart way to extend functionality while maintaining upgrade stability. By following this guide, you can enhance SAP Fiori PO tracking to deliver tailored business, you can introduce fields such as the distribution channel without modifying core code.
These clean, upgrade-safe enhancements improve the user experience and keep your SAP system adaptable to evolving business needs. With appropriate testing and cache management, your enhanced service will consistently deliver accurate, business-relevant data.
Call to Action
At Cremencing.com, we specialize in SAP Custom Development, including enhancing SAP Fiori App Gateway Services to meet your unique business requirements. If you want to unlock the full potential of your SAP landscape with tailored development and expert support, contact us today.
Let’s build smarter, faster, and more efficient SAP solutions together!
Frequently Asked Questions (FAQs)
Q1: What does SAP Fiori enhance in the user experience of SAP solutions?
SAP Fiori offers a simple, role-based, and responsive interface that makes SAP easier to use, reduces training time, and increases productivity.
Q2: How can I enhance a SAP Fiori application?
You can enhance Fiori apps by extending backend OData services via BAdIs, customizing SAPUI5 frontend components, and adding business logic tailored to your needs.
Q3: What are the three main types of SAP Fiori apps?
Transactional apps (for daily tasks), Analytical apps (for reporting and KPIs), and Fact Sheets (for detailed master data views).
Q4: How can I check the status of my SAP Fiori Gateway service?
Use transaction /IWFND/MAINT_SERVICE to check service activation and /IWFND/GW_CLIENT for testing OData responses. Clear cache with /IWBEP/CACHE_CLEANUP if changes don’t appear.
Q5: What are the five design principles of SAP Fiori?
Role-Based, Adaptive, Simple, Coherent, and Delightful user experience.