Month: December 2019

Function Imports in SAP OData

16 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 […]

Continue Reading

Create Object History in SAP Blockchain

10 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, […]

Continue Reading

Calculate a hash in ABAP

16 In ABAP we can perform the following: 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 ). CATCH cx_root. ” […]

Continue Reading

Translate »