ABAP: Release 740 new features

Below is the list of ABAP new commands and syntax available from version 740.

TYPES:
    BEGIN OF ty_tab,
      pernr TYPE persno,
    END OF ty_tab.

  DATA: tab TYPE STANDARD TABLE OF ty_tab.

  DATA wa_tab TYPE ty_tab.

  wa_tab-pernr = '00000001'.
  INSERT wa_tab INTO TABLE tab.

  wa_tab-pernr = '00000002'.
  INSERT wa_tab INTO TABLE tab.

  wa_tab-pernr = '00000003'.
  INSERT wa_tab INTO TABLE tab.

  LOOP AT tab ASSIGNING FIELD-SYMBOL(<tab>) FROM line_index( tab[ pernr = '00000002' ] ) .
    IF <tab> NE '00000002'.
      EXIT.
    ENDIF.
    WRITE: / sy-tabix, <tab>.
  ENDLOOP.

  "Retrieve WA where field meets condition
  DATA(lw_wa) = tab[ pernr = '00000003' ].

  "Retrieve field field meets condition
  DATA(lv_pernr) = tab[ pernr = '00000003' ]-pernr.

  "Update lines with '99999999' where field meets condition.
  tab[ pernr = '00000003' ]-pernr = '99999999'.

Additional links


http://scn.sap.com/docs/DOC-68458

http://zevolving.com/tag/abap-740/

https://scn.sap.com/community/abap/blog/2013/06/22/abap-news-for-release-740–new-internal-table-functions

Leave a Reply