Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

blank for value columns with zero value using GUI_DOWNLOAD

Former Member
0 Likes
2,795

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

6 REPLIES 6
Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
1,397

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.

Read only

1,397

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

Read only

0 Likes
1,397

Hi

I request an answer to my question please.

Vijaya Chamundi

Read only

0 Likes
1,397

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

Read only

Subhankar
Active Contributor
0 Likes
1,397

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.

Read only

Former Member
0 Likes
1,397

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