REPLACE in sap ABAP
Replace
* Replace command replace only 1st occurrence in
String.
Replace all occurrences of
* Used to replace all the occurrences in the given string.
Report for replace
REPORT zab_rp_replace.
PARAMETERS: p_name TYPE string.
WRITE: 'Before replacing: ', p_name.
REPLACE 'A' WITH 'B' INTO p_name.
WRITE: / 'After replacing: ', p_name.
Input
Output
Report for replace all
occurrences of
REPORT zab_rp_replace.
PARAMETERS: p_name TYPE string.
WRITE: 'Before replacing: ', p_name.
REPLACE ALL OCCURRENCES OF 'A' IN p_name WITH 'B'.
WRITE: / 'After replacing: ', p_name.
Input
Output
****************************Thank You*************************
Comments
Post a Comment