Application Development 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: 

urgent : doubt on gui_download

Former Member
0 Kudos

hi guys,

i am using gui_download to download the details into a local file ..

when i am downloading into the local file . the matnr containing so many zeros in front when i download into a text file. but my problem is when i download into excel the matnr is right alligned but my requirement is to have the matnr left alligned in the output excel ...if there are any usefull answers please reply

1 ACCEPTED SOLUTION

former_member189059
Active Contributor
0 Kudos

Before sending it to excel, append an ' (apostrophe) before the start of every value in the matnr column

this will solve your problem and the apostrophe will not show in the sheet as well !

So instead of 0001, send '0001

8 REPLIES 8

former_member189059
Active Contributor
0 Kudos

Before sending it to excel, append an ' (apostrophe) before the start of every value in the matnr column

this will solve your problem and the apostrophe will not show in the sheet as well !

So instead of 0001, send '0001

0 Kudos

hi kris ,

your answer is helpfull but how to append apostrophy into a matnr.

we tried to assign the apostrophy to a character and when we tried to append it gave some error can you kindly give one line of program of how to append for this.it will be very helpfull.

0 Kudos

Hi gokul,

1. First of all, the internal table which contains the field for MATNR,

should have length 1 extra (for apostrophe)

2. Then after assigning matnr value to the field,

3. we can use like this

concatenate <b>`'`</b> itab-matnr into itab-matnr.

where ` = the key to the left of 1

regards,

amit m.

0 Kudos

Hi Gokul,

First define your matnr as Char(19) since actual matnr is char(18) and we need one more space to append the apostrophe

then populate your data, then add this

loop at itab.
  concatenate '''' itab-matnr into itab-matnr.
  modify itab.
endloop.

Note that '''' is the escape sequence for '

0 Kudos

Amit,

It is ' (left of Enter in most keyboards) and not ` (left of 1)

if we put ` (left of 1) then that will show in the output as well

Former Member
0 Kudos

Hi gokul,

1. GUI_DOWNLOAD

always creates a TEXT File

whether we give extension .TXT or .XLS

2. Microsoft excel automatically detects the type of file,

whether it is .txt or xls

and opens accordingly.

3. In excel, by default, the numbers are always right aligned,

so it shows right.

We cannot control the alighment directly from gui_download,

bcos the format of file is always text,

and microsoft excel.

regards,

amit m.

Former Member
0 Kudos

pass the parameter FILETYPE as DBF in GUI_DOWNLOAD Function module and checkout if it works

former_member189059
Active Contributor
0 Kudos

is your doubt solved ?