Category: SAP

  • Components in Web Dynpro

    Preface – This post is part of the SAP ABAP Web Dynpro series.

    Introduction

    Web Dynpro is a SAP based technology which is used to create web-based Application. To develop a web based application we need multiple components and interfaces. In this article we will explain Components in Web Dynpro in detail.

    Components in Web Dynpro

    A Web Dynpro component is a reusable entity. The creation of Components in Web Dynpro is a mandatory process. A Web Dynpro component can even contain another Web Dynpro Component. The lifetime of Web Dynpro component begins at runtime of the application and end with the lifetime of Web Dynpro Application.

    Context

    It is a data container (or a temporary storage area) where we store data during runtime of Web Dynpro Application.

    UI Element

    It is the most important element of Web Dynpro. It is a display/screen element. Using it, we can display any information on the screen. It include Text View, Radio Buttons, Drop Down, Check Boxes, Tables, etc.

    View

    Like HTML websites, it is the screen that is visible on the browser. It is the same view that we have discussed in the MVC concept of Web Dynpro earlier.

    Window

    The window is the container that holds multiple view altogether.

    Methods

    It is the section that contains the business logic of our Web Dynpro Application. Like SAP ABAP, we include Select statements, Function Module, other code blocks here.

    Controller

    As we have discussed about MVC architecture of Web Dynpro, a controller is used to communicate between views and models (data). These models are extracted from the Methods.

    Navigation Plugs

    A navigation plug, as its name suggests is used to navigate between multiple views.

    Application

    Once we are done with all the component creation, modelling and coding, we need to get an executable link which is extracted from Web Dynpro Application.

    Advantage of Components in Web Dynpro

    Following are the advantages of Components in Web Dynpro:

    1. It helps in Structuring the programming
    2. It helps in creating blocks which are easily manageable
    3. It creates blocks which are reusable
  • Setup of SAP Web Dynpro Application

    Preface – This post is part of the SAP ABAP Web Dynpro series.

    Introduction

    Web Dynpro in SAP ABAP is a standard technology which is used to create web-based applications using ABAP programing language. Web Dynpro includes many graphical development tools which are included in ABAP workbench. Because of the use of a graphical tool, it seems to be more user-friendly. In this article we will learn about the setup of SAP Web Dynpro Application.

    Setup of SAP Web Dynpro Application

    Step 01: Goto the transaction SE80

    Step 02: Click Repository Browser

    web dynpro Object Navigator

    Step 03: Select Create web Dynpro component and assign it a name as shown above. On Clicking enter it will open a pop up as shown below:

    Create web dynpro App

    Step 04: Enter the description, chose the type and Assign Window and View name as shown below:

    web dynpro Connectivity browser

    Step 05: Now a view is created as shown below:

    web dynpro in SE80

    Step 06: Double click the view to open it, as shown below. Choose the layout option here:

    web dynpro layout

    Step 07: In the right hand side, you will see two options, choose Root Element Container, as shown below:

    web dynpro root

    Step 08: In above step, choose Insert Element:

    web dynpro Insert Element

    Step 09: Provide ID and TYPE of the element, as shown below:

    web dynpro Create Element

    Step 10: For the element “Page Header” you have just created, define the properties available in the right pane:

    web dynpro properties

    The title that we have provided above will be the header of the Web Dynpro Application. It is suggested to give a meaning title, unlike the one we have mentioned.

    Step 11: To save your application, click CTRL + S

    Step 12: Now activate your application, by right clicking the application name from left pane and clicking “Activate”, as shown below:

    web dynpro explorer

    Step 13: Whatever, we have done is just the creation of Web Dynpro Interface/Component. To get an executable Application, right click and under Create option, choose “Web Dynpro Application”.

    web dynpro Application

    Provide the name of the application and meaningful description. The application you have just created will appear just below the “Windows” option above. Now right click the Web Dynpro Application and click test to open your application. The application will open in Internet Explorer.

  • R3 Corda Platform Introduction

    Preface – This post is part of the Blockchain Basics series.

    Introduction

    Corda is an open source private blockchain platform, introduced by R3 that integrates the existing proven technologies such as relational database, Java Machine (JVM) in blockchain for ERP and business solutions.

    Corda has published a whitepaper to discuss the underline technologies; you can read the Corda: A distributed ledger Whitepaper here.

    How R3 Corda Works

    In Corda network, a node firstly undergoes a KYC process to obtain identity certificate. When this node joins the network, they publish this certificate including their legal name, their IP address, public key and some other information. Then the nodes communicate point-to-point using TLS encrypted messaging.

    R3 Corda Use Cases

    R3 Codra is one of the most used Enterprise based blockchain network. Following are some of the common use cases:

    1. International Bank Transaction

    To implement cross border payment without any third party involvement, a bank can use R3 Corda based network to implement it.

    1. Construction Industry

    To share information between multiple sub-contractors, we can submit the information related to construction on Corda Blockchain.

    1. Healthcare Industry

    Healthcare Industry has following two possible use cases to implement blockchain:

    1. Health records exchange
    2. Health Claims management

    Merits of Corda Blockchain

    Following are the merits of Corda Blockchain Network:

    1. Privacy
    2. Agile and flexible
    3. Interoperability
    4. Open development
    5. Open design

    Demerits of Corda Blockchain

    Following are the demerits of Quorum blockchain:

    1. Anonymity
    2. Questionable affair for many companies
  • Quorum Introduction

    Preface – This post is part of the Blockchain Basics series.

    Introduction

    Quorum is a private and permissioned blockchain developed on top of Go and Ethereum technology mainly for Enterprise based solution. An Ethereum is a decentralized platform which is used to run smart contracts. In this Quorum Introduction we will explore more about it.

    Quorum has its Whitepaper published here. Apart from Quorum Introduction, it discusses the core architecture and end to end implementation of Quorum technology.

    How Quorum Works

    Quorum Application are based on three layered structure. The initial layer is the go-Ethereum where all the transaction happens. The second layer is of Quorum where all the logics are implemented which also includes Transaction Manager, Crypto Enclave, consensus and network manager. The last layer includes the distributed blockchain applications.

    Quorum Use Cases

    With its permissioned blockchain paradigm, Quorum can be implemented easily in given use cases:

    1. Financial Applications

    To ensure the transactions between two parties and two financial institutions are secure, private and not revealed to any other financial institutions, then implementing it via a permissioned network like Quorum is a right decision. Quorum supports both client privacy as well as meet legal and regularity requirements.

    1. Payment Applications

    To implement payment across various parties based on various pre-defined conditions might include the implementation of smart contracts. The use of Quorum network helps us to implement the transaction on a common protocol.

    Merits of Quorum Blockchain

    Following are the merits of Quorum blockchain:

    1. Private and Permissioned Network
    2. Alternative Consensus Mechanism
    3. Peer permissioning
    4. Higher performance

    Demerits of Quorum Blockchain

    Following are the demerits of Quorum blockchain:

    1. Anonymity
    2. Questionable affair for many companies
  • Multichain Introduction

    Preface – This post is part of the Blockchain Basics series.

    Introduction

    Multichain is off-the-shelf private blockchain platform developed primarily for institutional financial sectors. It provides privacy, openness and control to the network administrator (that can be either miner of the first “genesis” block or a predefined miners set as Admin by previous Admin). Multichain has published a whitepaper to discuss the underline technologies; you can read the Multichain Private Blockchain Whitepaper here. In this article we will explore the Multichain Introduction with some of its use cases.

    How Multichain Works

    In a Multichain bases blockchain network, the administrator grants privileges to other users in the network. The mining (block validation) in a Multichain is just like a round robin schedule, which means each miner/user in the network must create blocks in rotation to generate an authentic blockchain.

    Multichain Use Cases

    Multichain is one of the widely used blockchain technologies that are being utilized by enterprises and small industries. Following are some of the accepted use cases by Multichain:

    1. Centralized Currency Settlement System

    This is a very generic use case where all the currency exchange system can be scrutinized under blockchain methodology.

    1. Bond Issuance System

    Issuance of bond in a systematic manner becomes a tedious job. Multichain can become a secure solution to this problem.

     

    1. Peer-to-peer Trading System

    Stock trading is not a peer-to-peer system but it can be like bitcoin trading system. This can be easily achieved with the help of Multichain.

     

    1. Consumer facing reward scheme

    It is also a generic scenario where blockchain can be used to win trust and bring fair results in the reward scheme.

     

     

    Merits of Multichain Blockchain

    Multichain Introduction on top of Bitcoin brings following merits:

    • Unlimited capacity
    • Very less or no transaction cost (based on subscription)
    • Relevant Data storage
    • Reduced Mining risks
    • Higher privacy features
    • Openness

    Demerits of Multichain Blockchain

    Although Multichain provides additional features on top of Bitcoin and is better than many permissioned blockchain technology, still it comes with following demerits:

    • No support to smart contracts
    • Typical consensus mechanism
  • Hyperledger Introduction

    Preface – This post is part of the Blockchain Basics series.

    Introduction

    In 2015, many corporations came along and created an open source blockchain platform beneath the guardianship of Linux Foundation and named it Hyperledger. Hyperledger, since then, has evolved a lot. It’s launched multiple frameworks and tools for the same. Among them Hyperledger Fabric is that the most suited framework for Enterprise. Hyperledger provides various industry ready blockchain frameworks and tools that are unique in terms of use and implementation. In this Hyperledger Introduction article we will learn some of the basics related to it.

    Hyperledger Frameworks Introduction

    Based on different business and enterprise scenarios, multiple Hyperledger frameworks were developed. These are as follows:

    Hyperledger Burrow

    It utilizes permissioned Smart Contracts methodology based upon Ethereum Virtual Machine (EVM).

    Hyperledger Fabric

    Hyperledger Fabric is the most stable platform by Hyperledger. It is mostly suitable for business applications. It uses components (consensus and membership services) in form of plug-and-play. It deploys business rules in smart contracts also known as “chaincode”.

    Hyperledger Indy

    It is a framework developed and designed solely for distributed identity.

    Hyperledger Iroha

    It is a blockchain framework designed in such a way that it can be incorporated in infrastructure projects easily.

    Hyperledger Sawtooth

    It is a blockchain framework that keeps the platform highly modular such that the enterprise and consortium can make their own decisions about their blockchain applications.

    Hyperledger Tools Introduction

    We have already discussed various blockchain frameworks provided by Hyperledger. In this section we will discuss various tools provided by Hyperledger that can be used by the frameworks.

    Hyperledger Caliper

    It is a blockchain tool to measure the performance of any blockchain by using set of predefined use cases.

    Hyperledger Cello

    It is a blockchain tool to bring on-demand deployment model to the blockchain ecosystem.

    Hyperledger Composer

    It is a blockchain tool which is used to make development of blockchain application easier.

    Hyperledger Explorer

    It is a dashboard which gives information on the network, blocks, node logs, smart contracts and transaction.

    Hyperledger Quilt

    It is a tool to implement ILP i.e. Interledger Protocol which is a payment protocol for Blockchain technology.

    Hyperledger Whitepaper

    Hyperledger has published several whitepapers to discuss the underline technologies; you can read the Introduction to Hyperledger here.

  • Consensus Mechanism

    Preface – This post is part of the Blockchain Basics series.

    Introduction

    The literal meaning of consensus is “A general agreement” which means a consensus for a Blockchain is a mechanism of validating transaction before pushing it into a block, based on general agreement. The common example of agreement can be seen in bitcoin where it is required to have miner’s agreement of more than 51%. Consensus mechanism used in bitcoin is Proof of Work.

    For example, Gargi sends $100 worth of Bitcoin to Rudra, Gargi will lose 100$ worth of Bitcoin from her wallet, and Rudra will gain 100$ worth of Bitcoin in his wallet. But it must be validated and verified that if Gargi actually had 100$ worth Bitcoin in her account or not. This is validated by the miners in the Blockchain and if more that 51% miners agreed upon this transaction, then only the transaction will be validated.

    There are several ways to reach on a consensus technically, we’ll discuss the few and wide used agreement mechanisms:

    Proof of Work (PoW)

    The process of finding nonce is available for everyone and it will be achieved earlier by the one who has better computational power (because of higher probability to guess). This way of corroborating a block in Blockchain where the work (here guessing a nonce) is taken into account as a signal of validation is termed as Proof-of-Work. This mechanism is employed in Blockchain based cryptocurrencies like Bitcoin.

    Proof of Stake (PoS)

    The process of finding nonce is achieved earlier by the one who has better computational power. This could end in a monopoly of wealth and will lead the monopoliser to impose conditions on the remainder of network. And if this monopoliser has malicious intentions, then it could lead low confidence in Bitcoin. To overcome this issue, an agreement mechanism was designed in such a way that the forger/validator can keep associated quantity of crypto currency as a stake and will be probabilistically appointed an opportunity to be the one validator and build new blocks. This too provides a monopoly to rich as they could stake more and will have high probability to become validator. As stake can be confiscated if dishonourable validation unit are created, hence it seems safer than PoW. This mechanism is employed in Dash, NEO and PIVX.

    Proof of Elapsed Time (PoET)

    In 2016, Intel observed the difficulty of terribly high resource utilization and energy consumption in current agreement mechanisms. To solve this issue and serve the aim “cost should stay proportional to the worth derived from the process”, Intel brought Proof of Elapsed Time. In this paradigm, each participating node of a permissioned Block within the Blockchain are assigned random waiting time. The one with lowest waiting time wins the chance to become a validator. This is more like a lottery type. This mechanism is used in Hyperledger.

  • How to Activate Services in SICF: SAP Transaction Guide

    Preface – This post is part of the SAP ABAP OData Tutorial series.

    Introduction

    SAP provides Internet Communication Framework (ICF) services that needs to be activated after your OData Service is registered and active. The ICF is an API service enables an ABAP program to communicate with the Internet. In our last article, we have activated our OData services, let us explore more about SICF nodes in this article.

    Steps to Activate OData Services

    1. Go to the transaction SICF (Maintain Services) and search for your OData Service Name as shown below:
      Go to the transaction SICF
    2. Now, activate the following service nodes (if available):
      1. /default_host/sap/bc/ui5_ui5
      2. /default_host/sap/bc/ui5_ui5/sap/<your service name>
      3. /default_host/sap/bc/bsp/sap/<your service name>
      4. /default_host/sap/opu/odata/sap/<your service name>
    3. To activate an ICF service, select the required service node in the ICF tree.
    4. Activate the ICF service in one of the following ways:
      1. In the menu, select option Service/Host  Activate
      2. In the context menu select Activate Service. (By Right Clicking on the node as shown below)

    Activate the ICF service

    Steps to Activate Services for Fiori Launchpad

    1. Go to the transaction SICF (Maintain Services) and search for your OData Service Name as shown below:
      Go to the transaction SICF
    2. Now, activate the following service nodes (if available):
      1. /default host/sap/bc/ui2/nwbc/
      2. /default_host/sap/bc/ui2/start_up
      3. /default_host/sap/bc/ui5_ui5/sap/ar_srvc_launch
      4. /default_host/sap/bc/ui5_ui5/sap/ar_srvc_news
      5. /default_host/sap/bc/ui5_ui5/sap/arsrvc_upb_admn
      6. /default_host/sap/bc/ui5_ui5/ui2/ushell
      7. /default_host/sap/public/bc/ui2
      8. /default_host/sap/public/bc/ui5_ui5
    3. To activate an ICF service, select the required service node in the ICF tree and choose hierarchy icon to activate all the child nodes under the chosen service.
    4. Activate the ICF service in one of the following ways:
      1. In the menu, select option Service/Host Activate
      2. In the context menu select Activate Service (By Right Clicking on the node as shown below)

    Activate Services for Fiori Launchpad

    Steps to Activate Services for Web Dynpro ABAP

    1. Go to the transaction SICF (Maintain Services) and search for your OData Service Name as shown below:
      Go to the transaction SICF
    2. Now, activate the following service nodes (if available):
      1. /default_host/sap/bc/webdynpro [Activate only the node and not the subnodes]
      2. /default_host/sap/public/bc [This node will be activated automatically once the given subnodes are activated]
        1. /default_host/sap/public/bc/ur
        2. /default_host/sap/public/bc/icons
        3. /default_host/sap/public/bc/icons_rtl
        4. /default_host/sap/public/bc/webicons
        5. /default_host/sap/public/bc/pictograms
        6. /default_host/sap/public/bc/webdynpro/* (ssr, mimes, etc.)
        7. /default_host/sap/public/myssocntl

    3. To activate an ICF service, select the required service node in the ICF tree.

    4. Activate the ICF service in one of the following ways:

    1. In the menu, select option Service/Host Activate
    2. In the context menu select Activate Service (By Right Clicking on the node as shown below)

    Activate Services for Web Dynpro ABAP

  • How to Register SAP OData Service in /IWFND/MAINT_SERVICE

    Preface – This post is part of the SAP ABAP OData Tutorial series.

    Introduction

    Once we have created an OData in SEGW. The very next step is to register the OData. After registering only we can access the SAP OData service. By registering, we mean we open our service to the internet. We can Register the service in two ways:

    • From the transaction SEGW
    • From the transaction /n/IWFND/MAINT_SERVICE

    Steps to Register an OData service using SEGW

    Once the OData is generated, now it is the time to register the service. Once the service is registered, then only it can be used anywhere.

    To generate an OData, follow the given steps:

    1. Double click the node Service Maintenance
    2. Select any System and click Register as shown below:
      OData Service Register
    3. Enter an Alias, if asked as shown below:
      OData System Alias
    4. Now, in the next screen you get following options:
    Field Description
    Technical Service Name This is auto generated service name
    Service Version It is auto generated service version
    Description It is the Description of the OData you have mention earlier
    External Service Name It is same to the auto generated service name
    Namespace It is by default bank
    External Mapping ID It is by default Empty
    External Data Source Type It is by Default set to source type C
    Technical Model Name It is auto generated Model Name
    Model Version It is auto generated Model Version
    Package Assignment Assign your package name here, or just choose Local Object from the button below. It will be then $TMP
    ICF Node It is by default “Standard Mode”
    oAuth Enablement It provides option to add extra authentication, in case you need oAuth2 enablement choose it, else leave it blank

     

    In our case, we just need to choose package and click confirm, as shown below:
    OData Service Registration

    Once the service is registered, the Registration will turn green, as shown below:
    OData Service Status

    Test the OData service

    1. To test the OData service, click the SAP Gateway Client button, as shown below:
      OData Test Service
    2. It will open a new screen, here click Add URI Option as shown below:
      OData Add URI Option
    3. Choose $metadata, here:
      OData $metadata
    4. Click Execute as shown below:
      OData Service Status 200

    If the status is 200, as shown above, then it means your OData is working fine.

    Steps to Register an OData service using /IWFND/MAINT_SERVICE

    1. Open the Service Maintenance Screen using the transaction /IWFND/MAINT_SERVICE. The given screen will open:
      Open the Service Maintenance Screen
    2. Click “Add Service” button. It will open “Add Selective Services” popup.
      Click “Add Service”
    3. Filter your service by entering it in the field “External Service Name” as shown below and click the search icon.
      Filter your service
    4. Now, the above search will return your OData Service name. Select your service and click Add Selected Service
      Select your service
    5. Now, assign your package name to the Service as shown below. In case, you don’t have package name, either click on “Local Object” or write $TMP in the package assignment. Then, save the above settings.
      Assign your package name to the Service
    6. Now, a pop up will open saying “Service <your service name> was created and its metadata was loaded successfully
    7. Now, go back to the transaction /iwfnd/maint_service and filter your service again. This time select your service and select SAP Gateway client
      select SAP Gateway client

    The Filter will open this popup, enter your details here and click execute (the green button).

    enter your details

    Then, follow these steps:

    follow these steps

    1. Here, test your service by following the steps given below:
      1. To test the OData service, click the SAP Gateway Client button, as shown below:
        OData Test Service
      2. It will open a new screen, here click Add URI Option as shown below:
        OData Add URI Option
      3. Choose $metadata, here:
        OData $metadata
      4. Click Execute as shown below:
        OData Service Status 200

    If the status is 200, as shown above, then it means your OData is working fine.

    Error Resolution

    In case you get an error while testing. It might be due to the wrong configuration, or a few nodes are inactive.

    To activate nodes, you need to visit T-Code SICF and search your service. Whatever result you will get, right-click on each and click “Activate”.

    In case you are still getting the same error of Node Activation “Check the ICF nodes in Tx SICF: At least one node is inactive.”, that might be because your server doesn’t have HTTPS enabled. To configure that, you need to visit T-Code RZ10. Check these blogs for the same: Error Explanation, Error Resolution.

    Tutorial Video

    You can watch the below video to learn implementation:

    [embedyt] https://youtu.be/2rEZrFj2haE?list=PLlZBMkVFeev4mdT2qpbUHTmZh4JMwrLqe&t=691[/embedyt]
  • How to perform OData Query and CRUD operation in OData

    Preface – This post is part of the SAP ABAP OData Tutorial series.

    Introduction

    In previous articles, we have discussed What is an OData and how to create an OData in SAP. We have also shown how to test an OData if it is working fine or not. Now, we need to learn how to read a table using an OData Query and also perform operations like Insert, Update and Delete on that table. In this article we will also learn basic queries of reading data.

    How it works

    In case of OData, there are three phases of data transfer. These are:

    1. Sending Data from Frontend

    Data is sent from UI (Client) to OData (Server) in form of query

    2.      Taking Data from Frontend

    At OData we receive data from Frontend using data provider (Code implemented in CRUD Operation section)

    io_data_provider->read_entry_data(IMPORTING es_data= ls_entity).

    3.      Sending Data to Frontend

    From OData we send data to UI using et_entityset or er_entity after data manipulation (Code implemented in CRUD Operation section)

    The above steps are shown in the image below:

    How to perform OData Query and CRUD operation in OData

    Operations in ODATA

    In this section, we will explore all the methods generated automatically, once you generate an OData. In last article, we have already instructed to write all your CRUD operations related code in DPC_EXT class. Hence, we will follow the same concept here.

    SAP ABAP OData provides different methods for CRUD operations, these are:

    Method SQL Operation Description
    GET_ENTITY Select This method is used to read a single data based on table keys
    GET_ENTITYSET Select This method is used to read entire data of a table
    CREATE_ENTITY Insert This method is used to create/insert a new data in table
    UPDATE_ENTITY Update/Modify This method is used to update an existing data in table
    DELETE_ENTITY Delete This method is used to delete an existing data in table

     

    Query in SAP OData

    In this section, we will explore all the Query we can perform while reading data from OData. In above section, we have learnt how to do read calls using GET_ENTITY and GET_ENTITYSET. Sometimes, we need to filter out data according to our requirement, or to get total number of data counts or to get data in specific order. These all SAP OData Queries are explained below:
    Here, let us suppose <your service name>  = https://isd.sap.com/<OData Service Name>

    Query Description Example
    $metadata It gives the metadata detail of your service. By metadata we mean it will provide information about all the entity sets with their field names and their attributes <your service name>/$metadata
    $FILTER It is mainly used during Read Entity Set call. During Read, we can send some filter value in backend that can be later used in where condition of Select queries <your service name>/$FILTER
    $top and $skip It is mainly used to get limited data in the UI, in case you are reading all the data, and the table is having a very large data <your service name>/$top and $skip
    $orderby This is used to order the data in ascending or descending order for a specific key <your service name>/$orderby
    $format=json This returns the data in form of JSON format. By default, the result is in XML format. <your service name>/$format=json
    $inlinecount This returns the number of data of a table that will appear in the UI <your service name>/$inlinecount
    $expand This is used to bind the association and navigation data together <your service name>/$expand
    $value This is used to return the media data <your service name>/$value

    Tutorial Video

    You can watch the below video to learn implementation:

    [embedyt] https://www.youtube.com/watch?v=2rEZrFj2haE[/embedyt]