Alternative Dispatcher Layer Overview

23

description

The Alternative Dispatcher Layer is a way to RESTify SAP systems. This presentation was delivered at Mastering SAP Tech Conference 2012

Transcript of Alternative Dispatcher Layer Overview

Page 1: Alternative Dispatcher Layer Overview
Page 2: Alternative Dispatcher Layer Overview

Nigel James - Square Cloud Pty Ltd and SAP Mentor

Before You Speed Through the Gateway Come to REST with the Alternative Dispatcher Layer (ADL)

Page 3: Alternative Dispatcher Layer Overview

Mastering SAP Technologies http://squarecloud.com.au

The Key Message

Presenting an

open Alternative

REST based Dispatcher

framework Layer to get data out of SAP

Page 4: Alternative Dispatcher Layer Overview

Mastering SAP Technologies http://squarecloud.com.au

Roadmap for today

• Get your data out of SAP

• Looking at the Internet Communication Framework (ICF)

• What makes Alternative Dispatcher Layer (ADL) so great?

• Installing ADL

• An Example Use-Case

• Demo

• Questions

• Key Points to Take Home

Page 5: Alternative Dispatcher Layer Overview

Mastering SAP Technologies http://squarecloud.com.au

RPL

SICF

REST

REGEX XML

ABAP OO SAPLINK

JSON

HTTP

HTML

Page 6: Alternative Dispatcher Layer Overview

Mastering SAP Technologies http://squarecloud.com.au

Introduction & Overview

Alternative Dispatcher Layer Alternative – there are other things that do this job

Dispatcher – it prime job is to route URL’s

Layer – it is part of the overall solution

(Personally I was arguing that is should be called the

AWESOME Dispatcher Layer)

Page 7: Alternative Dispatcher Layer Overview

Mastering SAP Technologies http://squarecloud.com.au

Something to keep in mind ...

NO SILVER BULLET

Page 8: Alternative Dispatcher Layer Overview

Mastering SAP Technologies http://squarecloud.com.au

Get your data out of SAP

• RFC

• BAPI’s

• Web Services / SOAP / PI

• Gateway

• ICF Handler

Page 9: Alternative Dispatcher Layer Overview

Mastering SAP Technologies http://squarecloud.com.au

Looking at the ICF

• ICF – Internet Communication Framework [Transaction SICF]

• Enables you to create an endpoint of your own naming and write custom code to expose data

• Hierarchies of Handlers

• Create URL’s that make sense – Pretty URL’s

• Plug in code to access anything inside SAP

Page 10: Alternative Dispatcher Layer Overview

Mastering SAP Technologies http://squarecloud.com.au

What makes the ADL so great?

• ReST based architectural approach

• Simplify nodes in SICF

• Create a simple class with all the url patterns you want to match

• Delegate each pattern to another class

• Return data in which ever representation works for you

• For example an invoice could be returned as Json, XML, JPEG, PDF

Page 11: Alternative Dispatcher Layer Overview

Mastering SAP Technologies http://squarecloud.com.au

Installing the ADL

Installing the Alternative Dispatcher Layer

1. Find the ADL project on Code Exchange https://cw.sdn.sap.com/cw/groups/adl

2. Download the Nugget File from sources

3. Use SAPLINK to install the Nugget file

4. Create a new project for the base classes – YADL

5. Make sure everything is compiled

Page 12: Alternative Dispatcher Layer Overview

Mastering SAP Technologies http://squarecloud.com.au

The ADL Flow

Page 13: Alternative Dispatcher Layer Overview

Mastering SAP Technologies http://squarecloud.com.au

New ADL Project

Starting a new Project with the ADL

1. Create a new package for your classes

2. Create a class for the dispatcher Z_REST_DISPATCHER that inherits from Y_ADL_DISP_BASE

3. Implement HANDLE_REQUEST

4. Create one or more classes, Z_REST_RES_MAIN*, that inherit from Y_ADL_RES_BASE

5. Create GET / POST Methods

Page 14: Alternative Dispatcher Layer Overview

Mastering SAP Technologies http://squarecloud.com.au

Implement HANDLE_REQUEST

Page 15: Alternative Dispatcher Layer Overview

Mastering SAP Technologies http://squarecloud.com.au

Add GET / POST methods

Page 16: Alternative Dispatcher Layer Overview

Mastering SAP Technologies http://squarecloud.com.au

Link to a New ICF Node

Page 17: Alternative Dispatcher Layer Overview

Mastering SAP Technologies http://squarecloud.com.au

This slide has been left blank intentionally

Page 18: Alternative Dispatcher Layer Overview

Mastering SAP Technologies http://squarecloud.com.au

Demo

And now with any further ado I would like to introduce ...

wait for it

wait for it

THE DEMO

Page 19: Alternative Dispatcher Layer Overview

Mastering SAP Technologies http://squarecloud.com.au

Questions

Page 20: Alternative Dispatcher Layer Overview

Mastering SAP Technologies http://squarecloud.com.au

Key Points to Take Home

• Simple

• Light weight

• Restful Architecture

• Alternative

• Control

• FREE

Page 21: Alternative Dispatcher Layer Overview

Mastering SAP Technologies http://squarecloud.com.au

Super Bonus Slides – More resourses

• DJ Adams http://scn.sap.com/people/dj.adams/content

• Sascha Wenninger http://scn.sap.com/people/sufw/content

• Nigel James http://scn.sap.com/people/nigel.james/content

• ADL Project https://cw.sdn.sap.com/cw/groups/adl

• JSON Project https://cw.sdn.sap.com/cw/groups/zjson

Page 22: Alternative Dispatcher Layer Overview

Mastering SAP Technologies http://squarecloud.com.au Slide 22

Nigel James Square Cloud Pty Ltd http://squarecloud.com.au/ [email protected]

Page 23: Alternative Dispatcher Layer Overview