‎2006 Jul 26 3:42 AM
Hi Experts,
I have this question regarding the dynamic parameter '$variable' parse into a perform statement.
Example:
FORM LEAD_ZERO_OR_ZERO USING $CONST CHANGING $FIELD.
DATA: LEN TYPE I,
CNT TYPE I,
TEMP(50).
CONDENSE $FIELD NO-GAPS.
LEN = STRLEN( $FIELD ).
IF LEN < $CONST AND LEN NE 0. "#EC PORTABLE
CNT = $CONST - LEN.
MOVE $FIELD0(LEN) TO TEMP0(LEN).
MOVE TEMP0(LEN) TO $FIELDCNT(LEN).
WHILE CNT NE 0.
CNT = CNT - 1.
MOVE '0' TO $FIELD+CNT(1).
ENDWHILE.
ENDIF.
IF LEN = 0.
CNT = $CONST.
WHILE CNT GT 0.
CNT = CNT - 1.
MOVE '0' TO $FIELD+CNT(1).
ENDWHILE.
ENDIF.
ENDFORM. "LEAD_ZERO_OR_ZERO
I got this feedback from the basis team in my current project that this line
MOVE TEMP0(LEN) TO $FIELDCNT(LEN)
is not Unicode compliant but I don't see why except for the dynamic parse in variable which is $field but I could not find any document to support my assumption.
Please let me know if my assumption is wrong. If I am correct, is it ok if I change that dynamic parse in parameter to a standard one like 'p_field'?
Thanks in advance.
‎2006 Jul 26 3:48 AM
there does not seem to be anything wrong with the form in isolation. Maybe one of the performs of it uses a structure name rather than a single variable. Unicode does not like structures which have embedded non-string variables to be treated like a string.
‎2006 Jul 26 3:48 AM
there does not seem to be anything wrong with the form in isolation. Maybe one of the performs of it uses a structure name rather than a single variable. Unicode does not like structures which have embedded non-string variables to be treated like a string.
‎2006 Jul 26 4:25 AM
Thanks for the explaination Neil. Now it is up to me to convince the basis people that there will not be a problem with the current codes.
If you have any existing documentation that you think can help me on this and if you don't mind, please send me a copy. Thanks in advance. Points awarded for ur reply.
‎2006 Jul 26 4:33 AM
THANKYOU FOR THE POINTS. For doco have a look in se38. click on the 'i' button to bring up help. Select 'abap overview'. Under 'Abap by theme' there is a whole sub-section that discusses unicode issues.