cancel
Showing results for 
Search instead for 
Did you mean: 

invalid character added

Former Member
0 Kudos

hi,

i have a keyfig with value " #34441 ". i want to remove the pound symbol, tried adding in transaction RSKC and it didn't help. do i need to write any abap code to get rid of it.

~rahul

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Yes..

You would write an ABAP code for it..

You could also try to do a source system clean up coz I donot think its a valid value for the Key Figure.

Ashish

Former Member
0 Kudos

hi ashish,

would this work,

DELETE '#' FROM COMM_STRTUCTURE-/BIC/ZSAL.

zsal is the keyfig infoobject.

~rahul

Former Member
0 Kudos

Hi Rahul,

This code will not workas far as my understanding of ABAP goes...

You will have to go thru the value character by character and replace the # with space or if # is always at the beginning of the value..pick up everything except the first character...

Hope few expert ABAPers will give you the exact code..

Meanwhile I will try and find a suitable example for you..

Ashish

Former Member
0 Kudos

thanks ashish,

like u said the # symbol might not be always at first and it might come anywhere. lets wait for other experts code.

~rahul

Former Member
0 Kudos

Hi Rahul,

  1. sign may represent any special character. To remove it you have to write an ABAP start routine in transfer rules.

In the following link you can find a comprehensive discussion of the problem and several pieces of code:

The code proposed by Rob Veenstra will eliminate all the chars not declared in the code as permitted.

Best regards,

Eugene

Former Member
0 Kudos

Rahul,

If the # symbol is the only symbol that you want to eliminate from the value. Then this would eliminate it where ever it occurs.

len = STRLEN(keyfigure).

WHILE i LE len.

if keyfigure+i(1) NE '#'.

CONCATINATE value keyfigure+i(1) INTO value.

endif.

i = i + 1.

LOOP.

keyfigure = value

Hope this helps.....

Answers (0)