What is SAP Cloud Application Programming Model

Table of Contents1 Introduction2 SAP Cloud Application Programming Model3 Architecture of SAP Cloud Application Programming Model4 Technologies and Tools Involved in SAP Cloud Application Programming Model5 Why and When to choose SAP Cloud Application Programming Model Introduction We have been writing codes in different languages (such as ABAP, CDS, UI5/FIori and OData) at different platform […]

Function Imports in SAP OData

DATA: ls_parameter TYPE /iwbep/s_mgw_name_value_pair, lv_custid TYPE kunnr, lv_flag TYPE char1, lt_custinfo TYPE TABLE OF ztest_gw_srv, ls_custinfo TYPE ztest_gw_srv, ls_entity TYPE zcl_ztest_gw_srv_mpc=>ts_msg_return. IF iv_action_name = ‘demoFuncImport’. ” Check what action is being requested IF it_parameter IS NOT INITIAL. * Read Function import parameter value READ TABLE it_parameter INTO ls_parameter WITH KEY name = ‘CustId’. IF sy-subrc […]

Convert JSON to ABAP Internal Table

TYPES: BEGIN OF t_entry, access_token TYPE string, token_type TYPE string, expires_in TYPE n LENGTH 8, scope TYPE string, jti TYPE string, END OF t_entry . TYPES: t_entry_map TYPE SORTED TABLE OF t_entry WITH UNIQUE KEY access_token. DATA: m_entries TYPE t_entry. DATA: lr_instance TYPE REF TO /ui5/cl_json_parser. CREATE OBJECT lr_instance. CALL METHOD me->get_token. IF gv_token IS […]

Create Object History in SAP Blockchain

In this article we will learn how to create a block in Blockchain at SAP Cloud Platform. METHOD create_object_history. DATA: lo_http_client TYPE REF TO if_http_client. DATA: response TYPE string, lv_url TYPE string, lv_auth TYPE string. CONSTANTS : lv_initial_url TYPE string VALUE ‘<Your_Service>’. IF iv_object_id IS NOT INITIAL. *** Getting Token TYPES: BEGIN OF t_entry, access_token […]

Get Token from SAP Cloud Platform Service

In this step we will call the service to get the token and store that token in a global variable for later use. METHOD get_token. DATA: lo_http_client TYPE REF TO if_http_client. DATA: response TYPE string, lv_url TYPE string. CONSTANTS: lv_initial_url TYPE string VALUE ‘<Blockchain Service Link>’, lv_auth TYPE string VALUE ‘Basic <your login credentials>’. “create […]

Calculate a hash in ABAP

In ABAP we can perform the following: Table of Contents1 calculate_hash_for_raw2 calculate_hash_for_string calculate_hash_for_raw METHOD calculate_hash_for_raw. TRY. cl_abap_message_digest=>calculate_hash_for_raw( EXPORTING if_algorithm = ‘SHA256’ if_data = iv_data IMPORTING ef_hashstring = ev_sha256 ). CATCH cx_root. ” Eh, what’re you gonna do? ENDTRY. ENDMETHOD. calculate_hash_for_string METHOD calculate_hash_for_string. TRY. cl_abap_message_digest=>calculate_hash_for_char( EXPORTING if_algorithm = ‘SHA256’ if_data = iv_data IMPORTING ef_hashstring = ev_sha256 […]

Navigate between Views in Web Dynpro

Table of Contents1 Introduction2 Navigate between Views in Web Dynpro3 Plugs3.1 Inbound Plug3.2 Outbound Plug4 Navigation Link5 Step by step process to create a Navigation between views Introduction In our previous articles we have already seen how to create a view in Web Dynpro. In Web Dynpro we can create multiple views under a component. […]

Data Binding in Web Dynpro

Table of Contents1 Introduction2 Data Binding in Web Dynpro2.1 Definition2.2 Why we need Data Binding2.3 Types of Data Binding3 Setup and Coding for Data Binding Introduction A Web Dynpro Application is developed using MVC (Model View Controller) Architecture. It means whatever data model is there that requires binding with the View elements (e.g. Input Field, […]

Blockchain Implementation in ABAP

Table of Contents1 Introduction2 Blockchain on SAP Cloud Platform3 Blockchain Implementation in ABAP3.1 Get Token from the Blockchain Service3.2 Get Proof history from the Blockchain Service Introduction With the introduction of Blockchain in SAP Cloud Platform, the important questions for SAP developers was its implementation in SAP ABAP. All the client information of SAP is […]

Translate »