‎2013 Jul 31 11:54 AM
Hi all,
I need to pass some data from an excel file to an internal table from type rku01g . I am having a conversion problem with the field mefbtr which is of type quantity 15.
I have define my input field with a type char 15 and it is not working. I even used the component type from the table MEFXXX. Help me fix this conversion error. Which data type should i give to my field that get data from an excel file.
Thanks
‎2013 Jul 31 1:16 PM
Hi Maria,
Use Function module "MOVE_CHAR_TO_NUM". It converst character field to quantity field.
E.g.
call function 'MOVE_CHAR_TO_NUM'
exporting
chr = Charvariable
importing
num = qty_variable
exceptions
convt_no_number = 1
convt_overflow = 2.
Srikanth.
‎2013 Jul 31 1:16 PM
Hi Maria,
Use Function module "MOVE_CHAR_TO_NUM". It converst character field to quantity field.
E.g.
call function 'MOVE_CHAR_TO_NUM'
exporting
chr = Charvariable
importing
num = qty_variable
exceptions
convt_no_number = 1
convt_overflow = 2.
Srikanth.
‎2013 Jul 31 1:32 PM
‎2013 Jul 31 1:37 PM
Hi Maria,
Take the type string for that field while uploading into internal table.
Declare one variable of type MEFXXX.
Move that string variable into variable of type MEFXXX.
‎2013 Jul 31 2:47 PM
‎2013 Jul 31 2:48 PM
‎2013 Jul 31 3:05 PM
what is your conversion error ? can you please post it.
1. Try using Type P decimals 3
Or
2. Try using MENGE_D
In one of my requirement, I fetch quantity from Excel sheet as follows:
TYPES: BEGIN OF t_upload,
srno TYPE int2,
material TYPe lips-matnr,
quantity TYPE lips-lfimg,
hdrtxt type string,
END OF t_upload.