Skip to Content
3
Former Member
Jul 09, 2007 at 08:47 PM

TCURR-GDATU

263 Views

Hi all,

I created a download program for exchange currency rates(tcurr), i'm getting the tcurr-gdatu format in the file, but my client need the file with normal date format , my logic is

DATA: BEGIN OF itab OCCURS 0, "Input / Output File

kurst LIKE tcurr-kurst, "Exchange Rate Type

fcurr LIKE tcurr-fcurr, "From Currency

tcurr LIKE tcurr-tcurr, "To Currency

gdatu LIKE tcurr-gdatu, "Effective Date

ukurs(11) TYPE c, "Exchange Rate

ffact(11) TYPE c, "From Factor

tfact(11) TYPE c, "To Factor

END OF itab.

FORM select_data.

SELECT * FROM tcurr WHERE kurst IN s_kurst

AND fcurr IN s_fcurr

AND tcurr IN s_tcurr.

*

  • MOVE-CORRESPONDING tcurr TO itab.

write: tcurr-kurst to itab-kurst, "Exchange Rate Type

tcurr-fcurr to itab-fcurr, "From Currency

tcurr-tcurr to itab-tcurr, "To Currency

tcurr-gdatu to itab-gdatu , "Effective Date

tcurr-ukurs to itab-ukurs, "Exchange Rate

tcurr-ffact to itab-ffact, "From Factor

tcurr-tfact to itab-tfact. "To Factor

APPEND itab.

CLEAR itab.

ENDSELECT.

ENDFORM. " SELECT_DATA

FORM download_source_file.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

filename = w_file

filetype = 'ASC'

TABLES

data_tab = itab

EXCEPTIONS

file_write_error = 1

no_batch = 2

gui_refuse_filetransfer = 3

invalid_type = 4

no_authority = 5

unknown_error = 6

header_not_allowed = 7

separator_not_allowed = 8

filesize_not_allowed = 9

header_too_long = 10

dp_error_create = 11

dp_error_send = 12

dp_error_write = 13

unknown_dp_error = 14

access_denied = 15

dp_out_of_memory = 16

disk_full = 17

dp_timeout = 18

file_not_found = 19

dataprovider_exception = 20

control_flush_error = 21

OTHERS = 22.

  • End CDSK904243

CASE sy-subrc.

WHEN '0'.

WHEN '1'.

MESSAGE e023(zh).

WHEN OTHERS.

MESSAGE e026(zh).

ENDCASE.

ENDFORM. " DOWNLOAD_SOURCE

so please any body let me know how to correct this issue, advance thanks for your help