Skip to Content
0
Former Member
Jun 04, 2010 at 07:21 AM

abap program

13 Views

Hi

this programme functioned, but it deleted only the first characteristic forbidden and I want deleted all characteristic forbidden.

I do not know how to calculate the length of the word and make a loop to delete all characteristic forbidden.

*******************************************************************************

DATA : INT_VAR TYPE /BIC/OIMATER.

DATA : VAR2 TYPE I.

DATA : VAR3 TYPE I.

DATA : STR_VAR1(20) TYPE C.

DATA : VAR4 TYPE I.

DATA : STR_VAR6(20) TYPE C.

clear INT_VAR.

clear VAR2.

clear VAR3.

clear STR_VAR1.

clear VAR4.

clear STR_VAR6.

MOVE SOURCE_FIELDS-/BIC/MATER TO INT_VAR.

TRANSLATE INT_VAR TO UPPER CASE .

IF INT_VAR CN

',<>?/\:;"''ABCDEFGHI JKLMNOPQRSTUVWXYZ!%^&*()__+=1234567890'.

VAR2 = STRLEN( INT_VAR ).

VAR3 = SY-FDPOS + 1.

VAR4 = VAR2 - VAR3.

STR_VAR6 = INT_VAR+VAR3(VAR4).

CONCATENATE STR_VAR1 STR_VAR6 INTO RESULT.

ELSE.

RESULT = INT_VAR.

ENDIF.

*******************************************************************************

best regard

francoise