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

Unicode Conversion error

Former Member
0 Likes
3,588

Hi ,

i am getting b>The type of the database table and work area (or internal table)are not Unicode convertible. Unicode convertible</b>".  error while using select query.

SELECT SINGLE *

         FROM ZTYPE_INVOICES

         INTO wa_FREIGHT1

         WHERE LIFNR = ZSEA_CHARGES-LIFNR.

TYPES : BEGIN OF TY_ZSEA_CHARGES,

           MANT TYPE ZSEA_CHARGES-MANT,

           LIFNR TYPE ZSEA_CHARGES-LIFNR,

           BELNR TYPE ZSEA_CHARGES-BELNR,

           NAME1 TYPE ZSEA_CHARGES-NAME1,

           FKDAT TYPE ZSEA_CHARGES-FKDAT,

           WRBTR TYPE ZSEA_CHARGES-WRBTR,

           KURST TYPE ZSEA_CHARGES-KURST,

           DMBTR TYPE ZSEA_CHARGES-DMBTR,

           THC_CHRG TYPE ZSEA_CHARGES-THC_CHRG,

           DOC_CHRG TYPE ZSEA_CHARGES-DOC_CHRG,

           SEAL_CHRG TYPE ZSEA_CHARGES-SEAL_CHRG,

           ENS_CHRG TYPE ZSEA_CHARGES-ENS_CHRG,

           HAZ_CHRG TYPE ZSEA_CHARGES-HAZ_CHRG,

           AMS_CHRG TYPE ZSEA_CHARGES-AMS_CHRG,

           ISPS_CHRG TYPE ZSEA_CHARGES-ISPS_CHRG,

           BLSURRENDER_CH TYPE ZSEA_CHARGES-BLSURRENDER_CH,

           SURVEY_CHRG TYPE ZSEA_CHARGES-SURVEY_CHRG,

           PLUGIN_CHRG TYPE ZSEA_CHARGES-PLUGIN_CHRG,

           AMENDMENT_CHRG TYPE ZSEA_CHARGES-AMENDMENT_CHRG,

           OTHER_CHRG TYPE ZSEA_CHARGES-OTHER_CHRG,

           OTHER_CHRG_AMT TYPE ZSEA_CHARGES-OTHER_CHRG_AMT,

           NETLASHING_CHR TYPE ZSEA_CHARGES-NETLASHING_CHR,

           SERVICETAX TYPE ZSEA_CHARGES-SERVICETAX,

           EDUCATION_CESS TYPE ZSEA_CHARGES-EDUCATION_CESS,

           SEC_CESS TYPE ZSEA_CHARGES-SEC_CESS,

           TOTAL_AMT TYPE ZSEA_CHARGES-TOTAL_AMT,

           END OF TY_ZSEA_CHARGES.

IT_FREIGHT1 TYPE STANDARD TABLE OF TY_ZSEA_CHARGES,

        WA_FREIGHT1 TYPE TY_ZSEA_CHARGES.

Thanks,

Amit Dwivedi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,100

Dear Amit,

Then error is due to the difference in the number of fields in the select query and in the WA_FREIGHT1.

give the field names in the select query and that should match with the fields in TY_ZSEA_CHARGES structure in the same sequence .

Best Regards,

Noufal P

18 REPLIES 18
Read only

RaymondGiuseppi
Active Contributor
0 Likes
3,100

Check compatibility of TY_ZSEA_CHARGES and ZTYPE_INVOICES (*) or use a CORRESPONDING option in SELECT statement.

Regards,

Raymond

(*) Open SQL - Work Areas in Statements

Read only

0 Likes
3,100

So for *******, either


SELECTSINGLE *

         FROM ZTYPE_INVOICES

         INTO CORRESPONDING FIELD OF wa_FREIGHT1

WHERE LIFNR = ZSEA_CHARGES-LIFNR.

or


SELECTSINGLE *

         FROM ZTYPE_INVOICES

         INTO wa_INVOICES " defined as TYPE ZTYPE_INVOICES

         WHERE LIFNR = ZSEA_CHARGES-LIFNR.

MOVE-CORRESPONDING wa_INVOICES TO wa_FREIGHT1.

Regards,

Raymond

Read only

0 Likes
3,100

Hi Raymond,

I tried using ur 1 option bt now it is giving error "Field "LIFNR" unknown".

what may be the cause of this error.

Thanks,

Amit

Read only

Venkat_Sesha
Product and Topic Expert
Product and Topic Expert
0 Likes
3,100

Make sure the Data Elements are matched in the your Type declaration as well as with your Database Table.

Hope this works

Read only

Former Member
0 Likes
3,100

Hi Amit,

You are selecting all the fields from the table ZTYPE_INVOICES into work area.

But your work area structure is different you declared in the program, Declare the work area with same type as ZTYPE_INVOICES.

DATA : WA_FREIGHT1 TYPE ZTYPE_INVOICES.

Regards

Mani

Read only

0 Likes
3,100

Hi Nagamani,

Done as u said but still giving the error.

Thanks,

Amit

Read only

0 Likes
3,100

Hi Amit,

Then check the where condition WHERE LIFNR = ZSEA_CHARGES-LIFNR.

the type of the LIFNR in both the tables are same or not.

Regards

Mani

Read only

0 Likes
3,100

Hi,

Both are same.

Thanks,

Amit Dwivedi

Read only

Former Member
0 Likes
3,101

Dear Amit,

Then error is due to the difference in the number of fields in the select query and in the WA_FREIGHT1.

give the field names in the select query and that should match with the fields in TY_ZSEA_CHARGES structure in the same sequence .

Best Regards,

Noufal P

Read only

0 Likes
3,100

I want to select the entire row based on LIFNR and dsiplay on screen.

i am working on Module pool.

Thanks,

Amit

Read only

Former Member
0 Likes
3,100

hello amit,

As you may be using less number of field in module pool designing when compared to your database structure. First you need to define work area depending up on your database table and pick the values in that work area and pass it to your screen elements.

Regards,

Divya.

Message was edited by: divya shree

Read only

former_member185177
Contributor
0 Likes
3,100

Hi Amit,

I guess ZSEA_CHARGES is customized table.

Need to declare the table on top of your types.

Tables:  ZSEA_CHARGES.

Regards,

Krishna Chaitanya.

Read only

0 Likes
3,100

Hi Krishna,

That's already there.

Thanks,

Amit Dwivedi

Read only

0 Likes
3,100

Then your entire code should be in CHAIN .... ENDCHAIN.

Read only

0 Likes
3,100

Hi Krishna,

I do not want to validate the fields.

I just want to select data from database table from internal table or work area.

Thanks,

Amit Dwivedi

Read only

Former Member
0 Likes
3,100

Hi Guys,

The issue is resolved.

Thanks,

Amit Dwivedi

Read only

0 Likes
3,100

Hi Amit,

Appreciate if you share the solution for this.

Regards,

Krishna Chaitanya.

Read only

0 Likes
3,100

Hi Krishna,


I mentioned wrong table name in my select query. The table name an the wa have  different structures.


That's the reason it was giving error.


Thanks,

Amit Dwivedi