Documentation View

We are hiring and constantly growing! Have a look through our vacancies to find the right role for you!

ABAPREPLACE_SHORTREF - REPLACE SHORTREF

ABAPREPLACE_SHORTREF - REPLACE SHORTREF

Addresses (Business Address Services)   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

REPLACE

Reference



Syntax

REPLACE { { [{FIRST OCCURRENCE}|{ALL OCCURRENCES OF}]
            {[SUBSTRING] substring} | {REGEX regex} IN
            { {[SECTION [OFFSET off] [LENGTH len] OF] dobj}
            | {TABLE itab [FROM lin1 [OFFSET off1]]
                          [TO   lin2 [OFFSET off2]]} }
            WITH new
            [IN {CHARACTER|BYTE} MODE]
            [{RESPECTING|IGNORING} CASE]
            [REPLACEMENT COUNT  rcnt]
            { {[REPLACEMENT OFFSET roff]
               [REPLACEMENT LENGTH rlen]
               [REPLACEMENT LINE   rlen]}
            | [RESULTS result_tab|result_wa] } }
        | { SECTION [OFFSET off] [LENGTH len] OF dobj
            WITH new
            [IN {CHARACTER|BYTE} MODE] } }.


Effect

Replaces character strings or byte strings in a character-like or byte-like data object dobj or in an internal table itab with the content of new. Determines the characters or bytes to be replaced using a search for substrings or regular expressions or by specifying the offset and length directly.

Additions

  • SECTION $[OFFSET off$] $[LENGTH len$] OF
    Specifies a section of dobj from the offset specified in off and the length specified in len. Either the section to be searched or the section to be replaced.
  • RESULTS result_tab$|result_wa
    Gets the attributes of all replaced positions or the last replaced position in an internal table result_tab or a structure result_wa of type MATCH_RESULT.
    Gets the offset of the last replacement in roff.
  • RESULTS result_tab$|result_wa
    Gets the attributes of all replaced positions or the last replaced position in an internal table result_tab or a structure result_wa of type MATCH_RESULT.





General Material Data   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

Length: 5807 Date: 20230206 Time: 100453     sap01-206 ( 52 ms )