‎2007 May 22 10:52 AM
Hi All,
i am using following code
TYPES : BEGIN OF ty_txt_file,
date(11) TYPE c,
actual(16) TYPE c,
nominal(12) TYPE c,
deviat(12) TYPE c,
uptol(10) TYPE c,
lowtol(12) TYPE c,
END OF ty_txt_file.
DATA: it_txt_file TYPE STANDARD TABLE OF ty_txt_file INITIAL SIZE 0,
TYPES : BEGIN OF ty_actual,
slno TYPE sy-index,
actual TYPE p DECIMALS 4,
END OF ty_actual.
DATA:it_actual TYPE STANDARD TABLE OF ty_actual INITIAL SIZE 0,
DATA: wa_actual TYPE ty_actual,
DATA: wa_txt_file TYPE ty_txt_file,
Throwing short dump at the following statement.
wa_actual-actual = wa_txt_file-actual.
help Pls..
Regards,
Sai Prasad
‎2007 May 22 10:59 AM
Hi,
You are trying to pass character value to a packed variable.
Use <b>Pack</b> statement to do it instead of directly assigning.
DATA C_FIELD(4) TYPE C VALUE '0103',
P_FIELD(2) TYPE P.
PACK C_FIELD TO P_FIELD. Note : C_field can be up to 16 characters.
Regards
Sailaja.
‎2007 May 22 10:54 AM
‎2007 May 22 10:55 AM
Both the staructure not compatable to assign, if you want copy from one structure to another both should be same content.
‎2007 May 22 10:56 AM
Hi sai
increase the size of wa_txt_file-actual and check once.
Regards,
Sreeram
‎2007 May 22 10:56 AM
‎2007 May 22 10:58 AM
Hi,
The type declaration of the field 'actual' is different in the internal tables. Maintain the declaration same in both the internal tables.
‎2007 May 22 10:58 AM
hi,
actual(16) TYPE c is 16 char length.
But
actual TYPE p DECIMALS 4 => type P.
Not possible to assign. Thats y getting dump.
Rgds
Reshma
‎2007 May 22 10:59 AM
Hi,
You are trying to pass character value to a packed variable.
Use <b>Pack</b> statement to do it instead of directly assigning.
DATA C_FIELD(4) TYPE C VALUE '0103',
P_FIELD(2) TYPE P.
PACK C_FIELD TO P_FIELD. Note : C_field can be up to 16 characters.
Regards
Sailaja.