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

download problem

Former Member
0 Likes
738

HI all,

i am unable to download alv output to local file.It is giving dump.

In my output some of them are currency fields and they are packed numbers.

in the dump it is saying only char types are allowed. but i saw some of the reports have currency fields and it is downloaded to local file.

i am unable to find the difference.

can any body please suggest where i am doing the mistake.

PS:Prompt replys will be rewarded.

Thanks<

CS Reddy.,

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
695

Hi Reddy,

How are you donloading into local file, throgh program or through the standard SAP. Which file format you are using for downlaod?

Regards,

Atish

5 REPLIES 5
Read only

Former Member
0 Likes
695

Hi,

a short excample how you can work with all fields.

READ TABLE ld_fieldtab BINARY SEARCH WITH KEY

tabname = ld_tabname

fieldname = ld_fieldcat_wa-fieldname.

IF sy-subrc IS INITIAL.

CLEAR ld_sema.

ld_sema-col_no = ld_column. " Spalte auf Screen

ld_sema-col_src = ld_fieldtab-position. " Position in itab

CASE ld_fieldtab-inttype.

WHEN 'Z'.

ld_sema-col_typ = 'NUM'.

ld_sema-col_ops = 'AVG'.

WHEN 'C'.

ld_sema-col_typ = 'STR'.

ld_sema-col_ops = 'NOP'.

WHEN 'X'.

ld_sema-col_typ = 'STR'.

ld_sema-col_ops = 'NOP'.

WHEN 'T'.

ld_sema-col_typ = 'STR'.

ld_sema-col_ops = 'NOP'.

WHEN 'P'.

ld_sema-col_typ = 'NUM'.

ld_sema-col_ops = 'ADD'.

WHEN 'F'.

ld_sema-col_typ = 'NUM'.

ld_sema-col_ops = 'ADD'.

WHEN 'I'.

ld_sema-col_typ = 'NUM'.

ld_sema-col_ops = 'ADD'.

WHEN 'N'.

ld_sema-col_typ = 'STR'.

ld_sema-col_ops = 'NOP'.

WHEN 'D'.

ld_sema-col_typ = 'DAT'.

ld_sema-col_ops = 'NOP'.

WHEN OTHERS.

ld_sema-col_typ = 'STR'.

ld_sema-col_ops = 'NOP'.

ENDCASE.

IF ld_fieldtab-datatype = 'CURR'.

READ TABLE ld_fieldtab WITH KEY

datatype = 'CUKY'.

ld_sema-col_cur = ld_fieldtab-position.

ENDIF.

regards

Nicole

Read only

Former Member
0 Likes
696

Hi Reddy,

How are you donloading into local file, throgh program or through the standard SAP. Which file format you are using for downlaod?

Regards,

Atish

Read only

Former Member
0 Likes
695

Hi,

In your data table add additional char fields which stores the same values from packed fields in string format. In the field catalog replace the packed fields with the new ones.

For sure is not the best solution, but it should work.

which is the dump message?

Bogdan

Read only

dev_parbutteea
Active Contributor
0 Likes
695

Hi,

you should define the fields as type char , you will store the same values in it.

Regards.

Read only

0 Likes
695

Thanks... Closing the thread..

Moderator message : It is not mandatory to put remarks while closing old questions (unless it add some value to the thread, like the solution used for resolving the problem). This brings the old threads to the top of current list.

Edited by: Vinod Kumar on Jul 6, 2011 3:54 PM