Skip to content

/AWS1/IF_MGN=>UPDATENETWORKMIGRMAPPERSEG()

About UpdateNetworkMigrationMapperSegment

Updates a mapper segment's configuration, such as changing its scope tags.

Method Signature

METHODS /AWS1/IF_MGN~UPDATENETWORKMIGRMAPPERSEG
  IMPORTING
    !IV_NETWORKMIGRATIONDEFNID TYPE /AWS1/MGNNETWORKMIGRDEFNID OPTIONAL
    !IV_NETWORKMIGRATIONEXECID TYPE /AWS1/MGNNETWORKMIGREXECID OPTIONAL
    !IV_SEGMENTID TYPE /AWS1/MGNSEGMENTID OPTIONAL
    !IT_SCOPETAGS TYPE /AWS1/CL_MGNSCOPETAGSMAP_W=>TT_SCOPETAGSMAP OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_mgnnetmigrmapperseg
  RAISING
    /AWS1/CX_MGNACCESSDENIEDEX
    /AWS1/CX_MGNRESOURCENOTFOUNDEX
    /AWS1/CX_MGNVALIDATIONEX
    /AWS1/CX_MGNCLIENTEXC
    /AWS1/CX_MGNSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_networkmigrationdefnid TYPE /AWS1/MGNNETWORKMIGRDEFNID /AWS1/MGNNETWORKMIGRDEFNID

The unique identifier of the network migration definition.

iv_networkmigrationexecid TYPE /AWS1/MGNNETWORKMIGREXECID /AWS1/MGNNETWORKMIGREXECID

The unique identifier of the network migration execution.

iv_segmentid TYPE /AWS1/MGNSEGMENTID /AWS1/MGNSEGMENTID

The unique identifier of the segment to update.

Optional arguments:

it_scopetags TYPE /AWS1/CL_MGNSCOPETAGSMAP_W=>TT_SCOPETAGSMAP TT_SCOPETAGSMAP

The updated scope tags for the segment.

RETURNING

oo_output TYPE REF TO /aws1/cl_mgnnetmigrmapperseg /AWS1/CL_MGNNETMIGRMAPPERSEG

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->updatenetworkmigrmapperseg(
  it_scopetags = VALUE /aws1/cl_mgnscopetagsmap_w=>tt_scopetagsmap(
    (
      VALUE /aws1/cl_mgnscopetagsmap_w=>ts_scopetagsmap_maprow(
        key = |string|
        value = new /aws1/cl_mgnscopetagsmap_w( |string| )
      )
    )
  )
  iv_networkmigrationdefnid = |string|
  iv_networkmigrationexecid = |string|
  iv_segmentid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_networkmigrationjobid = lo_result->get_jobid( ).
  lv_networkmigrationexecuti = lo_result->get_networkmigrationexecid( ).
  lv_networkmigrationdefinit = lo_result->get_networkmigrationdefnid( ).
  lv_segmentid = lo_result->get_segmentid( ).
  lv_networkmigrationmappers = lo_result->get_segmenttype( ).
  lv_segmentname = lo_result->get_name( ).
  lv_segmentdescription = lo_result->get_description( ).
  lv_logicalid = lo_result->get_logicalid( ).
  lo_checksum = lo_result->get_checksum( ).
  IF lo_checksum IS NOT INITIAL.
    lv_encryptionalgorithm = lo_checksum->get_encryptionalgorithm( ).
    lv_hash = lo_checksum->get_hash( ).
  ENDIF.
  lo_s3configuration = lo_result->get_outputs3configuration( ).
  IF lo_s3configuration IS NOT INITIAL.
    lv_s3bucketname = lo_s3configuration->get_s3bucket( ).
    lv_accountid = lo_s3configuration->get_s3bucketowner( ).
    lv_s3keyname = lo_s3configuration->get_s3key( ).
  ENDIF.
  lv_timestamp = lo_result->get_createdat( ).
  lv_timestamp = lo_result->get_updatedat( ).
  LOOP AT lo_result->get_scopetags( ) into ls_row.
    lv_key = ls_row-key.
    lo_value = ls_row-value.
    IF lo_value IS NOT INITIAL.
      lv_scopetagvalue = lo_value->get_value( ).
    ENDIF.
  ENDLOOP.
  lv_accountid = lo_result->get_targetaccount( ).
  LOOP AT lo_result->get_referencedsegments( ) into lo_row_1.
    lo_row_2 = lo_row_1.
    IF lo_row_2 IS NOT INITIAL.
      lv_segmentid = lo_row_2->get_value( ).
    ENDIF.
  ENDLOOP.
ENDIF.

Sample UpdateNetworkMigrationMapperSegment call

Sample UpdateNetworkMigrationMapperSegment call

DATA(lo_result) = lo_client->updatenetworkmigrmapperseg(
  iv_networkmigrationdefnid = |nmd-01234567891234567|
  iv_networkmigrationexecid = |01234567-abcd-abcd-abcd-0123456789ab|
  iv_segmentid = |12345678-abcd-abcd-efab-0123456789ab|
).