Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Replace

Former Member
0 Likes
510

My internal table has 4 columns as A,B,C and D. Out of that in Column C i want to replace all the Zeros as '1'.

4 REPLIES 4
Read only

Former Member
0 Likes
491

DATA itab TYPE TABLE OF string.

APPEND 'Beer - 3 DM' TO itab.

APPEND 'Pizza - 8 DM' TO itab.

REPLACE ALL OCCURRENCES OF REGEX '\b(DM)\b'

IN TABLE itab WITH 'EUR'

RESPECTING CASE.

Read only

Former Member
0 Likes
491

hi,

use the same logic

[https://forums.sdn.sap.com/click.jspa?searchID=19679062&messageID=6276382]

Read only

Former Member
0 Likes
491

hi,

try this

wa-c = 1.

modify itab from wa transport c where c = 0.

Command will update colunm c for where c value is zero.

Read only

Former Member
0 Likes
491

HI try this,

loop at itab into wa.

REPLACE ALL OCCURRENCES OF '0' IN wa-c WITH '1'.

endloop.

regards,

Mr.A