2015 May 13 9:49 AM
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
2015 May 13 10:08 AM
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
2015 May 13 10:06 AM
Check compatibility of TY_ZSEA_CHARGES and ZTYPE_INVOICES (*) or use a CORRESPONDING option in SELECT statement.
Regards,
Raymond
2015 May 13 11:05 AM
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
2015 May 13 11:29 AM
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
2015 May 13 11:33 AM
Make sure the Data Elements are matched in the your Type declaration as well as with your Database Table.
Hope this works
2015 May 13 10:06 AM
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
2015 May 13 10:18 AM
Hi Nagamani,
Done as u said but still giving the error.
Thanks,
Amit
2015 May 13 10:24 AM
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
2015 May 13 10:30 AM
2015 May 13 10:08 AM
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
2015 May 13 10:19 AM
I want to select the entire row based on LIFNR and dsiplay on screen.
i am working on Module pool.
Thanks,
Amit
2015 May 13 10:12 AM
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
2015 May 13 10:30 AM
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.
2015 May 13 10:40 AM
2015 May 13 10:51 AM
2015 May 13 10:57 AM
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
2015 May 13 11:34 AM
2015 May 14 8:30 AM
Hi Amit,
Appreciate if you share the solution for this.
Regards,
Krishna Chaitanya.
2015 May 27 6:47 AM
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