‎2009 Jul 23 6:40 AM
hi guru,
I am doing the unicode checking of the program... during that i hv found one error in insert statement.
the error is "The type of the database table and work area (or internal table) "WA_SRV" are
not Unicode convertible".
so plz help me on this matter..
INSERT ZSRVDET FROM WA_SRV.
where wa_srv is work area.
zsrvdet is z table.
‎2009 Jul 23 6:44 AM
Hi,
Declare the work area type same as that of the database table.
Thanks,
Sri.
‎2009 Jul 23 6:44 AM
Hi,
Declare the work area type same as that of the database table.
Thanks,
Sri.
‎2009 Jul 23 6:48 AM
i declared it like this... it has some error
TYPES : BEGIN OF GS_SRV,
INVNO LIKE ZSRVDET-INVNO, "Official Excise Document Number
MINVNO LIKE ZSRVDET-MINVNO, " mul invoice number
INVDATE LIKE ZSRVDET-INVDATE, "Excise Document Date
CUSTMAT LIKE ZSRVDET-CUSTMAT,"Material Number Used by Customer
MATNR LIKE ZSRVDET-MATNR, "Material Number
SRVNO LIKE ZSRVDET-SRVNO, "SRVNO
SRVDATE LIKE ZSRVDET-SRVDATE, "SRV DATE
QTY LIKE ZSRVDET-QTY, "Target quantity
NETAMOUNT LIKE ZSRVDET-NETAMOUNT, "NET AMOUNT PER MATERIAL
RECAMOUNT LIKE ZSRVDET-RECAMOUNT, "RECEIVED AMOUNT PER-
"-MATERIAL
NETAMOUNT1 LIKE ZSRVDET-NETAMOUNT1, "NETAMOUNT IN CURRENCY
END OF GS_SRV,
DATA: GT_SRV TYPE STANDARD TABLE OF GS_SRV,
DATA: WA_SRV TYPE GS_SRV,
‎2009 Jul 23 6:53 AM
Hi,
See whether all thesefields are there in the database table into which you are inserting. It should contain all the fields in the same order.
If not declare the internal table and work area similar to that of the database table.
DATA: GT_SRV TYPE STANDARD TABLE OF database_table.
DATA: WA_SRV TYPE database_table.Thanks,
Sri.
‎2009 Jul 23 6:45 AM
Hi
check wherhetr your ztable struture and the work area structure in compatible or not?
ZSRVDET structure and WA_SRV structure should be in Synch.
Regards,
Sreeram
‎2009 Jul 23 6:45 AM
‎2009 Jul 23 6:45 AM
Hi, Manish
Please Check the Type of WA_SRV it must same as ZSRVDET
Please Reply if any Issue,
Best Regards,
Faisal
‎2009 Jul 23 6:49 AM
i declared it like this... it has some error
tables: zsrvdet
TYPES : BEGIN OF GS_SRV,
INVNO LIKE ZSRVDET-INVNO, "Official Excise Document Number
MINVNO LIKE ZSRVDET-MINVNO, " mul invoice number
INVDATE LIKE ZSRVDET-INVDATE, "Excise Document Date
CUSTMAT LIKE ZSRVDET-CUSTMAT,"Material Number Used by Customer
MATNR LIKE ZSRVDET-MATNR, "Material Number
SRVNO LIKE ZSRVDET-SRVNO, "SRVNO
SRVDATE LIKE ZSRVDET-SRVDATE, "SRV DATE
QTY LIKE ZSRVDET-QTY, "Target quantity
NETAMOUNT LIKE ZSRVDET-NETAMOUNT, "NET AMOUNT PER MATERIAL
RECAMOUNT LIKE ZSRVDET-RECAMOUNT, "RECEIVED AMOUNT PER-
"-MATERIAL
NETAMOUNT1 LIKE ZSRVDET-NETAMOUNT1, "NETAMOUNT IN CURRENCY
END OF GS_SRV,
DATA: GT_SRV TYPE STANDARD TABLE OF GS_SRV,
DATA: WA_SRV TYPE GS_SRV,
Edited by: Manish Sharma on Jul 23, 2009 7:50 AM
‎2009 Jul 23 6:52 AM
Hi,
Use the MANDT field as the first field in your declaration of the structure like I mentioned before.
‎2009 Jul 23 6:56 AM
Hi,
If the declaration of the strcuture is causing more problems, declare your internal table TYPE STANDARD TABLE of database table and the work are LIKE LINE OF the internal table.
The Unicode error occurs when the structures are different.
‎2009 Jul 23 6:48 AM
Hi,
Please check if the internal table or the corresponding work area has the same structure as that of the database table. Only then the INSERT statement into the database will be successful.
Check if you have used the MANDT field in the declaration. That could probably be a reason for the error.
MANDT type SY-MANDT "Try including this in your declaration as the first field in your structure
‎2009 Jul 23 6:51 AM
‎2009 Jul 23 6:52 AM
Hi ,
check whether your internal table and workarea is of same type .
Please let me know if you still have any issues on this.
Thanks and regards,
Rajeshwar.