cancel
Showing results for 
Search instead for 
Did you mean: 

invalid characters BRAIN059

Former Member
0 Kudos

For this text, 0020-01271(PLATE, PUMPING 200MM WXZ##PLA

I've encountered this error at production. At ODS extraction of PR text, it is ok. However when ODS is updating to infocube, this error happens.

I have already included the necessary characters at SPRO, permitted extra characters.

"'.,()-\/#&[]{}

And also I have used the conversion routine CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT' for this infoobject.

EXPORTING

input = TRAN_STRUCTURE-PTXZ01

IMPORTING

OUTPUT = RESULT.

I've tried in the test client and it is ok, no error. Why production there is error? How to overcome this? Please advise. Thanks.

Value '0020-01271(PLATE, PUMPING 200MM WXZ PLA' (hex. '') of characteristic ZCPRTEXT contains invalid characters

Message no. BRAIN059

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

The program code has syntax error for data_pak and also the logic is still not working. This is the logic I have changed to at transfer rule for PR text as below which is syntax free, but it is still not working. Please advise. Thanks.

data: l_allowchar type rsallowchar,

l_string(125) type c.

data: l_length type i,

l_act type i.

data:wptxz01(40) type c.

select single allowchar into l_allowchar from rsallowedchar.

concatenate l_allowchar sy-abcde '0123456789' into l_string.

wptxz01 = TRAN_STRUCTURE-ptxz01.

translate wptxz01 to upper case.

if TRAN_STRUCTURE-ptxz01 co l_string.

RESULT = wptxz01.

  • nothing to do in this case.

else.

  • there is at least 1 character which is not allowed.

l_length = strlen( TRAN_STRUCTURE-ptxz01 ).

l_act = 0.

wptxz01 = TRAN_STRUCTURE-ptxz01.

do l_length times.

if wptxz01+l_act(1) na l_string.

wptxz01+l_act(1) = space.

endif.

l_act = l_act + 1.

enddo.

RESULT = wptxz01.

endif.

Former Member
0 Kudos

Hi,

as I mentioned, I was writing from memory, because I did it in a system to which I don't have access anymore. But I try to correct.

wptxz01 = TRAN_STRUCTURE-ptxz01.

translate wptxz01 to upper case.

*if TRAN_STRUCTURE-ptxz01 co l_string.

if wptxz01 co l_string.

RESULT = wptxz01.

  • nothing to do in this case.

else.

  • there is at least 1 character which is not allowed.

l_length = strlen( wptxz01 ).

l_act = 0.

*wptxz01 = TRAN_STRUCTURE-ptxz01.

do l_length times.

if wptxz01+l_act(1) na l_string. " try cn instead of na

wptxz01+l_act(1) = space.

endif.

l_act = l_act + 1.

enddo.

RESULT = wptxz01.

endif.

I hope that helps now. At the point I commented, try operator CN instead of NA (press F1 on the operator and you get some help), may be that is the better choice.

regards

Siggi

Former Member
0 Kudos

hi Siggi....what will happen to all the alphabets. I am going to use this logic for one of my problem but allwedchar has only 72 char and I have following string in my RSKC.

ALL_CAPITAL{} |É^@[]\u00A2#`$ºÑÁÖ!"%&''()+,-./:;<=>?_0123456789

in your logic, you already concatenating your string with 0123..789. what @ alphabets? while writing code, do i need to concatenate it with 'ABC...XYZ' or ALL CAPITAL{} will take care of alphabets?

Thanks,

Rahul.

Former Member
0 Kudos

Hi,

Thanks for your pointer. Please help to provide the codes. The infoobject which I have created is ZCPRTEXT of char(40). This is the PR short text from eban-txz01.

How do I do the code at start of routine, is it at the infosource->start routine? Please help to provide the codes. Thanks.

Former Member
0 Kudos

Hi,

ok, I give it a try. May be there will be syntax error. Remember, I am writing it from memory.

Goto RSA1->InfoSources and maintain the transfer rules. Create a start routine and enter the following code.

data: l_allowchar type rsallowchar,

l_string(125) type c.

data: l_length type i,

l_act type i.

select single allowchar into l_allowchar from rsallowedchar.

concatenate l_allowchar sy-abcde '0123456789' into l_string. "now you have all allowed characters in the

" string

loop at data_pak.

translate data_pak-txz01 to upper case. "just to be sure

if data_pak-txz01 co l_string.

  • nothing to do in this case.

else.

  • there is at least 1 character which is not allowed.

l_length = strlen( data_pak-txz01 ). " Length of your data

l_act = 0.

do l_length times.

if data_pak-txz01+l_act(1) na l_string. "checks the sign

data_pak-txz01+l_act(1) = space.

endif.

l_act = l_act + 1.

enddo.

endif.

endloop.

Hope there will be no error,

regards

Siggi

Message was edited by: Siegfried Szameitat

Former Member
0 Kudos

Hi,

Do I do the program logic in BW routine/transfer rule or code the logic at R/3, extractor program?

Former Member
0 Kudos

Hi,

I would do it in the start routine of your transfer rules, so you have to read the table rsallowedchar only one time for a data package.

regards

Siggi

Former Member
0 Kudos

How to replace the invalid characters with space???

The ## could be carriage return. It is showing as 2 square box... Please advise.

The error message is showing

Value '0020-01271(PLATE, PUMPING 200MM WXZ[][] PLA' (hex. '') of characteristic ZCPRTEXT contains invalid characters

Former Member
0 Kudos

Hi,

I once had to do something similar and I used the following logic.

data: l_allowchar type rsallowchar,

l_string(125) type c.

select single allowchar into l_allowchar from rsallowedchar.

concatenate l_allowchar sy-abcde '0123456789' into l_string. "now you have all allowed characters in the

" string

if <your_field> co l_string.

result = <your_field>.

else.

  • now, loop over each single sign in <your_field> and

  • check if it is contained in l_string.

  • if it is not in l_string

  • replace it by space.

endif.

If you need the logic, give me some time, because I am writing this from memory. So I have to remember the logic.

But hopefully this already helps you solving your issue.

regards

Siggi

Message was edited by: Siegfried Szameitat

Message was edited by: Siegfried Szameitat

Former Member
0 Kudos

Hi,

check your values.

0020-01271(PLATE, PUMPING 200MM WXZ##PLA

and

0020-01271(PLATE, PUMPING 200MM WXZ PLA

There must be some kind of special character between WXZ and PLA that is causing the error. In the worst case, you need to replace those signs by space.

regards

Siggi