on 08-22-2007 5:00 PM
I am checking a field value...
if the field contains abc it has to be changed to abc-de
If the field contains abc-123 it has to be changed by abc-de.
if it contains abc-de-123 then no changes have to be made..
In other words all entries except for entries like abc-de-123 have to be changed to adc-de..
how can i do that.
data: v_string(10).
check v_string+0(3) = 'abc'.
if v_string <> 'abc-de-123'.
clear v_string.
v_string = 'abc-de'.
endif.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
LOOP AT ITAB.
IF ITAB-FIELD NE 'abc-de-123'.
ITAB-FIELD = 'abc-de'.
MODIFY ITAB.
ENDIF.
ENDLOOP.
Greetings,
Blag.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
loop at itab.
if itab-line cs '-de'.
else
itab-line = 'abc-de'.
endif.
modify itab index sy-tabix.
endloop.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Declare 3 strings like
data: str1(3) type c value 'abc',
str2(7) type c value 'abc-123',
str3(11) type c value 'abc-de-123',
field(11).
if ( field CS str1 or field CS str2 ).
field = 'abc-de'.
elseif field CS str3 .
field = field.
endif.
CS = contains String
Reward if useful
regards
Anji
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.