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

Unicode issue

Former Member
0 Likes
775

Hi all,

This statement has unicode issues:

ADD KNC1-UM01S THEN KNC1-UM02S UNTIL KNC1-UM16S GIVING H-SOLL

ACCORDING TO BMONAT.

Can anyone help me in suggesting the replacement for this statement.

Regards,

keerthi

8 REPLIES 8
Read only

Former Member
0 Likes
743

hi keerthi,

if you could state the error message tht comes , we can pinpoint the problem.

Read only

0 Likes
743

Hi swetha,

It doesnt throw any synatx error,but the statement is obsolete

thanks,

keerthi

Read only

Former Member
0 Likes
743

<b>i faced a similar problem ..</b>

i had used variable named <b>vbrp-vbeln</b> in screen modular programming taking dictionary reference..

the problem here was the<b> hyphen</b> which made it non - unicode convertible..

then i removed the usage of hyphen.

probably it is the same case with your query .

Reward if useful..

Read only

Former Member
0 Likes
743

Hi,

chk this sample to understand what the ADD statement is doing , so that you can change accoringly

Also let us know what is the declaration for BMONAT, is it a select option??

DATA: BEGIN OF NUMBERS,
        ONE   TYPE P VALUE 10,
        TWO   TYPE P VALUE 20,
        THREE TYPE P VALUE 30,
        FOUR  TYPE P VALUE 40,
        FIVE  TYPE P VALUE 50,
      END   OF NUMBERS,
      SUM   TYPE I VALUE 1000,
      INDEX TYPE I.
RANGES SELECTION FOR INDEX.

SELECTION-SIGN   = 'I'.
SELECTION-OPTION = 'BT'.
SELECTION-LOW    = 2.
SELECTION-HIGH   = 4.
APPEND SELECTION.

ADD NUMBERS-ONE THEN NUMBERS-TWO
                UNTIL NUMBERS-FIVE
                ACCORDING TO SELECTION
                GIVING SUM.

SUM now contains 90. Only the component fields TWO to FOUR were selected from the field string NUMBERS and added together.

Read only

0 Likes
743

Hi,

BMONAT is ranges declaration.

I can understand what this statement is doing,

but this is obsolete and has unicode issues, can you please

what is other way of performing this function.

Thanks,

keerthi

Read only

0 Likes
743

Hi Keerthi..

Pls let me know if your problem is solved...

Read only

0 Likes
743

Hi Chandra,

Thanks for the solution.It was very helpful.

keerthi.

Read only

Former Member
0 Likes
743

You can check my previous code without using ADD , you can change your code accordingly,

chk the one in bold

REPORT ychatest LINE-SIZE 350.

DATA: BEGIN OF numbers,

one TYPE p VALUE 10,

two TYPE p VALUE 20,

three TYPE p VALUE 30,

four TYPE p VALUE 40,

five TYPE p VALUE 50,

END OF numbers,

sum TYPE i,

index TYPE i.

RANGES selection FOR index.

FIELD-SYMBOLS : <fs> TYPE ANY.

selection-sign = 'I'.

selection-option = 'BT'.

selection-low = 2.

selection-high = 4.

APPEND selection.

<b>DO.

IF sy-index GT selection-high.

EXIT.

ENDIF.

CHECK sy-index BETWEEN selection-low AND selection-high.

ASSIGN COMPONENT sy-index OF STRUCTURE numbers TO <fs>.

sum = sum + <fs>.

ENDDO.</b>

WRITE : / sum.