abap:string_func
This is an old revision of the document!
Table of Contents
String functions in ABAP
Find position of first occurence
data: v_len type i. IF str CA '<searched str>' . v_len = sy-fdpos. ENDIF.
NB : la numérotation commence à 0 (ex. : recherche de 'C' dans 'ABCD' ⇒ sy-fdpos = 2.
Remplacement
Substitution
Substituer (=remplacement d'1 caractère par 1 autre) des caractères : TRANSLATE var USING mask
. Fonctionne avec un masque par paires : '1a2b' transforme '1324' en 'a3b4'.
Remplacement
REPLACE str WITH str IN var.
Ex. : REPLACE '-' WITH '::' IN lv_var.
abap/string_func.1415972197.txt.gz · Last modified: 2014/11/14 14:36 by ginko