‎2007 May 01 10:22 AM
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
‎2007 May 01 10:26 AM
hi keerthi,
if you could state the error message tht comes , we can pinpoint the problem.
‎2007 May 01 10:30 AM
Hi swetha,
It doesnt throw any synatx error,but the statement is obsolete
thanks,
keerthi
‎2007 May 01 10:29 AM
<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..
‎2007 May 01 10:36 AM
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.
‎2007 May 01 10:43 AM
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
‎2007 May 01 11:29 AM
‎2007 May 02 10:46 AM
Hi Chandra,
Thanks for the solution.It was very helpful.
keerthi.
‎2007 May 01 10:58 AM
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.