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

mutually convertible Unicode

Former Member
0 Likes
414

When I change the next code (Adaptation unicode):

IF t004-sakln > 0.
*{   REPLACE        &$&$&$&$                                          1
*      DESCRIBE FIELD ska1-bilkt LENGTH sy-fdpos.
      DESCRIBE FIELD ska1-bilkt LENGTH sy-fdpos IN CHARACTER MODE.

...

...

I obtain the next error sintaxis:

Can you help me, please?

"SKC1A-GSBER" and "X_FF_GSBER" are not mutually convertible in a Unicode program . . . . .

IF NOT ( repwaers IS INITIAL ).
    ctyp_waers  = repwaers.
  ELSE.
    ctyp_waers  = skc1a-hwaer.
  ENDIF.
  IF fi_lc_ex = '2'.
*   Extrakt an FI_LC, Geschäftsbereich austauschen
*   ----------------------------------------------
    SELECT SINGLE * FROM tgsb WHERE gsber = skc1a-gsber.
*   IF SY-SUBRC = 0 AND TGSB-GSBER_KONS <> SPACE.           "vhs134295
    IF sy-subrc = 0.                                        "vhs134295
      skc1a-gsber = tgsb-gsber_kons.
    ELSE.
      IF NOT skc1a-gsber IS INITIAL.                        "vhs134295
*       Fehler, Gsber auf HexFF setzen
*       ------------------------------
        skc1a-gsber = x_ff_gsber.
      ENDIF.                                                "vhs134295
    ENDIF.
  ENDIF.

Cordial greetings.

2 REPLIES 2
Read only

Former Member
0 Likes
373

HI,

how is the field defined.

Both must be Char 4

Regards

Nicole

Read only

mathias_lange3
Explorer
0 Likes
373

Hi,

under Unicode you can't easely assign values from one variable to another with different datatype.

skc1a-gsber is char4 and x_ff_gsber seams to be type x?

Under Unicode there are strict rules. Instead of x = y you can use field-symbols.

This coding may help you:

DATA: z_gsber TYPE skc1a-gsber,

x_ff_gsber TYPE x.

FIELD-SYMBOLS: <f_gsber> TYPE skc1a-gsber,

<f_ff_gsber> TYPE x.

ASSIGN z_gsber TO <f_gsber>.

ASSIGN x_ff_gsber TO <f_ff_gsber>.

<f_gsber> = <f_ff_gsber>.

The variable z_gsber has now the same value as x_ff_gsber.