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

To avoid square boxes in DSO (problem in the code to avoid)

Former Member
0 Likes
462

Hi all,

I tried with a coding to avoid Square boxes that were coming into my DSO (SAP BI) . I tried with the follwing code. But it throws syntax error

DATA i_text type c length 60.

 

i_text = SOURCE_FIELDS-/BIC/ZMBS_FT1. "this is your material description field

 

REPLACE ALL OCCURRENCES OF '#'

          IN i_text WITH ' '.

 

REPLACE ALL OCCURRENCES OF '□'

          IN i_text WITH ' '.

 

RESULT = i_text.

The error i  get is '                             ' is not expected.

I tried replacing the box with some dummy character.. Even then it throws the same error. What will be the possible cause.Also is there any other way to avoid box characters from record? ( i am even ok to completely delete the record)

Please help on this.

Regards,

Rajarathnam.S

1 ACCEPTED SOLUTION
Read only

iftah_peretz
Active Contributor
0 Likes
411

Hi rajarathnam,

I took your code and compiled it. The box sign was automatically converted to # sign and the field

SOURCE_FIELDS-/BIC/ZMBS_FT1 and RESULT were unknown. I made SOURCE_FIELDS-/BIC/ZMBS_FT1  into 'SOURCE_FIELDS-/BIC/ZMBS_FT1 ' and defined RESULT the same as i_text and I got no syntax error.

Can you tell me the line you are getting it in? maybe its the line of

i_text = SOURCE_FIELDS-/BIC/ZMBS_FT1.

Send me the whole code and I will get to the bottom of it.

Best,

Iftah.

2 REPLIES 2
Read only

iftah_peretz
Active Contributor
0 Likes
412

Hi rajarathnam,

I took your code and compiled it. The box sign was automatically converted to # sign and the field

SOURCE_FIELDS-/BIC/ZMBS_FT1 and RESULT were unknown. I made SOURCE_FIELDS-/BIC/ZMBS_FT1  into 'SOURCE_FIELDS-/BIC/ZMBS_FT1 ' and defined RESULT the same as i_text and I got no syntax error.

Can you tell me the line you are getting it in? maybe its the line of

i_text = SOURCE_FIELDS-/BIC/ZMBS_FT1.

Send me the whole code and I will get to the bottom of it.

Best,

Iftah.

Read only

0 Likes
411

Thanks a lot Iftah,

Sorry about such a late reply. I found the error. It was a small code error only. I am closing the thread.. Thanks for the efforts from you.