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: 

download a value

Former Member
0 Kudos

Hi,

When we download a value like 12.300 from SAP into an excel sheet, in the excel sheet the value is downloaded as 12.3. It is wrong and it should be 12300. In SAP '.' is considered as comma and ',' is conidered as decimal point.

How can we download the same into excel sheet without losing the zeros like 12300 instead of 12.3.

I cannot change the user profile setting. it is client specific.

Thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Abishek,

A small help from my side will be ..

Any how you will have a internal table with values to be downloaded.

Loop at the Internal table , take the field with value 12.300.

Replace the Dot with Sapce and Condense the Field and modify the Original internal table with modified value.

Simillarly you can do Replace Command for Comma also ..

for example

data str(5) value '34,45'.

REPLACE ',' WITH '' into str.

condense str no-gaps.

write str.

one more eg

DATA : v_text(4) value ', '.

Data : v_str type string.

string = 'This is, one, of the, demo, of, translate,statement'.

TRANSLATE v_str USING v_text.

Here v_text contain the pattern in which you want to covert the string . so in this example all the , are replace by space.

Reward points,if useful.

3 REPLIES 3

Former Member
0 Kudos

Hi Abhishek,

May be you can change the value manually before downloading..

Regards,

Karuna.

Former Member
0 Kudos

hi abhishek,

check this notes,

Many SAP reports have direct download function to EXCEL.

SAP Query and SAP QuickViewer are excellent tools for Downloading (BvdR AO).

Transaction SE16N allows you to access any sap table and download result to Excel

SAP RFC functions can be called directly from Excel / VBA.

Use transaction BAPI in SAP to find your business object and study the function.

If you know the SAP table the RFC RFC_READ_TABLE offers a SQL query of the table

Trouble is .. you can not use joins here. you have to put the join in as a query in the SAP database and use the query in RFC_READ_TABLE

To upload data from Excel into SAP:

Some of the Business functions (BAPI's / RFC unctions) offer data upload

The general tool in SAP for data upload is the Batch input / call transactions

In the batch input file you specify screen by screen and field by field the input to SAP. SAP has a recorder to create the sample file. Just run trans SHDB and within this trans you run a case of the changes you want to do. On exit of the trans you will have a batch input file that you can download and from excel manipulate the file before you call the RFC function RFC_CALL_TRANSACTION.

Former Member
0 Kudos

Hi Abishek,

A small help from my side will be ..

Any how you will have a internal table with values to be downloaded.

Loop at the Internal table , take the field with value 12.300.

Replace the Dot with Sapce and Condense the Field and modify the Original internal table with modified value.

Simillarly you can do Replace Command for Comma also ..

for example

data str(5) value '34,45'.

REPLACE ',' WITH '' into str.

condense str no-gaps.

write str.

one more eg

DATA : v_text(4) value ', '.

Data : v_str type string.

string = 'This is, one, of the, demo, of, translate,statement'.

TRANSLATE v_str USING v_text.

Here v_text contain the pattern in which you want to covert the string . so in this example all the , are replace by space.

Reward points,if useful.