Skip to content

/AWS1/IF_DZN=>CREATEDATAPRODUCT()

About CreateDataProduct

Creates a data product.

A data product is a comprehensive package that combines data assets with their associated metadata, documentation, and access controls. It's designed to serve specific business needs or use cases, making it easier for users to find and consume data appropriately. Data products include important information about data quality, freshness, and usage guidelines, effectively bridging the gap between data producers and consumers while ensuring proper governance.

Prerequisites:

  • The domain must exist and be accessible.

  • The owning project must be valid and active.

  • The name must be unique within the domain (no existing data product with the same name).

  • User must have create permissions for data products in the project.

Method Signature

METHODS /AWS1/IF_DZN~CREATEDATAPRODUCT
  IMPORTING
    !IV_DOMAINIDENTIFIER TYPE /AWS1/DZNDOMAINID OPTIONAL
    !IV_NAME TYPE /AWS1/DZNDATAPRODUCTNAME OPTIONAL
    !IV_OWNINGPROJECTIDENTIFIER TYPE /AWS1/DZNPROJECTID OPTIONAL
    !IV_DESCRIPTION TYPE /AWS1/DZNDATAPRODUCTDESC OPTIONAL
    !IT_GLOSSARYTERMS TYPE /AWS1/CL_DZNGLOSSARYTERMS_W=>TT_GLOSSARYTERMS OPTIONAL
    !IT_FORMSINPUT TYPE /AWS1/CL_DZNFORMINPUT=>TT_FORMINPUTLIST OPTIONAL
    !IT_ITEMS TYPE /AWS1/CL_DZNDATAPRODUCTITEM=>TT_DATAPRODUCTITEMS OPTIONAL
    !IV_CLIENTTOKEN TYPE /AWS1/DZNCLIENTTOKEN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_dzncredataproductout
  RAISING
    /AWS1/CX_DZNACCESSDENIEDEX
    /AWS1/CX_DZNTHROTTLINGEX
    /AWS1/CX_DZNUNAUTHORIZEDEX
    /AWS1/CX_DZNCONFLICTEXCEPTION
    /AWS1/CX_DZNINTERNALSERVEREX
    /AWS1/CX_DZNRESOURCENOTFOUNDEX
    /AWS1/CX_DZNSERVICEQUOTAEXCDEX
    /AWS1/CX_DZNVALIDATIONEX
    /AWS1/CX_DZNCLIENTEXC
    /AWS1/CX_DZNSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_domainidentifier TYPE /AWS1/DZNDOMAINID /AWS1/DZNDOMAINID

The ID of the domain where the data product is created.

iv_name TYPE /AWS1/DZNDATAPRODUCTNAME /AWS1/DZNDATAPRODUCTNAME

The name of the data product.

iv_owningprojectidentifier TYPE /AWS1/DZNPROJECTID /AWS1/DZNPROJECTID

The ID of the owning project of the data product.

Optional arguments:

iv_description TYPE /AWS1/DZNDATAPRODUCTDESC /AWS1/DZNDATAPRODUCTDESC

The description of the data product.

it_glossaryterms TYPE /AWS1/CL_DZNGLOSSARYTERMS_W=>TT_GLOSSARYTERMS TT_GLOSSARYTERMS

The glossary terms of the data product.

it_formsinput TYPE /AWS1/CL_DZNFORMINPUT=>TT_FORMINPUTLIST TT_FORMINPUTLIST

The metadata forms of the data product.

it_items TYPE /AWS1/CL_DZNDATAPRODUCTITEM=>TT_DATAPRODUCTITEMS TT_DATAPRODUCTITEMS

The data assets of the data product.

iv_clienttoken TYPE /AWS1/DZNCLIENTTOKEN /AWS1/DZNCLIENTTOKEN

A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.

RETURNING

oo_output TYPE REF TO /aws1/cl_dzncredataproductout /AWS1/CL_DZNCREDATAPRODUCTOUT

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->createdataproduct(
  it_formsinput = VALUE /aws1/cl_dznforminput=>tt_forminputlist(
    (
      new /aws1/cl_dznforminput(
        iv_content = |string|
        iv_formname = |string|
        iv_typeidentifier = |string|
        iv_typerevision = |string|
      )
    )
  )
  it_glossaryterms = VALUE /aws1/cl_dznglossaryterms_w=>tt_glossaryterms(
    ( new /aws1/cl_dznglossaryterms_w( |string| ) )
  )
  it_items = VALUE /aws1/cl_dzndataproductitem=>tt_dataproductitems(
    (
      new /aws1/cl_dzndataproductitem(
        it_glossaryterms = VALUE /aws1/cl_dznitemglossaryterm00=>tt_itemglossaryterms(
          ( new /aws1/cl_dznitemglossaryterm00( |string| ) )
        )
        iv_identifier = |string|
        iv_itemtype = |string|
        iv_revision = |string|
      )
    )
  )
  iv_clienttoken = |string|
  iv_description = |string|
  iv_domainidentifier = |string|
  iv_name = |string|
  iv_owningprojectidentifier = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_domainid = lo_result->get_domainid( ).
  lv_dataproductid = lo_result->get_id( ).
  lv_revision = lo_result->get_revision( ).
  lv_projectid = lo_result->get_owningprojectid( ).
  lv_dataproductname = lo_result->get_name( ).
  lv_dataproductstatus = lo_result->get_status( ).
  lv_dataproductdescription = lo_result->get_description( ).
  LOOP AT lo_result->get_glossaryterms( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_glossarytermid = lo_row_1->get_value( ).
    ENDIF.
  ENDLOOP.
  LOOP AT lo_result->get_items( ) into lo_row_2.
    lo_row_3 = lo_row_2.
    IF lo_row_3 IS NOT INITIAL.
      lv_dataproductitemtype = lo_row_3->get_itemtype( ).
      lv_entityidentifier = lo_row_3->get_identifier( ).
      lv_revision = lo_row_3->get_revision( ).
      LOOP AT lo_row_3->get_glossaryterms( ) into lo_row_4.
        lo_row_5 = lo_row_4.
        IF lo_row_5 IS NOT INITIAL.
          lv_glossarytermid = lo_row_5->get_value( ).
        ENDIF.
      ENDLOOP.
    ENDIF.
  ENDLOOP.
  LOOP AT lo_result->get_formsoutput( ) into lo_row_6.
    lo_row_7 = lo_row_6.
    IF lo_row_7 IS NOT INITIAL.
      lv_formname = lo_row_7->get_formname( ).
      lv_formtypename = lo_row_7->get_typename( ).
      lv_revision = lo_row_7->get_typerevision( ).
      lv_string = lo_row_7->get_content( ).
    ENDIF.
  ENDLOOP.
  lv_createdat = lo_result->get_createdat( ).
  lv_createdby = lo_result->get_createdby( ).
  lv_createdat = lo_result->get_firstrevisioncreatedat( ).
  lv_createdby = lo_result->get_firstrevisioncreatedby( ).
ENDIF.