Ansicht
Dokumentation
ABENCONSUME_BS_ABEXA - CONSUME BS ABEXA
RFUMSV00 - Advance Return for Tax on Sales/Purchases Fill RESBD Structure from EBP Component StructureThis documentation is copyright by SAP AG.
- Consuming Business Services with Demo Class
This example demonstrates how the OData data of business services can be consumed in ABAP with a demonstration class.
Source Code
Description
Business services are designed mainly for accessing AS ABAP from outside, however for demonstration purposes here, an ICF client implemented in ABAP is used to read the ICF nodes of business services. The ICF client is implemented in the class CL_DEMO_BS_CONSUMPTION that offers some methods for examining the OData data of service bindings whose names are passed by parameter:
- Several methods are available for reading URLs for use in browsers.
- One method reads the non-handled OData data in XML or JSON format.
- One method extracts important metadata to internal tables.
- One method extracts the actual data to internal tables.
The above shown program DEMO_CONSUME_BS_SIMPLE uses the class to extract the data of individual CDS entities exposed in service definitions to internal tables and display it. Program DEMO_BS_SIMPLE_URL displays an URL that can be copied and pasted to a web browser in order to display the OData data in XML or JSON format.
Further example programs are:
- DEMO_BS_URLS gets the URLs of service bindings.
- DEMO_BS_ODATA gets the unhandled OData data of service bindings.
- DEMO_BS_META_DATA gets important metadata as the content of internal tables.
- DEMO_CONSUME_BS_WITH_PARAMS demonstrates parameter passing to exposed CDS entities with input parameters.
- DEMO_CONSUME_BS_WITH_ASSOCS demonstrates how paths are specified for exposed CDS entities joined using associations.
The defaults for the input parameters of the programs access service definitions and service bindings that were created for these demonstrations. These service bindings use the OData protocol (version 2) for Web APIs.
Note
See also Consuming Business Services with Client Proxy
General Material Data rdisp/max_wprun_time - Maximum work process run time
This documentation is copyright by SAP AG.
Length: 3094 Date: 20240425 Time: 124727 sap01-206 ( 41 ms )