Sending Z Tables via SAP Data Modeler and Custom Z Program

Sending Z Tables via SAP Data Modeler and Custom Z Program

Manual: Sending Z Tables via SAP Data Modeler and Custom Z Program

In the SAP Data Modeler, create an “ANY” Entity including the desired Z tables. Ensure the Domain is set to ANY.



Inside the entity, select the desired columns to send in the Column Definition.

 
Save the new Entity.

You can follow the steps for creating an ANY entity manually referring to the following link: ANY Entity

In transaction SE38, locate the Z Program provided by Onibex: Z_PROGRAM_CUD_ZTABLES.

In Display/Change mode, review the program logic to confirm it sends the appropriate Z tables.
Update this Z Program to include the necessary logic to handle the tables specific to your implementation.
This process ensures the program reacts to create, update, and delete events on the Z tables.

Example ABAP Code for Sending Z Tables

To send Z tables, use the following structure depending on the operation type. For create or update operations, set iv_update = abap_true and iv_delete = abap_false. For delete operations, use iv_update = abap_false and iv_delete = abap_true.

*----------------------------------------------------------------------*
* CONSTANTS
*----------------------------------------------------------------------*
DATA: gc_aliastab_header TYPE zonta_oc_col_all-tabname VALUE 'HEADER',
      gc_aliastab_items  TYPE zonta_oc_col_all-tabname VALUE 'ITEMS',
      gc_tabname_hd      TYPE zonta_oc_col_all-tabname VALUE 'ZONTA_SO_H',
      gc_tabname_items   TYPE zonta_oc_col_all-tabname VALUE 'ZONTA_SO_ITEM'.

* Send for each table:

NEW zoncl_fetch_data( )->send_json_any_internal_table(
    iv_tabname     = gc_tabname_hd
    iv_aliastab    = gc_aliastab_header      " Table Alias
    iv_update      = abap_true
    iv_delete      = abap_false
    it_tables_data = gt_data_hd
    iv_alias       = abap_false
    iv_fieldname   = abap_true
*   iv_dest        = 'ONIBEX_DEMO'
*   iv_bothnames   =
).

NEW zoncl_fetch_data( )->send_json_any_internal_table(
    iv_tabname     = gc_tabname_items
    iv_aliastab    = gc_aliastab_items       " Table Alias
    iv_update      = abap_true
    iv_delete      = abap_false
    it_tables_data = gt_data_item
    iv_alias       = abap_false
    iv_fieldname   = abap_true
*   iv_dest        = 'ONIBEX_DEMO'
*   iv_bothnames   =
).
    • Related Articles

    • Onibex SAP Data Modeler - Functionalities

      Introduction The following table outlines key functionalities offered by the SAP Data Modeler, highlighting features designed to enhance data extraction, customization, and integration within SAP environments. No Function Description 1 Direct Data ...
    • SAP Data Modeler - Entity Creation and Main Customizing

      Introduction This document provides a step-by-step guide for creating and configuring an entity within Onibex's SAP Modeler using transaction ZONT_ONECM. An entity in the Data Modeler is defined as a set of standard SAP tables and their key fields, ...
    • RFC Data Sending Guide – ZONCL_FETCH_DATA_V2

      RFC Data Sending Guide – ZONCL_FETCH_DATA_V2 This guide describes how to send data from a custom Z table in SAP to a remote system using the class ZONCL_FETCH_DATA_V2. The process supports optional filters and allows update/delete operations on the ...
    • SAP Data Modeler – Identifying CDS Views Compatible with OneConnect Modeler

      The purpose of this manual is to provide a simple and practical guide to identifying CDS views within SAP that are compatible with the OneConnect Data Modeler. It outlines the necessary steps in a clear and concise manner, allowing users to quickly ...
    • SAP Data Modeler - Customizing Parameters

      OneConnect Parameter Adjustments The OneConnect solution includes a parameter table used for sending information—especially real-time data. It is important to configure this table beforehand, prior to sending any data, to ensure proper communication ...