‎2007 Jul 05 7:53 AM
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.,
‎2007 Jul 05 8:02 AM
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
‎2007 Jul 05 7:59 AM
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
‎2007 Jul 05 8:02 AM
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
‎2007 Jul 05 9:14 AM
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
‎2007 Jul 05 9:26 AM
Hi,
you should define the fields as type char , you will store the same values in it.
Regards.
‎2011 Jul 06 11:12 AM
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