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

Problem with export ALV to XLS spreadsheet

Former Member
0 Likes
3,400

Dear ABAP Gurus,

I have problem with exporting ALV to spreadsheet at DMBTR field.

The ALV already shows the right amount, but when I'm exporting to XLS spreadsheet, it always divide by 100.

(Menu --> Export --> List --> Spreadsheet --> Excel (MHML) or Menu --> Export --> List --> Spreadsheet --> Excel (Excel in Office 2003 format))

I've already hard coded the field catalog currency with the currency used (IDR). I've also set the field refference to BSIS-DMBTR.

Are there any step that I missed ?

Thx in Adv

Rgds,

-g-

Dear ABAP Gurus,

I have problem with exporting ALV to spreadsheet at DMBTR field.

The ALV already shows the right amount, but when I'm exporting to XLS spreadsheet, it always divide by 100.

(Menu --> Export --> List --> Spreadsheet --> Excel (MHML) or Menu --> Export --> List --> Spreadsheet --> Excel (Excel in Office 2003 format))

I've already hard coded the field catalog currency with the currency used (IDR). I've also set the field refference to BSIS-DMBTR.

Are there any step that I missed ?

Thx in Adv

Rgds,

-g-

11 REPLIES 11
Read only

Former Member
0 Likes
2,334

can you check with the user setting if separators are displayed with "." rather than "," . this might be the reason.

Nafran

Read only

Former Member
0 Likes
2,334

Hey ,

check out the setting/rules applied to your spreadsheet/excel. Program has nothing wrong in it. Its with respect to your excel.

try doing the manual entry of same data in excel and see what it does.

Hope this is helpful.

Regards,

Uma Dave

Read only

0 Likes
2,334

Hi Nafran Shiraz & UmaDave,

Thanks for the fast reply.

@Nafran

I've already checked and changed setting with both '.' and ','. But the result still same.

@UmaDave

I've just run KE24, tried to export standar SAP ALV report.

If I export xls with this report, the amount didn't devide by 100.

So I assume, there aren't wrong with Excel setting.

Thx

Rgds,

-g-

Read only

0 Likes
2,334

Okey ..

please see any conversion routine attached to the dataelement of that field ?

Regards,

Uma Dave

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
2,334

This is because IDR has no decimals defined. But if you have passed the "currency" value to the currency reference field it should not be a problem.

BR,

Suhas

Read only

Former Member
0 Likes
2,334

Hi now i remember this issue this is coz of the currency. I remember i had this issue when it was Japanese where it was divided from 1000. there is a table for currency field the value is devised by the amount of cents information on that table. please check on TCURX for INR

Read only

0 Likes
2,334

Hi Dave, Suhas, & Nafran.

Sory for the late respond.

@Dave

data element DMBTR are DMBTR itself with domain WERT7

I don't see any conversion routine in that data element.

@Suhas & Nafran.

Yes, it's true that "IDR" doesn't have decimal.

But still I couldn't resolve with this problem.

Below are code that i used.

31 'DMBTR2' 'DMBTR' 'BSIS' space '15'  space  'Variance' 'Variance' 'Variance' 'Variance' 'Variance' space space space 'IDR' space space t_fieldcat,

and the set_fieldcat are below.

p_colpos
      p_fieldname
      p_ref_fieldname
      p_ref_tabname
      p_outputlen
      p_noout
      p_seltext_m 
      p_seltext_l 
      p_seltext_s 
      p_reptext_ddic 
      p_ddictxt
      p_hotspot 
      p_showasicon 
      p_checkbox 
      p_edit
      p_curr 
      p_dtype 
      p_dosum
      t_fieldcat

Are there any wrong in my code?

Thx in adv,

Rgds,

-g-

Read only

Former Member
0 Likes
2,334

Hi,

try to use excel-inplace in ALV.

Regards, Dieter

Read only

0 Likes
2,334

Hi Dieter,

I've tried excel in-place. But when i run it, the excel are blank.

Thx in adv

Rgds,

-g-

Read only

0 Likes
2,334

hi gaantz,

this question is marked as answered,

can i know the solution please?

Read only

0 Likes
2,334

I have same issue, the program runs on my user is still divided by 100, but in my laptop the amount is correct.

I think it's cause by currency setting in self computer.

The setting in my laptop is:

Hope this solved your problem. Thanks.