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: 

FM: GUI_DOWNLOAD not picking initial zero

Former Member
0 Kudos
524

Hi Experts,

I am using FM : GUI_DOWNLOAD for downloading material Master to PC...but material number is downloaded without initial zero's...like

if Meterial number is : 005646 and 00012AP00...Then it is downloaded as :

5645 and 00012AP0 ( this number is downloaded as it is because it is alpha numeric )

Please advice :

I have searched SDN many of them have commented to concatenate material number with special characteristics...but I can't go with this because..after downloading user will upload the same ..so it will be big probs.

Please advice.

Karthik.R

1 ACCEPTED SOLUTION

former_member925838
Participant
0 Kudos
166

Hi Karthik,

Use ''CONVERSION_EXIT_MATN1_INPUT" before you use the material no in program.

pass your material no which is downloaded through GUI_download to this function module, it will return you material no attached with leading zeros.

Regards,

Amar

10 REPLIES 10

former_member925838
Participant
0 Kudos
167

Hi Karthik,

Use ''CONVERSION_EXIT_MATN1_INPUT" before you use the material no in program.

pass your material no which is downloaded through GUI_download to this function module, it will return you material no attached with leading zeros.

Regards,

Amar

0 Kudos
166

Thank you...I shall try it

0 Kudos
166

Hi Amar,

I tried FM ''CONVERSION_EXIT_MATN1_INPUT" and all other Conversion exit availble but its not working...still when I download initial zero is not comming for matnr in excel,

Please avice

0 Kudos
166

Hi Karthik,

If you download the data in a text file then you will get the initial zeroes. To open it and view in excel you will have to do the following:

1. Open excel and convert your existing worksheet into text mode (right click --> Format cells --> text mode)

2. Copy the data from the downloaded text file.

3. Save this in excel (text mode worksheet).

Regards,

Pranav.

0 Kudos
166

Hi Pranav,

Thanks a lot...!!

I recommended the solution ...but I read that it is possible with OLE format.is it ?

0 Kudos
166

Hi Karthik,

The problem you're facing is not because of SAP. As you have seen that the file downloaded in text mode has the initial zeroes. The issue is actually with excel which automatically removes initial zeroes. So, using OLE will not serve any purpose.

What you can do is try some settings/options in excel which might allow initial zeroes.

Regards,

Pranav.

Former Member
0 Kudos
166

without adding ' before the zeros you cannot show 000 is excel..

well, if anyways users are going to upload the same excel, you can always gofor conversion exit while UPLOADing the file, any problem with that?

Former Member
0 Kudos
166

Hi Karthik,

I think this should not be a problem. Though it downloads without leading zeros, while uploading again you can use conversion exit to append the leading zeros. So it will not be a problem while uploading.

Hope it helps.

Thanks & Regards,

Praveenkumar T.

Former Member
0 Kudos
166

Hi Karthik,

You have to check Material value in 2 ways.

First you check the value in debug mode, the material value comes with leading zeroes or not.

1. if it comes with zeroes then you do settings in excel format. (Format cells -> Text)

2. if its not come with zeroes then you use FM Conversion_Exit -


to download with zeroes.

please check......surely u will get output.

Former Member
0 Kudos
166

Hi Karthik,

The problem you are facing is due to property of excel.

You have one solution: Just make the material number field value as : " '005646 " and " '00012AP00 ".

If you add one ( ' ) the excel will read it as text mode and you can get the initial zeroes.

But you have to add this to complete table before passing the table to GUI_DOWNLOAD.

Reagrds,

Ganesh.