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

Is dynamic parameter adviceable in Unicode enabled system?

Former Member
0 Likes
574

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.

1 ACCEPTED SOLUTION
Read only

former_member186741
Active Contributor
0 Likes
534

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.

3 REPLIES 3
Read only

former_member186741
Active Contributor
0 Likes
535

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.

Read only

0 Likes
534

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.

Read only

0 Likes
534

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.