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

... are not mutually convertible in a Unicode program.

Former Member
0 Likes
6,532

Hi,

I am getting the error like A line of "ZSCRMATNR-COLS" and "S_TABCONTROL" are not mutually convertible. In a Unicode program, "ZSCR_MATNR-COLS" must have the same structure layout as "S_TABCONTROL", irrespective of the length of a Unicode character. Unicode characte._

.Data Declarations 

DATA:  BEGIN OF S_TABCONTROL,
       SCREEN         LIKE SCREEN,
       INDEX          TYPE I,
       SELECTED       TYPE C,
       VISLENGTH      TYPE I,
       END OF S_TABCONTROL.

CONTROLS: ZSCR_MATNR TYPE TABLEVIEW USING SCREEN 9003.

At the below point it showing the error

    *LOOP AT ZSCR_MATNR-COLS INTO S_TABCONTROL.*

          IF NOT S_TABCONTROL-SELECTED IS INITIAL.
             CLEAR S_TABCONTROL-SELECTED.
             *MODIFY ZSCR_MATNR-COLS FROM S_TABCONTROL.*
             MOVE S_TABCONTROL-SCREEN-NAME+14(10) TO L_SORT.
             SORT ITAB_MATERIAL BY (L_SORT).
          ENDIF.

       ENDLOOP. 

.

Please give me some inputs.

Thanks

Kiran

1 ACCEPTED SOLUTION
Read only

faisalatsap
Active Contributor
0 Likes
2,116

Hi,

Declare S_TABCONTROL Following Way.

Data: S_TABCONTROL like line of ZSCR_MATNR-COLS.

Hope will solve out..

Please Reply if any Issue,

Best Regards,

Faisal

2 REPLIES 2
Read only

faisalatsap
Active Contributor
0 Likes
2,117

Hi,

Declare S_TABCONTROL Following Way.

Data: S_TABCONTROL like line of ZSCR_MATNR-COLS.

Hope will solve out..

Please Reply if any Issue,

Best Regards,

Faisal

Read only

_IvanFemia_
Active Contributor
0 Likes
2,116

In unicode programs you cannot longer move data from structure that are not mutually convertible.

Try to declare a work area LIKE ZSCR_MATNR-COLS and then move manually the field you need from the work area to S_TABCONTROL.

Regards,

IVan