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

gui_upload giving dump " Data objects in Unicode programs cannot be converted."

former_member653066
Participant
0 Likes
3,308

hi gurus,

i am getting dump with  "Data objects in Unicode programs cannot be converted."

data:

What happened?

    Error in the ABAP Application Program

    The current ABAP program "SAPLSFES" had to be terminated because it has

    come across a statement that unfortunately cannot be executed.

Error analysis

    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.

programme code:

data: FILE_NAME LIKE  IBIPPARMS-PATH,

       G_NAME TYPE STRING.

DATA: BEGIN OF WA_DATA,

       MATNR TYPE MATNR,

       MENGE TYPE MENGE,

       MEINS TYPE MEINS,

       DEL_DT TYPE BAPIEBANC-DELIV_DATE,

       END OF WA_DATA,

       IT_DATA LIKE TABLE OF WA_DATA.

call function 'F4_FILENAME'

  IMPORTING

    FILE_NAME           = FILE_NAME

           .

G_NAME = FILE_NAME.


call function 'GUI_UPLOAD'

   exporting

     filename                      = G_NAME

    FILETYPE                      = 'ASC'

    HAS_FIELD_SEPARATOR           = 'X'

   tables

     data_tab                      = IT_DATA

help me to get out of this... suggestions are really appreciated.

BD.

damon.

1 ACCEPTED SOLUTION
Read only

former_member241258
Active Participant
0 Likes
2,159

I MODIFIES UR SOURCE CODE .

SEE BELOW.

REPORT ZDEMO2.

TYPES: BEGIN OF TY_DATA,
         MATNR TYPE MARA-MATNR,
         MENGE TYPE EKPO-MENGE,
         MEINS TYPE EKPO-MEINS,
         DEL_DT TYPE BAPIEBANC-DELIV_DATE,
        END OF TY_DATA,
        TT_DATA TYPE STANDARD TABLE OF TY_DATA.

DATA: FILE_NAME LIKE  IBIPPARMS-PATH,
        G_NAME TYPE STRING.

  DATA:IT_DATA TYPE TT_DATA.



  START-OF-SELECTION.

CALL FUNCTION 'F4_FILENAME'
   IMPORTING
     FILE_NAME           = FILE_NAME.


G_NAME = FILE_NAME.

CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
     FILENAME                      = G_NAME
     FILETYPE                      = 'ASC'
     HAS_FIELD_SEPARATOR           = 'X'
    TABLES
     DATA_TAB                      = IT_DATA.

IF 1 = 4.

ENDIF.

8 REPLIES 8
Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,159

You use ASC so I suppose the file contains text, so use an intermediate internal table with only character type fields, then map individual field to the final table revords using some TRY/CATCH/ENDTRY to prevent dumps and any required conversion exits.

Regards,

Raymond

Read only

0 Likes
2,159

hi raymond giuseppi,

thanking you for ur rply,

i have tried with fm 'UPLOAD' filetype 'DAT' ,, so that time also same dump..

and if you have sample coding to avoid dumps for above programe please mail me..

bd.

damon.

Read only

0 Likes
2,159

First analyze the file with some notepad, is it text or binary data?

You don't rally need a sample, also without access to the actual file this demand seems irrelebvant, in a first step replace the definition of field of your internal table with character type with enough length. set a break-point after the GUI_UPLOAD so analyze what kind of data you actually get.

Then loop and try to map data field by field. As I already wrote, from simple MOVE statements to call of conversion-exit FM or even some ASSIGN CASTING.

Regards,

Raymond

Read only

Former Member
0 Likes
2,159

This is authorization issue. Experienced this one before. Not sure if the same problem with yours but you can check.

Read only

ThangaPrakash
Active Contributor
0 Likes
2,159

Hello Damon,

Could you please attach the ST22 dump file for more information.

Regards,

TP

Read only

0 Likes
2,159

Category               ABAP Programming Error

Runtime Errors         UC_OBJECTS_NOT_CONVERTIBLE

ABAP Program           SAPLSFES

Application Component  BC-FES-GUI

Date and Time          19.01.2016 12:09:56

Short text

     Data objects in Unicode programs cannot be converted.

What happened?

     Error in the ABAP Application Program

     The current ABAP program "SAPLSFES" had to be terminated because it has

     come across a statement that unfortunately cannot be executed.

What can you do?

     Note down which actions and inputs caused the error.

     To process the problem further, contact you SAP system

     administrator.

     Using Transaction ST22 for ABAP Dump Analysis, you can look

     at and manage termination messages, and you can also

     keep them for a long time.

Error analysis

    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.

How to correct the error

    Use only convertible operands "dst" and "src" for the statement

       "MOVE src TO dst"

    Probably the only way to eliminate the error is to correct the program.

    -

    If the error occures in a non-modified SAP program, you may be able to

    find an interim solution in an SAP Note.

    If you have access to SAP Notes, carry out a search with the following

    keywords:

    "UC_OBJECTS_NOT_CONVERTIBLE" " "

    "SAPLSFES" or "LSFESF04"

If you cannot solve the problem yourself and want to send an error

notification to SAP, include the following information:

1. The description of the current problem (short dump)

   To save the description, choose "System->List->Save->Local File

(Unconverted)".

2. Corresponding system log

   Display the system log by calling transaction SM21.

   Restrict the time interval to 10 minutes before and five minutes

after the short dump. Then choose "System->List->Save->Local File

(Unconverted)".

3. If the problem occurs in a problem of your own or a modified SAP

program: The source code of the program

   In the editor, choose "Utilities->More

Utilities->Upload/Download->Download".

System environment

    SAP Release..... 731

    SAP Basis Level. 0007

    Application server... "corperpdevp"

    Network address...... "172.16.5.100"

    Operating system..... "Windows NT"

    Release.............. "6.1"

    Hardware type........ "8x AMD64 Level"

    Character length.... 16 Bits

    Pointer length....... 64 Bits

    Work process number.. 4

    Shortdump setting.... "full"

    Database server... "CORPERPDEVP"

    Database type..... "MSSQL"

    Database name..... "DEV"

    Database user ID.. "dev"

    Terminal.......... "krc-bpulagam-d"

    Char.set.... "C"

    SAP kernel....... 721

Line  SourceCde

   85           prc_tab_position = prc_dest_buffer_length.

   86         ELSE.

   87           prc_tab_position = prc_data_length.

   88           IF prc_data_type = 'D' AND par_dat_mode IS NOT INITIAL.

   89              prc_tab_position = prc_tab_position + 2.

   90           ENDIF.

   91         ENDIF.

   92       ENDIF.

   93     ENDIF.

   94

   95 *   In case uploaded data contain empty p fields do not ConvertDat.

   96 *   if ... and prc_tab_position > 0 (See SAPNote # 1038430)

   97

   98     if not par_dat_mode is initial and

   99        prc_tab_position > 0.

  100        PERFORM ConvertDat USING par_dest_buffer

  101                                 prc_tab_position

  102                                 prc_data_type

  103                                 <f_field>

  104                                 par_decimal

  105                                 par_DatFormat.

  106     ELSE.

  107       CATCH SYSTEM-EXCEPTIONS CONVT_NO_NUMBER = 1.

  108       FIELD-SYMBOLS: <x>.

  109       data c(4096).

  108       FIELD-SYMBOLS: <x>.

  109       data c(4096).

  110       if prc_data_type = 'X'.

  111          move par_dest_buffer(prc_tab_position) to c.

  112          assign c to <x> type 'X'.

  113          move <x> to <f_field>.

  114       else.

>>>>>          MOVE par_dest_buffer(prc_tab_position) TO <f_field>.

  116       endif.

  117       ENDCATCH.

  118       IF sy-subrc = 1.

  119          MESSAGE ID 'FES' TYPE 'E' NUMBER '007' RAISING BAD_DATA_FORMAT.

  120       ENDIF.

  121     ENDIF.

  122

  123     IF prc_tab_position < prc_dest_buffer_length AND

  124         par_has_field_separator IS NOT INITIAL.

  125       prc_tab_position = prc_tab_position + 1.

  126     ENDIF.

  127     SHIFT par_dest_buffer LEFT BY prc_tab_position PLACES.

  128     prc_dest_buffer_length =

  129         prc_dest_buffer_length - prc_tab_position.

  130

  131 *    ENDCASE.

  132   ENDDO.

  133 *  APPEND par_data_tab.

  134

Read only

former_member241258
Active Participant
0 Likes
2,159

hi.

ur  problem declaration of table type.

do like this.

  DATA: BEGIN OF WA_DATA,
         MATNR TYPE MARA-MATNR,
         MENGE TYPE EKPO-MENGE,
         MEINS TYPE EKPO-MEINS,
         DEL_DT TYPE BAPIEBANC-DELIV_DATE,
        END OF WA_DATA,
        IT_DATA LIKE TABLE OF WA_DATA.



ur code for above table declaration wrong.

ok?

Read only

former_member241258
Active Participant
0 Likes
2,160

I MODIFIES UR SOURCE CODE .

SEE BELOW.

REPORT ZDEMO2.

TYPES: BEGIN OF TY_DATA,
         MATNR TYPE MARA-MATNR,
         MENGE TYPE EKPO-MENGE,
         MEINS TYPE EKPO-MEINS,
         DEL_DT TYPE BAPIEBANC-DELIV_DATE,
        END OF TY_DATA,
        TT_DATA TYPE STANDARD TABLE OF TY_DATA.

DATA: FILE_NAME LIKE  IBIPPARMS-PATH,
        G_NAME TYPE STRING.

  DATA:IT_DATA TYPE TT_DATA.



  START-OF-SELECTION.

CALL FUNCTION 'F4_FILENAME'
   IMPORTING
     FILE_NAME           = FILE_NAME.


G_NAME = FILE_NAME.

CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
     FILENAME                      = G_NAME
     FILETYPE                      = 'ASC'
     HAS_FIELD_SEPARATOR           = 'X'
    TABLES
     DATA_TAB                      = IT_DATA.

IF 1 = 4.

ENDIF.