2008 Sep 08 8:33 AM
Hi all
In ALV we get a blank using no-zero option for columns containg zero values. Whereas in GUI_DOWNLOAD, I am unable to get the same. Can someone throw some light on this ? I would like to get blanks in excel file, for columns containing zero values.
Vijaya
Hi all
In ALV we get a blank using no-zero option for columns containg zero values. Whereas in GUI_DOWNLOAD, I am unable to get the same. Can someone throw some light on this ? I would like to get blanks in excel file, for columns containing zero values.
Vijaya
2008 Sep 09 10:05 PM
After you have used GUI_DOWNLOAD to read the data into an internal table, you may modify the values in that internal table. As an alternative, such conversion may be done at the point where the file gets created.
2008 Sep 11 7:25 AM
Dear Jelena
How can we do that ? The moment we call gui_download, the internal table is passed and excel file is created . Is that not? If not, please explain how to go about it ?
Thankyou
Vijaya
2008 Sep 16 7:33 AM
Hi
I request an answer to my question please.
Vijaya Chamundi
2008 Sep 16 7:42 AM
Hi Viyaja,
i think the easiest solution for you is to replace values in the table you are putting into GUI_DOWNLOAD.
It means to loop all records and replace zeroes with blanks. (if you have zeroes in types like "i" or "f" then you need to concatenate values into string variable ... - here you have two possibilities:
one is to create internal table with one string field and concatenate all fields into this one field separated by ';' or ',' depending on your excel setting - to get CSV file which excel opens as separated values into appropriate columns - and then save this table on hdd)\
second possibility is to create table with exactly the same list of fields as your table you are saving on HDD has but all data types like "i" will be replaces with datatype string. Then just loop all records and use move-corresponding command and for all fields do check if contains value 0 - if so - replace it with blank. Then save this internal table via gui_download)
Second chance is to create excel file and then use function modules to read this file and replace the zeroes with blanks - for this purpose please follow FM ALSM_EXCEL_TO_INTERNAL_TABLE to load data from excel into internal table and FM MS_EXCEL_OLE_STANDARD_DAT to store data to excel.
I propose the first solution is much better ...
Regards,
Karol
Edited by: Karol Seman on Sep 16, 2008 8:45 AM
2008 Sep 16 8:02 AM
Hi..
Just change the data types in the structure of internal table.
Make the types as char or string....
If it is then change the format (zeros to blank) using
REPLACE '0' IN FIELDNAME WITH space.
2008 Sep 16 9:22 AM
hi,
just useFUNCTION MODULE 'CONVERSION_EXIT_ALPHA_INPUT'
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = wa_crrb_audit-em_item_num
IMPORTING
output = wa_crrb_audit-em_item_num.
it will definately help you
thanks and regards
rahul sharma