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

Problems with data objects unicode in popup ALV.

Former Member
0 Likes
625

Hello guys! I have the next problem to show a popup AVL. My error is the next:

The statement                                                              
"MOVE src TO dst"                                                       
requires that the operands "dst" and "src" are convertible.                
Since this statement is in a Unicode program, the special conversion       
rules for Unicode programs apply.                                          
In this case, these rules were violated.                                   

My code is the next:

TYPES:

  BEGIN OF ty_posic,

    ebelp   TYPE EKPO-EBELP,

    posid   TYPE PRPS-POSID,

    texto   TYPE PRPS-POST1,

    impor   TYPE NETPR,

    waers   TYPE EKKO-WAERS,

  END OF ty_posic.

* Tablas internas.

DATA:

  t_posic   TYPE STANDARD TABLE OF ty_posic,

  t_cols    TYPE STANDARD TABLE OF help_value,

  t_tabix   TYPE sy-tabix,

  t_just    TYPE CATSXT_LONGTEXT_ITAB.

* Workareas.

DATA:

  wa_cols   LIKE LINE OF t_cols,

  wa_posic  LIKE LINE OF t_cols.

..........


  CLEAR t_tabix.

  APPEND wa_cols TO t_cols.

    wa_cols-tabname    = 'EKPO'.

    wa_cols-fieldname  = 'EBELP'.

    wa_cols-selectflag = 'X'.

  APPEND wa_cols TO t_cols.

    wa_cols-tabname    = 'PRPS'.

    wa_cols-fieldname  = 'POSID'.

  APPEND wa_cols TO t_cols.

    wa_cols-tabname    = 'PRPS'.

    wa_cols-fieldname  = 'POST1'.

  APPEND wa_cols TO t_cols.

    wa_cols-tabname    = 'EKPO'.

    wa_cols-fieldname  = 'NETPR'.

  APPEND wa_cols TO t_cols.

    wa_cols-tabname    = 'EKKO'.

    wa_cols-fieldname  = 'WAERS'.

  APPEND wa_cols TO t_cols.

  CALL FUNCTION 'MD_POPUP_SHOW_INTERNAL_TABLE'

  EXPORTING

    title   = 'My text'

  IMPORTING

    index   = t_tabix 

  TABLES

    values  = t_posic

    columns = t_cols

  EXCEPTIONS

    leave   = 1

    others  = 2.
...........


Greethings!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
552

Hi

FM MD_POPUP_SHOW_INTERNAL_TABLE,which you are using is not released,may still have some internal bugs.

this error "MOVE src TO dst" ==> is because of this statement in FM "valuex-data = values. APPEND valuex."

As IMPOR is of type p,this conversion error might have occured.

In fact i can execute your report only when the internal table doesn't hold this field   'impor   TYPE NETPR,'.

I suggest you to use FM  REUSE_ALV_POPUP_TO_SELECT which is already in released status.

I could display the internal table in POPUP with below,

data : t_fcat TYPE SLIS_T_FIELDCAT_ALV with header line.

t_posic-ebelp = '1234'.

t_posic-posid = '1234'.

t_posic-texto = '12345678'.

t_posic-impor = '145.78'.

t_posic-waers = 'SGD'.

append t_posic.

t_posic-ebelp = '8765'.

t_posic-posid = '2584'.

t_posic-texto = '12345678'.

t_posic-impor = '122.78'.

t_posic-waers = 'USD'.

append t_posic.

t_fcat-col_pos = '1'.

t_fcat-fieldname = 'EBELP'.

t_fcat-seltext_l = 'Item'.

t_fcat-tabname  = 'T_POSIC[]'.

append t_fcat.

t_fcat-col_pos = '2'.

t_fcat-fieldname = 'POSID'.

t_fcat-seltext_l = 'WBS'.

t_fcat-tabname  = 'T_POSIC[]'.

append t_fcat.

t_fcat-col_pos = '3'.

t_fcat-fieldname = 'TEXTO'.

t_fcat-seltext_l = 'Desc'.

t_fcat-tabname  = 'T_POSIC[]'.

append t_fcat.

t_fcat-col_pos = '4'.

t_fcat-fieldname = 'IMPOR'.

t_fcat-seltext_l = 'Price'.

t_fcat-tabname  = 'T_POSIC[]'.

append t_fcat.

t_fcat-col_pos = '4'.

t_fcat-fieldname = 'WAERS'.

t_fcat-seltext_l = 'Curr'.

t_fcat-tabname  = 'T_POSIC[]'.

append t_fcat.

   CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'

     EXPORTING

      I_TITLE                       = 'test'

      I_SELECTION                   = 'X'

*     I_ALLOW_NO_SELECTION          =

*     I_ZEBRA                       = ' '

*     I_SCREEN_START_COLUMN         = 0

*     I_SCREEN_START_LINE           = 0

*     I_SCREEN_END_COLUMN           = 0

*     I_SCREEN_END_LINE             = 0

*     I_CHECKBOX_FIELDNAME          =

*     I_LINEMARK_FIELDNAME          =

*     I_SCROLL_TO_SEL_LINE          = 'X'

       i_tabname                     = 'T_POSIC[]'

*     I_STRUCTURE_NAME              =

      IT_FIELDCAT                   = t_fcat[]

*     IT_EXCLUDING                  =

*     I_CALLBACK_PROGRAM            =

*     I_CALLBACK_USER_COMMAND       =

*     IS_PRIVATE                    =

*   IMPORTING

*     ES_SELFIELD                   =

*     E_EXIT                        =

     tables

       t_outtab                      = t_posic[]

*   EXCEPTIONS

*     PROGRAM_ERROR                 = 1

*     OTHERS                        = 2

             .

   IF sy-subrc <> 0.

* Implement suitable error handling here

   ENDIF.

Regards

Pallavi

2 REPLIES 2
Read only

Former Member
0 Likes
553

Hi

FM MD_POPUP_SHOW_INTERNAL_TABLE,which you are using is not released,may still have some internal bugs.

this error "MOVE src TO dst" ==> is because of this statement in FM "valuex-data = values. APPEND valuex."

As IMPOR is of type p,this conversion error might have occured.

In fact i can execute your report only when the internal table doesn't hold this field   'impor   TYPE NETPR,'.

I suggest you to use FM  REUSE_ALV_POPUP_TO_SELECT which is already in released status.

I could display the internal table in POPUP with below,

data : t_fcat TYPE SLIS_T_FIELDCAT_ALV with header line.

t_posic-ebelp = '1234'.

t_posic-posid = '1234'.

t_posic-texto = '12345678'.

t_posic-impor = '145.78'.

t_posic-waers = 'SGD'.

append t_posic.

t_posic-ebelp = '8765'.

t_posic-posid = '2584'.

t_posic-texto = '12345678'.

t_posic-impor = '122.78'.

t_posic-waers = 'USD'.

append t_posic.

t_fcat-col_pos = '1'.

t_fcat-fieldname = 'EBELP'.

t_fcat-seltext_l = 'Item'.

t_fcat-tabname  = 'T_POSIC[]'.

append t_fcat.

t_fcat-col_pos = '2'.

t_fcat-fieldname = 'POSID'.

t_fcat-seltext_l = 'WBS'.

t_fcat-tabname  = 'T_POSIC[]'.

append t_fcat.

t_fcat-col_pos = '3'.

t_fcat-fieldname = 'TEXTO'.

t_fcat-seltext_l = 'Desc'.

t_fcat-tabname  = 'T_POSIC[]'.

append t_fcat.

t_fcat-col_pos = '4'.

t_fcat-fieldname = 'IMPOR'.

t_fcat-seltext_l = 'Price'.

t_fcat-tabname  = 'T_POSIC[]'.

append t_fcat.

t_fcat-col_pos = '4'.

t_fcat-fieldname = 'WAERS'.

t_fcat-seltext_l = 'Curr'.

t_fcat-tabname  = 'T_POSIC[]'.

append t_fcat.

   CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'

     EXPORTING

      I_TITLE                       = 'test'

      I_SELECTION                   = 'X'

*     I_ALLOW_NO_SELECTION          =

*     I_ZEBRA                       = ' '

*     I_SCREEN_START_COLUMN         = 0

*     I_SCREEN_START_LINE           = 0

*     I_SCREEN_END_COLUMN           = 0

*     I_SCREEN_END_LINE             = 0

*     I_CHECKBOX_FIELDNAME          =

*     I_LINEMARK_FIELDNAME          =

*     I_SCROLL_TO_SEL_LINE          = 'X'

       i_tabname                     = 'T_POSIC[]'

*     I_STRUCTURE_NAME              =

      IT_FIELDCAT                   = t_fcat[]

*     IT_EXCLUDING                  =

*     I_CALLBACK_PROGRAM            =

*     I_CALLBACK_USER_COMMAND       =

*     IS_PRIVATE                    =

*   IMPORTING

*     ES_SELFIELD                   =

*     E_EXIT                        =

     tables

       t_outtab                      = t_posic[]

*   EXCEPTIONS

*     PROGRAM_ERROR                 = 1

*     OTHERS                        = 2

             .

   IF sy-subrc <> 0.

* Implement suitable error handling here

   ENDIF.

Regards

Pallavi

Read only

0 Likes
552

Thanks! its works for me. It is a good alternative. Greetings!