Skip to content

/AWS1/IF_GLU=>PUTASSETTYPE()

About PutAssetType

Creates or updates an asset type in Glue Data Catalog. An asset type defines the structure of assets by specifying which forms they include. If an asset type with the given name already exists, it is updated.

Method Signature

METHODS /AWS1/IF_GLU~PUTASSETTYPE
  IMPORTING
    !IV_NAME TYPE /AWS1/GLUASSETTYPENAME OPTIONAL
    !IT_FORMS TYPE /AWS1/CL_GLUASSETTYPEFORMREF=>TT_ASSETTYPEFORMSMAP OPTIONAL
    !IV_CLIENTTOKEN TYPE /AWS1/GLUHASHSTRING OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_gluputassettypersp
  RAISING
    /AWS1/CX_GLUACCESSDENIEDEX
    /AWS1/CX_GLUCONCURRENTMODEX
    /AWS1/CX_GLUINTERNALSERVICEEX
    /AWS1/CX_GLUINVALIDINPUTEX
    /AWS1/CX_GLUTHROTTLINGEX
    /AWS1/CX_GLUCLIENTEXC
    /AWS1/CX_GLUSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_name TYPE /AWS1/GLUASSETTYPENAME /AWS1/GLUASSETTYPENAME

The name of the asset type.

it_forms TYPE /AWS1/CL_GLUASSETTYPEFORMREF=>TT_ASSETTYPEFORMSMAP TT_ASSETTYPEFORMSMAP

The forms that make up the asset type, keyed by form name. Each entry references the form type that defines the form's schema.

Optional arguments:

iv_clienttoken TYPE /AWS1/GLUHASHSTRING /AWS1/GLUHASHSTRING

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

RETURNING

oo_output TYPE REF TO /aws1/cl_gluputassettypersp /AWS1/CL_GLUPUTASSETTYPERSP

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->putassettype(
  it_forms = VALUE /aws1/cl_gluassettypeformref=>tt_assettypeformsmap(
    (
      VALUE /aws1/cl_gluassettypeformref=>ts_assettypeformsmap_maprow(
        key = |string|
        value = new /aws1/cl_gluassettypeformref( |string| )
      )
    )
  )
  iv_clienttoken = |string|
  iv_name = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_assettypeid = lo_result->get_id( ).
  lv_assettypename = lo_result->get_name( ).
  LOOP AT lo_result->get_forms( ) into ls_row.
    lv_key = ls_row-key.
    lo_value = ls_row-value.
    IF lo_value IS NOT INITIAL.
      lv_formtypeid = lo_value->get_formtypeidentifier( ).
    ENDIF.
  ENDLOOP.
ENDIF.