Overcast Components (OC) are a way to build integrations to external or backend systems for users in Salesforce using configuration rather than code.
Built on top of Overcast Real-time Scenarios and using Salesforce Aura Component UI technology, OCs allow for displaying real-time data in various forms, such as lists of records, charts, gauges, summaries; and performing real-time updates to backend systems.
To learn more about creating a real-time scenario, please click here.
This page details how to create an OC for displaying SAP invoice history for an SAP customer from within Salesforce.
This OC will be used on an Account detail page. When the page opens, the component loads, reads the SAP customer number from the record, and a query is sent to SAP through Overcast in order to retrieve the invoice history. The invoice records are displayed and the invoice number links to the details page. The details page, when loaded, will again read the SAP customer number from the record, and a query will be sent to SAP through Overcast to retrieve the invoice detail to display on screen.
To ensure a full understanding of specific terminology, click here to learn more about terms used to describe Overcast Components.
As a first step, we need to create a scenario for querying SAP invoices. Create and activate two real-time scenarios, one for one for BAPI_WEBINVOICE_GETDETAIL and one for BAPI_WEBINVOICE_GETLIST.
Following are the steps to create a Real-Time Integration Scenario for SAP BAPI / RFC - BAPI_WEBINVOICE_GETDETAIL. Using this Real-Time Scenario, we shall also be creating a detail display as mentioned on the page Detail Component Definition Setup.
.png?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kemY4dnF2MjRlcWhnLmNsb3VkZnJvbnQubmV0L3VzZXJmaWxlcy83NDg4LzMyMTM5L2NrZmluZGVyL2ltYWdlcy9xdS9SVDEoMSkucG5nIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNzY2Mjk3ODkyfX19XX0_&Signature=Rl93CNoy2JMpo-7QxuutIbyM8WtD3h72iDSFk0yOEKGT~hBbmyPJtBPlQ2NvJE4pBxI6QLCOGYKzKry6Eg9jTD0OVIOemyQ9TfzH5zNZc6FQrEkuPItc8FamDCoC1Ylq5TVDHEBeAtxdSK2oC9PDxOzML~hyaAixyVI4LE4BtEVNooBRD07PDXujXEwZjO3~AGf~NsZQ3CAi2Qr~7NkZGvzrVK2F1KZWk5m728kSh3m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sdgRUvv0yKLG4nSXI-GnZTjSw853WFc3kuvuRvYK8wjj4l8g69TKEGmyKmYUo~8~-0iIarK9Fm6jlXdhUk9IduA4qwwfns0QPKImJLBWLKRpX6PD-t7T5hpMEM9H9SVRwdX7Yw-Ve5eK38cf4ALsUwXYbkpOIE2tqaibulNintrXxBsYzujG-S7jINNgjNgzxP8ZqB1qkWy7-waCGAMfRBpOZH-2X5XXk6DXnhFS7Xmbre4X0y0DB4yJbmqnhBOlHCY49WxkDtSepdcDSiyKXk8RPg__&Key-Pair-Id=K2TK3EG287XSFC)
Note: This may take time, but progress can be tracked in the Monitoring tab as well as the section for Scenario Execution History. The status changes to green when the scenario is successfully activated, as shown below.

Repeat Steps 1-6 for creating a Real-Time Scenario with a Scenario named myRealTime_SAPInvoiceList for SAP BAPI/RFC - BAPI_WEBINVOICE_GETLIST. Using this Real-Time Scenario, we shall also be creating a simple list display on the upcoming page Widget Component Definition Setup and a full list display on the upcoming page List Component Definition Setup.
As the next step, please ensure that we complete the following pages in the given order as below:
1) Detail Component Definition Setup
2) Widget Component Definition Setup &
3) List Component Definition Setup
As the last step, with the component definitions(Detail, Widget & List) created and configured, the next step is to add the widget component to the Account detail page. Open an Account page, select the cog and then select the Edit Page link.

Locate the component in the Custom section named SAP Invoice Widget(the Label which you had given to the Widget Component Definition). Drag and drop this onto the page(alternatively you could create a new Tab, for this example, SAP, and place this Component Definition there), and Save. Select the Back arrow button in the top left corner of the Edit page.
.png?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kemY4dnF2MjRlcWhnLmNsb3VkZnJvbnQubmV0L3VzZXJmaWxlcy83NDg4LzMyMTM5L2NrZmluZGVyL2ltYWdlcy9xdS9SVDU1KDEpLnBuZyIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTc2NjI5Nzg5Mn19fV19&Signature=X71ScIkz0tBPze8iQG6zyWa3tLdpsCBGgKDwHeYLz0GDH4hfbi6FXgTWfhBJDfle4eVuL4yZdNjifRox6AmtS5oSFMKv-FO9gaFpLq4ggFAO6yGIiPv1sEo299iMMdVDEJVC0hxKPbsrG4QPFDks7W6NrAfejOggUPZjZf-6SygFmCNeyLBrkEISdtQ05oSTw2QikqCMEu9guSO9LiUgvDyNxSvllNAFWGfBhgNsAa~AluCLpL63l4ZCG2FOdKp~6hn3D3LSJgNf5qv5zUPWq~V0Dc9sonl6YYB0NLZCRHbGf0h5rHYy-ftb1nWk0A0rb7jYbEWxAN~uuNq4bYdaTA__&Key-Pair-Id=K2TK3EG287XSFC)
On the Account Screen, to view the data, adjust the filter settings (1) accordingly and change the date range, for example, Current and Previous Year FY (2) and then click Update (3).
.png?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kemY4dnF2MjRlcWhnLmNsb3VkZnJvbnQubmV0L3VzZXJmaWxlcy83NDg4LzMyMTM5L2NrZmluZGVyL2ltYWdlcy9xdS9SVDU2KDEpLnBuZyIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTc2NjI5Nzg5Mn19fV19&Signature=kKsY7XsAh0tkyEYWiPCZaqvVxgJRNa1s-wkrWgQ4kyJTaBPfEznokksqe9UXuPsuUQvTl0sTv7VydhYJ4uFhar21h1FWRzZ0nydKOKh0Rf2HjjCz92f0oO78rltlil4COaxa90OM8I96HeiXNCt2iqmnnb-6r02H9L47Q6zhsYIlPEAK0Yi7pdEnEzjVsSnejSeNShzAKLIIO910Uw4INvwNi~zhcuAn~QqUOlqAJulHXLlt0FON2RmX~g5pGQmkWNokQUOem1agfAsSkA8Aivacae2f5oNo-kkHdEgrctBEQG3u-qL-qz3bfkG-R9vu9PY1DMrOQAb-5-bU7VXq8A__&Key-Pair-Id=K2TK3EG287XSFC)
Clicking Update shows the Widget with 6 Invoices(based on the number of Tiles selected in the Widget Component Definition Setup).

Clicking View All takes us to the List screen as shown below and clicking the Invoice from the Widget or the List takes us to the Detail screen.

Detail screen:
