Skip to content

/AWS1/IF_BDC=>BATCHUPDATEMEMORYRECORDS()

About BatchUpdateMemoryRecords

Updates multiple memory records with custom content in a single batch operation within the specified memory.

Method Signature

METHODS /AWS1/IF_BDC~BATCHUPDATEMEMORYRECORDS
  IMPORTING
    !IV_MEMORYID TYPE /AWS1/BDCMEMORYID OPTIONAL
    !IT_RECORDS TYPE /AWS1/CL_BDCMEMRECUPDATEINPUT=>TT_MEMORYRECSUPDATEINPUTLIST OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_bdcbatchupdmemrecsout
  RAISING
    /AWS1/CX_BDCACCESSDENIEDEX
    /AWS1/CX_BDCRESOURCENOTFOUNDEX
    /AWS1/CX_BDCSERVICEEXCEPTION
    /AWS1/CX_BDCSERVICEQUOTAEXCDEX
    /AWS1/CX_BDCTHROTTLEDEXCEPTION
    /AWS1/CX_BDCVALIDATIONEX
    /AWS1/CX_BDCCLIENTEXC
    /AWS1/CX_BDCSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_memoryid TYPE /AWS1/BDCMEMORYID /AWS1/BDCMEMORYID

The unique ID of the memory resource where records will be updated.

it_records TYPE /AWS1/CL_BDCMEMRECUPDATEINPUT=>TT_MEMORYRECSUPDATEINPUTLIST TT_MEMORYRECSUPDATEINPUTLIST

A list of memory record update inputs to be processed in the batch operation.

RETURNING

oo_output TYPE REF TO /aws1/cl_bdcbatchupdmemrecsout /AWS1/CL_BDCBATCHUPDMEMRECSOUT

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->batchupdatememoryrecords(
  it_records = VALUE /aws1/cl_bdcmemrecupdateinput=>tt_memoryrecsupdateinputlist(
    (
      new /aws1/cl_bdcmemrecupdateinput(
        io_content = new /aws1/cl_bdcmemorycontent( |string| )
        it_namespaces = VALUE /aws1/cl_bdcnamespaceslist_w=>tt_namespaceslist(
          ( new /aws1/cl_bdcnamespaceslist_w( |string| ) )
        )
        iv_memoryrecordid = |string|
        iv_memorystrategyid = |string|
        iv_timestamp = '20150101000000.0000000'
      )
    )
  )
  iv_memoryid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  LOOP AT lo_result->get_successfulrecords( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_memoryrecordid = lo_row_1->get_memoryrecordid( ).
      lv_memoryrecordstatus = lo_row_1->get_status( ).
      lv_requestidentifier = lo_row_1->get_requestidentifier( ).
      lv_integer = lo_row_1->get_errorcode( ).
      lv_string = lo_row_1->get_errormessage( ).
    ENDIF.
  ENDLOOP.
  LOOP AT lo_result->get_failedrecords( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_memoryrecordid = lo_row_1->get_memoryrecordid( ).
      lv_memoryrecordstatus = lo_row_1->get_status( ).
      lv_requestidentifier = lo_row_1->get_requestidentifier( ).
      lv_integer = lo_row_1->get_errorcode( ).
      lv_string = lo_row_1->get_errormessage( ).
    ENDIF.
  ENDLOOP.
ENDIF.