10-11-2008 7:58 AM
hi friends,
i am using this statement in SE37 but it gives error message
INSERT INTO ZBATCH VALUES TO_CHVW.
error message is
Function Module ZFIND_PRDORD_FOR_BATCH.
The type of of database table work area (or internal table )
"to_chvw" are not unicode convertable.
what shld i do to remove this error message.
regards
10-11-2008 8:01 AM
hi,
i assume ZBATCH is a DB table and you are inserted values from work area - TO_CHVW
in such a case the work area TO_CHVW has to be declared as:
DATA: TO_CHVW TYPE ZBATCH
because the length of TO_CHVW must be the same as ZBATCH including the field MANDT
If you have TO_CHVW of some other structure, then create a temp. structure TO_CHVW_TEMP TYPE ZBATCH and
MOVE-CORRESPONDING TO_CHVW to TO_CHVW_TMP.
then insert the temp structure into ZBATCH.
Regards,
Adi
10-11-2008 8:01 AM
10-11-2008 8:01 AM
hi,
i assume ZBATCH is a DB table and you are inserted values from work area - TO_CHVW
in such a case the work area TO_CHVW has to be declared as:
DATA: TO_CHVW TYPE ZBATCH
because the length of TO_CHVW must be the same as ZBATCH including the field MANDT
If you have TO_CHVW of some other structure, then create a temp. structure TO_CHVW_TEMP TYPE ZBATCH and
MOVE-CORRESPONDING TO_CHVW to TO_CHVW_TMP.
then insert the temp structure into ZBATCH.
Regards,
Adi
10-11-2008 8:02 AM
hey this error is shown because there is a type difference in your database table and the internal table.
create a structure of your database
types: begin of <is_tab>.
include structure <database tablename>.
types : end of <is_tab>.
create a work area for this.
wa_tab type is_tab.
assign all the values from your internal table to this new work area and from then you update the table.
Regards,
Midhun Abraham
Edited by: Midhun Abraham on Oct 11, 2008 9:02 AM