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

Again

Former Member
0 Likes
562

Hi,

I have the below code:

FORM display_log .

LOOP AT t_msg INTO wa_msg.

IF wa_msg-type = c_s.

After this if I want to download a file by passing the internal table t_msg ...please tell me how to do down load into presentation server???

ENDIF.

ENDLOOP.

1 ACCEPTED SOLUTION
Read only

amit_khare
Active Contributor
0 Likes
536

Call GUI_DOWNLAOD FM here.

4 REPLIES 4
Read only

amit_khare
Active Contributor
0 Likes
537

Call GUI_DOWNLAOD FM here.

Read only

former_member386202
Active Contributor
0 Likes
536

Hi,

Do like this

LOOP AT t_msg INTO wa_msg.

IF wa_msg-type NE c_s.

delete t_msg.

endif.

endloop.

then use fm GUI_DOWNLOAD to download the data from Internal table

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

  • BIN_FILESIZE =

filename = p_path

filetype = 'ASC'

  • APPEND = ' '

write_field_separator = 'X'

  • HEADER = '00'

  • TRUNC_TRAILING_BLANKS = ' '

  • WRITE_LF = 'X'

  • COL_SELECT = ' '

  • COL_SELECT_MASK = ' '

  • DAT_MODE = ' '

  • CONFIRM_OVERWRITE = ' '

  • NO_AUTH_CHECK = ' '

  • CODEPAGE = ' '

  • IGNORE_CERR = ABAP_TRUE

  • REPLACEMENT = '#'

  • WRITE_BOM = ' '

  • TRUNC_TRAILING_BLANKS_EOL = 'X'

  • WK1_N_FORMAT = ' '

  • WK1_N_SIZE = ' '

  • WK1_T_FORMAT = ' '

  • WK1_T_SIZE = ' '

  • IMPORTING

  • FILELENGTH =

TABLES

data_tab = it_final

  • FIELDNAMES =

  • 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

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Regards,

pRashant

Read only

Former Member
0 Likes
536

hi

good

i would suggest you to use the open dataset and close dataset to upload file into the presentation server.

go through this link

http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ca6358411d1829f0000e829fbfe/content.htm

reward point if helpful.

thanks

mrutyun^

Read only

0 Likes
536

Thank you all guys for the reply,

Can you please suggest me for the below:

I have matnr,vkorg n vtweg in my flat file as below values:

3213332 1000 01

but before this line I want MATNR VKORG VTWEG as header line.....before uploading the file...

please suggest me how can I give in my code before calling GUI_UPLOAD Fm.