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: 

Timestamp problem.

Former Member
0 Kudos

HI all,

I am using timestamp.

here iam paste my code what iam writen.

data: v_filename type string,

v_date(12),

v_time(12).

write sy-datum to v_date dd/mm/yyyy.

write sy-uzeit to v_time using edit mask '__:__:__'.

concatenate 'bph.TXT' v_date v_time into v_filename separated by space.

  • concatenate v_date v_time name into p_condatetime separated BY ','.

*

*data: bph(30) type c.

*move p_condatetime to bph.

ENDFORM. " concat_datetime

&----


*& Form file_download

&----


  • Download the file from Application/Presentation Server

----


FORM file_download.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

FILENAME = 'H:\v_filename'

FILETYPE = 'ASC'

TABLES

DATA_TAB = it_final_flat[]

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.

After concatenate time date and my file path comes to "v_filename".

i am FM "GUI_DOWNLOAD" there i can give file name .

here actually i face problem

when i excu my prog what ever i gave file name that file name is save to our presentation server .at the time i want to display time and date and same file path name,again i run the prog this time (same date) time diff i want same file name ,same date and diff time save data to presentation server.

where can we pass the " v_filename".

Regards,

kris.

wh

6 REPLIES 6

former_member223537
Active Contributor
0 Kudos

data: v_filename type string,

v_date(12),

v_time(12).

write sy-datum to v_date dd/mm/yyyy.

write sy-uzeit to v_time using edit mask '__:__:__'.

<b>concatenate 'bph.TXT' v_date v_time into v_filename.

CONCATENATE 'H:\" v_filename into v_filename_new.</b>

*data: bph(30) type c.

*move p_condatetime to bph.

ENDFORM. " concat_datetime

&----


*& Form file_download

&----


  • Download the file from Application/Presentation Server

----


FORM file_download.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

<b>FILENAME = v_filename_new</b>

FILETYPE = 'ASC'

TABLES

DATA_TAB = it_final_flat[]

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.

0 Kudos

Hi prashant,

i write this

CONCATENATE 'H:\" v_filename into v_filename_new.

and i pass to file name to FM v_filename_new.

i got error v_filename_new is unknown.its is one of the specified table nor define by "data"statemet.

plz it's very urgent for me prashant.

Regards,

Kris.

Former Member
0 Kudos

Hi,

concatenate 'bph' v_date v_time into v_filename separated by space.

concatenate v_filenmae '.TXT' into v_filename.

Regards

Sudheer

Former Member
0 Kudos

Hi,

You need to declare that field, Declare it as String and then do the cancatenate

Regards

Sudheer

former_member223537
Active Contributor
0 Kudos

Data : V_Filename_new type string.

0 Kudos

Hi prasanth,and sudeer,

ya i Declare v_filename_new

but problem is i gave file name " v_filename_new". its download and save .howe can we see the file name .

Regards,

Kris.